/* Fluid balance simulator. Shares the ce-* scenario classes with the escalation simulator. */
.ce-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ce-cases{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.ce-case{display:flex;flex-direction:column;gap:6px;text-align:left;background:var(--white);border:1px solid var(--border);border-top:3px solid #a88a4d;border-radius:12px;padding:16px 18px;cursor:pointer;font:inherit;color:inherit}
.ce-case:hover,.ce-case:focus-visible{background:#f6f9f5;outline:none;box-shadow:0 0 0 3px #a1783640}
.ce-case[aria-pressed=true]{border-color:var(--teal);border-top-color:var(--teal);box-shadow:0 0 0 2px var(--teal)}
.ce-case strong{font-family:'Fraunces',Georgia,serif;font-weight:400;font-size:20px;color:var(--teal)}
.ce-case span{font-size:13.5px;color:var(--muted)}
.ce-case em{font-style:normal;font-size:12px;color:#76613c;font-weight:600}
.ce-play{margin-top:18px}
.ce-play h3{font-size:26px;margin:4px 0 8px}
.ce-when{font:700 12px 'DM Sans',Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#76613c;margin:0}
.ce-step{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.ce-opts{display:grid;gap:8px;margin:14px 0 0}
.ce-opt{display:flex;gap:12px;align-items:flex-start;text-align:left;border:1px solid #c9d5cb;background:#fff;border-radius:10px;padding:12px 14px;font:inherit;font-size:14.5px;cursor:pointer;color:var(--ink);min-height:44px}
.ce-opt:hover{background:#f6f9f5}.ce-opt:disabled{cursor:default}
.ce-opt b{flex:0 0 26px;height:26px;border-radius:50%;background:var(--teal-pale);color:var(--teal);text-align:center;line-height:26px;font-size:13px}
.ce-opt.chosen{border-width:2px;border-color:var(--teal)}
.ce-opt.best{background:#eaf2ec;border-color:#5f9a83}
.ce-opt.best b{background:var(--teal);color:#fff}
.ce-fb{border-radius:12px;padding:16px 18px;margin:14px 0 0;font-size:14.5px;background:#f6f8f4;border:1px solid var(--border)}
.ce-fb h4{margin:0 0 6px!important;font:600 16px 'DM Sans',Arial,sans-serif!important;letter-spacing:0!important;text-transform:none!important;color:var(--ink)!important}
.ce-fb p{margin:0 0 8px}
.ce-note{background:#f5efdf;color:#5a4a2a;border-radius:8px;padding:10px 14px;font-size:13.5px;margin:12px 0}
.ce-err{color:#8a3b2c;font-size:13px;margin:8px 0 0}
.ce-chartcap{font-size:12.5px;color:var(--muted);margin:8px 2px 0}
.ce-script{list-style:none;margin:0;padding:0;counter-reset:s}
.ce-script li{counter-increment:s;position:relative;padding:10px 0 10px 40px;border-top:1px solid #edf1ec;font-size:15px}
.ce-script li:first-child{border-top:0}
.ce-script li::before{content:counter(s);position:absolute;left:0;top:10px;width:26px;height:26px;border-radius:50%;background:#f3ead4;color:#6c5428;text-align:center;line-height:26px;font-size:13px;font-weight:700}
.ce-ev{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.ce-ev div{background:var(--white);border:1px solid var(--border);border-radius:12px;padding:18px 20px;font-size:14.5px}
.ce-ev strong{display:block;font:400 22px 'Fraunces',Georgia,serif;color:var(--teal);margin-bottom:6px;line-height:1.2}
.fb-mode{margin:14px 0}
.fb-h{margin:0 0 8px!important;font:400 22px 'Fraunces',Georgia,serif!important;color:var(--teal)!important;letter-spacing:0!important;text-transform:none!important}
.fb-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:12px;background:var(--white);max-height:70vh;overflow-y:auto}
.fb-wrap:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.fb-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1080px;font-size:13.5px;font-variant-numeric:tabular-nums;color:var(--ink)}
.fb-table th,.fb-table td{padding:6px 8px;border-bottom:1px solid var(--border);text-align:right;white-space:nowrap}
.fb-table thead th{position:sticky;top:0;background:var(--teal-pale);color:var(--teal);font-weight:600;text-align:center;z-index:2}
.fb-table thead tr:nth-child(2) th{top:31px}
.fb-table tbody th,.fb-table tfoot th{position:sticky;left:0;background:var(--white);text-align:left;font-weight:600;z-index:1}
.fb-table thead tr:first-child th:first-child{left:0;z-index:3}
.fb-table .fb-gap{border-left:2px solid var(--border)}
.fb-table .fb-run{background:rgba(127,127,127,.07);font-weight:600}
.fb-table .fb-note{text-align:left;white-space:normal;min-width:220px;color:var(--muted);font-size:12.5px}
.fb-table tfoot td,.fb-table tfoot th{border-top:2px solid var(--teal);font-weight:700;background:var(--teal-pale);color:var(--ink)}
.fb-table tbody tr.fb-spot th,.fb-table tbody tr.fb-spot td{background:#fff4b8;color:#4d4100}
.fb-bal.positive::before{content:"▲ ";font-size:10px}.fb-bal.negative::before{content:"▼ ";font-size:10px}
.fb-addform{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-top:12px}
.fb-answers{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
@media(max-width:1000px){.ce-step{grid-template-columns:1fr}}
@media screen{
  html[data-theme="dark"] body.renovated .fb-table tbody tr.fb-spot th,
  html[data-theme="dark"] body.renovated .fb-table tbody tr.fb-spot td{background:#3d3816;color:#f3e8a6}
  html[data-theme="dark"] body.renovated .ce-case em,
  html[data-theme="dark"] body.renovated .ce-when{color:var(--gold)}
  html[data-theme="dark"] body.renovated .ce-opt{background:var(--white);color:var(--ink);border-color:var(--border)}
  html[data-theme="dark"] body.renovated .ce-script li{border-color:var(--border)}
  html[data-theme="dark"] body.renovated .ce-err{color:#f0a593}
}
@media print{.fb-wrap{max-height:none;overflow:visible}.fb-table{min-width:0;font-size:9pt}.fb-add,.fb-mode,.ce-cases{display:none!important}}
/* v2: practice mode fills the chart itself */
.fb-practice-only{display:none}
.fb-is-practice .fb-practice-only{display:block}
.fb-is-practice .st-actions.fb-practice-only{display:flex}
.fb-asyougo{display:none;align-items:center;gap:10px;margin:0 0 12px;font-size:14.5px;min-height:44px;cursor:pointer}
.fb-is-practice .fb-asyougo{display:flex}
.fb-asyougo input{accent-color:var(--teal);width:22px;height:22px;margin:0}
.fb-table.fb-practice{min-width:1240px}
.fb-table td.fb-fill{padding:4px 6px;position:relative;min-width:104px}
.fb-cellwrap{display:flex;align-items:center;gap:4px;justify-content:flex-end}
.fb-table .fb-fill input{width:100%;min-width:64px;max-width:96px;min-height:40px;padding:6px 8px;border:1px solid #9fb3a6;border-radius:6px;background:#fff;color:var(--ink);font:inherit;font-variant-numeric:tabular-nums;text-align:right}
.fb-table .fb-fill input:focus{outline:3px solid var(--teal);outline-offset:1px}
.fb-sign{flex:0 0 34px;min-height:40px;border:1px solid #9fb3a6;border-radius:6px;background:var(--teal-pale);color:var(--teal);font:700 16px 'DM Sans',Arial,sans-serif;cursor:pointer;padding:0}
.fb-mark{position:absolute;top:2px;left:4px;font-size:12px;font-weight:700;line-height:1}
.fb-ans{display:block;font-size:11.5px;font-weight:700;text-align:right;min-height:0}
.fb-fill.ok{background:#e3f1e8!important}.fb-fill.ok input{border-color:#2f7a55;border-width:2px}.fb-fill.ok .fb-mark{color:#1f6b45}
.fb-fill.bad{background:#fbe3de!important}.fb-fill.bad input{border-color:#b0392a;border-width:2px}.fb-fill.bad .fb-mark,.fb-fill.bad .fb-ans{color:#8a2a1d}
.fb-fill.empty .fb-ans{color:var(--muted)}
.fb-hint{min-height:1.5em;font-size:14px;margin:10px 0 0;padding:0}
.fb-hint:not(:empty){background:var(--teal-pale);border-radius:8px;padding:10px 14px;color:var(--ink)}
.fb-table thead tr:first-child th.fb-timehead{position:sticky;left:0;z-index:4}
@media(max-width:700px){.fb-table tbody th,.fb-table tfoot th{min-width:62px;box-shadow:2px 0 0 var(--border)}}
@media screen{
  html[data-theme="dark"] body.renovated .fb-table .fb-fill input{background:#10201b;color:var(--ink);border-color:#5d7a6b}
  html[data-theme="dark"] body.renovated .fb-fill.ok{background:#1f4d36!important}
  html[data-theme="dark"] body.renovated .fb-fill.ok .fb-mark{color:#9be0b9}
  html[data-theme="dark"] body.renovated .fb-fill.ok input{border-color:#6fcf9b}
  html[data-theme="dark"] body.renovated .fb-fill.bad{background:#6b2b22!important}
  html[data-theme="dark"] body.renovated .fb-fill.bad .fb-mark,html[data-theme="dark"] body.renovated .fb-fill.bad .fb-ans{color:#ffb4a6}
  html[data-theme="dark"] body.renovated .fb-fill.bad input{border-color:#f08b78}
}
.fb-table.fb-practice{min-width:1010px}
.fb-table.fb-practice thead tr:nth-child(2) th{white-space:normal;line-height:1.2}
.fb-table.fb-practice th,.fb-table.fb-practice td{padding-left:5px;padding-right:5px}
.fb-table.fb-practice .fb-note{min-width:140px}
.fb-table.fb-practice td.fb-fill{min-width:96px}
/* Totals sit inside their intake / output groups, like a paper chart */
.fb-table .fb-tot{border-left:1px dashed var(--border);background:rgba(127,127,127,.07)}
.fb-table thead th.fb-tot,.fb-table thead th.fb-balcol{font-weight:700}
.fb-table thead small{font-weight:400;font-size:11px}
.fb-table .fb-balcol{border-left:2px solid var(--teal)!important}
.fb-table.fb-practice{min-width:1060px}
.fb-table thead th.fb-tot,.fb-table thead th.fb-balcol{background:var(--teal-pale)}
