/* Interactive dashboards — same tokens as the main site (Apple-style: one accent, no chrome shadows, 400/600/700) */
:root {
  /* dark theme: black page, graphite cards */
  color-scheme: dark;
  --primary: #2997ff; --primary-focus: #409cff; --primary-on-dark: #2997ff; --btn: #0071e3;
  --ink: #f5f5f7; --ink-80: #d1d1d6; --ink-48: #98989d; --on-dark: #ffffff;
  --hairline: #38383a; --divider-soft: #2c2c2e;
  --canvas: #1c1c1e; --parchment: #000000;
  /* chart series, validated on the dark card surface #1c1c1e (lightness, chroma, CVD, contrast all pass) */
  --s-actual: #338ced; --s-budget: #e76624; --s-prior: #9b7ee8;
  --good: #32d74b; --bad: #ff6961; --dim: #24476b;
  --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-xxl: 28px; --r-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(20px, 4vw, 48px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--parchment); font-size: 17px; line-height: 1.5; letter-spacing: -0.012em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-48); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) 64px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; height: 52px; background: rgba(0, 0, 0, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.nav__inner { max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.nav__brand img { width: 150px; height: auto; }
.nav__back { color: rgba(255, 255, 255, .8); font-size: 14px; }
.nav__back:hover { color: #fff; }

/* intro */
.intro { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.intro h1 { font-size: clamp(44px, 7vw, 88px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; margin-bottom: 14px; }
.intro__ctx { font-size: clamp(18px, 2vw, 22px); font-weight: 600; color: var(--ink-80); }
.intro__note { margin-top: 10px; font-size: 15px; color: var(--ink-48); max-width: 70ch; }

/* filters */
.filters { position: sticky; top: 52px; z-index: 20; margin: 0 calc(-1 * var(--gutter)); padding: 14px var(--gutter); background: rgba(0, 0, 0, .82); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--hairline); display: grid; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.filter { display: flex; align-items: center; gap: 12px; min-width: 0; }
.filter__label { font-size: 13px; font-weight: 600; color: var(--ink-48); white-space: nowrap; min-width: 52px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: #2c2c2e; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 0; background: transparent; padding: 6px 14px; border-radius: var(--r-pill); font-size: 14px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button:hover { background: rgba(255, 255, 255, .08); }
.seg button[aria-checked="true"] { background: #48484a; font-weight: 600; color: #fff; }
.seg--months button { padding: 6px 11px; min-width: 44px; }
.filters__period { font-size: 14px; color: var(--ink-80); }
.filters__period b { font-weight: 600; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 24px 0; }
.kpi { background: var(--canvas); border-radius: var(--r-xl); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi__label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-48); text-transform: uppercase; }
.kpi__value { font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi__delta { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.kpi__delta span { font-weight: 400; color: var(--ink-48); }
.is-good { color: var(--good); } .is-bad { color: var(--bad); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--canvas); border-radius: var(--r-xxl); padding: clamp(20px, 2.4vw, 32px); min-width: 0; }
.card--wide { grid-column: 1 / -1; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.card__head h2 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; letter-spacing: -0.025em; }
.card__head p { font-size: 14px; color: var(--ink-48); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink-80); }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 22px; height: 0; border-top: 2px solid; }
.key--a { border-color: var(--s-actual); } .key--b { border-color: var(--s-budget); border-top-style: dashed; } .key--p { border-color: var(--s-prior); border-top-style: dotted; border-top-width: 3px; }

/* line chart */
.chart { position: relative; }
.line-svg { display: block; width: 100%; height: clamp(240px, 30vw, 340px); overflow: visible; }
.line-svg .grid-l { stroke: var(--divider-soft); stroke-width: 1; }
.line-svg .axis-t { font-size: 12px; fill: var(--ink-48); font-variant-numeric: tabular-nums; }
.line-svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln--a { stroke: var(--s-actual); } .ln--b { stroke: var(--s-budget); stroke-dasharray: 6 5; } .ln--p { stroke: var(--s-prior); stroke-dasharray: 1.5 5; stroke-width: 2.5; }
.js .ln--a.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.line-svg .sel-band { fill: rgba(51, 140, 237, .14); transition: x .35s var(--ease), width .35s var(--ease); }
.line-svg .sel-dot { fill: var(--s-actual); stroke: var(--canvas); stroke-width: 2; transition: cx .35s var(--ease), cy .35s var(--ease); }
.line-svg .end-l { font-size: 12px; font-weight: 600; fill: var(--ink-80); }
.line-svg .hit { fill: transparent; cursor: pointer; }
.line-svg .xhair { stroke: var(--ink-48); stroke-width: 1; opacity: 0; pointer-events: none; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 168px; padding: 10px 12px; border-radius: var(--r-md); background: #3a3a3c; color: var(--on-dark); font-size: 13px; line-height: 1.5; opacity: 0; transform: translateY(4px); transition: opacity .15s var(--ease), transform .15s var(--ease); font-variant-numeric: tabular-nums; }
.tip.is-on { opacity: 1; transform: none; }
.tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* EBITDA bridge (waterfall) */
.bridge { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 260px; padding: 26px 0 40px; }
.bw { position: relative; }
.bw__bar { position: absolute; left: 8%; right: 8%; border-radius: 4px; transition: bottom .5s var(--ease), height .5s var(--ease), background .3s var(--ease); }
.bw__bar--total { background: var(--s-actual); }
.bw__bar--cmp { background: #8e8e93; }
.bw__bar--up { background: var(--good); } .bw__bar--down { background: var(--bad); }
.bw__val { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; transition: bottom .5s var(--ease); }
.bw__lbl { position: absolute; left: -4px; right: -4px; top: calc(100% + 8px); font-size: 11px; line-height: 1.25; color: var(--ink-48); text-align: center; }

/* region bars */
.hbars { display: grid; gap: 14px; padding-top: 4px; }
.hb__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.hb__name { color: var(--ink-80); }
.hb__val { font-weight: 600; font-variant-numeric: tabular-nums; }
.hb__val span { font-weight: 400; color: var(--ink-48); margin-left: 6px; }
.hb__track { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--divider-soft); overflow: hidden; }
.hb__fill { height: 100%; width: calc(var(--w) * 1%); border-radius: 5px; background: var(--s-actual); transform-origin: left; transition: width .6s var(--ease); }

/* margin bars */
.vbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 220px; padding-top: 24px; padding-bottom: 26px; }
.vb { position: relative; cursor: pointer; border: 0; background: none; padding: 0; font: inherit; }
.vb__bar { position: absolute; left: 14%; right: 14%; bottom: 0; height: calc(var(--h) * 1%); border-radius: 4px 4px 0 0; background: var(--dim); transition: height .6s var(--ease), background .25s var(--ease); }
.vb.is-in .vb__bar { background: var(--s-actual); }
.vb:hover .vb__bar { filter: brightness(.92); }
.vb__val { position: absolute; left: 0; right: 0; bottom: calc(var(--h) * 1% + 4px); text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-80); font-variant-numeric: tabular-nums; transition: bottom .6s var(--ease); }
.vb__m { position: absolute; left: 0; right: 0; bottom: -24px; text-align: center; font-size: 12px; color: var(--ink-48); }
.vb.is-sel .vb__m { color: var(--primary); font-weight: 700; }

/* P&L table */
.table-wrap { overflow-x: auto; }
.pl { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 560px; }
.pl th { text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-48); text-transform: uppercase; letter-spacing: .02em; padding: 0 12px 10px; border-bottom: 1px solid var(--hairline); }
.pl th:first-child, .pl td:first-child { text-align: left; padding-left: 0; }
.pl td { text-align: right; padding: 9px 12px; border-bottom: 1px solid var(--divider-soft); }
.pl tr.is-key td { font-weight: 700; }
.pl tr.is-key td:first-child { color: var(--ink); }
.pl td:first-child { color: var(--ink-80); }
.pl .mark { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* footer */
.foot { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-48); }
.btn { display: inline-flex; padding: 10px 20px; border-radius: var(--r-pill); background: var(--btn); color: #fff; font-size: 15px; transition: background .2s var(--ease); }
.btn:hover { background: var(--primary-focus); }

/* page-load reveal */
.js .rise { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- shared additions for the treasury dashboard ---------- */
.key--ref { border-color: var(--ink-48); border-top-style: dashed; border-top-width: 1.5px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw--in, .sw--a { background: var(--s-actual); } .sw--out { background: var(--s-budget); }
.slider { gap: 10px; }
.slider input[type="range"] { width: 150px; accent-color: var(--primary); }
.slider output { min-width: 44px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.select { font: inherit; font-size: 14px; padding: 6px 30px 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7a7a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; color: var(--ink); cursor: pointer; }
.filter--inline { margin: -4px 0 16px; }
.alert { margin-top: 14px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.alert:empty { display: none; }
.line-svg .ref-l { stroke: var(--ink-48); stroke-width: 1.5; stroke-dasharray: 5 5; }
.line-svg .ref-t { font-size: 12px; fill: var(--ink-48); }
.line-svg .area { fill: rgba(51, 140, 237, .12); }
.line-svg .band { fill: rgba(51, 140, 237, .18); }
.ln--g { stroke: #8e8e93; stroke-width: 1.5; }
.line-svg .warn-dot { fill: var(--bad); stroke: var(--canvas); stroke-width: 2; }

/* receipts (up) vs disbursements (down) */
.flows { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; height: 280px; padding: 18px 0 28px; position: relative; }
.flows::before { content: ""; position: absolute; left: 0; right: 0; top: calc(18px + (100% - 46px) / 2); border-top: 1px solid var(--hairline); }
.fw { position: relative; cursor: default; }
.fw__in, .fw__out { position: absolute; left: 12%; right: 12%; transition: height .5s var(--ease); }
.fw__in { bottom: 50%; height: calc(var(--in) * 50%); background: var(--s-actual); border-radius: 4px 4px 0 0; }
.fw__out { top: 50%; height: calc(var(--out) * 50%); background: var(--s-budget); border-radius: 0 0 4px 4px; }
.fw:hover .fw__in, .fw:hover .fw__out { filter: brightness(.9); }
.fw__w { position: absolute; left: -4px; right: -4px; bottom: -26px; text-align: center; font-size: 11px; color: var(--ink-48); }
.hbars--out .hb__fill { background: var(--s-budget); }

/* working-capital levers */
.levers { display: grid; gap: 14px; }
.lv { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--divider-soft); }
.lv__name { font-weight: 600; }
.lv__days { font-size: 14px; color: var(--ink-48); font-variant-numeric: tabular-nums; }
.lv__rel { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lv__rel small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-48); letter-spacing: 0; }
.lv__track { grid-column: 1 / -1; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--divider-soft); overflow: hidden; }
.lv__fill { height: 100%; width: calc(var(--w) * 1%); border-radius: 4px; background: var(--s-actual); transition: width .6s var(--ease); }
.lv--total { border-bottom: 0; padding-bottom: 0; }
.lv--total .lv__rel { font-size: 28px; color: var(--primary); }

/* cash conversion cycle bars with target line */
.vbars--ccc { position: relative; }
.ccc-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink-80); pointer-events: none; z-index: 1; }
.ccc-target span { position: absolute; left: 0; top: -20px; font-size: 12px; font-weight: 600; color: var(--ink-80); background: var(--canvas); padding: 0 6px 0 0; }

/* weekly table */
.pl--weeks { min-width: 1100px; font-size: 13px; }
.pl--weeks td, .pl--weeks th { padding: 7px 8px; }
.pl--weeks .neg { color: var(--bad); }
.pl--weeks tr.is-sub td:first-child { padding-left: 14px; }
@media (max-width: 760px) {
  .slider input[type="range"] { width: 100%; }
  .slider { width: 100%; flex-direction: row; align-items: center; }
  .flows { gap: 3px; } .fw__w { font-size: 9px; }
}

/* ---------- valuation dashboard ---------- */
.sw--p { background: var(--s-prior); } .sw--range { background: #2f6aa8; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--s-actual); outline: 2px solid var(--canvas); }
.link-btn { border: 0; background: none; color: var(--primary); font-size: 14px; cursor: pointer; padding: 6px 4px; }
.link-btn:hover { text-decoration: underline; }

/* football field */
.ff { position: relative; display: grid; gap: 18px; padding: 8px 0 30px; }
.ff__row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; }
.ff__name { font-size: 14px; color: var(--ink-80); }
.ff__row.is-sel .ff__name { font-weight: 700; color: var(--ink); }
.ff__track { position: relative; height: 34px; }
.ff__bar { position: absolute; top: 6px; height: 22px; border-radius: 6px; background: #2f6aa8; transition: left .6s var(--ease), width .6s var(--ease); }
.ff__row.is-sel .ff__bar { background: #4a8fd8; }
.ff__dot { position: absolute; top: 9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--s-actual); outline: 2px solid var(--canvas); transition: left .6s var(--ease); }
.ff__lo, .ff__hi { position: absolute; top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-80); white-space: nowrap; font-variant-numeric: tabular-nums; transition: left .6s var(--ease); }
.ff__lo { transform: translateX(calc(-100% - 6px)); } .ff__hi { transform: translateX(6px); }
.ff__now { position: absolute; top: 0; bottom: 22px; border-left: 2px dashed var(--ink-80); pointer-events: none; }
.ff__now span { position: absolute; bottom: -22px; left: 0; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-80); }
.ff__axis { position: relative; height: 18px; margin-left: 166px; }
.ff__axis span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--ink-48); }

/* EV bridge with 5 steps */
.bridge--5 { grid-template-columns: repeat(5, 1fr); }
.bw__bar--part { background: #2f6aa8; }

/* WACC build */
.wacc { display: grid; gap: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.wacc div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--divider-soft); }
.wacc div span:first-child { color: var(--ink-80); }
.wacc .is-key { font-weight: 700; } .wacc .is-key span:first-child { color: var(--ink); }
.wacc .is-total { border-bottom: 0; font-size: 20px; font-weight: 700; }
.wacc .is-total span:last-child { color: var(--primary); }
.wacc .note { display: block; font-size: 13px; color: var(--ink-48); border-bottom: 0; padding-top: 10px; }

/* grouped bars */
.gbars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; height: 260px; padding: 24px 0 28px; }
.gb { position: relative; display: flex; gap: 6px; justify-content: center; align-items: flex-end; cursor: default; }
.gb__b { position: relative; width: min(38px, 40%); height: calc(var(--h) * 1%); border-radius: 4px 4px 0 0; transition: height .6s var(--ease); }
.gb__b--a { background: var(--s-actual); } .gb__b--p { background: var(--s-prior); }
.gb__b span { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--ink-80); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gb__y { position: absolute; left: -6px; right: -6px; bottom: -24px; text-align: center; font-size: 12px; color: var(--ink-48); }
.gb.is-hist .gb__y { font-style: italic; }
.gb:hover .gb__b { filter: brightness(.9); }

/* sensitivity heatmap */
.sens { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 380px; }
.sens th { font-size: 12px; font-weight: 600; color: var(--ink-48); padding: 6px; text-align: center; }
.sens th[scope="row"] { text-align: right; padding-right: 10px; }
.sens td { text-align: center; padding: 10px 4px; border-radius: 6px; transition: background .4s var(--ease), color .4s var(--ease); }
.sens td.is-center { outline: 2px solid var(--ink); outline-offset: -2px; font-weight: 700; }
.sens caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--ink-48); padding-top: 10px; }

.pl--proj { min-width: 640px; }
@media (max-width: 760px) {
  .ff__row { grid-template-columns: 1fr; gap: 4px; }
  .ff__axis { margin-left: 0; }
  .gbars { gap: 4px; } .gb__b span { font-size: 9px; }
}

/* ---------- comps / capex / portfolio ---------- */
.legend .dot--t { background: var(--s-budget); }
.sw--b { background: var(--s-budget); } .sw--dim { background: #48484a; } .sw--bad { background: var(--bad); }
.hb__row.is-client .hb__fill { background: var(--s-budget); }
.hb__row.is-client .hb__name, .hb__row.is-client .hb__val { color: var(--ink); font-weight: 700; }
.line-svg .pt { fill: var(--s-actual); stroke: var(--canvas); stroke-width: 2; cursor: default; transition: opacity .3s var(--ease); }
.line-svg .pt--c { fill: var(--s-budget); }
.line-svg .pt--off { opacity: .25; }
.pl--peers { min-width: 980px; font-size: 13px; }
.pl--peers td, .pl--peers th { padding: 7px 8px; }
.pl--peers tr.is-off td { color: var(--ink-48); }
.pl--peers .is-col { background: rgba(51, 140, 237, .12); }
.pl--peers tr.is-stat td { color: var(--primary); }
.pl--peers tr.is-clientrow td { color: var(--s-budget); }
.pl--peers input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.pl td.neg { color: var(--bad); }
.mark.is-fund { color: var(--good); } .mark.is-defer { color: var(--ink-48); } .mark.is-reject { color: var(--bad); }

/* capex project list */
.plist { display: grid; gap: 10px; }
.pr { display: grid; grid-template-columns: 36px 1fr auto 150px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-lg); background: #232325; transition: background .3s var(--ease); }
.pr__rank { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #3a3a3c; font-weight: 700; font-size: 14px; }
.pr.is-fund .pr__rank { background: var(--s-actual); color: #fff; }
.pr__name { display: block; font-weight: 600; }
.pr__meta { display: block; font-size: 12px; color: var(--ink-48); margin-top: 2px; }
.pr__track { position: relative; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--divider-soft); }
.pr__track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px solid var(--ink-48); }
.pr__bar { position: absolute; top: 0; bottom: 0; left: 50%; width: calc(var(--w) * 1%); border-radius: 3px; background: var(--s-actual); transition: width .6s var(--ease); }
.pr__bar.is-neg { left: auto; right: 50%; background: var(--bad); }
.pr.is-defer .pr__bar { background: #636366; }
.pr__npv { text-align: right; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr__npv small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-48); }
.pr__dec { font-size: 13px; font-weight: 600; text-align: right; }
.pr.is-fund .pr__dec { color: var(--good); } .pr.is-defer .pr__dec { color: var(--ink-48); } .pr.is-reject .pr__dec { color: var(--bad); }
.pr.is-defer, .pr.is-reject { background: #1f1f21; }

/* payback bars around a zero line */
.vbars--pay { position: relative; height: 240px; padding: 10px 0 28px; }
.vbars--pay::before { content: ""; position: absolute; left: 0; right: 0; top: calc(10px + (100% - 38px) / 2); border-top: 1px solid var(--hairline); }
.pb { position: relative; cursor: default; }
.pb__bar { position: absolute; left: 16%; right: 16%; bottom: 50%; height: calc(var(--h) * 1%); border-radius: 4px 4px 0 0; background: var(--s-actual); transition: height .6s var(--ease); }
.pb__bar.is-neg { bottom: auto; top: 50%; border-radius: 0 0 4px 4px; background: var(--bad); }
.pb__y { position: absolute; left: 0; right: 0; bottom: -24px; text-align: center; font-size: 12px; color: var(--ink-48); }
.pb:hover .pb__bar { filter: brightness(1.15); }

/* portfolio weights + allocation */
.weights { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.weights .slider input[type="range"] { width: 110px; }
.wsum { font-size: 13px; color: var(--ink-48); }
.alloc { display: grid; gap: 14px; }
.al { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.al__name { color: var(--ink-80); } .al__v { font-weight: 600; font-variant-numeric: tabular-nums; }
.al__bars { grid-column: 1 / -1; display: grid; gap: 3px; }
.al__p, .al__b { display: block; height: 8px; width: calc(var(--w) * 1%); min-width: 2px; border-radius: 4px; transition: width .6s var(--ease); }
.al__p { background: var(--s-actual); } .al__b { background: var(--s-budget); }
.pl--metrics { min-width: 0; }
@media (max-width: 760px) {
  .pr { grid-template-columns: 30px 1fr auto; } .pr__dec { grid-column: 2 / -1; text-align: left; }
  .weights .slider input[type="range"] { width: 100%; }
}

/* ---------- last six dashboards ---------- */
:root { --c1: #338ced; --c2: #e76624; --c3: #00a888; --c4: #d28e05; --c5: #e24d8b; }
.ln--c1 { stroke: var(--c1); } .ln--c2 { stroke: var(--c2); } .ln--c3 { stroke: var(--c3); } .ln--c4 { stroke: var(--c4); } .ln--c5 { stroke: var(--c5); }
.key--g { border-color: #8e8e93; }
.sw--band { background: rgba(51, 140, 237, .35); }
.hb__track--stack { display: flex; gap: 2px; background: transparent; }
.hb__track--stack .hb__fill { flex: none; }
.hb__fill--b { background: var(--s-budget) !important; }
.hb__row.is-neg .hb__fill { background: var(--bad); } .hb__row.is-pos .hb__fill { background: var(--good); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.pill { background: #232325; border-radius: var(--r-lg); padding: 12px; }
.pill__v { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pill__l { display: block; font-size: 12px; color: var(--ink-48); margin-bottom: 6px; }
.hbars--ind { gap: 10px; } .hbars--ind .hb__row { font-size: 13px; }
.heat { min-width: 980px; font-size: 13px; } .heat td, .heat th { padding: 7px 6px; text-align: center; } .heat td:first-child, .heat th:first-child { text-align: left; }
.pl .is-col { background: rgba(51, 140, 237, .12); }
.pl tr.is-cat td { padding-top: 16px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--primary); border-bottom: 0; }
.pl tr.is-sel td { color: var(--primary); }
.pl--ratios { min-width: 760px; }
.gb__b--o { background: var(--s-budget); }
.gb.is-sel .gb__y { color: var(--primary); font-weight: 700; font-style: normal; }
.gbars .gb { cursor: pointer; }
.dupont { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dp { flex: 1; min-width: 130px; background: #232325; border-radius: var(--r-lg); padding: 16px; text-align: center; }
.dp__v { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dp__l { font-size: 13px; color: var(--ink-48); }
.dp--total { background: rgba(51, 140, 237, .18); } .dp--total .dp__v { color: var(--primary); }
.dp__op { font-size: 24px; color: var(--ink-48); }
.h2h { display: grid; gap: 12px; }
.hh { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.hh__v { font-weight: 600; font-variant-numeric: tabular-nums; }
.hh__bars { grid-column: 1 / -1; display: grid; gap: 3px; }
.pb__bar.is-dim { background: #636366; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } .dp__op { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise { opacity: 1; transform: none; }
  .js .ln--a.draw { stroke-dashoffset: 0; }
}
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .filter { flex-direction: column; align-items: flex-start; gap: 6px; }
  .filter-row { gap: 10px 16px; }
  .bridge { height: 240px; }
  .vbars { gap: 4px; }
  .vb__val { font-size: 9px; }
  .nav__back { font-size: 13px; }
}

/* phones: keep each slider on one row (label, slider, value) */
@media (max-width: 760px) {
  .filter.slider { flex-direction: row; align-items: center; width: 100%; }
  .filter.slider .filter__label { min-width: 92px; }
  .weights { display: grid; gap: 6px; }
}

/* phones: controls never widen the page; long option rows scroll sideways inside themselves */
@media (max-width: 760px) {
  .filter { width: 100%; max-width: 100%; }
  .filter .seg { max-width: 100%; }
  .filter-row { width: 100%; }
  .filters__period { overflow-wrap: anywhere; }
}

/* the controls bar is a grid: let its single column shrink so long option rows scroll instead of widening the page */
.filters { grid-template-columns: minmax(0, 1fr); }
.filters > * { min-width: 0; }

/* wide tables scroll inside their card and never widen the page */
.card { overflow-x: clip; }
.table-wrap { max-width: 100%; }
@media (max-width: 760px) { .kpi__value { white-space: normal; overflow-wrap: anywhere; } }

/* Finance-project dashboards */
.legend .dot--g { background: var(--c3); } .legend .dot--p { background: var(--s-prior); }
.key--c1 { border-color: var(--c1); } .key--c2 { border-color: var(--c2); } .key--c3 { border-color: var(--c3); } .key--c4 { border-color: var(--c4); } .key--c5 { border-color: var(--c5); }
#c-mc { position: relative; height: 380px; }
.mc-canvas, .mc-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mc-svg { pointer-events: none; }
.mc-svg .mk { stroke: var(--canvas); stroke-width: 2; }
.bf-bar { fill: var(--s-actual); transition: opacity .3s; } .bf-bar.is-flag { fill: var(--bad); } .bf-bar:hover { opacity: .8; }
.bf-exp { fill: none; stroke: var(--s-budget); stroke-width: 2; stroke-dasharray: 6 5; } .bf-dot { fill: var(--s-budget); }
@media (max-width: 640px) { #c-mc { height: 300px; } }

/* SARIMA dashboard */
.orders { gap: 10px 14px; }
.ord { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-48); }
.ord span { font-style: italic; font-weight: 600; color: var(--ink-80); }
.ord .select { padding: 5px 26px 5px 10px; }
.seg--sm button { padding: 5px 11px; font-size: 13px; }
.acf-ctl { margin-bottom: 8px; }
.line-svg--tall { height: clamp(280px, 36vw, 420px); }
.pipe { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.pipe__s { position: relative; background: #232325; border-radius: var(--r-lg); padding: 16px; opacity: .45; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease); }
.pipe__s.is-on, .pipe__s.is-run { opacity: 1; transform: none; }
.pipe__s.is-run { box-shadow: 0 0 0 2px var(--s-actual) inset; }
.pipe__s.is-run .pipe__dot { animation: pulse 0.9s var(--ease) infinite; }
.pipe__s.is-flash { animation: flash .9s var(--ease); }
.pipe__dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #3a3a3c; font-size: 13px; font-weight: 700; margin-bottom: 10px; transition: background .3s var(--ease); }
.pipe__s.is-on .pipe__dot { background: var(--good); color: #000; }
.pipe__s h4 { font-size: 15px; margin-bottom: 4px; }
.pipe__s b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.pipe__s p { font-size: 12px; color: var(--ink-48); margin-top: 4px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(51, 140, 237, .6); } 50% { box-shadow: 0 0 0 8px rgba(51, 140, 237, 0); } }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--s-budget) inset; } 100% { box-shadow: 0 0 0 0 transparent inset; } }
.gs-bar { height: 4px; border-radius: 2px; background: #2c2c2e; margin-bottom: 14px; overflow: hidden; }
.gs-bar span { display: block; height: 100%; width: 0; background: var(--s-actual); }
#c-gs .hb__row { cursor: pointer; }
.wk { height: 240px; }
.acf-band { fill: rgba(51, 140, 237, .12); }
.acf-bar { fill: #636366; } .acf-bar.is-sig { fill: var(--s-actual); } .acf-bar.is-seas { fill: var(--s-budget); }
.hist-bar { fill: var(--s-actual); opacity: .85; }
.donut-box { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dn { width: min(240px, 60vw); transform: rotate(0deg); }
.dn__seg { fill: none; stroke-width: 6; cursor: pointer; transition: stroke-dasharray 1s var(--ease), stroke-width .3s var(--ease); }
.dn__seg:hover, .dn__seg.is-sel { stroke-width: 7.5; }
.dn__v { font-size: 5px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.dn__l { font-size: 2.2px; fill: var(--ink-48); text-anchor: middle; }
.dn__leg { list-style: none; display: grid; gap: 10px; font-size: 14px; min-width: 160px; }
.dn__leg li { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-80); }
.dn__leg li.is-sel { color: var(--ink); font-weight: 700; }
.dn__leg i { width: 10px; height: 10px; border-radius: 3px; }
.dn__leg b { margin-left: auto; padding-left: 16px; font-variant-numeric: tabular-nums; }
.area-s { opacity: .78; stroke: var(--canvas); stroke-width: 1.5; transition: opacity .3s var(--ease); }
.area-s.is-sel { opacity: 1; }
.js .area-g { animation: areaIn 1s var(--ease); transform-origin: bottom; transform-box: fill-box; }
@keyframes areaIn { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.table-wrap--scroll { max-height: 420px; overflow-y: auto; }
@media (max-width: 900px) { .pipe { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pipe { grid-template-columns: 1fr; } .wk { height: 200px; } }
.line-svg .xhair.is-on { opacity: 1; }

/* ---------- Motion layer: growing charts and pulsing highlights ---------- */
/* charts wait until their card scrolls into view, then grow */
.anim .card:not(.in) .hb__fill { width: 0 !important; }
.anim .card:not(.in) .gb__b, .anim .card:not(.in) .pb__bar, .anim .card:not(.in) .vb__bar, .anim .card:not(.in) .lv__fill { height: 0 !important; }
.anim .card:not(.in) .lv__fill { width: 0 !important; height: 100% !important; }
.anim .card:not(.in) .ln.draw, .anim .card:not(.in) .grow, .anim .card:not(.in) .late, .anim .card:not(.in) .area-g, .anim .card:not(.in) .dn__seg { animation-play-state: paused; }
.anim .card:not(.in) .dn__seg { stroke-dasharray: 0 100 !important; }
.hb__fill, .gb__b, .pb__bar, .vb__bar { transition-duration: .9s; }
.gbars .gb:nth-child(2) .gb__b { transition-delay: 60ms; } .gbars .gb:nth-child(3) .gb__b { transition-delay: 120ms; } .gbars .gb:nth-child(4) .gb__b { transition-delay: 180ms; } .gbars .gb:nth-child(5) .gb__b { transition-delay: 240ms; } .gbars .gb:nth-child(6) .gb__b { transition-delay: 300ms; } .gbars .gb:nth-child(7) .gb__b { transition-delay: 360ms; } .gbars .gb:nth-child(8) .gb__b { transition-delay: 420ms; } .gbars .gb:nth-child(9) .gb__b { transition-delay: 480ms; } .gbars .gb:nth-child(n+10) .gb__b { transition-delay: 540ms; }
.vbars .pb:nth-child(2) .pb__bar, .vbars .vb:nth-child(2) .vb__bar { transition-delay: 50ms; } .vbars .pb:nth-child(3) .pb__bar, .vbars .vb:nth-child(3) .vb__bar { transition-delay: 100ms; } .vbars .pb:nth-child(4) .pb__bar, .vbars .vb:nth-child(4) .vb__bar { transition-delay: 150ms; } .vbars .pb:nth-child(5) .pb__bar, .vbars .vb:nth-child(5) .vb__bar { transition-delay: 200ms; } .vbars .pb:nth-child(6) .pb__bar, .vbars .vb:nth-child(6) .vb__bar { transition-delay: 250ms; } .vbars .pb:nth-child(n+7) .pb__bar, .vbars .vb:nth-child(n+7) .vb__bar { transition-delay: 300ms; }

/* first draw, like the main page's forecast: solid lines grow, then dashed forecasts extend from where they end, then bands and markers (timing from DC.seq) */
.js .ln.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s var(--ease) forwards; }
.js .ln--b.draw { stroke-dasharray: 6 5; stroke-dashoffset: 0; animation: wipe 1.2s var(--ease) both; }
.js .ln--p.draw { stroke-dasharray: 1.5 5; stroke-dashoffset: 0; animation: wipe 1.2s var(--ease) both; }
@keyframes lineIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe { from { clip-path: inset(-12px 100% -12px -12px); } to { clip-path: inset(-12px -12px -12px -12px); } }
@keyframes show { from { visibility: hidden; } to { visibility: visible; } }
.js .area.grow { animation: wipe 1.6s var(--ease) both; }
.js .band.late { animation: lineIn 1s var(--ease) var(--after) both; }
.js .warn-dot.late { animation: lineIn .5s var(--ease) var(--after) both; }
.is-wait .ln, .is-wait .band, .is-wait .area, .is-wait .sel-ring, .is-wait .sel-dot, .is-wait .end-ring, .is-wait .end-dot { visibility: hidden; }

/* pulsing rings on the selected point and the latest value */
.line-svg .sel-ring { fill: none; stroke: var(--s-actual); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: ring 1.1s cubic-bezier(.2,.6,.3,1) infinite; pointer-events: none; }
.line-svg .end-dot { fill: var(--s-actual); stroke: var(--canvas); stroke-width: 2; pointer-events: none; }
.line-svg .end-ring { animation-delay: .55s; }
.line-svg .sel-dot, .line-svg .end-dot { animation: dotBeat 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.js .sel-dot.late, .js .end-dot.late { animation: lineIn .4s var(--ease) var(--after) both, dotBeat 1.1s ease-in-out calc(var(--after) + .4s) infinite; }
.js .sel-ring.late { animation: show 1ms var(--after) both, ring 1.1s cubic-bezier(.2,.6,.3,1) var(--after) infinite; }
.js .end-ring.late { animation: show 1ms calc(var(--after) + .55s) both, ring 1.1s cubic-bezier(.2,.6,.3,1) calc(var(--after) + .55s) infinite; }
@keyframes dotBeat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.5); } }
@keyframes ring { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(4.6); opacity: 0; } }

/* KPI tiles: values pop when they land; good and bad signals glow */
.kpi__value.pop { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); color: #fff; } 100% { transform: scale(1); } }
.kpi__value { transform-origin: left center; }
.js .kpi.rise:has(.kpi__delta.is-good) { animation: rise .8s var(--ease) calc(var(--i, 0) * 70ms) forwards, glowGood 1.4s ease-in-out 1s infinite; }
.js .kpi.rise:has(.kpi__delta.is-bad) { animation: rise .8s var(--ease) calc(var(--i, 0) * 70ms) forwards, glowBad 1.4s ease-in-out 1s infinite; }
.js .kpi.rise:first-child:not(:has(.is-good)):not(:has(.is-bad)) { animation: rise .8s var(--ease) forwards, glowKey 1.4s ease-in-out 1s infinite; }
@keyframes glowGood { 0%, 100% { box-shadow: 0 0 0 1px rgba(50, 215, 75, .25); transform: none; } 50% { box-shadow: 0 0 0 2px rgba(50, 215, 75, 1), 0 0 34px 4px rgba(50, 215, 75, .45); transform: translateY(-2px); } }
@keyframes glowBad { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 105, 97, .25); transform: none; } 50% { box-shadow: 0 0 0 2px rgba(255, 105, 97, 1), 0 0 34px 4px rgba(255, 105, 97, .45); transform: translateY(-2px); } }
@keyframes glowKey { 0%, 100% { box-shadow: 0 0 0 1px rgba(51, 140, 237, .25); transform: none; } 50% { box-shadow: 0 0 0 2px rgba(51, 140, 237, 1), 0 0 34px 4px rgba(51, 140, 237, .45); transform: translateY(-2px); } }
.kpi__delta.is-good, .kpi__delta.is-bad { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* highlighted bars shimmer */
.hb__fill { position: relative; overflow: hidden; }
.hb__row.is-client .hb__fill, .hb__row.is-pos .hb__fill { animation: barBeat 1.3s ease-in-out infinite; }
@keyframes barBeat { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.45); } }
.hb__row.is-client .hb__fill::after, .hb__row.is-pos .hb__fill::after, .hb__row.is-sel .hb__fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .7) 50%, transparent 80%); transform: translateX(-100%); animation: shimmer 1.3s .8s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* key cells and rows breathe */
.sens td.is-center { animation: cellPulse 1s ease-in-out infinite; }
@keyframes cellPulse { 0%, 100% { outline-color: var(--ink); box-shadow: 0 0 0 0 rgba(245, 245, 247, 0); transform: scale(1); } 50% { outline-color: #fff; box-shadow: 0 0 18px 2px rgba(245, 245, 247, .55); transform: scale(1.08); } }
.pl tr.is-sel td:first-child, .gb.is-sel .gb__y { animation: blink 1s ease-in-out infinite; }

/* live indicator next to the active filter summary */
.filters__period::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--good); vertical-align: 0; animation: live 1s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(50, 215, 75, .9); } 100% { box-shadow: 0 0 0 14px rgba(50, 215, 75, 0); } }

@media (prefers-reduced-motion: reduce) {
  .js .ln.draw, .js .ln--b.draw, .js .ln--p.draw { animation: none; stroke-dashoffset: 0; }
  .js .ln.draw:not(.ln--b):not(.ln--p) { stroke-dasharray: none; }
  .sel-ring, .sel-dot, .end-dot, .hb__fill, .js .kpi.rise, .kpi__delta, .hb__fill::after, .sens td.is-center, .filters__period::before, .kpi__value.pop, .pl tr.is-sel td, .gb.is-sel .gb__y, .grow, .late { animation: none !important; }
}

/* ---------- The maths behind it (dash-eq.js): equations like the SARIMA one on the main page ---------- */
.eqs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.eqb { background: var(--parchment); border-radius: var(--r-xl); padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; }
.eqb__label { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 14px; }
.eqb__math { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; min-height: 84px; padding: 8px 0; font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-size: clamp(18px, 1.9vw, 24px); line-height: 1.5; color: var(--on-dark); }
.eqb .eq { position: relative; display: inline-flex; align-items: center; padding: 2px 5px; border-radius: var(--r-md); transition: background .2s var(--ease), color .2s var(--ease); }
.eqb .eq sub, .eqb .eq sup { font-size: .6em; }
.eqb .eq--op, .eqb .eq--v { padding: 2px 1px; }
.eqb .eq[data-tip] { cursor: help; outline: none; }
.eqb .eq[data-tip]:hover, .eqb .eq[data-tip].is-on, .eqb .eq[data-tip]:focus-visible { background: var(--primary); color: var(--on-dark); }
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-size: .92em; line-height: 1.25; }
.fr > span { padding: 0 3px; white-space: nowrap; }
.fr > span:first-child { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.fr > span:last-child { padding-top: 2px; }
.lim { display: inline-flex; flex-direction: column; font-size: .5em; line-height: 1.1; margin-left: 1px; }
.lim sup, .lim sub { font-size: 1em; vertical-align: baseline; }
.eqb__tip { min-height: 1.5em; margin: 6px 0 14px; text-align: center; font-size: 14px; font-weight: 600; color: var(--primary); }
.eqb__text { margin: 0; padding-top: 16px; border-top: 1px solid var(--divider-soft); font-size: 15px; line-height: 1.5; }
.eqb__text dt { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-48); }
.eqb__text dd { margin: 4px 0 14px; color: var(--ink-80); }
.eqb__text dd:last-child { margin-bottom: 0; }
.eqb__text sub, .eqb__text sup { font-size: .7em; }
/* terms rise in one by one when the card scrolls into view, as on the main page */
.anim .eqs .eqb .eq { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.anim .eqs.in .eqb .eq { opacity: 1; transform: none; transition-delay: calc(var(--i) * 90ms + 200ms), calc(var(--i) * 90ms + 200ms), 0s, 0s; }
@media (max-width: 640px) { .eqb__math { font-size: 17px; min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .anim .eqs .eqb .eq { opacity: 1; transform: none; transition: none; } }

/* travelling marker on line charts (dash-anim.js), like the main page's forecast dot */
.trail-dot { fill: var(--primary-on-dark); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(41, 151, 255, .95)) drop-shadow(0 0 2px rgba(41, 151, 255, .9)); pointer-events: none; }

/* Case study card (dash-case.js) */
.case__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.case__item { background: var(--parchment); border-radius: var(--r-xl); padding: 18px 20px; }
.case__item h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-on-dark); }
.case__item p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-80); }

/* Second-company bars (comparison dashboards) */
.hb__row.is-alt .hb__fill { background: #8e8e93; }

/* Cohort heatmap: 14 narrow columns */
.sens--coh { font-size: 12px; min-width: 640px; } .sens--coh td { padding: 7px 2px; }

/* Dashboard gallery (dashboards/index.html) */
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.gcard { display: flex; flex-direction: column; gap: 10px; background: var(--canvas); border-radius: var(--r-xxl); padding: 22px; color: var(--ink); transition: transform .25s var(--ease), background .25s var(--ease); }
.gcard:hover, .gcard:focus-visible { transform: translateY(-3px); background: #232325; }
.gcard[hidden] { display: none; }
.gcard h2 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.gcard p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-80); flex: 1; }
.gcard__go { font-size: 14px; color: var(--primary-on-dark); }
.gcard__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gtag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: #2c2c2e; color: var(--ink-80); }
.gtag--muted { background: transparent; border: 1px solid #3a3a3c; color: var(--ink-48); }
.gtag--new { background: rgba(41, 151, 255, .18); color: var(--primary-on-dark); }
.gcard__spark { width: 100%; height: 64px; }
.gs-a { fill: none; stroke: var(--s-actual); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gs-b { fill: none; stroke: var(--s-budget); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.gs-area { fill: rgba(41, 151, 255, .12); }
.gcard .gs-a { clip-path: inset(0 0 0 0); } .js .gcard:not(.in) .gs-a { clip-path: inset(0 100% 0 0); }
.js .gcard:not(.in) .gs-b, .js .gcard:not(.in) .gs-area { opacity: 0; }
.gcard .gs-a { transition: clip-path 1.4s var(--ease); }
.gcard .gs-b, .gcard .gs-area { transition: opacity .6s 1.3s var(--ease); }
.gsearch { display: flex; flex-direction: column; gap: 6px; }
.gsearch input { width: min(360px, 100%); padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid #3a3a3c; background: #1c1c1e; color: var(--ink); font-size: 15px; }
.gsearch input:focus { outline: 2px solid var(--primary-on-dark); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .gcard, .gs-a, .gs-b, .gs-area { transition: none; } }

/* Insights articles and glossary (insights/) */
.article { max-width: 720px; margin: 0 auto; }
.article h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.2; letter-spacing: -.01em; margin: 40px 0 12px; }
.article p, .article li { font-size: 17px; line-height: 1.65; color: var(--ink-80); }
.article p { margin: 0 0 16px; } .article ul, .article ol { padding-left: 22px; margin: 0 0 16px; }
.article strong { color: var(--ink); }
.article .formula { background: var(--canvas); border-radius: var(--r-xl); padding: 18px 22px; margin: 20px 0; font-family: 'Cambria Math', Cambria, Georgia, serif; font-size: 19px; color: var(--ink); overflow-x: auto; }
.article .callout { border-left: 3px solid var(--primary-on-dark); padding: 4px 0 4px 18px; margin: 24px 0; color: var(--ink); }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; font-variant-numeric: tabular-nums; }
.article th, .article td { padding: 10px 8px; border-bottom: 1px solid #2c2c2e; text-align: right; } .article th:first-child, .article td:first-child { text-align: left; }
.article th { color: var(--ink-48); font-weight: 600; font-size: 13px; }
.art-meta { font-size: 14px; color: var(--ink-48); margin-top: 6px; }
.art-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--canvas); border-radius: var(--r-xxl); padding: 22px; margin: 36px 0; }
.art-cta p { margin: 0; flex: 1 1 260px; color: var(--ink); }
.glossary dl { margin: 0; } .glossary dt { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 26px; scroll-margin-top: 70px; }
.glossary dt:target { color: var(--primary-on-dark); } .glossary dd { margin: 6px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-80); }
.glossary dd .muted a { color: var(--primary-on-dark); }
.gl-az { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; } .gl-az a { font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); background: #2c2c2e; color: var(--ink-80); }
.eqs__gloss { grid-column: 1 / -1; font-size: 14px; color: var(--ink-48); margin: 4px 0 0; } .eqs__gloss a { color: var(--primary-on-dark); }
