/* Tornado Cash / USDC story page. Tokens are the site's (shared with the Argentina page); concept: ART-DIRECTION.md. */

:root {
  --paper: #faf7f2;
  --paper-deep: #f3eee5;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --oxblood: #8c2f1b;
  --teal: #2f7184;
  --hair: color-mix(in oklab, var(--ink) 16%, transparent);
  --hair-soft: color-mix(in oklab, var(--ink) 9%, transparent);
  --plate: var(--paper-deep);
  /* extra muted hues (ART-DIRECTION, Nik 2026-11-03): >2 series only; both >=3:1 on --paper-deep */
  --ochre: #946b1b;
  --moss: #5b7a45;
  --ochre-text: #7a5714; /* >=4.5:1 on --paper-deep for labels */
  --moss-text: #4a6636;

  --f-display: "Fraunces", "Fraunces Fallback", Georgia, serif;
  --f-body: "Source Serif 4", "Source Serif Fallback", Georgia, serif;
  --f-label: "Space Grotesk", "Helvetica Neue", sans-serif;

  /* annotation hue: reserved for notes, floors and reference marks; never a data series (>=4.5:1 on --plate) */
  --annot: #644a73;
  --step-dim: #706d6a; --step-past: #6a6764;   /* inactive step text: solid colours, not opacity. 20px regular text needs 4.5:1 on --paper: 4.81 / 5.26 light (ink at 62% / 65%) */
  --ink-body: color-mix(in oklab, var(--ink) 84%, var(--paper)); /* reading text one step below full ink: 11.1:1 on paper in both themes (.key, headings, h1 stay --ink) */

  /* tooltip card: dark in both themes; series swatches use the bright (dark-theme) hues so they clear 3:1 on it */
  --tip-bg: #1c1917; --tip-fg: #f6f1e8; --tip-soft: #cfc8bd; --tip-edge: transparent; --tip-r: 8px;
  --tip-oxblood: #e2855f; --tip-teal: #6fc6db; --tip-ochre: #d4a85a; --tip-moss: #9cc283;

  --ease: cubic-bezier(.65, 0, .35, 1);
  --pad-x: clamp(20px, 5vw, 56px);
  /* one left content edge: masthead, hero, closing sections and footer share it (a 1068px measure centred, pad-x below that); % resolves against the full-width parent in padding */
  --edge: max(var(--pad-x), calc((100% - 1068px) / 2));
}

/* theme: html.is-dark / html.is-light are authoritative (theme.js); the media query is only the
   no-class fallback for a reader with no stored choice */
html.is-light { color-scheme: light; }
html.is-dark { color-scheme: dark; }
html.is-dark {
    --paper: #0f0d0a;
    --paper-deep: #181410;
    --ink: #f1ece2;
    --ink-soft: #b9b0a3;
    --oxblood: #e2855f;
    --teal: #6fc6db;
    --ochre: #d4a85a;
    --moss: #9cc283;
    --ochre-text: #d4a85a;
    --moss-text: #9cc283;
    --annot: #c7acd6;
    --step-dim: #86837c; --step-past: #918d86;   /* dark: 5.0 / 6.0:1 on --paper */
    --tip-bg: #2b2620; --tip-edge: color-mix(in oklab, #f1ece2 16%, transparent);
}
@media (prefers-color-scheme: dark) {
  html:not(.is-light):not(.is-dark) {
    --paper: #0f0d0a;
    --paper-deep: #181410;
    --ink: #f1ece2;
    --ink-soft: #b9b0a3;
    --oxblood: #e2855f;
    --teal: #6fc6db;
    --ochre: #d4a85a;
    --moss: #9cc283;
    --ochre-text: #d4a85a;
    --moss-text: #9cc283;
    --annot: #c7acd6;
    --step-dim: #86837c; --step-past: #918d86;   /* dark: 5.0 / 6.0:1 on --paper */
    --tip-bg: #2b2620; --tip-edge: color-mix(in oklab, #f1ece2 16%, transparent);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem; /* 17px phone */
  line-height: 1.65;
  font-variant-numeric: lining-nums;
}
html { scrollbar-gutter: stable; } /* the viewport scrolls: the gutter belongs on the root, not body */
::selection { background: color-mix(in oklab, var(--oxblood) 22%, transparent); color: inherit; }
html.is-dark body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* light-on-dark text renders heavy with subpixel AA */
@media (prefers-color-scheme: dark) { html:not(.is-light):not(.is-dark) body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } }
@media (min-width: 700px) { body { font-size: 1.125rem; } } /* 18px */

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
  font: 500 .875rem var(--f-label); text-decoration: none;
}
.skip-link:focus { top: 8px; color: var(--paper); }

/* ---- masthead (static: scrolls away, never covers a chart title) ---- */
.masthead {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px var(--edge);
  font-family: var(--f-label); font-size: .8125rem; letter-spacing: .06em;
}
.wordmark, .paper-link { white-space: nowrap; }
.wordmark { font-family: var(--f-display); font-weight: 500; font-size: 1.0625rem; letter-spacing: -.01em; text-decoration: none; }
.paper-link { padding: 12px 0; margin: -12px 0; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 500; }


/* ======================= Tornado page: lanes ======================= */
:root { --rail-h: 0px; --lane-c: var(--oxblood); --lane-t: var(--teal); }
@media (min-width: 1024px) { :root { --rail-h: 40px; } }
.nw { white-space: nowrap; }
.kicker, .ex-no, .sec-no, .ex-source, .src-inline, .scroll-cue, .fn-note, .endnote { font-family: var(--f-label); }
/* two-lane hairline: oxblood over teal, the page's one recurring device */
.lane-rule { background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); height: 6px; }

/* ---- hook ---- */
.hook-title {
  min-height: calc(100svh - 76px); padding: 2vh var(--edge) 4vh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 3.6vh, 40px);
}
.kicker { margin: 0 0 1rem; font-size: .8125rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.hook h1 {
  margin: 0; font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2rem, 5.6vw, 4.1rem); line-height: 1.06; letter-spacing: -.025em; max-width: 24ch; text-wrap: balance;
}
.standfirst { margin: 0; max-width: 50ch; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); }
.byline { margin: 1.1rem 0 0; font-family: var(--f-label); font-size: .875rem; letter-spacing: .04em; font-weight: 500; }
.scroll-cue { margin: 0; display: flex; align-items: center; gap: 10px; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.scroll-cue i { display: block; width: 1px; height: 34px; background: var(--ink-soft); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* lane ledger: the two issuers as two ruled lanes, state in the lane's colour */
.lanes-ledger { list-style: none; margin: 0; padding: 0; }
.lanes-ledger li { display: flex; align-items: baseline; gap: 12px; padding: .9rem 0 .75rem 16px; border-left: 6px solid var(--lane); border-bottom: 1px solid var(--hair); margin-bottom: 12px; }
.ll-c { --lane: var(--oxblood); } .ll-t { --lane: var(--teal); }
.ll-name { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -.015em; line-height: 1.1; }
.ll-coin { font-family: var(--f-label); font-size: max(.75rem, .55em); letter-spacing: .1em; color: var(--ink-soft); font-weight: 500; }
.ll-lead { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--ink-soft); transform: translateY(-.3em); }
.ll-state { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -.02em; line-height: 1; color: var(--lane); white-space: nowrap; }

/* key-figure strip: record entries, Space Grotesk tabular */
.keyfig { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; position: relative; }
.keyfig::before { content: ""; display: block; height: 6px; background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); grid-column: 1 / -1; }
.keyfig li { padding: 12px 0 10px; display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--hair); min-width: 0; }
.kf-num { font-family: var(--f-label); font-weight: 500; font-size: clamp(1.75rem, 7vw, 2.75rem); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); white-space: nowrap; min-width: 4.1ch; }
.kf-lab { font-family: var(--f-label); font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.3; }
@media (min-width: 700px) {
  .keyfig { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .keyfig li { flex-direction: column; gap: 6px; border-bottom: 0; padding: 14px 20px 6px 0; }
  .keyfig li + li { padding-left: 20px; border-left: 1px solid var(--hair); }
  .hook-title .scroll-cue { display: none; }
}
@media (min-width: 1024px) {
  .hook-title { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); row-gap: clamp(18px, 3vh, 36px); align-content: center; }
  .hook-head { grid-column: 1 / -1; }
  .hook-main { grid-column: 1 / span 5; align-self: end; }
  .lanes-ledger { grid-column: 7 / -1; align-self: end; }
  .keyfig { grid-column: 1 / -1; }
  .hook h1 { font-size: clamp(2.4rem, min(4.6vw, 7.4vh), 4.25rem); max-width: 26ch; }
  .standfirst { font-size: 1.0625rem; }
}
@media (min-width: 1024px) and (max-height: 760px) { .standfirst { font-size: 1rem; line-height: 1.42; } .ll-name, .lanes-ledger li { } }

.hook-track { display: none; position: relative; }
.js .hook-track { display: block; height: 460vh; }
.hook-stage { position: sticky; top: 0; height: calc(100vh - var(--rail-h)); height: calc(100svh - var(--rail-h)); display: flex; flex-direction: column; }

/* ---- exhibit anatomy ---- */
.exhibit { margin: 0; height: 100%; width: 100%; display: flex; flex-direction: column; padding: 24px clamp(16px, 3vw, 40px) 18px; }
.exhibit-hook { padding: 14px var(--edge) 8px; flex: 1; min-height: 0; height: auto; }
.ex-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.ex-no { font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.2; }
.ex-title { font-family: var(--f-display); font-weight: 500; letter-spacing: -.012em; font-size: clamp(1.0625rem, 1.5vw, 1.4rem); line-height: 1.22; }
.stack { display: grid; }
.stack > .sw { grid-area: 1 / 1; opacity: 0; transition: opacity .2s var(--ease); }
.stack > .sw.on { opacity: 1; transition: opacity .3s var(--ease) .1s; }
.chart-host { flex: 1; min-height: 0; position: relative; }
.chart-host svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.ex-source { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--hair); font-size: .75rem; letter-spacing: .03em; color: var(--ink-soft); line-height: 1.35; }
.src-inline { display: none; margin: 0; font-size: .75rem; letter-spacing: .03em; color: var(--ink-soft); line-height: 1.4; padding: 0 0 4vh; }

/* ---- svg chart vocabulary ---- */
svg.chart text { font-family: var(--f-label); font-size: 12px; fill: var(--ink-soft); font-variant-numeric: tabular-nums lining-nums; }
@media (min-width: 1024px) { svg.chart text { font-size: 13px; } }
.chart .grid line { stroke: var(--hair); stroke-dasharray: 3 4; }
.chart .base { stroke: var(--ink-soft); stroke-width: 1; }
.chart .xt { stroke: var(--hair); }
.chart .lane-lab { font-weight: 600; letter-spacing: .02em; fill: var(--ink-soft); transition: fill .5s; }
@media (min-width: 1024px) { .chart .lane-lab { font-size: 15px; } }
.chart .lane.lit.c .lane-lab { fill: var(--oxblood); } .chart .lane.lit.t .lane-lab { fill: var(--teal); }
.chart .bar { fill: var(--ink-soft); opacity: .5; transition: fill .5s, opacity .5s; }
.chart .lane.lit.c .bar { fill: var(--oxblood); opacity: 1; } .chart .lane.lit.t .bar { fill: var(--teal); opacity: 1; }
.chart .cut { stroke: var(--ink); stroke-width: 1.5; transition: opacity .5s; }
.chart .cut-lab { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; }
.chart .pill rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.chart .pill text { fill: var(--ink); font-weight: 600; }
.chart .pill.c rect { stroke: var(--oxblood); } .chart .pill.c text { fill: var(--oxblood); }
.chart .pill.t rect { stroke: var(--teal); } .chart .pill.t text { fill: var(--teal); }
.chart .pill { transition: opacity .5s; }
.chart .mark-lab { fill: var(--ink); font-weight: 500; paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; }
.chart .mark-line { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .head-line { stroke: var(--ink); stroke-width: 1; opacity: .65; }
.chart .stamp { fill: var(--ink); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; paint-order: stroke; stroke: var(--plate); stroke-width: 4px; }
.chart .ln { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.soft { stroke: var(--ink-soft); stroke-width: 1.75; }
.chart .ln.lit { stroke: var(--oxblood); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s var(--ease); }
.chart .ln.lit.on { stroke-dashoffset: 0; }
.chart .ci { fill: var(--ink); opacity: .09; }
.chart .zero { stroke: var(--ink); stroke-width: 1; }
.chart .dot { fill: var(--oxblood); stroke: var(--plate); stroke-width: 1.5px; opacity: 0; transition: opacity .4s; }
.chart .dot.on, .chart .lab.on { opacity: 1; }
.chart .lab { font-weight: 600; fill: var(--oxblood); paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; opacity: 0; transition: opacity .4s; }
.chart .lab.ink { fill: var(--ink); }
.chart .fade { opacity: 0; pointer-events: none; }
.chart .mark, .chart .cutg, .chart .pillg { transition: opacity .4s var(--ease); }   /* F6: marks, the cut and the pills fade, never pop */
.chart .head-line { transition: opacity .3s; }
.chart .ln.litgap { stroke: var(--oxblood); stroke-width: 4; stroke-dasharray: 3 3; opacity: 0; }
.chart .halo { fill: var(--ink-soft); paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; }

/* readouts riding the line head (Space Grotesk digits: tabular, no jitter) */
.exhibit-hook .readout:not(.sm) { background: var(--paper); padding: 2px 6px; margin: -2px -6px; z-index: 2; }
.readout { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; transition: opacity .35s; }
.ro-stamp { display: block; font-family: var(--f-label); font-weight: 500; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.ro-val { display: block; font-family: var(--f-label); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: .98; letter-spacing: -.035em; }
.ro-val.c { color: var(--oxblood); } .ro-val.t { color: var(--teal); } .ro-val.x { color: var(--oxblood); }
.ro-unit { font-family: var(--f-label); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); display: block; }
.hook-hint { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); margin: 0; font: 500 .75rem var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); transition: opacity .4s; pointer-events: none; white-space: nowrap; max-width: 100%; }
@media (max-width: 600px) { .hook-hint { font-size: .6875rem; letter-spacing: .08em; } }

/* ---- sections ---- */
.scrolly { position: relative; display: flex; flex-direction: column; }
.sec-head { padding: 12vh 0 2vh; }
.sec-no { margin: 0 0 .7rem; font-size: .8125rem; font-weight: 500; letter-spacing: .18em; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.sec-no::after { content: ""; width: 44px; height: 6px; background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); }
.sec-head h2 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.text-col { padding: 0 var(--pad-x); }
.text-col > * { max-width: 32rem; }
.text-col p { margin: 0 0 1.1em; hyphens: manual; text-wrap: pretty; color: var(--ink-body); }
.step { padding: 5vh 0 2vh; min-height: 56svh; }
.step p:last-child { margin-bottom: 0; }
.step .cont { margin-top: -.2em; }
.fn { font-family: var(--f-label); font-size: .7em; line-height: 0; }
.fn a { text-decoration: none; color: var(--oxblood); padding: 0 .1em; }
.fn-note { font-size: .875rem !important; line-height: 1.5; color: var(--ink-soft) !important; padding: 4vh 0 4vh; border-top: 1px solid var(--hair); margin-top: 4vh !important; }
.fn-note .fn-no { font-weight: 700; margin-right: .4em; color: var(--ink); }
.fn-note a { text-decoration: none; color: var(--oxblood); }

.plate { order: -1; background: var(--plate); }
.chart-section .plate { position: sticky; top: 0; z-index: 5; height: var(--plate-h); min-height: 0; max-height: none; border-bottom: 1px solid var(--hair); }
.chart-section .plate .exhibit { padding: 10px var(--pad-x) 6px; }
.chart-section .ex-head { padding-bottom: 6px; gap: 2px; }
.chart-section .ex-title { font-size: 1rem; }
.chart-section .ex-source { display: none; }
#s10 .chart-host { overflow: hidden; }
.chart-section .src-inline { display: block; }
.chart-section .sec-head { padding-top: 7vh; }

/* ---- desktop split: text left, framed panel right ---- */
@media (min-width: 1024px) { :root { --split: 38%; } }
@media (orientation: landscape) and (max-height: 500px) { :root { --split: 46%; } }
@media (min-width: 1440px) { :root { --split: 36%; } }
@media (min-width: 1024px), (orientation: landscape) and (max-height: 500px) {
  body { font-size: 1.125rem; padding-bottom: var(--rail-h); }
  .scrolly { display: grid; grid-template-columns: minmax(0, var(--split)) minmax(0, 1fr); align-items: start; }
  .text-col { padding: 0 clamp(24px, 2.4vw, 40px) 0 max(var(--pad-x), calc((100vw - 1068px) / 2)); }
  .plate { order: 0; background: transparent; }
  .chart-section .plate {
    position: sticky; top: 0; height: calc(100svh - var(--rail-h)); max-height: none; min-height: 0; border-bottom: 0;
    padding: 20px 28px 20px 0; display: flex; align-items: stretch;
  }
  .chart-section .plate .exhibit {
    background: var(--plate); border: 1px solid var(--hair); border-top: 0; padding: 0 clamp(24px, 2.8vw, 44px) 20px; position: relative;
  }
  .chart-section .plate .exhibit::before { content: ""; display: block; height: 6px; margin: 0 calc(-1 * clamp(24px, 2.8vw, 44px)) 22px; background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); }
  .chart-section .ex-head { padding-bottom: 12px; gap: 4px; }
  .chart-section .ex-title { font-size: clamp(1.15rem, 1.5vw, 1.45rem); }
  .chart-section .ex-source { display: block; }
  .chart-section .src-inline { display: none; }
  .chart-section .step { min-height: 62svh; padding: 14svh 0 0; }
  .chart-section .sec-head { padding-top: 22vh; padding-bottom: 6vh; }
  .chart-section .text-col { padding-bottom: 20vh; }
  .fn-note { padding-bottom: 12vh; }
}

/* ---- section ruler (desktop): fixed strip along the bottom edge ---- */
.rail { display: none; }
@media (min-width: 1024px) {
  .rail { display: block; position: fixed; left: 0; right: 0; bottom: 0; height: var(--rail-h); z-index: 20; background: var(--paper); border-top: 1px solid var(--hair); transition: transform .35s var(--ease); }
  .rail[hidden] { display: block; transform: translateY(100%); }
  .rail::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 6px; background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); opacity: .0; }
  .rail ol { list-style: none; margin: 0; padding: 0 20px; height: 100%; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .rail li { min-width: 0; }
  .rail a, .rail-later { height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 8px; font-family: var(--f-label); font-size: .75rem; letter-spacing: .02em; color: var(--ink-soft); text-decoration: none; position: relative; min-width: 0; }
  .rail a::before, .rail-later::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; }
  .rail a:hover { color: var(--ink); }
  .rail-later { opacity: .5; }
  .rail-no { font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
  .rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .rail a.is-current { color: var(--ink); }
  .rail a.is-current::before { background: var(--ink); }
  .rail a.is-current .rail-no { color: var(--oxblood); }
}
@media (min-width: 1024px) and (max-width: 1279.98px) { .rail-name { display: none; } .rail a.is-current .rail-name { display: inline; } }

/* ---- chrome ---- */
.endnote { padding: 12vh var(--edge) 14vh; border-top: 1px solid var(--hair); }
.endnote p { margin: 0; font-size: .875rem; letter-spacing: .04em; color: var(--ink-soft); }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 6px; z-index: 60; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); }
@media (min-width: 1024px) { .progress { display: none; } }
@media (prefers-reduced-motion: reduce) { .js .hook-track { height: 100svh; } *, *::before, *::after { animation: none !important; transition: none !important; } .js .chart-section .step { transform: none; } }
@media (max-width: 600px) {
  .kicker { font-size: .72rem; letter-spacing: .1em; }
  .masthead { gap: 8px; } .mast-right { gap: 4px; }
  .theme-toggle .tt-dark, .theme-toggle .tt-light, .theme-toggle[aria-pressed="true"] .tt-light { display: none; }
  .paper-link { letter-spacing: .08em; }
}
@media (max-width: 1023.98px) { .scrolly, .sec-head { scroll-margin-top: calc(clamp(300px, 50svh, 560px) + 16px); } }
@media (max-width: 360px) {
  .theme-toggle { padding: 0; justify-content: center; } .masthead { gap: 14px; } .mast-right { gap: 14px; }
  .paper-link .pl-opt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
}
/* theme toggle (>=44px target) */
.mast-right { display: flex; align-items: center; gap: 18px; }
/* two-state version switch: Article | Interactive (selected) */
.ver-switch { display: inline-flex; border: 1px solid var(--hair); font: 500 .75rem/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ver-switch a { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; text-decoration: none; color: var(--ink-soft); }
.ver-switch a + a { border-left: 1px solid var(--hair); }
.ver-switch a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.ver-switch a[aria-current="page"] { color: var(--ink); background: var(--paper-deep); box-shadow: inset 0 -2px 0 var(--oxblood); }
.ver-switch a:not([aria-current]):hover { color: var(--oxblood); }
@media (max-width: 600px) { .ver-switch { letter-spacing: .06em; } .ver-switch a { padding: 0 7px; } .paper-link .pl-opt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); } }
@media (max-width: 420px) { .ver-switch .vs-arr { display: none; } .wordmark .wm-rest { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); } } /* phone: wordmark shortens to "Nik" (full name stays in the accessible name) so the switch, PDF link and toggle fit one row */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 10px;
  background: transparent; color: var(--ink); border: 0; cursor: pointer;
  font: 500 .75rem var(--f-label); letter-spacing: .12em; text-transform: uppercase;
}
.theme-toggle:hover { color: var(--oxblood); }
.theme-toggle { margin-right: -10px; } /* the 44px target keeps its padding; the label's right edge sits on the content edge (the label is last) */
@media (max-width: 600px) { .theme-toggle { margin-right: -15px; } } /* icon only: the 14px icon is centred in the 44px box (15px of air to its right) */
.tt-ico { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-toggle .tt-light { display: none; }
.theme-toggle[aria-pressed="true"] .tt-dark { display: none; }
.theme-toggle[aria-pressed="true"] .tt-light { display: inline; }
@media (max-width: 600px) { .theme-toggle[aria-pressed] .tt-dark, .theme-toggle[aria-pressed] .tt-light { display: none; } } /* icon-only on phones in both states (the pressed rule above otherwise re-shows "Light") */
@media (min-width: 1024px) {
  .rail ol { display: flex; justify-content: space-between; gap: 4px; }
  .rail li { flex: 0 1 auto; }
}


/* ======================= overhaul 2026-11-16: visual first, text after ======================= */
/* step text: Kalla-style, readable, short measure; hidden until its visual has changed (JS adds is-active ~280 ms later; upcoming steps dimmed, not hidden) */
.text-col .step p { font-size: 1.1875rem; line-height: 1.5; max-width: 26rem; color: var(--ink); margin: 0; }
@media (min-width: 1024px) { .text-col .step p { font-size: 1.25rem; line-height: 1.5; } }
.kp { background: none; font-weight: 600; color: inherit; }
.kp.c { color: var(--oxblood); } .kp.t { color: var(--teal); }
.kp.i { box-shadow: inset 0 -.42em color-mix(in oklab, var(--ink) 15%, transparent); }
.js .step { transform: translateY(8px); transition: transform .4s var(--ease); }
.js .step p { color: var(--step-dim); transition: color .4s var(--ease); }
.js .step.is-past { transform: none; }
.js .step.is-past p { color: var(--step-past); }
.js .step.is-active { transform: none; transition: transform .18s ease-out; }   /* brighten-in is fast; the fade to past/dim keeps .4s above */
.js .step.is-active p { color: var(--ink); transition: color .18s ease-out; }
.js .step:not(.is-active) .kp.c, .js .step:not(.is-active) .kp.t { color: inherit; }   /* key-phrase hues only on the active step: oxblood/teal inside dim text fall below 4.5:1 */
.step { min-height: 62svh; padding: 8svh 0 0; }
.text-col .step:last-of-type { min-height: 70svh; }
.slot { font-family: var(--f-label); font-size: .78em; font-weight: 500; letter-spacing: .04em; color: var(--ink-soft); border: 1px dashed var(--ink-soft); padding: 0 .45em; }

/* scrubbed Exhibit 1: chart above, caption strip below */
.scrub { position: relative; }
.hook-caps { list-style: none; margin: 0; padding: 4px var(--edge) 16px; display: grid; flex: 0 0 auto; min-height: 7.4rem; border-top: 1px solid var(--hair); align-items: start; }
.hook-caps .step { grid-area: 1 / 1; min-height: 0; padding: 12px 0 0; }
.hook-caps .step p { max-width: 38rem; font-size: 1.0625rem; }
@media (min-width: 700px) { .hook-caps { min-height: 6.4rem; } .hook-caps .step p { font-size: 1.25rem; } }
.hook-caps.all { display: block; } .hook-caps.all .step { opacity: 1; transform: none; } .js .hook-caps.all .step p { color: var(--ink); } .js .hook-caps.all .step .kp.c { color: var(--oxblood); } .js .hook-caps.all .step .kp.t { color: var(--teal); }
.exhibit-hook .ex-head { padding-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .js .hook-track { height: auto; } .hook-stage { position: static; height: auto; } .exhibit-hook { flex: none; height: 70svh; } }

/* hook lanes: own scales, the 38 dots */
.chart .lane-tot { fill: var(--ink-soft); font-size: 12px; }
.chart .dots38 { transition: opacity .5s; }
.chart .dot38 { fill: transparent; stroke-width: 1.4; transition: fill .45s, stroke .45s; }
.chart .d38.c .dot38 { stroke: var(--oxblood); } .chart .d38.t .dot38 { stroke: var(--teal); }
.chart .d38.c.filled .dot38 { fill: var(--oxblood); } .chart .d38.t.filled .dot38 { fill: var(--teal); }
.chart .d38-lab { fill: var(--ink); font-weight: 600; font-size: 12px; }
.chart .lane.lit.i .lane-lab { fill: var(--ink); }

/* shared svg vocabulary for the new plates */
.chart .colh { fill: var(--ink-soft); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.chart .iv { color: var(--ink); }
.chart .iv.c { color: var(--oxblood); } .chart .iv.t { color: var(--teal); }
.chart .iv-l { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.chart .iv-c { stroke: currentColor; stroke-width: 2; }
.chart .iv-p { fill: currentColor; stroke: var(--plate); stroke-width: 2; }
.chart .iv.hol .iv-p, .chart .iv-p.hol { fill: var(--plate); stroke: currentColor; stroke-width: 2.5; }
.chart .iv-p.hol { stroke: var(--ink); }
.chart .iv-l.unc, .chart .iv-c.unc { stroke: var(--ink-soft); stroke-width: 2; }
.chart .barline { stroke: var(--ink); stroke-width: 2; }
.chart .barlab { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; }
.chart .zone { fill: var(--ink); opacity: .06; }
.chart .band { fill: var(--ink); opacity: .08; }
.chart .zeroline { stroke: var(--ink-soft); stroke-dasharray: 3 4; }
.chart .brk { stroke: var(--ink-soft); stroke-width: 1.5; }
.chart .fallbar { fill: var(--oxblood); }
.chart .hat { fill: url(#hatch); stroke: var(--ink); stroke-width: 1; }
.chart .est-lab { fill: var(--ink); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.chart .est-lab.sm { font-size: 15px; }
.chart .rl-in .est-lab:not(.sm) { fill: var(--oxblood); }
.chart .ml.c .est-lab { fill: var(--oxblood); } .chart .ml.t .est-lab { fill: var(--teal); } .chart .ml.i .est-lab { fill: var(--ink); }
.chart .note-lab { fill: var(--ink-soft); font-size: 12px; }
.chart .rw-lab { fill: var(--ink-soft); font-size: 13px; } .chart .rw-lab.hi { fill: var(--ink); font-weight: 600; }
.chart .rw-val { fill: var(--ink); font-size: 14px; font-weight: 600; }
.chart .tab { fill: var(--ink-soft); font-weight: 500; letter-spacing: .03em; font-size: 12px; transition: fill .4s; }
.chart .tab.cur { fill: var(--ink); font-weight: 600; }
.chart .rl-in { opacity: 0; transition: opacity .6s var(--ease); }
.chart .rl-in.on { opacity: 1; }
.chart .rl-in .fallbar { transform-box: fill-box; transform-origin: 100% 50%; transform: scaleX(0); transition: transform .8s var(--ease); }
.chart .rl-in.on .fallbar { transform: none; }
.chart .pn { opacity: 0; transition: opacity .2s var(--ease); pointer-events: none; }   /* out first, then in: never 50/50 */
.chart .pn.on { opacity: 1; transition: opacity .3s var(--ease) .08s; }
.chart .hd { opacity: 0; transition: opacity .2s var(--ease); }
.chart .hd.on { opacity: 1; transition: opacity .3s var(--ease) .08s; }
.chart .rw { transition: opacity .5s; }
.chart .ml { opacity: 0; transition: opacity .6s var(--ease); }
.chart .ml.on { opacity: 1; }
.chart .ml .base { stroke: var(--hair); }
.chart .ml .cap, .chart .ml .unc { opacity: 0; transition: opacity .2s var(--ease); }
.chart .ml .cap.on, .chart .ml .unc.on { opacity: 1; transition: opacity .3s var(--ease) .08s; }
/* slope */
.chart .sl { opacity: 0; transition: opacity .6s var(--ease); }
.chart .sl.on { opacity: 1; }
.chart .sl.ctl.dim { opacity: .16; }
.chart .sl-l { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.chart .sl.ctl .sl-l { stroke: var(--ink-soft); stroke-width: 3; }
.chart .sl-l.dash { stroke: var(--ink-soft); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .sl-d { fill: var(--ink); stroke: var(--plate); stroke-width: 2; }
.chart .sl-d.hol { fill: var(--plate); stroke: var(--ink-soft); stroke-width: 2.5; }
.chart .sl-n { fill: var(--ink); font-weight: 600; font-size: 13px; } .chart .sl.ctl .sl-n { fill: var(--ink-soft); }
.chart .sl-v { fill: var(--ink); font-weight: 500; font-size: 14px; } .chart .sl.ctl .sl-v { fill: var(--ink-soft); }
.chart .sl-br { stroke: var(--ink); stroke-width: 2; }
.chart .sl-big { fill: var(--ink); font-size: 26px; font-weight: 500; letter-spacing: -.03em; }
.chart .sl-small { fill: var(--ink-soft); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* generic html plates */
.frz, .who, .gp, .led { font-family: var(--f-label); font-variant-numeric: tabular-nums lining-nums; }
/* 2 freeze */
.frz { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 30rem; margin: 0 auto; width: 100%; }
.frz-card { position: relative; border: 1px solid var(--ink-soft); background: var(--paper); padding: 26px 26px 22px; transition: border-color .5s, background .5s; }
.frz-lab { margin: 0; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.frz-addr { margin: 6px 0 14px; font-size: 1.1rem; letter-spacing: .02em; }
.frz-bal { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.frz-n { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.frz-u { font-size: .9rem; letter-spacing: .12em; color: var(--ink-soft); }
.frz-stamp { position: absolute; top: -1px; right: -1px; margin: 0; padding: 7px 12px; background: var(--ink); color: var(--paper); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; transition: opacity .5s, transform .5s var(--ease); }
.frz[data-k="-1"] .frz-stamp { opacity: 0; transform: translateY(-8px); }
.frz-stays { margin: 12px 0 0; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; opacity: 0; transition: opacity .5s; }
.frz:is([data-k="1"], [data-k="2"]) .frz-stays { opacity: 1; }
.frz:is([data-k="0"], [data-k="1"], [data-k="2"]) .frz-card { border-color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, var(--paper)); }
.frz-tx { border: 1px solid var(--hair); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--ease); }
.frz[data-k="2"] .frz-tx { opacity: 1; transform: none; }
.frz-txl { margin: 0; font-size: 1rem; text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-soft); }
.frz-res { margin: 0; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
/* 3 who we watch */
.who { position: relative; height: 100%; min-height: 0; }
.who-view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transition: opacity .7s; pointer-events: none; }
.who-view.cmp { height: 40%; opacity: 0; }   /* two fixed layouts crossfade: nothing re-wraps while the step changes */
.who[data-k="2"] .who-view.full { opacity: 0; }
.who[data-k="2"] .who-view.cmp { opacity: 1; }
.who .cv { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .7s; }
.who:not([data-k="-1"]) .cv.a { opacity: 1; }
.who:is([data-k="1"], [data-k="2"]) .cv.b { opacity: 1; }
.who-lab { position: absolute; left: 0; margin: 0; display: flex; align-items: baseline; gap: 12px; opacity: 0; transition: opacity .6s; }
.who-lab b { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.who-lab span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.who-lab.b b { color: var(--ink-soft); }
.who:not([data-k="-1"]) .who-lab.a { opacity: 1; }
.who:is([data-k="1"], [data-k="2"]) .who-lab.b { opacity: 1; }
.who-view.cmp .who-lab b { font-size: 1.25rem; }
.who-bal { position: absolute; left: 0; right: 0; top: 40%; bottom: 0; padding-top: 12px; opacity: 0; transition: opacity .6s .4s; overflow: hidden; }
.who[data-k="2"] .who-bal { opacity: 1; }
.bal-key { margin: 0 0 8px; font-size: .75rem; color: var(--ink-soft); letter-spacing: .04em; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.bal-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.bal-key .kx { background: var(--ink); } .bal-key .ky { border: 2px solid var(--ink-soft); } .bal-key .kz { background: var(--paper); border: 1px solid var(--ink-soft); }
.bal-rows { display: flex; flex-direction: column; gap: clamp(6px, 1.4svh, 14px); }
.bal-row { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.who[data-k="2"] .bal-row { opacity: 1; transform: none; }
.bal-name { margin: 0; font-size: .8125rem; font-weight: 600; } .bal-name small { font-weight: 400; color: var(--ink-soft); margin-left: 6px; font-size: .75rem; }
.bal-track { position: relative; height: 20px; }
.bal-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--ink-soft); }
.bal-track i { position: absolute; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.bal-track .x { width: 10px; height: 10px; background: var(--ink); z-index: 3; }
.bal-track .y { width: 18px; height: 18px; border: 2px solid var(--ink-soft); z-index: 2; }
.bal-track .z { width: 10px; height: 10px; background: var(--paper); border: 1px solid var(--ink-soft); z-index: 1; }
.bal-n { font-size: .75rem; }
.bal-val { margin: 0; font-size: .8125rem; color: var(--ink-soft); } .bal-val b { color: var(--ink); font-weight: 600; }
/* 4 the gap */
.gp { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3.4svh, 34px); }
.gp > * { transition: opacity .6s var(--ease); }
.gp-formula { display: grid; justify-items: stretch; width: max-content; max-width: 100%; gap: 6px; }
.gf-top, .gf-bot { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 2.1rem); letter-spacing: -.02em; line-height: 1.05; }
.gf-bar { display: block; height: 2px; background: var(--ink); }
.gf-eq { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; margin-top: 4px; }
.gp[data-k="-1"] .gp-formula { opacity: 0; }
.gp-wallet, .gp-gap, .gp-money { opacity: 0; }
.gp:is([data-k="1"], [data-k="2"], [data-k="3"]) :is(.gp-wallet, .gp-gap) { opacity: 1; }
.gp[data-k="3"] .gp-money { opacity: 1; }
.gp-bar { display: flex; height: clamp(34px, 6.5svh, 54px); }
.gp-bar .u { flex: 0 0 70%; background: var(--oxblood); }   /* width, numbers and marker share one JS clock (F8) */
.gp-bar .t { flex: 1; background: var(--teal); }
.gp-labs { margin: 8px 0 0; display: flex; justify-content: space-between; font-size: .875rem; letter-spacing: .04em; color: var(--ink-soft); }
.gp-labs b { color: var(--ink); font-size: 1.15rem; font-weight: 500; margin-right: 4px; }
.gp-labs .u { color: var(--oxblood); } .gp-labs .t { color: var(--teal); }
.gp-gap { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.gp-n { margin: 0; flex: 0 0 auto; display: flex; flex-direction: column; min-width: 4.2rem; }
.gp-n span { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.gp-n small { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.gp-scale { flex: 1; min-width: 0; }
.gp-track { position: relative; height: 54px; }
.gp-track::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: var(--ink-soft); }
.gp-track i, .bal-track i, .bal-key i { font-style: normal; }
.gp-track .tk { position: absolute; top: 8px; height: 14px; border-left: 1px solid var(--ink-soft); }
.gp-track .tk b { position: absolute; top: 16px; left: -1em; width: 2em; text-align: center; font-size: .75rem; font-weight: 400; color: var(--ink-soft); }
.gp-m { position: absolute; top: 15px; left: 75%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--ink); }
.gp-ghost { position: absolute; top: 15px; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid var(--ink-soft); background: var(--plate); opacity: 0; transition: opacity .5s; }
.gp:is([data-k="2"], [data-k="3"]) .gp-ghost { opacity: 1; }
.gp-br { position: absolute; top: 28px; left: 62.5%; width: 12.5%; height: 8px; border: 2px solid var(--ink); border-top: 0; opacity: 0; transition: opacity .5s .5s; }
.gp-br b { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .8125rem; font-weight: 600; }
.gp-br .b3 { display: none; }
.gp:is([data-k="2"], [data-k="3"]) .gp-br { opacity: 1; }
.gp[data-k="3"] .gp-br { border-width: 3px; } .gp[data-k="3"] .gp-br .b2 { display: none; } .gp[data-k="3"] .gp-br .b3 { display: block; }
.gp-cap { margin: 20px 0 0; font-size: .75rem; color: var(--ink-soft); }
.gp-money { margin: 0; font-size: 1rem; color: var(--ink-soft); border-top: 2px solid var(--ink); padding-top: 12px; } .gp-money b { color: var(--ink); font-weight: 600; font-size: 1.15rem; }
/* 10 closing ledger */
.led { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2.4svh, 22px); }
.led-b { border-left: 6px solid var(--ink); padding: 0 0 0 16px; }
.led-b.cant { border-left: 6px dashed var(--ink-soft); }
.led h3 { margin: 0 0 4px; font-family: var(--f-label); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.led ul { list-style: none; margin: 0; padding: 0; }
.led li { font-family: var(--f-display); font-weight: 500; font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.25; letter-spacing: -.01em; padding: .5rem 0; border-bottom: 1px solid var(--hair); opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.led:not([data-k="-1"]) .can li, .led:is([data-k="1"], [data-k="2"], [data-k="3"]) .cant li { opacity: 1; transform: none; }
.led-b.cant { opacity: 0; transition: opacity .4s; } .led:is([data-k="1"], [data-k="2"], [data-k="3"]) .led-b.cant { opacity: 1; }
.led-b.can { opacity: 0; transition: opacity .4s; } .led:not([data-k="-1"]) .led-b.can { opacity: 1; }
.led-read, .led-links { margin: 0; opacity: 0; transition: opacity .6s var(--ease); }
.led-read { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.35; color: var(--ink-soft); font-style: italic; }
.led:is([data-k="2"], [data-k="3"]) .led-read, .led[data-k="3"] .led-links { opacity: 1; }
.led-links { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: .875rem; letter-spacing: .02em; }
.led-links a, .step-links a { display: inline-block; padding: 12px 0; margin: -12px 0; }   /* >=44px tap target, layout unchanged */
.text-col .step .step-links { display: none; flex-direction: column; gap: 2px; margin: 16px 0 0; font-family: var(--f-label); font-size: .9375rem; line-height: 1.4; }
@media (max-width: 1023.98px) {
  .exhibit .ex-title { font-size: .95rem; }
  .who-lab b { font-size: 1.4rem; } .frz-n { font-size: 2.2rem; } .frz { gap: 12px; } .frz-card { padding: 16px; }
  .led li { padding: .3rem 0; font-size: .92rem; } .led { gap: 8px; } .led-read { font-size: .9rem; } .led h3 { margin: 0; }
  .gp { gap: 12px; } .gp-cap { margin-top: 12px; }
}
.hook-caps:not(.all) .step:not(.is-active) { opacity: 0; }
/* hook captions stack in one cell: they crossfade by opacity (inactive ones are hidden, so no dim colour) */
.js .hook-caps .step { transition: opacity .4s var(--ease), transform .4s var(--ease); } .js .hook-caps .step.is-active { transition: opacity .18s ease-out, transform .18s ease-out; }
.js .hook-caps .step p { color: var(--ink); transition: none; } .js .hook-caps .step .kp.c { color: var(--oxblood); } .js .hook-caps .step .kp.t { color: var(--teal); }
.chart .colline { stroke: var(--hair); stroke-width: 1.5; }
.chart .sl-v, .chart .sl-n { paint-order: stroke; stroke: var(--plate); stroke-width: 4px; stroke-linejoin: round; }
.gp-bar { height: clamp(40px, 8svh, 70px); }
.chart .est-lab.in { fill: var(--paper) !important; font-size: 15px; }
.chart .note-lab { paint-order: stroke; stroke: var(--plate); stroke-width: 3px; stroke-linejoin: round; }
.chart .ml .note-lab, .chart .rw-lab { paint-order: stroke; stroke: var(--plate); stroke-width: 3px; }
.led-b.cant { border-left: 6px solid color-mix(in oklab, var(--ink) 38%, transparent); }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .who-view.cmp { display: none; }
  .who-bal { top: 0; }
  .led-read, .led-links { display: none; }   /* M2: the links move into step 4's text as real links (the reading is step 3's own text) */
  .text-col .step .step-links { display: flex; }
  .bal-row { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
  .bal-track { grid-column: 1 / -1; grid-row: 2; }
  .bal-val { text-align: right; }
  .bal-name small { display: none; }
  .gp { gap: 12px; justify-content: flex-start; padding-top: 8px; }
  .gf-top, .gf-bot { font-size: 1.05rem; }
  .gp-bar { height: 34px; }
  .gp-cap { display: none; }
  .gp-n span { font-size: 2.2rem; } .gp-track { height: 44px; }
  .gp-money { font-size: .875rem; padding-top: 8px; }
  #s10 .ex-head { display: none; }
  .led { justify-content: flex-start; gap: 8px; padding-top: 8px; }
  .led li { padding: .25rem 0; font-size: .85rem; line-height: 1.2; }
  .led-b { padding-left: 12px; } .led-read { font-size: .82rem; }
  .frz { justify-content: flex-start; padding-top: 8px; }
}

/* M5: a long step stays fully on screen for most of its scroll (activation line is 30% below the plate) */
@media (max-width: 600px) and (not ((orientation: landscape) and (max-height: 500px))) { .chart-section .step { min-height: calc((100svh - clamp(300px, 50svh, 560px)) * .85); padding-top: 4svh; } }
@media (min-width: 601px) and (max-width: 1023.98px) and (not ((orientation: landscape) and (max-height: 500px))) { .chart-section .step { min-height: calc((100svh - clamp(300px, 46svh, 560px)) * .85); padding-top: 4svh; } }
/* M11: tablets: a centred text column instead of the phone layout blown up */
@media (min-width: 700px) and (max-width: 1023.98px) { .text-col > * { margin-left: auto; margin-right: auto; } .hook-caps .step p { margin-left: auto; margin-right: auto; } }
/* M1: a phone on its side: the hook is a static figure, sections use the two-column layout */
@media (orientation: landscape) and (max-height: 500px) {
  .js .hook-track { height: auto; } .hook-stage { position: static; height: auto; } .exhibit-hook { flex: none; height: 460px; }
  .hook-title { min-height: 0; }
}
/* F12a: a theme switch fades the page, the svg and the borders on one clock */
@media (prefers-reduced-motion: no-preference) {
  html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: background-color .4s, color .4s, border-color .4s, fill .4s, stroke .4s, box-shadow .4s !important; }
}

.readout.sm .ro-val { font-size: 1.75rem; }
.chart .note-lab { stroke-width: 5px; }
.frz-stamp { max-width: 11em; text-align: right; }
.gp-br b { top: 16px; }
/* M1: phone on its side: the plate gives its height to the chart */
@media (orientation: landscape) and (max-height: 500px) {
  .chart-section .plate { padding: 8px 12px 8px 0; }
  .chart-section .plate .exhibit { padding: 0 14px 6px; }
  .chart-section .plate .exhibit::before { margin: 0 -14px 6px; }
  .chart-section .ex-head { padding-bottom: 4px; gap: 0; }
  .chart-section .ex-no, .chart-section .ex-source { display: none; }
  .chart-section .src-inline { display: block; }
  .chart-section .sec-head { padding-top: 14vh; }
}
/* compact plates: the worked example and the freeze card must fit the short plate */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .gp { gap: 8px; padding-top: 4px; }
  .gp-formula { gap: 3px; } .gf-eq { margin-top: 2px; }
  .gp-bar { height: 28px; } .gp-labs { margin-top: 4px; }
  .gp-n .gn { font-size: 1.9rem; } .gp-track { height: 40px; }
  .gp-money { font-size: .8125rem; line-height: 1.3; padding-top: 6px; } .gp-money b { font-size: 1rem; }
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) { .gp-track { height: 52px; } .gp-cap { display: none; } .gf-top, .gf-bot { font-size: 1rem; } }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) { .gp-money { margin-top: 6px; } }
.readout.sm .ro-val, .readout.sm .ro-unit { text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 5px var(--paper); }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .frz { gap: 8px; padding-top: 2px; }
  .frz-card { padding: 12px 14px 10px; }
  .frz-addr { margin: 2px 0 6px; font-size: 1rem; }
  .frz-n { font-size: 1.9rem; }
  .frz-stays { margin: 6px 0 0; }
  .frz-tx { padding: 8px 14px; gap: 3px; }
  .frz-stamp { padding: 5px 10px; }
}
/* tablets: the balance rows get the whole plate (as on phones); the dot field fades out */
@media (min-width: 701px) and (max-width: 1023.98px) {
  .who-view.cmp { display: none; } .who-bal { top: 0; }
  .bal-row { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
  .bal-track { grid-column: 1 / -1; grid-row: 2; } .bal-val { text-align: right; } .bal-name small { display: none; }
}

.exhibit-hook .readout { z-index: 2; }
.exhibit-hook .readout .ro-val, .exhibit-hook .readout .ro-unit { text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 6px var(--paper); }
.readout.nu .ro-unit { display: none; }
.gp-track .tk.last b { left: auto; right: 0; text-align: right; }
.gp-br { top: 42px; } .gp-br b { top: 10px; } .gp-track { height: 70px; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) { .gp-track { height: 64px; } }
.chart .ml .lane-lab, .chart .ml .est-lab { paint-order: stroke; stroke: var(--plate); stroke-width: 5px; stroke-linejoin: round; }
.chart .zeroline { stroke: var(--ink-soft); }
.bal-nkey { display: none; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .bal-n { display: none; } .bal-nkey { display: block; flex-basis: 100%; }
  .bal-rows { gap: 4px; } .bal-track { height: 16px; } .bal-key { margin-bottom: 4px; }
}

@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .gp { gap: 6px; } .gp-money { margin-top: 0; } .gp-bar { height: 24px; } .gp-track { height: 60px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .bal-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
  .gf-eq { display: none; } .gp-bar { height: 20px; }
  .frz { gap: 6px; } .frz-card { padding: 8px 12px 8px; } .frz-n { font-size: 1.6rem; } .frz-tx { padding: 6px 12px; }
  .led li { padding: .15rem 0; } .led { gap: 5px; }
}

@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) { .gp-br b { top: 8px; } .gp-track { height: 66px; } }
@media (orientation: landscape) and (max-height: 500px) { .who-bal { padding-top: 6px; } .bal-track { height: 12px; } .bal-key { margin-bottom: 2px; } .bal-rows { gap: 2px 16px; } }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) { .gp-track { height: 62px; } .gp { gap: 5px; } }
@media (orientation: landscape) and (max-height: 500px) { .gp-track { height: 66px; } .gp-money { margin-top: 5px; } }
@media (max-width: 700px) { .gp { gap: 4px; } .gp-track { height: 65px; } .gp-money { line-height: 1.25; } }

/* ======================= step dwell 2026-11-17: the text pins at a reading line while the reader keeps scrolling ======================= */
/* .step-in is sticky at --pin inside .step; .step is taller than its text by --dwell (the ::after spacer), so the text stays still for that scroll distance, then leaves with its container. JS reads the computed `top` of .step-in as the activation line. */
.chart-section {
  --plate-h: clamp(300px, 50svh, 560px);   /* phone plate height: the plate rule and the pin both use it */
  --rh: 2rem;                              /* phone running head height */
  --pin: calc(var(--plate-h) + var(--rh) + .75rem);   /* phone: below the plate and the running head */
  --dwell: 35svh; --lead: 10svh;           /* dwell distance; air above the text before it arrives */
}
@media (min-width: 601px) { .chart-section { --plate-h: clamp(300px, 46svh, 560px); } }
@media (max-width: 1023.98px) and (max-height: 700px) and (orientation: portrait) { .chart-section { --plate-h: clamp(300px, 47svh, 560px); } }   /* 360x640: pin 345 so the tallest step (285px) fits and keeps its dwell-free pin without clipping */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 500px) {
  .chart-section { --pin: 36svh; --dwell: 30svh; --lead: 16svh; }   /* two columns: text beside the plate, a little above the vertical middle */
}
@media (orientation: landscape) and (max-height: 500px) {
  .chart-section { --pin: 45svh; --dwell: 0px; --lead: 8svh; }   /* phone on its side: no room to hold 50 words, so no dwell; --pin is only the activation line */
}
.chart-section .text-col .step { min-height: 0; padding: var(--lead) 0 0; }
.chart-section .step::after { content: ""; display: block; height: var(--dwell); }
.chart-section .step-in { position: sticky; top: var(--pin); }
.js .chart-section .step { transform: none; }   /* a translateY on the step would shift the pinned text while it highlights */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 500px) {
  .chart-section .text-col { padding-bottom: calc(100svh - var(--pin)); }   /* the chart stays docked until the last step's dwell is over */
}
@media (max-width: 1023.98px) and (not ((orientation: landscape) and (max-height: 500px))) {
  .chart-section .text-col .step:first-of-type { padding-top: 0; }   /* no empty chart between the dock and the first step */
  .chart-section .sec-head { padding-top: .75rem; padding-bottom: 0; }   /* the heading sits right under the plate; the running-head slot below it is the air before the first step */
  /* running head: a real in-flow slot (so it leaves with the section and the plate), sticky under the plate; invisible until the h2 has scrolled under the plate (JS .rh-on) */
  .chart-section .run-head {
    display: flex; position: sticky; top: var(--plate-h); z-index: 4; max-width: none; height: var(--rh); box-sizing: border-box;
    margin: 0 calc(-1 * var(--pad-x)); padding: 0 var(--pad-x); align-items: center; gap: 12px;
    background: var(--paper); border-bottom: 1px solid var(--hair); opacity: 0; pointer-events: none;   /* disappears instantly (it leaves with the plate), fades in .12s */
  }
  .chart-section.rh-on .run-head { opacity: 1; transition: opacity .12s ease-out; }
  .chart-section.rh-on .plate { border-bottom-color: transparent; }   /* the head's own hairline is the only rule under the plate (no double band) */
  .rh-solo .rh-no::after { content: ""; display: inline-block; vertical-align: middle; margin-left: 12px; width: 44px; height: 6px; background: linear-gradient(to bottom, var(--oxblood) 0 2px, transparent 2px 4px, var(--teal) 4px 6px); }
  .rh-no { font: 500 .75rem var(--f-label); letter-spacing: .18em; color: var(--ink); flex: none; }
  .rh-t { font: 500 .875rem/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
.run-head, .sh-c { display: none; }
/* desktop: the section heading stays at the top of the text column until the section ends; the next section's heading replaces it. Short landscape: no sticky heading (no room).
   The box keeps its full size (flow never changes, so the steps never shift); once the first step has pinned (.hc) only its paper backdrop shrinks to the one-line head and the big h2 gives way to .sh-c. */
@media (min-width: 1024px) and (not ((orientation: landscape) and (max-height: 500px))) {
  html { scroll-padding-top: 5.5rem; }   /* collapsed head (3.75rem) + 1.5rem: keyboard focus never lands under it */
  .chart-section .sec-head { position: sticky; top: 0; z-index: 4; box-sizing: border-box; padding: 1.5rem 0 .75rem; margin: calc(22vh - 1.5rem) 0 6vh; pointer-events: none; }
  .chart-section .sec-head::before, .chart-section .sec-head::after { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1; pointer-events: none; }
  .chart-section .sec-head::before { height: calc(100% + 20px); background: linear-gradient(to bottom, var(--paper) calc(100% - 20px), transparent); }   /* full backdrop, behind the big h2 */
  .chart-section .sec-head::after { height: calc(3.75rem + 20px); background: linear-gradient(to bottom, var(--paper) calc(100% - 20px), transparent); }   /* collapsed backdrop: always there */
  .chart-section.hc .sec-head::before { opacity: 0; transition: opacity .15s ease .15s; }   /* the full backdrop goes only after the h2 has faded, so the h2 is never printed over the step text */
  .chart-section .sec-head .sec-no, .chart-section .sec-head h2 { transition: opacity .15s; }
  .chart-section.hc .sec-head .sec-no, .chart-section.hc .sec-head h2 { opacity: 0; }
  .chart-section .sh-c { display: flex; position: absolute; left: 0; right: 0; top: 1.5rem; height: 1.5rem; align-items: center; gap: 12px; opacity: 0; transition: opacity .15s .05s; }
  .chart-section.hc .sh-c { opacity: 1; }
  .sh-c .rh-t { font: 500 1.25rem/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .sh-c .rh-no { font: 500 .8125rem var(--f-label); letter-spacing: .18em; color: var(--ink); flex: none; }
}
.text-col .step .step-links { gap: 0; }
.step-links a { padding: 8px 0; margin: 0; }   /* tap targets stacked, not overlapping (was -12px margins on a 2px gap) */

/* ---- s08 / s09: step transitions in the s04-s07 family (visual leads; .1 s panel delay; .09 s stagger per row; leaving = the panel/lane fades (.25 s), its parts reset only after that, unseen) ---- */
.chart .pn .rw-lab, .chart .pn .rw-val { opacity: 0; transition: opacity 0s linear .2s; }
.chart .pn.on .rw-lab, .chart .pn.on .rw-val { opacity: 1; transition: opacity .35s var(--ease) calc(.08s + var(--i, 0) * .09s); }
.chart .rw .iv-l, .chart .ml .iv-l { transform: scaleX(0); transition: transform 0s linear .2s; }   /* the whisker is drawn out from its point (origin set per element in JS) */
.chart .pn.on .rw .iv-l, .chart .ml .cap.on .iv-l, .chart .ml .unc.on .iv-l { transform: none; transition: transform .6s var(--ease) calc(.08s + var(--i, 0) * .09s); }
.chart .rw .iv-p, .chart .ml .iv-p, .chart .rw .iv-c, .chart .ml .iv-c, .chart .ml .est-lab { opacity: 0; transition: opacity 0s linear .2s; }
.chart .pn.on .rw .iv-p, .chart .ml .cap.on .iv-p, .chart .ml .unc.on .iv-p { opacity: 1; transition: opacity .3s var(--ease) calc(.08s + var(--i, 0) * .09s); }
.chart .pn.on .rw .iv-c, .chart .ml .cap.on .iv-c, .chart .ml .unc.on .iv-c, .chart .ml .cap.on .est-lab, .chart .ml .unc.on .est-lab { opacity: 1; transition: opacity .3s var(--ease) calc(.4s + var(--i, 0) * .09s); }
.chart .pn .barline { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform 0s linear .2s; }
.chart .pn.on .barline { transform: none; transition: transform .6s var(--ease) .08s; }
.chart .ml { transition: opacity .25s var(--ease); }
.chart .ml.on { transition: opacity .35s var(--ease) .1s; }
.chart .ml .base { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); transition: transform 0s linear .3s; }
.chart .ml.on .base { transform: none; transition: transform .7s var(--ease) .1s; }
.chart .tabline { fill: var(--oxblood); transform-origin: 0 0; transition: transform .4s var(--ease), opacity .3s var(--ease); }

/* ---- hover layer: one dark tooltip card (the page's --tip-* tokens), a mark on the hovered datum, a visible focus ring for the keyboard route ---- */
.tip { position: fixed; left: 0; top: 0; z-index: 60; width: max-content; max-width: min(19rem, calc(100vw - 16px)); padding: 9px 12px 10px; border-radius: var(--tip-r); background: var(--tip-bg); color: var(--tip-fg); border: 1px solid var(--tip-edge); box-shadow: 0 6px 22px rgb(0 0 0 / .22); font-family: var(--f-label); font-size: .8125rem; line-height: 1.35; font-variant-numeric: tabular-nums lining-nums; pointer-events: none; opacity: 0; transition: opacity .12s ease-out; }
.tip.on { opacity: 1; }
.tip-t { display: block; font-weight: 600; font-size: .875rem; }
.tip-n { display: block; color: var(--tip-soft); font-size: .75rem; margin-top: 1px; }
.tip-r { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; margin-top: 5px; }
.tip-t + .tip-r, .tip-n + .tip-r { margin-top: 8px; }
.tip-k { color: var(--tip-soft); display: inline-flex; align-items: center; gap: 6px; }
.tip-k i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.tip-r b { font-weight: 600; text-align: right; }
.tip-r small { grid-column: 1 / -1; color: var(--tip-soft); font-size: .6875rem; line-height: 1.3; }
.tip-f { display: block; margin-top: 8px; padding-top: 6px; border-top: 1px solid color-mix(in oklab, var(--tip-fg) 18%, transparent); color: var(--tip-soft); font-size: .75rem; }
.chart-host svg.hov-ov { pointer-events: none; }
.hv-ring { fill: none; stroke: var(--ink); stroke-width: 2; }
.hv-line { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 3; }
.hv-box { fill: none; stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-host:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.led li:hover { border-bottom-color: var(--ink); }   /* s10 is the closing ledger of statements and links: no data to read, so hover only marks the row */
.led li { transition: opacity .6s var(--ease), transform .7s var(--ease), border-color .2s; }

.tip.compact .tip-r small, .tip.compact .tip-n { display: none; }
.tip.compact { padding: 7px 10px 8px; line-height: 1.3; }   /* shorter card: it must clear the hovered row on a 640px-tall phone */
.tip.compact .tip-r { margin-top: 3px; } .tip.compact .tip-t + .tip-r { margin-top: 6px; } .tip.compact .tip-f { margin-top: 6px; padding-top: 4px; }

/* s09 cap switch: the mover group is always fully drawn (the generic entry rules would hide its whisker/point); .snap lands states without fades */
.chart .ml .mvg .iv-l { transform: none; transition: none; }
.chart .ml .mvg .iv-p, .chart .ml .mvg .iv-c, .chart .ml .mvg .est-lab { opacity: 1; transition: none; }
.chart .ml.snap, .chart .ml.snap * { transition: none !important; }
