/* ==========================================================================
   Decodable, Not Transferable — project page
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #fbfaf7;
  --bg-alt: #f3f1ea;
  --surface: #ffffff;
  --ink: #17161b;
  --ink-2: #4a4852;
  --ink-3: #7a7784;
  --line: #e4e1d8;
  --line-2: #d3cfc3;

  --accent: #5b3fc4;         /* latent-action violet */
  --accent-soft: #ece8fb;
  --accent-ink: #3f2a95;

  /* encoder identity — validated categorical trio (CVD-safe, all pairs) */
  --ada: #2a78d6;
  --olaf: #eb6834;
  --vft: #1baf7a;

  --good: #1b8a5a;
  --warn: #b7791f;
  --bad: #c2410c;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pixel: "Silkscreen", var(--mono);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 22, 27, .04), 0 8px 24px -12px rgba(23, 22, 27, .12);
  --wrap: 1120px;
  --narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
b, strong { font-weight: 600; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
::selection { background: var(--accent-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
.wrap.narrow { max-width: calc(var(--narrow) + 48px); }
.muted { color: var(--ink-3); font-weight: 400; }
.mono { font-family: var(--mono); font-size: .88em; background: var(--bg-alt); padding: 1px 6px; border-radius: 5px; }
.pixel { font-family: var(--pixel); letter-spacing: .02em; }
.accent { color: var(--accent); }

/* ───────────── Top nav ───────────── */
.topnav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.topnav.is-visible { transform: none; }
.topnav-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topnav-title { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.topnav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topnav-links::-webkit-scrollbar { display: none; }
.topnav-links a { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.topnav-links a:hover { background: var(--bg-alt); color: var(--ink); }
.topnav-links a.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); }

/* ───────────── Hero ───────────── */
.hero { position: relative; overflow: hidden; padding: 80px 0 56px; text-align: center; border-bottom: 1px solid var(--line); }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(91, 63, 196, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91, 63, 196, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; }
.venue { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin: 0 0 28px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 13.5px; color: var(--ink-2); }
.venue .pixel { color: var(--accent); font-size: 12px; }
.venue-sep { color: var(--ink-3); }

.title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 7vw, 76px); letter-spacing: -.02em; line-height: 1.02; }
.title .accent { font-style: italic; }
.subtitle { display: block; margin-top: 14px; font-size: clamp(22px, 3.2vw, 34px); font-weight: 400; color: var(--ink-2); letter-spacing: -.01em; }

.authors { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; font-size: 18px; }
.author { color: var(--ink); white-space: nowrap; }
.author a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.author a:hover { color: var(--accent); border-color: var(--accent); }
.author sup, .affils sup { color: var(--ink-3); font-size: .7em; margin-left: 1px; }
.affils { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 15px; color: var(--ink-2); }

.links { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--ink); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { color: #fff; background: #2b2933; }
.btn.is-soon { color: var(--ink-3); cursor: default; }
.btn.is-soon:hover { transform: none; box-shadow: none; }
.soon { font-family: var(--pixel); font-size: 10px; text-transform: uppercase; background: var(--bg-alt); color: var(--ink-3); padding: 2px 6px; border-radius: 4px; }

/* ───────────── Sections ───────────── */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.015em; margin-bottom: 20px; }
.kicker { display: block; font-size: 13px; color: var(--accent); margin-bottom: 10px; letter-spacing: .06em; font-family: var(--pixel); font-weight: 400; }
.sub { font-family: var(--serif); font-weight: 500; font-size: 25px; margin: 48px 0 18px; }
.lede { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--ink-2); margin-bottom: 8px; }

/* TL;DR */
.tldr-section { padding-top: 56px; }
.tldr { position: relative; max-width: 880px; margin: 0 auto 36px; padding: 24px 28px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.tldr p { margin: 0; font-size: 18.5px; line-height: 1.6; }
.tag { position: absolute; top: -11px; left: 20px; font-family: var(--pixel); font-size: 11px; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.stat { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-num { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); font-weight: 500; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.stat-unit { font-size: .55em; color: var(--ink-3); }
.stat-label { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* Figures */
.figure { margin: 28px 0 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.figure img { margin: 0 auto; border-radius: 4px; }
.figure-plain { padding: 16px; box-shadow: none; }
.figure figcaption { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 900px; }
.figure figcaption b { color: var(--ink); }
.figure.teaser { margin-top: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; }
.split .figure { margin: 0; display: flex; flex-direction: column; justify-content: space-between; }

/* Charts */
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-title { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.chart-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.legend-center { justify-content: center; margin-top: -20px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.swatch.round { border-radius: 50%; }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.slopes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-panel-title { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.chart-panel-title .pixel { color: var(--accent); font-size: 12px; margin-right: 6px; font-weight: 400; }
.chart-panel-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 6px; }
.chart .axis text { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .axis text, .chart .lbl { font-family: var(--sans); fill: var(--ink-3); font-size: 11px; }
.chart .val { font-family: var(--sans); font-size: 11.5px; font-weight: 600; fill: var(--ink-2); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .baseline-band { fill: #9b98a3; opacity: .18; }
.chart .baseline-lbl { font-size: 10.5px; fill: var(--ink-3); }
.chart .bar { transition: opacity .15s; }
.chart .hit { fill: transparent; cursor: default; }
.chart.is-hovering .bar:not(.is-hot) { opacity: .35; }
.chart .slope-line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.chart .slope-dot { stroke: var(--surface); stroke-width: 2; }
.chart .end-lbl { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart .end-lbl tspan.muted { fill: var(--ink-3); font-weight: 500; }
.chart .delta-lbl { font-size: 12.5px; font-weight: 700; fill: var(--bad); }
.chart .col-lbl { font-size: 12px; font-weight: 600; fill: var(--ink-2); }

.tooltip { position: fixed; z-index: 100; pointer-events: none; min-width: 160px; max-width: 260px; padding: 10px 12px; background: var(--ink); color: #fff; border-radius: 8px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.tooltip .tt-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; color: #d4d2da; }
.tooltip .tt-row b { color: #fff; font-family: var(--mono); font-weight: 500; }
.tooltip .tt-note { margin-top: 6px; color: #a9a6b3; font-size: 12px; }

.chip { display: inline-block; font-size: .85em; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fde7f1; color: #9d2860; white-space: nowrap; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); background: transparent; border: 0; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Explorer */
.explorer { margin: 28px 0 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.explorer-controls { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 16px; }
.control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-label { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.explorer-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.explorer-stage { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.umap-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.explorer-legend { font-size: 13.5px; }
.explorer-legend h5 { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.explorer-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.explorer-legend li { display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.explorer-legend .sys { font-size: 11px; color: var(--ink-3); font-family: var(--mono); margin-left: auto; padding-left: 6px; }
.explorer-note { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); min-height: 1.6em; }

/* Cards */
.cards { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.card header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card h4 { font-size: 18px; font-weight: 600; }
.card p { font-size: 15px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.card.model { border-top: 3px solid var(--c); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.badge { margin-left: auto; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.badge-ghost { background: var(--bg-alt); color: var(--ink-2); }
.card dl { margin: 4px 0 0; display: grid; gap: 6px; font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 12px; }
.card dl div { display: flex; justify-content: space-between; gap: 12px; }
.card dt { color: var(--ink-3); }
.card dd { margin: 0; font-family: var(--mono); font-size: 12.5px; text-align: right; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); }

/* Findings */
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 40px; }
.findings-2 { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
.finding { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.finding-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--pixel); font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.finding h4 { font-size: 16px; font-weight: 600; margin: 3px 0 6px; line-height: 1.35; }
.finding p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 32px auto; max-width: 900px; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table caption { caption-side: top; text-align: left; font-size: 14.5px; color: var(--ink-2); padding: 0 2px 12px; line-height: 1.55; }
.data-table caption b { color: var(--ink); }
.data-table th, .data-table td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.data-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-2); background: #faf9f5; border-bottom: 1px solid var(--line-2); }
.data-table tbody th { text-align: left; font-weight: 500; color: var(--ink); }
.data-table td { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tr.dim th, .data-table tr.dim td { color: var(--ink-3); }
.data-table tr.hl th, .data-table tr.hl td { background: #f7f5fe; }
.data-table tr.hl td { font-weight: 500; color: var(--ink); }
.data-table tr.group th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); background: #faf9f5; padding-top: 12px; padding-bottom: 8px; }
.data-table tr.group .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.data-table td.na, .data-table tr.hl td.na { color: var(--line-2); font-weight: 400; }
.data-table th .dot { margin-right: 8px; vertical-align: 0; }
.data-table thead th.c-ada { box-shadow: inset 0 -3px 0 var(--ada); }
.data-table thead th.c-olaf { box-shadow: inset 0 -3px 0 var(--olaf); }
.data-table thead th.c-vft { box-shadow: inset 0 -3px 0 var(--vft); }
/* in-cell bars (Table 2) */
.data-table.bars td[data-v] { position: relative; }
.data-table.bars td[data-v]::before { content: ""; position: absolute; left: 10px; right: auto; top: 50%; height: 6px; margin-top: -3px; width: calc((100% - 72px) * var(--p, 0)); border-radius: 3px; background: var(--c, var(--ink-3)); opacity: .22; }
.data-table.bars td:nth-child(2) { --c: var(--ada); }
.data-table.bars td:nth-child(3) { --c: var(--olaf); }
.data-table.bars td:nth-child(4) { --c: var(--vft); }
.data-table.bars td { min-width: 150px; }
/* delta column (Table 3) */
.data-table.delta td.neg { color: var(--bad); font-weight: 600; position: relative; min-width: 140px; }
.data-table.delta td.neg::before { content: ""; position: absolute; right: 70px; top: 50%; height: 8px; margin-top: -4px; width: calc(var(--d) * 1.6px); background: var(--bad); opacity: .18; border-radius: 3px 0 0 3px; }

.hint { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; font-size: 10.5px; font-weight: 700; border-radius: 50%; background: var(--bg-alt); color: var(--ink-3); cursor: help; vertical-align: 1px; font-family: var(--sans); }
.hint:hover, .hint:focus { background: var(--accent-soft); color: var(--accent-ink); outline: none; }

.note { font-size: 15.5px; color: var(--ink-2); padding: 16px 20px; border-left: 3px solid var(--line-2); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Details */
.more { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.more summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 10px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg-alt); color: var(--ink-2); font-family: var(--mono); transition: transform .2s; }
.more[open] summary::before { content: "−"; }
.more summary:hover { color: var(--accent); }
.more-body { padding: 0 20px 20px; }
.more-body .figure { margin: 8px 0 24px; }
.more-body ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.more-body li { margin: 8px 0; }


/* Takeaways */
.takeaways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 8px 0 20px; }
.caveat { text-align: center; font-size: 14.5px; color: var(--ink-3); margin: 0; }
.take { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.take-n { font-size: 13px; color: var(--accent); }
.take h4 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.3; margin: 10px 0 8px; }
.take p { font-size: 15.5px; color: var(--ink-2); margin: 0; }

/* BibTeX */
.bibtex { position: relative; background: #17161b; border-radius: var(--radius); overflow: hidden; }
.bibtex pre { margin: 0; padding: 56px 24px 22px; overflow-x: auto; color: #e9e7ef; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; }
.copy { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 500; color: #e9e7ef; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.16); }
.copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.copy.is-done { color: #9be3bf; border-color: rgba(155,227,191,.4); }

/* Footer */
.footer { padding: 48px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); text-align: center; }
.footer p { margin: 4px 0; }

/* ───────────── Responsive ───────────── */
@media (max-width: 980px) {
  .setup { grid-template-columns: 1fr; }
  .takeaways, .chips, .stats-3, .cards-3, .findings { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats-3 { grid-template-columns: 1fr; }
  .cards-3, .findings { grid-template-columns: 1fr; }
  .qladder { grid-template-columns: 1fr; }
  .q:not(:last-child)::after { right: auto; left: 36px; top: auto; bottom: -13px; transform: rotate(135deg); }
  .explorer-body { grid-template-columns: 1fr; }
  .explorer-legend ul { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 760px) {
  .cards-2, .findings-2, .takeaways { grid-template-columns: 1fr; }
  .data-table th, .data-table td { padding: 9px 12px; }
  .data-table.bars td { min-width: 110px; }
  .data-table thead th { white-space: normal; }
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topnav-inner { padding: 0 16px; }
  .topnav-title { display: none; }
  .hero { padding: 64px 0 52px; }
  .section { padding: 64px 0; }
  .lede { font-size: 20px; }
  .figure { padding: 14px; margin: 28px 0; }
  .figure-plain { padding: 10px; }
  .ladder { grid-template-columns: 1fr; gap: 20px; }
  .slopes { grid-template-columns: 1fr; }
  .split, .cards-2, .findings-2, .takeaways { grid-template-columns: 1fr; }
  .stat-num { font-size: 32px; }
  .tldr { padding: 22px 18px 18px; }
  .tldr p { font-size: 17px; }
  .data-table th, .data-table td { padding: 9px 12px; }
  .data-table.bars td { min-width: 110px; }
  .explorer { padding: 14px; }
  .legend-center { margin-top: -8px; }
  .slopes .end-lbl { font-size: 17px; }
  .slopes .end-lbl tspan.muted { display: none; }
  .slopes .delta-lbl { font-size: 16px; }
  .slopes .col-lbl, .slopes .axis text, .slopes .baseline-lbl { font-size: 14px; }
  .data-table thead th { white-space: normal; }
  .data-table.delta td.neg { min-width: 0; }
  .data-table.delta td.neg::before { display: none; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

/* Lightbox */
img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(23, 22, 27, .82); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; object-fit: contain; background: #fff; border-radius: 8px; padding: 12px; }
.lightbox-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* Setup */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.setup-text p { font-size: 17px; }
.setup-text .section-title { margin-bottom: 16px; }
.setup-fig { margin: 0; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.enc { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); font-size: 15px; }
.enc .muted { font-size: 13.5px; flex-basis: 100%; padding-left: 20px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

.verdict { display: inline-block; font-size: 12px; font-weight: 700; font-family: var(--sans); text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 4px; margin-right: 8px; vertical-align: 2px; }
.v-yes { background: #dcf3e6; color: #11663f; }
.v-partial { background: #fbefd5; color: #7c5210; }
.v-no { background: #fde2d6; color: #9a330b; }

.sae-fig { max-width: 820px; margin-left: auto; margin-right: auto; }
.sub-lead { font-size: 15.5px; color: var(--ink-2); margin: 0 0 16px; }

/* Abstract (collapsible, under the TL;DR) */
.more.abstract { margin: -8px auto 36px; }
.more.abstract .more-body { padding: 4px 28px 26px; }
.more.abstract .more-body p {
  margin: 0; padding-left: 20px; border-left: 3px solid var(--accent);
  font-family: var(--serif); font-size: 18px; line-height: 1.75; color: var(--ink-2);
  text-wrap: pretty;
}
.more.abstract .more-body p::first-line { color: var(--ink); font-weight: 500; }
@media (max-width: 640px) {
  .more.abstract .more-body { padding: 4px 18px 20px; }
  .more.abstract .more-body p { font-size: 16.5px; padding-left: 14px; }
}
