/* KIPfoot Labs: case-study pages. Builds on the Ideas article tokens (copied below so a Labs page stands alone).
   Layout concept: an article column that scrolls past a sticky 3D model, timeline steps down the left edge,
   facts and comparisons set off in quiet panels, a full explore mode and the process numbers at the end. */

:root {
  --bg: #FFF9F2; --panel: #FFFFFF; --ink: #0B1F36; --body: #22364B; --muted: #546779; --line: rgba(11, 31, 54, .14); --line-strong: rgba(11, 31, 54, .28);
  --orange: #FF6A00; --teal: #14B8A6; --btn: #0B1F36; --btn-ink: #FFFFFF; --accent-ink: #C2410C; --note: #EEF0F3; --plate: #FFFFFF; --plate-ink: #141413; --plate-muted: #546779;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  /* viewer + chart roles (validated reference palette; status colours fixed across themes) */
  --stage: #F3EEE6; --pv-frame: #9AA7B5; --pv-wall: #5F6F80; --pv-slab: #C9D2DB; --pv-ghost: #D3D9DF; --pv-ground: #E8E1D6;
  --pv-arm: #FF6A00; --pv-pier: #0B1F36; --pv-neg: #2a78d6; --pv-pos: #d03b3b; --pv-mid: #e4e2dc; --pv-seq-lo: #cde2fb; --pv-seq-hi: #0d366b;
  --pv-wind: #2a78d6; --pv-lee: #eb6834;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --grid: #e1e0d9; --axis: #c3c2b7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A1A2D; --accent-ink: #FF8A3D; --note: #13263C; --panel: #0F2238; --ink: #EEF1F4; --body: #D5DDE5; --muted: #9FB0C2; --line: rgba(238, 241, 244, .14); --line-strong: rgba(238, 241, 244, .28); --btn: #EEF1F4; --btn-ink: #0B1F36;
  --stage: #0D1F34; --pv-frame: #6F8297; --pv-wall: #9FB0C2; --pv-slab: #3A516A; --pv-ghost: #22364B; --pv-ground: #12263D;
  --pv-arm: #FF7A1A; --pv-pier: #EEF1F4; --pv-neg: #3987e5; --pv-pos: #e66767; --pv-mid: #2b3d52; --pv-seq-lo: #1d3a5c; --pv-seq-hi: #9ec5f4;
  --pv-wind: #3987e5; --pv-lee: #d95926;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --grid: #22364B; --axis: #3A516A;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0A1A2D; --accent-ink: #FF8A3D; --note: #13263C; --panel: #0F2238; --ink: #EEF1F4; --body: #D5DDE5; --muted: #9FB0C2; --line: rgba(238, 241, 244, .14); --line-strong: rgba(238, 241, 244, .28); --btn: #EEF1F4; --btn-ink: #0B1F36;
  --stage: #0D1F34; --pv-frame: #6F8297; --pv-wall: #9FB0C2; --pv-slab: #3A516A; --pv-ghost: #22364B; --pv-ground: #12263D;
  --pv-arm: #FF7A1A; --pv-pier: #EEF1F4; --pv-neg: #3987e5; --pv-pos: #e66767; --pv-mid: #2b3d52; --pv-seq-lo: #1d3a5c; --pv-seq-hi: #9ec5f4;
  --pv-wind: #3987e5; --pv-lee: #d95926;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --grid: #22364B; --axis: #3A516A;
  color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
p, h1, h2, h3, h4, figure { margin: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 999px; text-decoration: none; z-index: 30; }
.skip:focus { top: 12px; }

/* top bar (Ideas pattern, with a Labs link) */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--bg); }
.bar-wrap { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 18px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); max-width: 1280px; margin: 0 auto; }
.home { color: var(--ink); display: inline-flex; }
.lockup { height: 30px; width: auto; display: block; }
.spacer { flex: 1; }
.bar-link { font-size: 15px; font-weight: 600; text-decoration: none; }
.bar-link:hover, .bar-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); }
.switch { position: relative; flex: none; width: 42px; height: 22px; padding: 0; border-radius: 999px; border: 1.5px solid var(--muted); background: transparent; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .2s ease; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 999px; padding: 10px 18px; border: 1.5px solid var(--ink); color: var(--ink); white-space: nowrap; background: transparent; cursor: pointer; font-family: var(--font); }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn svg { width: 18px; height: 18px; }

/* hero */
.hero { max-width: 1280px; margin: 0 auto; padding: 44px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kicker svg { width: 30px; height: 30px; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: none; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero h1 { font-size: clamp(44px, 8vw, 92px); font-weight: 800; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.hero h1 .dot { color: var(--orange); }
.dek { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.45; color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.lab-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 54px); align-items: start; }
.lab-intro .dek + .dek { margin-top: 1em; }
.hero-project { display: grid; gap: 8px; }
.hero-project img { display: block; width: 100%; height: clamp(240px, 32vw, 390px); object-fit: contain; background: var(--stage); border-radius: 14px; }
.hero-project figcaption { color: var(--muted); font-size: 13px; }
.engineer-teaser { display: grid; gap: 2px; width: fit-content; max-width: 100%; margin-top: 22px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 8px; background: var(--panel); text-decoration: none; }
.engineer-teaser span { color: var(--muted); font-size: 13px; }
.engineer-teaser:hover strong { text-decoration: underline; text-decoration-color: var(--orange); }
#note, #process { scroll-margin-top: 90px; }
@media (max-width: 760px) {
  .lab-intro { grid-template-columns: minmax(0, 1fr); }
}
.meta { font-size: 14px; color: var(--muted); }
.made-with { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: fit-content; max-width: 100%; box-sizing: border-box; padding: 10px 18px; margin: 0; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); }
.mw-claude, .mw-app { display: inline-flex; align-items: center; gap: 9px; font: 700 21px/1 var(--font); letter-spacing: -.01em; color: var(--plate-ink); }
.mw-claude img, .mw-app img { width: 36px; height: 36px; border-radius: 8px; display: block; }
.mw-plus { font: 600 24px/1 var(--font); color: var(--plate-muted); }
.mw-pondus { height: 36px; width: auto; display: block; }
.figures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 6px; }
.figures div { padding: 14px 16px 14px 0; display: grid; gap: 2px; }
.figures div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.figures dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); order: 2; }
.figures dd { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; order: 1; }
.figures dd small { font-size: .55em; font-weight: 700; color: var(--muted); letter-spacing: 0; }

/* story: text column + sticky model */
.story { max-width: 1280px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 1fr); gap: 40px; align-items: start; }
.stage { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); height: calc(100vh - 96px - env(safe-area-inset-top, 0px)); min-height: 460px; }
.lab-steps { display: grid; grid-template-columns: minmax(0, 1fr); }
.step { position: relative; padding: 34px 0 54px 30px; border-left: 2px solid var(--line); min-height: 64vh; display: grid; align-content: start; gap: 18px; }
.step:first-child { padding-top: 6px; }
.step::before { content: ""; position: absolute; left: -7px; top: 40px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.step:first-child::before { top: 12px; }
.step.is-active::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 22%, transparent); }
.step h2 { transition: color .3s ease; }
.step.is-active h2 { color: var(--accent-ink); }
.try { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.try::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pv.is-flash { animation: pv-flash 1.4s ease-out; }
@keyframes pv-flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 60%, transparent); } 25% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 35%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.note { background: var(--note); border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px; display: grid; gap: 14px; max-width: 82ch; color: var(--body); font-size: 16.5px; line-height: 1.6; }
.note h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.note ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.note .from { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pv-collapse { display: none; position: absolute; top: 10px; right: 10px; z-index: 4; font: 700 12.5px/1 var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 11px; cursor: pointer; }

.stamp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stamp .run { text-transform: none; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.stamp time { font-family: var(--mono); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.step h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.022em; line-height: 1.12; text-wrap: balance; }
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.68; color: var(--body); display: grid; gap: 1em; max-width: 62ch; }
.prose p { text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose code, .mono { font-family: var(--mono); font-size: .86em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.lede { font-family: var(--serif); font-size: 22px; line-height: 1.58; color: var(--ink); max-width: 60ch; text-wrap: pretty; }
.view-hint { display: none; }

/* fact and comparison panels */
.fact { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; color: var(--body); max-width: 62ch; }
.fact .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fact .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.fact.is-process .label::before { background: var(--orange); }
.fact cite { font-style: normal; font-size: 13px; color: var(--muted); }
.fact cite a { color: var(--muted); }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); max-width: 62ch; }
.compare > div { padding: 16px 18px; display: grid; gap: 8px; align-content: start; font-size: 15px; line-height: 1.5; color: var(--body); }
.compare > div + div { border-left: 1px solid var(--line); }
.compare h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.compare ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.code { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 14px 16px; overflow-x: auto; max-width: 62ch; white-space: pre; }
.code .hl { color: #FFB27A; }
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); max-width: 62ch; overflow: hidden; }
.numbers div { padding: 14px 16px; display: grid; gap: 2px; }
.numbers div + div { border-left: 1px solid var(--line); }
.numbers b { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.numbers span { font-size: 13px; color: var(--muted); line-height: 1.35; }

/* viewer chrome */
.pv { position: relative; height: 100%; border-radius: 20px; background: var(--stage); border: 1px solid var(--line); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.pv-modes { grid-row: 1; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; min-width: 0; }
.pv-modes:empty { padding: 0; }
.pv-modes button.m { font: 600 12.5px/1.15 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 12px; cursor: pointer; text-align: left; white-space: nowrap; }
.pv-modes button.m[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pv-canvas { grid-column: 1; grid-row: 2; position: relative; min-height: 0; touch-action: none; }
.pv-canvas canvas { display: block; width: 100%; height: 100%; }
.pv-caption { position: absolute; left: 14px; top: 12px; right: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.pv-caption .tag { pointer-events: auto; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.pv-legend { position: absolute; left: 14px; bottom: 12px; max-width: min(340px, calc(100% - 28px)); padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; color: var(--body); display: grid; gap: 6px; }
.pv-legend[hidden] { display: none; }
.pv-legend .pv-lt { font-weight: 700; color: var(--ink); }
.pv-ramp { height: 10px; border-radius: 3px; }
.pv-ramp-labels { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; color: var(--muted); }
.pv-status { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pv-status span { display: inline-flex; align-items: center; gap: 6px; }
.pv-status i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.pv-info { position: absolute; right: 12px; top: 52px; width: min(330px, calc(100% - 24px)); max-height: calc(100% - 120px); overflow: auto; padding: 14px 14px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 10px 34px rgba(11, 31, 54, .16); font-size: 13.5px; line-height: 1.45; display: grid; gap: 8px; }
.pv-info[hidden] { display: none; }
.pv-info h4 { font-size: 15px; font-weight: 800; }
.pv-info .close-x { position: absolute; right: 8px; top: 6px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.pv-info table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.pv-info td { padding: 2px 0; vertical-align: top; }
.pv-info td:last-child { text-align: right; padding-left: 10px; }
.pv-info .checks { margin: 0; padding-left: 16px; display: grid; gap: 4px; color: var(--body); font-size: 12.5px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.status-pill i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pv-controls { grid-column: 1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.pv-controls .seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pv-controls [hidden] { display: none !important; }
.pv-controls button.m { font: 600 12.5px/1 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.pv-controls button.m[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pv-controls select, .pv-controls input[type="range"] { font: 500 13px var(--font); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 6px; max-width: 100%; }
.pv-controls label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.pv-controls .grow { flex: 1 1 140px; min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
.pv-controls .grow input { flex: 1; min-width: 60px; }
.pv-passive .pv-canvas { touch-action: pan-y; }
.pv-passive .pv-canvas::after { content: "Rotate and click in Explore, below"; position: absolute; right: 12px; bottom: 10px; font-size: 11.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; pointer-events: none; }
@media (max-width: 600px) { .explore-stage { height: 72vh; min-height: 440px; } }
.pv-loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.pv-loading[hidden] { display: none; }

/* explore + process sections */
.band { max-width: 1280px; margin: 0 auto; padding: 56px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 24px; }
.band-head { display: grid; gap: 12px; max-width: 70ch; }
.band-head .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.band-head h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.028em; line-height: 1.06; text-wrap: balance; }
.band-head p { font-family: var(--serif); font-size: 19px; line-height: 1.6; color: var(--body); }
.explore-stage { height: min(82vh, 820px); min-height: 520px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.tiles div { padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.tiles div + div { border-left: 1px solid var(--line); }
.tiles b { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.tiles span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 12px var(--font); }
.chart .lab { fill: var(--ink); font-weight: 700; }
.chart-wrap { position: relative; min-width: 0; }
.tip { position: absolute; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.35; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tip[hidden] { display: none; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--body); }
.legend-row span { display: inline-flex; align-items: center; gap: 7px; }
.legend-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tbl-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.data td.n, table.data th.n { text-align: right; }
details.more-data summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.limits { display: grid; gap: 10px; margin: 0; padding-left: 20px; font-size: 16px; color: var(--body); max-width: 80ch; }
.sources { columns: 2 340px; column-gap: 32px; margin: 0; padding-left: 20px; font-size: 14px; color: var(--body); }
.sources li { break-inside: avoid; margin-bottom: 8px; }
.foot { max-width: 1280px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { order: -1; height: 46vh; min-height: 300px; z-index: 5; margin-bottom: 8px; }
  .step { min-height: 0; padding-bottom: 40px; }
}
@media (max-width: 1000px) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures div:nth-child(4) { padding-left: 0; border-left: 0; }
  .figures div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { min-height: 0; padding-bottom: 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles div:nth-child(3) { border-left: 0; }
  .tiles div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .lockup { height: 26px; }
  .bar { gap: 12px; }
  .bar .btn { display: none; }
  .hero { padding-top: 26px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures div:nth-child(n) { padding-left: 0; border-left: 0; }
  .figures div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .figures div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .prose { font-size: 17.5px; }
  .lede { font-size: 19px; }
  .step { padding-left: 20px; }
  .compare, .numbers { grid-template-columns: minmax(0, 1fr); }
  .compare > div + div, .numbers div + div { border-left: 0; border-top: 1px solid var(--line); }
  .pv-info { top: auto; bottom: 8px; max-height: 60%; }
  .pv-legend { display: none; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tiles div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 1099px) {
  .pv-collapse { display: inline-flex; }
  .stage.is-mini { position: fixed; top: auto; left: auto; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: 128px; height: 200px; min-height: 0; z-index: 30; margin: 0; }
  .stage.is-mini.is-gone { display: none; }
  .stage.is-mini .pv { grid-template-columns: minmax(0, 1fr); border-radius: 16px; box-shadow: 0 12px 32px rgba(11, 31, 54, .35); }
  .stage.is-mini .pv-canvas { grid-column: 1; }
  .stage.is-mini .pv-modes, .stage.is-mini .pv-controls, .stage.is-mini .pv-legend, .stage.is-mini .pv-info, .stage.is-mini .pv-caption, .stage.is-mini .pv-canvas::after { display: none; }
  .stage.is-mini .pv-collapse { top: auto; bottom: 8px; right: 8px; left: 8px; justify-content: center; }
  .try.click-only { display: none; }
  .pv[data-viewer="story"] .pv-caption { right: 116px; }
}
@media (max-width: 600px) { .pv[data-viewer="story"] .pv-controls { display: none; } }
@media (max-width: 600px) { .pv-modes { padding: 8px 6px 8px 8px; gap: 4px; } .pv-modes button.m { font-size: 11px; padding: 5px 8px; } .note { padding: 18px; } }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } .pv.is-flash { animation: none; } .step h2 { transition: none; } }
