/* Ported from q. Scoped under .w-cashflow; legacy tokens aliased to the unified token contract. */
.w-cashflow { --ink:var(--text);--muted:var(--text-2);--ui:var(--text-3);--surface2:var(--surface-2);--inset:var(--surface-3);--cta:var(--accent);--cta-hover:var(--accent-hover);--cta-ink:var(--accent-ink);--med:var(--text);--scn:var(--c1);--base:var(--text-3);--risk:var(--bad-text);--risk-bg:var(--bad-soft);--good:var(--good-text);--good-bg:var(--good-soft);--warn:var(--warn-text);--warn-bg:var(--warn-soft);--shadow:var(--shadow-1);--r:var(--radius); }
.w-cashflow .ck{background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.w-cashflow .ck-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s3);padding:var(--s3) var(--s5);border-bottom:1px solid var(--line);background:var(--surface2)}
.w-cashflow .ck-bar h2, .w-cashflow .ck-bar .ck-title{font-size:.9375rem;font-weight:700;margin:0;letter-spacing:-.01em}
.w-cashflow .ck-bar .sp{flex:1}
.w-cashflow .ck-grid{display:grid;grid-template-columns:minmax(260px,290px) minmax(0,1fr) minmax(330px,360px)}
.w-cashflow .ck-col{padding:var(--s4) var(--s5);min-width:0}
.w-cashflow .ck-ctl{border-right:1px solid var(--line);background:color-mix(in srgb,var(--inset) 40%,var(--surface))}
.w-cashflow .ck-delta{border-left:1px solid var(--line);background:color-mix(in srgb,var(--inset) 40%,var(--surface))}
.w-cashflow .ck-h .chip{white-space:nowrap}
.w-cashflow .ck-h{font-size:.75rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin:0 0 var(--s3);display:flex;justify-content:space-between;align-items:center;gap:var(--s2)}
.w-cashflow .presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:var(--s4)}
.w-cashflow .presets .pre{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;border-radius:10px;padding:8px 10px;min-height:56px;gap:2px;line-height:1.25}
.w-cashflow .presets .pre .h{font-size:.75rem;font-weight:500;color:var(--muted)}
.w-cashflow .presets .pre[aria-pressed="true"] .h{color:inherit;opacity:.85}
.w-cashflow .pre{font:600 .8125rem var(--font);min-height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--ui);background:var(--surface);color:var(--ink);cursor:pointer}
.w-cashflow .pre:hover{background:var(--surface2)}
.w-cashflow .pre[aria-pressed="true"]{background:var(--ink);color:var(--surface);border-color:var(--ink);box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--ink)}
.w-cashflow .ctl{margin-bottom:var(--s4)}
.w-cashflow .ctl-h{display:flex;justify-content:space-between;align-items:baseline;gap:var(--s2);margin-bottom:var(--s2)}
.w-cashflow .ctl label, .w-cashflow .ctl .lbl{font-size:.9375rem;font-weight:600;line-height:1.3}
.w-cashflow .ctl output{font-size:.9375rem;white-space:nowrap}
.w-cashflow .ctl output.mv{color:var(--scn)}
.w-cashflow .ctl-n{font-size:.8125rem;color:var(--muted);margin:2px 0 0;line-height:1.4}
.w-cashflow .rng{position:relative;padding:8px 0}
.w-cashflow .rng .bm{position:absolute;top:9px;width:2px;height:22px;background:var(--ink);opacity:.55;border-radius:1px;pointer-events:none;transform:translateX(-1px)}
.w-cashflow .rng-t{display:flex;justify-content:space-between;font-size:.8125rem;color:var(--muted);margin-top:2px}
.w-cashflow .sw{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);padding:var(--s3);border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:var(--s5)}
.w-cashflow .sw .lbl{font-weight:600;font-size:.9375rem;display:block}
.w-cashflow .sw .sub{font-size:.8125rem;color:var(--muted)}
.w-cashflow .tgl{position:relative;width:52px;height:32px;border-radius:16px;border:2px solid var(--ui);background:var(--surface2);cursor:pointer;flex:none;padding:0}
.w-cashflow .tgl::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--ui);transition:transform .15s}
.w-cashflow .tgl[aria-checked="true"]{background:var(--scn);border-color:var(--scn)}
.w-cashflow .tgl[aria-checked="true"]::after{transform:translateX(20px);background:var(--surface)}
.w-cashflow .adv{border-top:1px solid var(--line);padding-top:var(--s4);margin-top:var(--s2)}
.w-cashflow .adv summary{cursor:pointer;font-weight:650;font-size:.9375rem;min-height:32px;display:flex;align-items:center}
.w-cashflow .adv .ctl:first-of-type{margin-top:var(--s4)}
.w-cashflow .chk{display:flex;gap:10px;align-items:flex-start;font-size:.875rem;margin-bottom:var(--s2)}
.w-cashflow .chk input{width:20px;height:20px;margin:2px 0 0;accent-color:var(--scn);flex:none}
.w-cashflow .kpis{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:var(--s3);margin-bottom:var(--s4)}
.w-cashflow .kpi{border:1px solid var(--line);border-radius:10px;padding:var(--s3) var(--s4);background:var(--surface);min-width:0}
.w-cashflow .kpi{transition:border-color .12s,background .12s}
.w-cashflow .kpi:hover{border-color:var(--scn);background:var(--surface2)}
.w-cashflow .kpi.lead{border-color:var(--scn);box-shadow:inset 0 0 0 1px var(--scn)}
.w-cashflow .kpi .k{font-size:.8125rem;font-weight:600;color:var(--muted);display:flex;justify-content:space-between;gap:6px}
.w-cashflow .kpi .v{font-family:var(--font);font-weight:700;font-size:1.625rem;letter-spacing:-.025em;line-height:1.25;margin:2px 0;font-variant-numeric:tabular-nums}
.w-cashflow .kpi.lead .v{font-size:2.125rem}
.w-cashflow .kpi .r{font-size:.8125rem;color:var(--muted)}
.w-cashflow .kpi .b{font-size:.8125rem;color:var(--muted);margin-top:2px}
.w-cashflow .status{display:inline-flex;align-items:center;gap:6px;font-size:.75rem;font-weight:700;border-radius:999px;padding:2px 10px 2px 8px;white-space:nowrap}
.w-cashflow .status.good{background:var(--good-bg);color:var(--good)}
.w-cashflow .status.warn{background:var(--warn-bg);color:var(--warn)}
.w-cashflow .status.bad{background:var(--risk-bg);color:var(--risk)}
.w-cashflow .chartbox{position:relative;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:var(--s3) var(--s3) var(--s2)}
.w-cashflow .chartbox:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.w-cashflow .chartbox svg{display:block;width:100%;height:auto;overflow:visible}
.w-cashflow .ch-t{font-size:.875rem;font-weight:650;display:flex;justify-content:space-between;gap:var(--s3);flex-wrap:wrap;margin:0 0 var(--s2)}
.w-cashflow .ch-t span{font-weight:500;color:var(--muted);font-size:.8125rem}
.w-cashflow .chartbox.sk{min-height:380px}
.w-cashflow .ax text{font:500 12.5px var(--font);fill:var(--muted);font-variant-numeric:tabular-nums}
.w-cashflow .ax .ti{stroke:var(--line);stroke-width:1}
.w-cashflow .gridl{stroke:var(--line);stroke-width:1;stroke-dasharray:2 4}
.w-cashflow .floorl{stroke:var(--risk);stroke-width:1.5;stroke-dasharray:6 4}
.w-cashflow .floort{font:650 12px var(--font);fill:var(--risk);paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
.w-cashflow .band90{fill:var(--scn);fill-opacity:.14}
.w-cashflow .band50{fill:var(--scn);fill-opacity:.30}
.w-cashflow .edge{fill:none;stroke:var(--scn);stroke-width:1;stroke-opacity:.55}
.w-cashflow .scnl{fill:none;stroke:var(--med);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.w-cashflow .basel{fill:none;stroke:var(--base);stroke-width:2;stroke-dasharray:7 5;stroke-linecap:round}
.w-cashflow .evl{stroke:var(--ui);stroke-width:1;stroke-dasharray:1 3}
.w-cashflow .evb circle{fill:var(--ink);}
.w-cashflow .evb text{font:700 10px var(--font);fill:var(--surface);text-anchor:middle}
.w-cashflow .minm{fill:var(--surface);stroke:var(--risk);stroke-width:2.5}
.w-cashflow .call rect{fill:var(--surface);stroke:var(--risk);stroke-width:1.5}
.w-cashflow .call text{font:650 12px var(--font);fill:var(--ink)}
.w-cashflow .call .lead{stroke:var(--risk);stroke-width:1.5}
.w-cashflow .endl{font:650 12px var(--font);paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
.w-cashflow .endl.m{fill:var(--med)}
.w-cashflow .endl.b{fill:var(--scn)}
.w-cashflow .endl.k{fill:var(--muted)}
.w-cashflow .mint{font:650 11.5px var(--font);fill:var(--ink);paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
.w-cashflow .cur{stroke:var(--ink);stroke-width:1;opacity:.6}
.w-cashflow .curd{fill:var(--med);stroke:var(--surface);stroke-width:2}
.w-cashflow .curp{fill:var(--surface);stroke:var(--scn);stroke-width:2}
.w-cashflow .tip{position:absolute;pointer-events:none;z-index:5;background:var(--ink);color:var(--surface);border-radius:8px;padding:var(--s2) var(--s3);font-size:.8125rem;line-height:1.5;min-width:170px;box-shadow:var(--shadow);transform:translateY(-4px)}
.w-cashflow .tip b{font-weight:700}
.w-cashflow .tip .num{font-size:.8125rem}
.w-cashflow .tip table{border-collapse:collapse;width:100%}
.w-cashflow .tip td{padding:0 0 0 12px}
.w-cashflow .tip td:first-child{padding:0;opacity:.85}
.w-cashflow .tip td:last-child{text-align:right}
.w-cashflow .legend{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s5);margin:var(--s3) 0 0;padding:0;list-style:none;font-size:.8125rem;color:var(--muted)}
.w-cashflow .legend li{display:flex;align-items:center;gap:8px}
.w-cashflow .legend svg{flex:none}
.w-cashflow .evlist{margin:var(--s3) 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px var(--s4);font-size:.8125rem}
.w-cashflow .evlist li{display:flex;gap:8px;align-items:center;color:var(--muted)}
.w-cashflow .evlist .n{width:18px;height:18px;border-radius:50%;background:var(--ink);color:var(--surface);font:700 10px var(--font);display:grid;place-items:center;flex:none}
.w-cashflow .evlist.off li{opacity:.45}
.w-cashflow .dt{width:100%;border-collapse:collapse;font-size:.8125rem}
.w-cashflow .dt th{font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);text-align:right;padding:0 0 6px 8px;border-bottom:1px solid var(--line)}
.w-cashflow .dt th:first-child, .w-cashflow .dt td:first-child{text-align:left;padding-left:0}
.w-cashflow .dt td{white-space:nowrap;padding:9px 0 9px 8px;border-bottom:1px solid var(--line);text-align:right;font-variant-numeric:tabular-nums;vertical-align:baseline}
.w-cashflow .dt td:first-child{white-space:normal;font-weight:550;font-size:.8125rem;line-height:1.3}
.w-cashflow .dt tbody tr:hover td{background:color-mix(in srgb,var(--scn) 6%,transparent)}
.w-cashflow .dchip{display:inline-block;white-space:nowrap;border-radius:6px;padding:1px 6px;font-weight:700}
.w-cashflow .dchip.up{background:var(--good-bg);color:var(--good)}
.w-cashflow .dchip.dn{background:var(--risk-bg);color:var(--risk)}
.w-cashflow .dnone{margin:var(--s3) 0 0;font-size:.8125rem;color:var(--muted);display:flex;gap:8px;align-items:center}
.w-cashflow .dnone::before{content:"";width:8px;height:2px;background:var(--ui)}
.w-cashflow .scn-tag{display:flex;align-items:center;gap:8px;margin:0 0 var(--s3);font-size:.8125rem;color:var(--muted)}
.w-cashflow .dl{margin:0;padding:0;list-style:none}
.w-cashflow .dl li{display:grid;grid-template-columns:1fr auto;gap:2px var(--s3);padding:10px 0;border-bottom:1px solid var(--line)}
.w-cashflow .dl li:last-child{border-bottom:0}
.w-cashflow .dl .n{font-size:.875rem;font-weight:550}
.w-cashflow .dl .d{font-size:.9375rem;text-align:right}
.w-cashflow .dl .s{grid-column:1/-1;font-size:.75rem;color:var(--muted)}
.w-cashflow .d.up{color:var(--good)}
.w-cashflow .d.dn{color:var(--risk)}
.w-cashflow .d.nz{color:var(--muted)}
.w-cashflow .caveat{font-size:.8125rem;color:var(--muted);border-left:3px solid var(--warn);padding:2px 0 2px var(--s3);margin:var(--s4) 0 0;line-height:1.5}
.w-cashflow .assume{margin:var(--s3) 0 0;padding:0;list-style:none;font-size:.8125rem;color:var(--muted)}
.w-cashflow .assume li{display:flex;justify-content:space-between;gap:var(--s3);padding:4px 0;border-bottom:1px dotted var(--line)}
.w-cashflow .assume li span:last-child{color:var(--ink);text-align:right}
.w-cashflow .ck-foot{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s4);align-items:center;padding:var(--s3) var(--s5);border-top:1px solid var(--line);font-size:.8125rem;color:var(--muted);background:var(--surface2)}
.w-cashflow .ck-foot .sp{flex:1}
.w-cashflow .ck-state{padding:var(--s7) var(--s5);text-align:center;color:var(--muted);min-height:520px;display:grid;place-content:center;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--inset) 60%,transparent),transparent) 0 0/200% 100%;animation:shim 1.6s linear infinite}
@keyframes shim{to{background-position:-200% 0}}
.w-cashflow .ck-state.err{color:var(--risk)}
.w-cashflow .spin{width:20px;height:20px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--scn);display:inline-block;animation:sp .9s linear infinite;vertical-align:middle;margin-right:8px}
@keyframes sp{to{transform:rotate(360deg)}}
.w-cashflow details.tbl{margin-top:var(--s3)}
.w-cashflow details.tbl summary{cursor:pointer;font-weight:600;font-size:.875rem;min-height:32px;display:flex;align-items:center}
.w-cashflow .tw{position:relative;overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin-top:var(--s2)}
.w-cashflow table.t{border-collapse:collapse;width:100%;font-size:.875rem;background:var(--surface)}
.w-cashflow table.t th, .w-cashflow table.t td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
.w-cashflow table.t th{font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--surface2)}
.w-cashflow table.t td.r, .w-cashflow table.t th.r{text-align:right}
.w-cashflow table.t tr:last-child td{border-bottom:0}
.w-cashflow table.t tbody tr:hover td, .w-cashflow table.t tbody tr:hover th{background:color-mix(in srgb,var(--scn) 7%,var(--surface))}
.w-cashflow table.t th button{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;min-height:24px}
.w-cashflow table.t th button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.w-cashflow table.t th[aria-sort="ascending"] button::after{content:"\2191"}
.w-cashflow table.t th[aria-sort="descending"] button::after{content:"\2193"}
@media (max-width:1180px){
.w-cashflow .ck-grid{grid-template-columns:minmax(250px,290px) minmax(0,1fr)}
.w-cashflow .ck-delta{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:0 var(--s6)}
.w-cashflow .ck-delta .ck-h, .w-cashflow .ck-delta .caveat{grid-column:1/-1}
}
@media (max-width:900px){
.w-cashflow .ck-grid{grid-template-columns:1fr}
.w-cashflow .ck-ctl{border-right:0;border-bottom:1px solid var(--line)}
}
@media (max-width:620px){
.w-cashflow .kpis{grid-template-columns:1fr 1fr}
.w-cashflow .kpi.lead{grid-column:1/-1}
.w-cashflow .ck-col{padding:var(--s4)}
.w-cashflow .ck-bar, .w-cashflow .ck-foot{padding:var(--s3) var(--s4)}
.w-cashflow .ck-delta{display:block}
}
.w-cashflow .kpis.wlsum{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:620px){
.w-cashflow .kpis.wlsum{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:620px){
.w-cashflow .presets .pre{min-height:52px}
}
