/* Correction Lab. Built on shared/css/tsm.css tokens only. */
.toolbar-top { max-width: 1400px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.lede { margin: 0; max-width: 72ch; font-size: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.fig { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fig-h { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; align-items: baseline; }
.fig .eyebrow, .panel .eyebrow { margin: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 1200px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.why { margin: 0; font-size: 13.5px; line-height: 1.5; max-width: 90ch; }
.cond { margin: 0; font-family: var(--mono); font-size: 13px; }
.cond b { color: var(--good); }

/* Hero: the number and the people */
.hero { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 700px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.big { margin: 0; font-family: var(--display); font-weight: 700; font-size: 58px; line-height: 1; color: var(--bad); font-variant-numeric: tabular-nums; }
.people { display: block; width: 100%; height: auto; }
.pp.hold { fill: var(--bad); }
.pp.rev { fill: var(--panel); stroke: var(--good); stroke-width: 2.4; }

/* Charts */
.chart { display: block; width: 100%; height: auto; touch-action: none; }
.axis .grid { stroke: var(--rule); stroke-width: 1; }
.axis .zero { stroke: var(--muted); stroke-width: 1.2; }
.ax-t { font: 11.5px var(--body); fill: var(--muted); }
.hb.rev { fill: var(--good); opacity: .75; }
.hb.hold { fill: var(--bad); opacity: .8; }
.base { stroke: var(--faint); }
.lhs { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 3; }
.lhs-t { font: 500 11.5px var(--mono); fill: var(--ink); }
.sw { fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.sw.on { stroke: var(--bad); } .sw.off { stroke: var(--muted); stroke-dasharray: 6 4; stroke-width: 2; }
.now { stroke: var(--accent); stroke-width: 1.4; }
.mark { fill: var(--panel); stroke: var(--accent); stroke-width: 2.6; }
.hit { fill: transparent; cursor: ew-resize; }

/* Waterfall */
.wf { display: flex; flex-direction: column; gap: 5px; }
.wf-r { display: grid; grid-template-columns: 150px minmax(0, 1fr) 58px; gap: 8px; align-items: center; font-size: 12.5px; }
.wf-t { color: var(--ink); }
.wf-bar { position: relative; height: 14px; background: var(--chip); border-radius: 2px; }
.wf-bar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.wf-bar i.base { background: var(--muted); } .wf-bar i.up { background: var(--bad); } .wf-bar i.down { background: var(--good); }
.wf-bar i.flat { background: var(--faint); } .wf-bar i.tot { background: var(--ink); }
.wf-v { font: 12px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.wf-r.tot { border-top: 1px solid var(--rule); padding-top: 5px; font-weight: 600; }

/* Forest plot */
.fp-g { font: 600 12px var(--display); letter-spacing: .05em; text-transform: uppercase; fill: var(--muted); }
.fp-l { font: 12px var(--body); fill: var(--muted); }
.fp-l.on { fill: var(--ink); font-weight: 600; } .fp-l.ov { fill: var(--ink); font-weight: 600; }
.fp-ci { stroke: var(--faint); stroke-width: 2; } .fp-ci.on { stroke: var(--blue); stroke-width: 3; } .fp-ci.ctx { stroke: var(--rule); }
.fp-pt { fill: var(--panel); stroke: var(--faint); stroke-width: 1.6; }
.fp-pt.on { fill: var(--blue); stroke: var(--blue); } .fp-pt.ov { fill: var(--ink); stroke: var(--ink); } .fp-pt.ctx { stroke: var(--muted); }
.fp-n { font: 10.5px var(--mono); fill: var(--muted); }

/* Legends */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 11px; height: 11px; display: inline-block; }
.lg i.d { border-radius: 50%; } .lg i.d.hold { background: var(--bad); } .lg i.d.rev { background: var(--panel); border: 2px solid var(--good); }
.lg i.sq.rev { background: var(--good); opacity: .75; } .lg i.sq.hold { background: var(--bad); opacity: .8; }
.lg i.ln { width: 18px; height: 0; border-top: 2.6px solid var(--bad); } .lg i.ln.off { border-top: 2px dashed var(--muted); }

/* Panel */
.panel .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel .choices button b { display: block; font-weight: 600; }
.panel .choices button span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; font-family: var(--mono); }
.panel .fine { margin-top: 6px; }
.slider { margin-top: 8px; }
.slider .sym { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.tg { margin-top: 6px; }

/* Below */
.below .col { min-width: 0; }
.mt { margin-top: 18px; }
.howto, .evid { font-size: 13.5px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 7px; margin: 0 0 8px; max-width: 74ch; }
.evid li { line-height: 1.5; }
.below p { font-size: 14px; }

/* Walkthrough */
.tour { position: fixed; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 4px; padding: 12px 14px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); z-index: 20; }
.tour[hidden] { display: none; }
.tour-h { display: flex; justify-content: space-between; align-items: center; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tour .x { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }
.tour h3 { margin: 6px 0 4px; font-size: 19px; }
.tour p { margin: 0 0 10px; font-size: 13px; }
.tour-nav { display: flex; justify-content: space-between; }
@media (max-width: 600px) {
  .tour { right: 8px; bottom: 8px; }
  .wf-r { grid-template-columns: 112px minmax(0, 1fr) 52px; font-size: 12px; }
  .big { font-size: 48px; }
  .axis text { font-size: 13px; } .ax-t { font-size: 12.5px; } .fp-l { font-size: 12.5px; } .fp-g { font-size: 12px; }
}
