/* SpecAnn project page — design A "Paper & Ramp".
   Light, editorial, serif headings. Figure plates (demos, charts, paper figures) stay light in dark mode,
   so the paper's colours (Fig. 1 palette, per-method colours of Figs. 4-7) never change. */

:root {
  /* Fig. 1 (B1e) palette */
  --ramp-0: #253494; --ramp-1: #2C7FB8; --ramp-2: #41B6C4; --ramp-3: #FF7F0E; --ramp-4: #FDC627;
  --ramp: linear-gradient(90deg, var(--ramp-0), var(--ramp-1) 25%, var(--ramp-2) 50%, var(--ramp-3) 75%, var(--ramp-4));
  --spin-neg: #253494; --spin-pos: #D62728; --star: #FDC627;
  --edge-pos: #3B4250; --edge-neg: #8A96A8; --heat-neg: #8A96A8; --node: #5A6170;
  --specann: #4575B4;
  /* page */
  --bg: #FFFFFF; --panel: #F4F7FA; --ink: #1B2230; --muted: #5A6170; --line: #D5DCE4; --link: #1E6597;
  --hl: #E8F1F8; --hl-strong: #D3E5F2;
  /* plates: always light */
  --plate: #FFFFFF; --plate-2: #F4F7FA; --plate-ink: #1B2230; --plate-muted: #5A6170; --plate-line: #D5DCE4;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  /* one academic serif family everywhere (Valentin, 2026-11-11); --sans and --mono kept as aliases */
  --sans: var(--serif);
  --mono: var(--serif);
  --wrap: 1180px;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F141B; --panel: #151C26; --ink: #E6EAF0; --muted: #A3ACBA; --line: #2A3442; --link: #8CC4EE;
    --hl: #1B2A3A; --hl-strong: #22374C;
    --plate: #F4F7FA; --plate-2: #E6ECF2; --plate-line: #C9D2DD;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F141B; --panel: #151C26; --ink: #E6EAF0; --muted: #A3ACBA; --line: #2A3442; --link: #8CC4EE;
  --hl: #1B2A3A; --hl-strong: #22374C;
  --plate: #F4F7FA; --plate-2: #E6ECF2; --plate-line: #C9D2DD;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@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: 400 17.5px/1.6 var(--serif); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.22; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 12px; z-index: 99; background: var(--bg); color: var(--ink); padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
:focus-visible { outline: 2px solid var(--ramp-1); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.katex { font-size: 1.06em; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font: 600 1.15rem/1 var(--serif); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .wordmark { height: 27px; width: auto; display: block; color: var(--ink); }   /* SpecΛnn: ink follows the theme, Λ the α ramp */
.brand:hover .wordmark { opacity: .85; }
.foot-wm { margin: 0 0 10px !important; } .foot-wm .wordmark { height: 22px; width: auto; display: block; color: var(--ink); }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: .94rem; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav nav a:hover, .nav nav a.is-current, .nav nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ramp-1); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: 500 .9rem/1 var(--sans); padding: 8px 12px; cursor: pointer; }
.nav-progress { height: 3px; }
.nav-progress span { display: block; height: 100%; width: 0; background: var(--ramp); background-size: 100vw 100%; transition: width .1s linear; }

/* ---------- hero ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 60px 24px 36px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.venue { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 .8rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.venue::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--ramp); }
.hero h1 { margin: 0 0 22px; }
.h1-name { display: block; font-size: clamp(2.5rem, 5.2vw, 3.7rem); line-height: 1.04; letter-spacing: -.01em; }
.h1-sub { display: block; margin-top: 12px; font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.3; font-weight: 400; color: var(--muted); }
.authors { margin: 0 0 4px; font-size: 1.06rem; line-height: 1.7; }
.authors a, .authors span.author { white-space: nowrap; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s; }
.authors a:hover { border-color: var(--ramp-1); }
.authors sup { color: var(--muted); margin-left: 1px; }
.affil { margin: 0 0 22px; color: var(--muted); font-size: .95rem; }
.affil .fn { display: block; font-size: .84rem; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font: 500 .95rem/1.2 var(--sans); background: var(--bg); cursor: pointer; transition: border-color .2s, transform .2s; }
.pill:hover { border-color: var(--ink); transform: translateY(-1px); text-decoration: none; }
.pill.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill svg { width: 16px; height: 16px; flex: none; }
.pill.is-pending { border-style: dashed; cursor: default; opacity: .8; transform: none; }
.pill.primary.is-pending { background: transparent; color: var(--ink); }
.pill small { font: 500 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.plate { margin: 0; background: var(--plate); color: var(--plate-ink); border: 1px solid var(--plate-line); border-radius: var(--radius); padding: 14px 16px 12px; --muted: var(--plate-muted); --line: var(--plate-line); --link: #1E6597; }
.plate-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.tag { font: 500 .72rem/1 var(--mono); color: var(--plate-muted); padding: 5px 8px; border: 1px solid var(--plate-line); border-radius: 999px; background: var(--plate); white-space: nowrap; }
.hero-plate svg.graph { width: 100%; height: auto; display: block; }
.ramp-bar { position: relative; height: 8px; border-radius: 4px; background: var(--ramp); margin: 10px 8px 4px; }
.ramp-bar .knob { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--plate); box-shadow: 0 0 0 1px var(--plate-ink); transform: translate(-50%, -50%); }
.ramp-labels { display: flex; justify-content: space-between; gap: 8px; font: 400 .74rem/1.3 var(--mono); color: var(--plate-muted); margin: 0 2px; }
.hero-plate figcaption { margin-top: 10px; font-size: .86rem; color: var(--plate-muted); line-height: 1.45; }
.icon-btn { background: var(--plate); border: 1px solid var(--plate-line); color: var(--plate-ink); border-radius: 999px; font: 500 .72rem/1 var(--mono); padding: 5px 9px; cursor: pointer; }
.icon-btn:hover { border-color: var(--plate-ink); }

/* ---------- key numbers ---------- */
.stats { max-width: var(--wrap); margin: 0 auto; padding: 8px 24px 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { border: 1px solid var(--line); border-top: 3px solid var(--c, var(--ramp-0)); border-radius: 10px; padding: 16px 18px 14px; background: var(--bg); display: flex; flex-direction: column; }
.stat:nth-child(2) { --c: var(--ramp-1); } .stat:nth-child(3) { --c: var(--ramp-2); } .stat:nth-child(4) { --c: var(--ramp-3); }
.stat p { margin: 0 0 8px; font-size: .93rem; line-height: 1.45; }
.stat .num { font: 600 2.05rem/1.1 var(--serif); margin-bottom: 8px; letter-spacing: -.01em; }
.stat .num small { font-size: .55em; font-weight: 400; color: var(--muted); margin-left: 2px; }
.stat .src { margin: auto 0 0; font: 400 .74rem/1.3 var(--mono); color: var(--muted); }
.stat .src a { color: inherit; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 8px; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.section-title { margin: 0 0 14px; font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
.section-head { max-width: 820px; margin-bottom: 30px; }
.section-head.center { margin-inline: auto; text-align: center; }
.lede { color: var(--muted); font-size: 1.04rem; }
.prose { max-width: 760px; }
.sub { margin: 48px 0 8px; font-size: 1.45rem; }
.sub + .lede { margin-bottom: 20px; }
.dev-note { border: 1px dashed var(--ramp-3); background: color-mix(in srgb, var(--ramp-4) 10%, var(--bg)); color: var(--ink); border-radius: 10px; padding: 12px 16px; font-size: .92rem; margin: 18px 0; }

/* abstract */
.abstract { max-width: 760px; margin: 0 auto; }
.abstract p:not(.kicker) { font: 400 1.08rem/1.72 var(--serif); }

/* figures */
.fig { margin: 24px 0; }
.fig.plate { padding: 16px; }
.fig img { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 10px; font-size: .88rem; color: var(--plate-muted); line-height: 1.5; }
.fig figcaption b { color: var(--plate-ink); }
.fig-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px; }
.fig-row .fig img { max-height: 460px; object-fit: contain; }

/* how it works (phase 1: static fig + rail) */

/* ---------- method cards ---------- */
.thm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.thm { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s; }
.thm:hover { border-color: color-mix(in srgb, var(--ramp-1) 60%, var(--line)); box-shadow: 0 4px 18px -12px rgba(20, 40, 70, .35); }
.thm-kind { margin: 0 0 6px; font: 600 .74rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.thm-kind::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ramp-1)); }
.thm h3 { margin: 0 0 10px; font-size: 1.22rem; }
.thm .eq { overflow-x: auto; overflow-y: hidden; margin: 4px 0 10px; padding: 2px 0; }
.thm p { font-size: .96rem; margin-bottom: .7em; }
.thm .more { margin-top: auto; font-size: .9rem; font-weight: 500; text-decoration: none; }
.thm .more:hover { text-decoration: underline; }
.thm.wide { grid-column: 1 / -1; }

/* ---------- results ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--plate-line); border-radius: 999px; padding: 3px; background: var(--plate-2); }
.seg button { border: 0; background: transparent; color: var(--plate-muted); font: 500 .86rem/1 var(--sans); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--plate); color: var(--plate-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--plate-line); background: var(--plate); color: var(--plate-ink); border-radius: 999px; font: 500 .8rem/1 var(--sans); padding: 6px 10px 6px 8px; cursor: pointer; transition: opacity .2s, border-color .2s; }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="false"] { opacity: .45; }
.chip[aria-pressed="false"] .sw { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.chip:hover { border-color: var(--plate-ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-size: .86rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.chart h4 { margin: 0 0 4px; font: 600 .92rem/1.3 var(--sans); color: var(--plate-ink); }
.chart .ax text { fill: var(--plate-muted); font-size: 11px; }
.chart .ax line, .chart .ax path { stroke: var(--plate-line); }
.chart .ax .domain { stroke: #9AA5B4; }
.chart .grid line { stroke: var(--plate-line); stroke-dasharray: 2 3; }
.chart .zone { fill: #D9DEE5; opacity: .55; }
.chart .zone-label { fill: var(--plate-muted); font-size: 11px; }
.chart .series path.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: opacity .25s; }
.chart .series path.band { stroke: none; opacity: .18; }
.chart .series .mk { }
.chart .series.is-dim { opacity: .14; }
.chart .series.is-hot path.line { stroke-width: 3.2; }
.chart .series.spec path.line { stroke-width: 3; }
.chart .xlab, .chart .ylab { fill: var(--plate-muted); font-size: 12px; }
.chart .hover-line { stroke: var(--plate-ink); stroke-dasharray: 3 3; stroke-width: 1; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--plate); color: var(--plate-ink); border: 1px solid var(--plate-line); border-radius: 8px; box-shadow: 0 6px 22px -10px rgba(0,0,0,.35); padding: 8px 10px; font-size: .8rem; line-height: 1.35; min-width: 150px; opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip b { font-weight: 600; }
.tip table { border-collapse: collapse; width: 100%; }
.tip td { padding: 1px 4px; white-space: nowrap; }
.tip td:last-child { text-align: right; font-family: var(--mono); font-size: .76rem; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.note-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.note-list li { position: relative; padding-left: 16px; font-size: .95rem; }
.note-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ramp-1); }
.note-list .src { font: 400 .74rem/1 var(--mono); color: var(--muted); white-space: nowrap; }

/* tables */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.table-wrap { overflow-x: auto; border-radius: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--plate-ink); }
table.data caption { text-align: left; caption-side: bottom; padding-top: 10px; font-size: .84rem; color: var(--plate-muted); line-height: 1.45; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--plate-line); text-align: right; white-space: nowrap; }
table.data th { font-weight: 600; font-size: .8rem; color: var(--plate-muted); text-transform: none; }
table.data thead th { border-bottom: 1.5px solid #9AA5B4; vertical-align: bottom; }
table.data .mcol { text-align: left; }
table.data .num { text-align: right; }
table.data .ctr { text-align: center; }
table.data .gstart { border-left: 1px solid var(--plate-line); }
#ttt-table table.data th:first-child, #ttt-table table.data td:first-child, .mini-table table.data th:first-child, .mini-table table.data td:first-child { text-align: left; }
table.data td.best { font-weight: 700; }
table.data tr.spec td { background: #E3F0E3; }
table.data tr.is-sel td { background: #EAF2FA; }
table.data tr.spec.is-sel td { background: #DCEBDC; }
table.data td.na { color: #9AA5B4; }
table.data tbody tr { transition: background .2s; }
table.data tbody tr:hover td { background: #F0F4F8; }
table.data tr.group td { background: var(--plate-2); font-weight: 600; font-size: .78rem; color: var(--plate-muted); text-align: left; }
.mk-gpu, .mk-q { font-size: .8em; color: var(--plate-muted); }
.compare { display: grid; grid-template-columns: 220px 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.compare label { font-size: .86rem; color: var(--plate-muted); display: block; margin-bottom: 6px; }
.compare select { width: 100%; font: 500 .95rem/1.2 var(--sans); padding: 8px 10px; border: 1px solid var(--plate-line); border-radius: 8px; background: var(--plate); color: var(--plate-ink); }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cmp { border: 1px solid var(--plate-line); border-radius: 10px; padding: 10px 12px; background: var(--plate); }
.cmp h5 { margin: 0 0 6px; font: 600 .78rem/1.2 var(--mono); color: var(--plate-muted); text-transform: uppercase; letter-spacing: .03em; }
.cmp .row { display: flex; justify-content: space-between; gap: 6px; font-size: .84rem; }
.cmp .row span:last-child { font-family: var(--mono); font-size: .8rem; }
.cmp .ratio { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--plate-line); font-size: .82rem; }
.cmp .ratio b { font-family: var(--mono); }
.cmp.na { opacity: .6; }
.foot-note { font-size: .8rem; color: var(--plate-muted); margin-top: 8px; }

.abl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.abl { display: flex; flex-direction: column; }
.abl h3 { margin: 0 0 4px; font-size: 1.12rem; }
.abl > p { font-size: .92rem; color: var(--plate-muted); margin-bottom: 10px; }
.abl .src { font: 400 .74rem/1.3 var(--mono); color: var(--plate-muted); margin-top: auto; padding-top: 8px; }
.mini-table { margin-top: 10px; }

/* limitations */
.limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.limits li { border: 1px solid var(--line); border-left: 3px solid var(--ramp-3); border-radius: 8px; padding: 12px 16px; background: var(--bg); font-size: .96rem; }
.limits .src { display: block; margin-top: 4px; font: 400 .74rem/1.3 var(--mono); color: var(--muted); }
details.more-limits { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--bg); }
details.more-limits summary { cursor: pointer; font-weight: 600; }
details.more-limits blockquote { margin: 12px 0 4px; padding-left: 14px; border-left: 3px solid var(--line); font: 400 .98rem/1.65 var(--serif); color: var(--ink); }

/* bibtex */
.bib { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; }
.bib pre { margin: 0; font: 400 .85rem/1.55 var(--mono); color: var(--ink); white-space: pre; }
.copy-btn { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 6px 12px; font: 500 .82rem/1 var(--sans); cursor: pointer; }
.copy-btn:hover { border-color: var(--ink); }
.bib-note { font-size: .86rem; color: var(--muted); margin-top: 8px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.privacy-link { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.privacy-link:hover { color: var(--ink); }
[data-analytics-status] { color: var(--muted); font-size: .9rem; }
[data-analytics-toggle] { min-height: 40px; margin-bottom: 10px; }
.site-footer .site-disclosure { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; line-height: 1.6; }

/* ---------- math page ---------- */
.math-main { max-width: 900px; margin: 0 auto; padding: 48px 24px 64px; }
.math-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; }
.toc ol { columns: 2; column-gap: 32px; padding-left: 20px; font-size: .94rem; }
.toc li { break-inside: avoid; margin-bottom: 3px; }
.math-part { margin-top: 44px; }
.math-part > h2 { font-size: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.stmt { border: 1px solid var(--line); border-left: 3px solid var(--ramp-1); border-radius: 10px; padding: 16px 20px 8px; margin: 18px 0; background: var(--bg); scroll-margin-top: 80px; }
.stmt:target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ramp-2) 45%, transparent); }
.stmt-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.stmt-kind { font: 600 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stmt-name { font: 600 1.12rem/1.3 var(--serif); }
.stmt-src { margin-left: auto; font: 400 .74rem/1.3 var(--mono); color: var(--muted); }
.stmt-body { overflow-x: auto; overflow-y: hidden; }
.stmt-body p { margin: 0 0 .8em; }
.stmt table { border-collapse: collapse; font-size: .92rem; margin-bottom: 1em; }
.stmt table td, .stmt table th { border-bottom: 1px solid var(--line); padding: 5px 10px; text-align: left; vertical-align: top; }
.back { margin-top: 32px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chart-grid, .abl-grid, .fig-row { grid-template-columns: minmax(0, 1fr); }
  .note-list { grid-template-columns: 1fr; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .nav nav { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 14px; }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 700px) {
  .thm-grid, .limits { grid-template-columns: minmax(0, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap, .hero, .stats, .nav-in { padding-inline: 16px; }
  .stats { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .stmt { padding: 14px 14px 6px; }
  .math-main { padding-inline: 16px; }
  .stat .num { font-size: 1.8rem; }
}

/* math page: context sentences and the notation table */
.stmt-note { font-size: .93rem; }
.stmt-note.muted, .stmt .muted { color: var(--muted); }
table.notation { width: 100%; }
table.notation td:first-child { white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--plate-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 22px; height: 12px; overflow: visible; }
.hero-range { -webkit-appearance: none; appearance: none; width: calc(100% - 16px); margin: -14px 8px 6px; height: 18px; background: transparent; position: relative; z-index: 2; display: block; cursor: pointer; }
.hero-range::-webkit-slider-runnable-track { height: 18px; background: transparent; }
.hero-range::-moz-range-track { height: 18px; background: transparent; }
.hero-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: transparent; border: 0; }
.hero-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: transparent; border: 0; }
.hero-range:focus-visible { outline: 2px solid var(--ramp-1); outline-offset: 2px; }

.cmp-t { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 12px; font-size: .84rem; align-items: baseline; }
.cmp-t span:nth-child(-n+3) { font-size: .7rem; color: var(--plate-muted); text-transform: uppercase; letter-spacing: .04em; }
.cmp-t span:nth-child(3n+2), .cmp-t span:nth-child(3n+3) { text-align: right; font-family: var(--mono); font-size: .8rem; }
.cmp-t span:nth-child(1), .cmp-t span:nth-child(2), .cmp-t span:nth-child(3) { font-family: var(--sans); }
.cmp-t .nores { grid-column: span 2; text-align: right; color: var(--plate-muted); font-family: var(--sans) !important; }
table.data.narrow { width: auto; min-width: min(100%, 520px); }
#ttt-table table.data td, #ttt-table table.data th { padding: 4px 10px; }

.tabs.seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.tabs.seg button { white-space: nowrap; }
.chart, .abl, .plate, .compare > * { min-width: 0; }

/* ---------- how it works: scroll story ---------- */
.fig-details { margin-top: 28px; }
.fig-details summary { cursor: pointer; font-weight: 600; color: var(--ink); }


/* panel building blocks */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.pgrid.w3 { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.pcell { min-width: 0; }
.pcap { margin: 4px 0 4px; font-size: .8rem; color: var(--plate-muted); line-height: 1.35; }
.pcap b { color: var(--plate-ink); font-weight: 600; }
.readout { font: 500 .8rem/1.4 var(--mono); color: var(--plate-ink); background: var(--plate-2); border: 1px solid var(--plate-line); border-radius: 8px; padding: 6px 9px; margin: 6px 0; }
.readout .k { color: var(--plate-muted); }
.side canvas.mat { width: 100%; max-width: 380px; aspect-ratio: 1; display: block; border-radius: 4px; cursor: crosshair; }
.side svg.graph { width: 100%; max-height: 360px; height: auto; display: block; }
.side svg.graph circle { transition: r .35s ease, fill .35s ease; }
.side svg.graph line { transition: stroke-width .35s ease; }
.ctrl { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; flex-wrap: wrap; }
.ctrl label { font-size: .8rem; color: var(--plate-muted); }
.ctrl .mono { font-size: .86rem; color: var(--plate-ink); min-width: 74px; }
.side input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 160px; height: 8px; border-radius: 4px; background: var(--ramp); outline-offset: 6px; cursor: pointer; }
.side input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--knob, var(--ramp-0)); border: 3px solid var(--plate); box-shadow: 0 0 0 1px var(--plate-ink); }
.side input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--knob, var(--ramp-0)); border: 3px solid var(--plate); box-shadow: 0 0 0 1px var(--plate-ink); }
.side input[type="range"].plain { background: var(--plate-line); }
.ticks { display: block; width: calc(100% - 84px); margin-left: 84px; height: 9px; }
.seg.sm button { padding: 5px 10px; font-size: .78rem; }
.mini-num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.mini-num > div { border: 1px solid var(--plate-line); border-radius: 8px; padding: 6px 8px; background: var(--plate); }
.mini-num .lab { font-size: .7rem; color: var(--plate-muted); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.mini-num .val { font: 600 1.05rem/1.2 var(--mono); color: var(--plate-ink); }
.mini-num .sub { font-size: .72rem; color: var(--plate-muted); font-family: var(--mono); }
.sw-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
canvas.strip { width: 100%; height: 190px; display: block; border-radius: 4px; cursor: crosshair; }
.badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 600 .7rem/1 var(--mono); color: #fff; }
.ls-rows { display: grid; gap: 3px; margin: 6px 0; }
.ls-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 64px; gap: 8px; align-items: center; font: .78rem/1 var(--mono); }
.ls-row canvas { width: 100%; height: 14px; display: block; }
.ls-row .e { text-align: right; }
.ls-row .e.up { color: #C2410C; }
.ls-row.restored .e::after { content: " ↺"; color: var(--plate-muted); }
.pair-demo { border: 1px dashed var(--plate-line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center; }
.pair-demo svg { width: 100%; height: auto; }
.pair-demo .btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.note-sm { font-size: .76rem; color: var(--plate-muted); margin: 4px 0 0; }
@media (max-width: 1000px) {
  .pgrid, .pgrid.w3 { grid-template-columns: minmax(0, 1fr); }
  .pair-demo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .ticks { width: calc(100% - 20px); margin-left: 20px; }
}


/* =====================================================================================================
   Revision 2 (2026-11-11): one serif family, larger story stage, structured demo panels
   ===================================================================================================== */
code, .mono, .tag, .readout, .src, .stat .src, .note-list .src, .limits .src, .abl .src, .tip td:last-child, .cmp-t span,
.mini-num .val, .mini-num .sub, .ramp-labels, .bib pre { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.bib pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }   /* BibTeX stays monospaced */
.tag { font-size: .8rem; letter-spacing: .01em; }
.kicker, .venue, .phase, .thm-kind, .stmt-kind { font-family: var(--serif); font-variant: small-caps; text-transform: none; letter-spacing: .06em; font-size: .92rem; font-weight: 600; }
.stat .num { font-variant-numeric: lining-nums; }
.chart svg, .side svg { font-family: var(--serif); }
.chart .ax text { font-size: 12px; }
.chart .xlab, .chart .ylab { font-size: 12.5px; font-style: italic; }
.pill, .seg button, .chip, .icon-btn, .nav nav a, .copy-btn, .compare select, .nav-toggle { font-family: var(--serif); }
.small { font-size: .9rem; }

/* story layout: narrower text column, larger stage */

/* structured demo panel */
.pn { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.pn-head h4 { margin: 0; font: 600 1.18rem/1.25 var(--serif); color: var(--plate-ink); }
.pn-head p { margin: 3px 0 0; font-size: .95rem; line-height: 1.45; color: var(--plate-muted); }
.pn-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 10px; background: var(--plate-2); border: 1px solid var(--plate-line); border-radius: 10px; }
.pn-ctrl .grow { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.pn-ctrl .val { font: 600 1rem/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--plate-ink); min-width: 92px; }
.pn-ctrl input[type="range"] { width: 100%; }
.pn-vis { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px 18px; align-items: start; }
.pn-vis.one { grid-template-columns: minmax(0, 1fr); }
.pn-vis.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pn-vis figure { margin: 0; min-width: 0; }
.pn-vis figcaption { font-size: .85rem; color: var(--plate-muted); margin-top: 4px; line-height: 1.35; }
.pn-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.pn-facts > div { border: 1px solid var(--plate-line); border-radius: 10px; padding: 7px 10px 6px; background: var(--plate); }
.pn-facts dt { font-size: .8rem; color: var(--plate-muted); line-height: 1.25; }
.pn-facts dd { margin: 2px 0 0; font: 600 1.1rem/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--plate-ink); transition: color .3s; }
.pn-facts dd small { font-weight: 400; font-size: .78rem; color: var(--plate-muted); }
.pn-facts .hot dd { color: #1E6597; }
.pn-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--plate-muted); margin: 0; }
.pn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pn-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.pn-legend i.ln { width: 20px; height: 0; border-radius: 0; border-top: 3px solid #3B4250; }
.pn-legend i.ln.neg { border-top: 2px dashed #8A96A8; }
.pn-legend i.sq { border-radius: 2px; }
.pn-note { font-size: .82rem; color: var(--plate-muted); margin: 0; line-height: 1.4; }
.pn details { border: 1px dashed var(--plate-line); border-radius: 10px; padding: 6px 10px; }
.pn details summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--plate-ink); }
.play { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--plate-ink); background: var(--plate-ink); color: #fff; border-radius: 999px; padding: 6px 14px; font: 600 .9rem/1 var(--serif); cursor: pointer; transition: background .2s, transform .15s; }
.play:hover { transform: translateY(-1px); }
.play[aria-pressed="true"] { background: #fff; color: var(--plate-ink); }
.side svg.graph { max-height: 420px; }
.side canvas.mat { max-width: 320px; }
.side .bars { width: 100%; height: 70px; display: block; }
canvas.strip { height: 230px; }
.ls-row { font-size: .84rem; }
.ls-row canvas { height: 11px; }
.badge { font-family: var(--serif); font-weight: 700; }
.side svg.graph circle { transition: r .45s cubic-bezier(.3,.7,.2,1), fill .35s ease, opacity .3s; }
.side svg.graph line { transition: stroke-width .45s cubic-bezier(.3,.7,.2,1), opacity .3s; }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.side svg.graph.intro circle { transform-box: fill-box; transform-origin: center; animation: pop-in .5s cubic-bezier(.3,.7,.2,1) both; }
@keyframes draw-in { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.facts-flash { animation: flash .6s ease; }
@keyframes flash { from { background: #FFF6D6; } to { background: var(--plate); } }
@media (prefers-reduced-motion: reduce) { .side svg.graph.intro circle { animation: none; } .facts-flash { animation: none; } }
@media (max-width: 1000px) {
  .pn-vis, .pn-vis.even { grid-template-columns: minmax(0, 1fr); }
  .side svg.graph { max-height: 360px; }
}

.pn-ctrl .ticks { width: 100%; margin: 3px 0 0; height: 9px; display: block; }
.pn-vis.wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.pn-vis.wide canvas.mat { max-width: 270px; }
.side .bars { height: 64px; }
@media (max-width: 1000px) { .pn-vis.wide { grid-template-columns: minmax(0, 1fr); } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.3,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }


/* =====================================================================================================
   Revision 3 (2026-11-11): fewer boxes; lists and narrative text
   ===================================================================================================== */
.plain-list .src { font-size: .85rem; color: var(--muted); margin-left: 4px; }
.plain-list { margin: 0; padding: 0 0 0 1.2em; max-width: 880px; display: grid; gap: 10px; font-size: 1.02rem; line-height: 1.6; }
.plain-list li::marker { color: var(--ramp-1); }
.temp-tag { font: 600 .78rem/1 var(--serif); font-variant: small-caps; letter-spacing: .06em; color: #9A4A00; border: 1px solid #E8B98A; border-radius: 4px; padding: 2px 6px; margin-left: 8px; vertical-align: middle; }
.compare { display: block; margin-top: 22px; }
.compare > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.compare label { margin: 0; font-size: .95rem; color: var(--plate-ink); }
.compare select { width: auto; min-width: 200px; }
.compare .foot-note { margin: 0; }
.cmp-grid { display: block; overflow-x: auto; }
table.cmp-table { width: auto; min-width: min(100%, 640px); }

/* story revision 3: more room for the demos, narrative readouts instead of boxes */
.readout-text { margin: 2px 0 0; font-size: 1rem; line-height: 1.6; color: var(--plate-ink); }
.readout-text b { font-weight: 600; }
.readout-text .hot { color: #1E6597; font-weight: 600; }
.key-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: .95rem; color: var(--plate-ink); }
.key-list li { display: flex; gap: 8px; align-items: baseline; }
.key-list .sw, .pn-legend i { flex: none; }
.key-list .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; transform: translateY(1px); }
.how-to { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: .95rem; line-height: 1.5; color: var(--plate-ink); }
.how-to dt { font-weight: 600; padding-top: 4px; }
.how-to dd { margin: 0; }
.how-to dd .seg { margin: 0 6px 4px 0; vertical-align: middle; }
.ctrl-hint { font-size: .8rem; color: var(--plate-muted); }
.strip-wrap canvas { display: block; width: 100%; }
.strip-wrap canvas.strip { height: 210px; border-radius: 4px 4px 0 0; cursor: crosshair; }
.strip-wrap canvas.runs { height: 14px; border-radius: 0 0 4px 4px; margin-top: 2px; cursor: crosshair; }
.side canvas.mat.big { max-width: 100%; }
@media (max-width: 1000px) {
  .how-to { grid-template-columns: minmax(0, 1fr); }
  .how-to dt { padding-top: 0; }
}


/* =====================================================================================================
   Revision 4 (2026-11-11): scroll only; each step = explanation on top + the same demos on two examples
   ===================================================================================================== */
#how > .wrap.story { max-width: 1480px; }
.how-note { margin: 16px auto 0; max-width: 760px; color: var(--muted); font-size: .98rem; }
.how-note b { color: var(--ink); font-weight: 600; }

/* sticky rail of the seven steps (only while "How it works" is on screen) */
.story-rail { position: sticky; top: 59px; z-index: 20; background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-block: 1px solid var(--line); margin: 4px 0 28px; }
.story-rail ol { list-style: none; margin: 0 auto; padding: 7px 24px; max-width: 1480px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.story-rail a { display: inline-flex; align-items: center; gap: 7px; padding: 3px 1px; color: var(--muted); text-decoration: none; font-size: .94rem; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.story-rail a:hover { color: var(--ink); }
.story-rail a span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 .76rem/1 var(--serif); border: 1px solid var(--line); background: var(--bg); color: var(--ink); transition: background .3s, color .3s, border-color .3s; }
.story-rail a.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--c); }
.story-rail a.is-on span { background: var(--c); border-color: var(--c); color: #fff; }
.story-rail a.is-done span { border-color: var(--c); }

/* one step */
.step { margin: 0 0 72px; scroll-margin-top: 44px; }
.step:last-child { margin-bottom: 8px; }
.step-text { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 34px; background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--ramp-1)); border-radius: var(--radius); padding: 20px 26px 12px; }
.step .phase { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.step .phase .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ramp-1)); }
.step h3 { margin: 0 0 10px; font-size: 1.36rem; }
.st-main p { font-size: 1.02rem; line-height: 1.62; }
.st-read { border-left: 1px solid var(--line); padding-left: 24px; font-size: .96rem; line-height: 1.55; }
.st-kicker { margin: 2px 0 6px; font-variant: small-caps; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.st-read ul { margin: 0 0 10px; padding-left: 1.1em; display: grid; gap: 6px; }
.st-read li::marker { color: var(--c, var(--ramp-1)); }
.st-read ul.key-list { padding-left: 0; color: var(--ink); font-size: .95rem; }
.pair-details { margin: 4px 0 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 12px; }
.pair-details summary { cursor: pointer; font-weight: 600; }
.pair-details .pair-demo { border: 0; padding: 8px 0 2px; margin: 0; }
.pair-details svg { background: var(--plate); border-radius: 8px; }
.step-text .pn-note { color: var(--muted); font-size: .9rem; }
.step-text [data-pe] { color: var(--ink); font-size: .95rem; }
.step-opts { margin: 14px 0 0; padding: 14px 18px; background: var(--plate); border: 1px solid var(--plate-line); border-radius: var(--radius); color: var(--plate-ink); }
.step-bar { display: flex; justify-content: flex-end; margin: 14px 2px 8px; }
.link-play { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink); cursor: pointer; user-select: none; }
.link-play input { width: 17px; height: 17px; margin: 0; accent-color: var(--ramp-1); cursor: pointer; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 16px; align-items: start; }
.step-bar + .duo { margin-top: 0; }

/* one example inside a step */
.side { container-type: inline-size; position: relative; padding: 14px 18px 16px; min-height: 340px; }
.side-head { display: flex; flex-direction: column; gap: 1px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--plate-line); }   /* title over meta: both columns stay aligned */
.side-head h4 { margin: 0; font-size: 1.1rem; color: var(--plate-ink); }
.side-meta { font-size: .88rem; color: var(--plate-muted); font-variant-numeric: lining-nums tabular-nums; }
.side-body { display: flex; flex-direction: column; gap: 12px; }
.side-body.fade-in { animation: fade-up .5s cubic-bezier(.3,.7,.2,1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vis2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.vis2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.vis2.w60 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.vis2 figure, .fig0 { margin: 0; min-width: 0; }
.vis2 figcaption, .fig0 figcaption { font-size: .85rem; color: var(--plate-muted); margin-top: 4px; line-height: 1.4; }
.side svg.graph { width: 100%; height: auto; max-height: none; display: block; }
.side canvas.graph { width: 100%; aspect-ratio: 460 / 360; display: block; border-radius: 6px; }
.side canvas.mat { width: 100%; max-width: 300px; aspect-ratio: 1; display: block; border-radius: 4px; cursor: crosshair; margin: 0 auto; }
.side .pcap { margin: -4px 0 0; }
.side .ls-rows { max-height: none; overflow: visible; gap: 2px; }
@container (max-width: 560px) {
  .vis2, .vis2.even, .vis2.w60 { grid-template-columns: minmax(0, 1fr); }
  .side canvas.mat { max-width: 280px; }
}

/* loading panels */
.loading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: center; gap: 12px 14px; padding: 26px 22px; margin: 4px 0; border: 1px dashed var(--plate-line); border-radius: 10px; background: var(--plate-2); color: var(--plate-ink); min-height: 260px; }
.loading p { margin: 0; font-size: .98rem; line-height: 1.5; }
.loading .lbar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--plate-line); overflow: hidden; }
.loading .lbar i { display: block; height: 100%; width: 0; background: var(--ramp); transition: width .3s ease; }
.loading.slim { min-height: 0; padding: 16px 18px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--plate-line); border-top-color: var(--ramp-1); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { position: absolute; inset: 52px 0 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: color-mix(in srgb, var(--plate) 80%, transparent); border-radius: 0 0 var(--radius) var(--radius); z-index: 3; }
.busy[hidden] { display: none; }
.busy p { margin: 0; font-weight: 600; color: var(--plate-ink); }

@media (max-width: 1240px) {
  .story-rail ol { gap: 4px 13px; }
  .story-rail a { font-size: .87rem; gap: 5px; }
}
@media (max-width: 1000px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
  .step-text { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 10px; }
  .st-read { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .step-bar { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .story-rail ol { gap: 4px 10px; padding: 6px 12px; }
  .story-rail a { font-size: 0; gap: 0; }
  .story-rail a span { font-size: .76rem; }
  .story-rail a.is-on { font-size: .86rem; gap: 6px; }
  .side { padding: 12px 12px 14px; }
}


/* =====================================================================================================
   Revision 5 (2026-11-11, Valentin's choice): two themes, Graphite (dark, default) and Paper (light), switched in the
   top bar (<html data-skin>); "paper-like" sections without cards; "How it works" with large step numbers in the margin
   ===================================================================================================== */
.plate { --link: var(--plate-link, #1E6597); }
:root { --plate-line-strong: #9AA5B4; --plate-hl: #EAF2FA; --plate-link: #1E6597; }

:root[data-skin="graphite"] { color-scheme: dark; }
:root[data-skin="graphite"] {
  --bg: #141312; --panel: #141312; --ink: #ECE6DA; --muted: #A69E91; --line: #2C2926; --link: #9DC4E8; --hl: #1D1B19; --hl-strong: #272420;
  --plate: #141312; --plate-2: #1C1A18; --plate-ink: #ECE6DA; --plate-muted: #A69E91; --plate-line: #33302B; --plate-line-strong: #5A544B;
  --plate-hl: #262320; --plate-link: #9DC4E8;
  --edge-pos: #9C9486; --edge-neg: #696257; --node: #DDD5C7; --spin-neg: #6A86F5; --spin-pos: #F25F52;
  --ramp-0: #5A6BE0; --ramp-1: #3E9FE0; --ramp-2: #45BFCB; --ramp-3: #FF8F2E; --ramp-4: #FDC627;
}
:root[data-skin="paper"] {
  --bg: #FFFFFF; --panel: #FFFFFF; --ink: #15181C; --muted: #5C636D; --line: #E1E4E8; --link: #1E6597; --hl: #F2F5F8; --hl-strong: #E4ECF4;
  --plate: #FFFFFF; --plate-2: #F5F6F7; --plate-ink: #15181C; --plate-muted: #5C636D; --plate-line: #E1E4E8; --plate-line-strong: #A9B0BA;
  --plate-hl: #EEF3F8; --plate-link: #1E6597; color-scheme: light;
}
:root[data-skin="graphite"] .nav { background: color-mix(in srgb, var(--bg) 86%, transparent); }
:root[data-skin="graphite"] .fig.plate { background: #F6F6F3; border-radius: 6px; padding: 16px; }
:root[data-skin="graphite"] .fig.plate figcaption { color: #4A4F57; }
:root[data-skin="graphite"] .fig.plate figcaption b { color: #1B2230; }
:root[data-skin="graphite"] table.data tr.spec td { background: color-mix(in srgb, #2CA02C 16%, var(--plate)); }
:root[data-skin="graphite"] table.data tbody tr:hover td, :root[data-skin="graphite"] table.data tr.is-sel td { background: var(--plate-hl); }
table.data thead th { border-bottom-color: var(--plate-line-strong); }
table.data td.na { color: var(--plate-line-strong); }
.chart .ax .domain { stroke: var(--plate-line-strong); }
.chart .zone { fill: var(--plate-2); }
.play { border-color: var(--plate-ink); background: var(--plate-ink); color: var(--plate); }
.play[aria-pressed="true"] { background: var(--plate); color: var(--plate-ink); }
.cand-list li.is-hot, .readout-text .hot { color: var(--plate-link); }

/* ---------- paper-like: no cards, no coloured bars, no tinted bands ---------- */
.section.alt { background: transparent; border: 0; }
.section + .section { border-top: 1px solid var(--line); }
.plate:not(.fig) { background: transparent; border: 0; border-radius: 0; padding: 0; }
.hero-plate .tag, .hero-plate .icon-btn { background: transparent; }
.limits li { border: 0; border-left: 0; padding: 0; background: none; }
details.more-limits { border: 0; padding: 0; background: none; }
details.more-limits blockquote { border-left: 1px solid var(--line); }
.bib { background: var(--plate-2); border: 0; border-radius: 4px; }
.pn-ctrl { background: none; border: 0; border-radius: 0; padding: 2px 0 8px; border-bottom: 1px solid var(--plate-line); }
.loading { border: 0; background: none; min-height: 300px; }
.pair-details { border: 0; padding: 0; }
.pair-details summary { font-weight: 600; color: var(--link); }
.busy { background: color-mix(in srgb, var(--plate) 86%, transparent); }

/* the story: a section per step, text first, then the two examples as figure (a) and figure (b) */
.story-rail { background: color-mix(in srgb, var(--bg) 88%, transparent); border-top: 0; }
.step { margin: 0 0 120px; }
.step-text { background: none; border: 0; border-radius: 0; padding: 0; gap: 18px 56px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.step .phase { font-size: .95rem; letter-spacing: .07em; }
.step .phase .dot { display: none; }
.step .phase b { color: var(--c); font-weight: 700; margin-right: 2px; }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.2; margin-bottom: 14px; letter-spacing: -.005em; }
.st-main p { font-size: 1.08rem; line-height: 1.72; max-width: 70ch; }
.st-read { border-left: 0; padding: 4px 0 0; font-size: .95rem; color: var(--muted); }
.st-read b { color: var(--ink); font-weight: 600; }
.st-read ul { list-style: none; padding-left: 0; gap: 9px; }
.st-kicker { color: var(--ink); }
.step-bar { margin: 26px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.link-play { color: var(--muted); }
.duo { gap: 0; margin-top: 14px; }
.step-bar + .duo { margin-top: 6px; }
.side { background: none; border: 0; border-radius: 0; padding: 4px 28px 0 0; min-height: 300px; }
.side + .side { padding: 4px 0 0 28px; border-left: 1px solid var(--line); }
.side-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 10px; }
.side-head h4 { font-size: 1rem; font-variant: small-caps; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.side-head h4::before { content: "(a) "; color: var(--ink); font-variant: normal; letter-spacing: 0; }
.side + .side .side-head h4::before { content: "(b) "; }
@media (max-width: 1000px) {
  .side { padding: 4px 0 0; }
  .side + .side { padding: 28px 0 0; margin-top: 28px; border-left: 0; border-top: 1px solid var(--line); }
  .step-text { grid-template-columns: minmax(0, 1fr); }
  .st-read { border-top: 0; padding-top: 0; }
}

/* figure captions: first sentence = what the figure shows, then how to read it */
.gist { display: block; color: var(--plate-ink); font-weight: 600; font-size: .95rem; line-height: 1.4; margin-bottom: 2px; }
.vis2 figcaption, .fig0 figcaption, .figx figcaption { font-size: .86rem; }
.figx { margin: 0; min-width: 0; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .8s; filter: blur(3px); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; filter: none; } }

/* ---------- "How it works": a large step number that stays in the margin while its step scrolls ---------- */
.step { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 18px; }
.step > * { grid-column: 2; }
.step::before { content: attr(data-step); grid-column: 1; grid-row: 1 / span 6; align-self: start; position: sticky; top: 118px;
  font: 600 7.2rem/0.85 var(--serif); color: transparent; -webkit-text-stroke: 1.5px var(--c); text-align: right; padding-right: 10px; transition: color .7s ease, transform .7s ease, opacity .7s; opacity: .55; }
.step.is-active::before { color: var(--c); opacity: 1; transform: translateY(-4px); }
@media (max-width: 1000px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step > * { grid-column: 1; }
  .step::before { grid-row: auto; position: static; font-size: 3.6rem; text-align: left; padding: 0; margin-bottom: 4px; }
}

/* ---------- step 5 options: one line each, help on hover / focus / tap ---------- */
.ls-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 26px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.ls-opts .opt { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.ls-opts .opt-l { font-size: .95rem; color: var(--muted); cursor: help; }
.ls-opts .seg { background: transparent; border-color: var(--line); }
.ls-opts .seg button { color: var(--muted); }
.ls-opts .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.help { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 .75rem/1 var(--serif); cursor: help; display: inline-grid; place-items: center; padding: 0; }
.help:hover, .help:focus-visible, .opt.open .help { color: var(--ink); border-color: var(--ink); }
.tipbox { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 12; width: max-content; max-width: min(320px, 80vw); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: .88rem; line-height: 1.45; box-shadow: 0 10px 28px -12px rgba(0,0,0,.5); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.opt-l:hover ~ .tipbox, .help:hover ~ .tipbox, .help:focus-visible ~ .tipbox, .opt.open .tipbox { opacity: 1; transform: none; }
.ls-opts .icon-btn { background: transparent; border-color: var(--line); color: var(--muted); font-size: .8rem; }

/* ---------- theme switch in the top bar ---------- */
.nav-right { display: flex; align-items: center; gap: 18px; }
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.theme-switch button { width: 30px; height: 26px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .2s, color .2s; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.theme-switch svg { width: 15px; height: 15px; }
html.theme-fade body, html.theme-fade .nav, html.theme-fade .story-rail { transition: background-color .12s ease, color .12s ease; }

/* Revision 9: quieter typography, compact input, explanations on demand. */
.hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; padding-block: 42px 26px; }
.hero-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.hero-title-line .h1-name { margin: 0; font-size: clamp(2rem, 4.4vw, 3.5rem); }
.hero-title-line .venue { margin: 0; font-size: .72rem; letter-spacing: .08em; white-space: nowrap; }
.venue::before { content: none; }
.hero-text > .h1-sub { margin: 12px 0 20px; max-width: 620px; }
.hero-plate { width: 100%; align-self: center; }
.hero-plate .plate-head { justify-content: flex-start; gap: 10px; margin-bottom: 5px; }
.hero-plate [data-alpha-out] { margin-left: auto; font-variant-numeric: tabular-nums; }
.tag { padding: 0; border: 0; border-radius: 0; background: transparent; font-size: .76rem; }
.hero-plate .tag { font-size: .7rem; }
.hero-plate .icon-btn { padding: 4px 0; border: 0; border-radius: 0; color: var(--link); }
.hero-plate figcaption { font-size: .81rem; line-height: 1.45; }
.hero-plate .ramp-labels { font-size: .65rem; }
.hero-plate .ramp-bar { height: 5px; margin-top: 6px; }
.hero-plate .ramp-bar .knob { width: 13px; height: 13px; }

.info-btn, .info-btn.help { display: inline-grid; place-items: center; vertical-align: middle; flex: 0 0 auto;
  width: 25px; height: 25px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--muted); font: italic 500 .83rem/1 var(--serif); cursor: pointer;
  transition: color .18s, border-color .18s, background-color .18s; }
.info-btn:hover, .info-btn:focus-visible { color: var(--ink); border-color: var(--ink); background: var(--hl); }
h2 > .info-btn, h3 > .info-btn { margin-left: 7px; transform: translateY(-2px); }
figcaption > .info-btn { float: right; margin: 0 0 5px 8px; }
.info-inline { font-style: italic; font-weight: 600; }
.chart-with-info { position: relative; }
.chart-with-info > .info-btn { position: absolute; top: 0; right: 2px; z-index: 3; }
.chart-with-info > h4 { padding-right: 32px; }
#chart-bound.chart-with-info { padding-top: 24px; }
.info-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(78dvh, 760px); padding: 25px 28px 26px;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  box-shadow: 0 24px 90px #0005; overflow-y: auto; overscroll-behavior: contain; }
.info-dialog::backdrop { background: #0007; backdrop-filter: blur(2px); }
.info-dialog[open] { animation: info-enter .18s ease-out; }
.info-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.info-dialog-head h2 { margin: 0; font-size: 1.4rem; }
.info-close { flex: none; border: 0; background: none; color: var(--muted); padding: 0 3px; font: 400 1.6rem/1 var(--serif); cursor: pointer; }
.info-close:hover { color: var(--ink); }
.info-body { font-size: .98rem; line-height: 1.65; }
.info-body p:last-child { margin-bottom: 0; }
.info-body .katex { font-size: .95em; max-width: 100%; }
.info-dialog-head { position: sticky; top: 0; z-index: 1; background: var(--bg); }
.info-context { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
@keyframes info-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.step { grid-template-columns: 96px minmax(0, 1fr); column-gap: 20px; margin-bottom: 78px; }
.step::before { font-size: 5.7rem; padding-right: 4px; }
.step-text { grid-template-columns: minmax(0, 1fr); }
.st-main { max-width: 800px; }
.st-main p { font-size: 1.03rem; line-height: 1.6; max-width: 76ch; }
.step h3 { margin-bottom: 10px; font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.step .phase { font-size: .81rem; letter-spacing: .06em; margin-bottom: 8px; }
.step-bar { margin-top: 12px; padding-top: 8px; }
.side-head { margin-bottom: 7px; }
.side-head h4 { font-size: .88rem; letter-spacing: .04em; }
.side-meta { font-size: .76rem; }
.input-graph { max-width: 320px; margin-inline: auto; }
.input-graph figure { margin: 0; }
.input-graph .graph { display: block; width: 100%; }
.input-graph figcaption { margin-top: 7px; font-size: .83rem; line-height: 1.45; color: var(--muted); }
.readout-text { font-size: .93rem; line-height: 1.55; margin-top: 10px; }
.gist { font-size: .88rem; line-height: 1.45; }
.pn-ctrl { gap: 10px; }
.pn-ctrl .val { font-weight: 500; font-size: .88rem; min-width: 0; }
.pn-ctrl > .info-btn { margin-left: auto; }
.pn-ctrl input[type="range"] { flex: 0 0 24px; min-width: 0; min-height: 0; height: 24px; margin: 0; padding: 0; border-radius: 0; background: transparent; }
.pn-ctrl input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 1px; background: var(--ramp); }
.pn-ctrl input[type="range"]::-moz-range-track { height: 4px; border-radius: 1px; background: var(--ramp); }
.pn-ctrl input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; border-width: 2px; margin-top: -5px; }
.pn-ctrl input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-width: 2px; }
.pn-ctrl input[type="range"].plain { background: transparent; }
.pn-ctrl input[type="range"].plain::-webkit-slider-runnable-track { background: var(--plate-line); }
.pn-ctrl input[type="range"].plain::-moz-range-track { background: var(--plate-line); }
.pn-ctrl .ticks { width: 100%; margin-left: 0; height: 5px; opacity: .55; }
.icon-btn, .play { border-radius: 4px; }
.play { font-weight: 500; }
.seg { border-radius: 4px; background: transparent; }
.seg button { border-radius: 2px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { box-shadow: none; }
.chip { border-radius: 3px; border-color: transparent; background: transparent; }
.chip:hover { border-color: var(--line); }
.chip[aria-pressed="true"] { border-bottom-color: var(--c); }
.ls-opts { gap: 10px 24px; margin-top: 14px; }
.ls-opts .opt-l { cursor: default; }
.pair-details { margin: 12px 0 0; }
.pair-details summary { font-size: .9rem; font-weight: 400; }
.temp-tag { border: 0; background: none; padding: 0; font-style: italic; color: var(--muted); }
.rv { transform: translateY(14px); filter: none; transition: opacity .65s ease, transform .65s cubic-bezier(.2,.65,.3,1); }
.rv.in { transform: none; filter: none; }

#table1 table.data, table.cmp-table, .mini-table table.data { margin-inline: auto; }
#table1 .table-summary { max-width: 760px; margin-inline: auto; }
.table-wrap { border-radius: 0; }
.compare > div:first-child { justify-content: center; }
.concise-notes { display: block; max-width: 900px; margin-block: 20px 28px; }
.concise-notes li { margin-bottom: 8px; }
.abl > p:not(.src) { font-size: .96rem; line-height: 1.5; }
.chart .series path.line { transition: opacity .2s, stroke-width .18s; }
.chart .hover-marks { pointer-events: none; }
.chart .hover-marks circle { stroke: var(--plate); stroke-width: 1.6; }
.step svg.graph .nodes circle { transition: r 85ms linear; }
.step svg.graph .edges line { transition: stroke-width 85ms linear; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) 270px; gap: 26px; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step::before { font-size: 3rem; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 30px; }
  .hero-title-line { flex-wrap: nowrap; gap: 12px; }
  .hero-title-line .h1-name { font-size: clamp(1.75rem, 7.6vw, 2.8rem); white-space: nowrap; }
  .hero-title-line .venue { margin-left: auto; font-size: .7rem; letter-spacing: .04em; }
  .hero-text > .h1-sub { font-size: 1.1rem; margin-top: 12px; }
  .hero-plate { max-width: 270px; justify-self: center; }
  .hero-plate .tag { font-size: .65rem; }
  .step { margin-bottom: 58px; }
  .section { padding-block: 52px; }
  .info-dialog { padding: 22px; }
  .info-dialog-head h2 { font-size: 1.25rem; }
  .pn-ctrl { flex-wrap: wrap; }
  .pn-ctrl .grow { min-width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  html.theme-fade, html.theme-fade *, .info-dialog[open] { transition: none !important; animation: none !important; }
}

/* Revision 10: author links belong to the author, and input edges lead into A. */
.authors { display: grid; grid-template-columns: max-content max-content; gap: 15px 30px; margin-block: 22px 18px; }
.author-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.author-name { line-height: 1.35; font-size: 1rem; max-width: 100%; }
.author-name a { white-space: normal; }
.author-name > a { text-decoration-color: transparent; }
.author-name > a:hover { text-decoration-color: currentColor; }
.author-links { display: flex; flex-wrap: wrap; gap: 3px 15px; font-size: .74rem; line-height: 1.6; }
.author-links a { color: var(--muted); }
.author-links a:hover { color: var(--link); }
.example-picker { display: none; }
.input-sequence { margin: 12px 0 0; }
.input-sequence figcaption { font-size: .83rem; line-height: 1.45; color: var(--muted); }
.input-scene { position: relative; width: 100%; overflow: hidden; isolation: isolate; }
.input-scene::before { content: ""; display: block; padding-top: calc(100% * 360 / 560 + 28px); }
.input-full-graph { position: absolute; inset: 0 0 28px; }
.input-full-graph .graph { width: 100%; height: 100%; object-fit: contain; }
.input-full-graph canvas.graph { object-fit: fill; }
.input-full-matrix.mat { position: absolute; width: 49%; height: auto; aspect-ratio: 1; top: 4%; left: 25.5%; opacity: 0; transform-origin: center; }
.input-detail { position: absolute; inset: 0 0 28px; width: 100%; height: calc(100% - 28px); overflow: visible; pointer-events: none; }
.input-detail text { font-family: var(--sans); }
.input-detail .coupling-value { paint-order: stroke; stroke: var(--plate); stroke-width: 5px; stroke-linejoin: round; }
.input-stage { position: absolute; bottom: 0; inset-inline: 0; text-align: center; color: var(--ink); font-size: .78rem; line-height: 1.5; }
.input-scene[data-phase="3"] .input-full-matrix { outline: 1px solid var(--line); }
.input-sequence + .readout-text { min-height: 4.6em; }
@media (max-width: 760px) {
  .authors { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 16px; }
  .author-name { font-size: .92rem; }
  .author-links { flex-direction: column; gap: 2px; font-size: .76rem; }
  .example-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin: 0 0 28px; padding-block: 10px; border-block: 1px solid var(--line); }
  .example-picker label { font-size: .86rem; color: var(--muted); }
  .example-picker select { max-width: 100%; min-height: 40px; padding: 7px 24px 7px 0; border: 0; border-radius: 0; font: 500 .9rem var(--sans); color: var(--ink); background: var(--bg); cursor: pointer; }
  #story[data-example="paper"] .side[data-side="toy"], #story[data-example="toy"] .side[data-side="paper"] { display: none; }
  #story .side { padding: 4px 0 0; margin: 0; border: 0; }
  #story .side-head h4::before { content: none; }
  .input-stage { font-size: .75rem; }
  .input-scene::before { padding-top: calc(100% * 640 / 350 + 28px); }
  .input-detail { transform-origin: 50% 75%; }
  .input-full-matrix.mat { width: 72%; left: 14%; top: 22%; }
  .input-sequence + .readout-text { min-height: 0; }
}
@media (max-width: 360px) {
  .hero-title-line .h1-name { font-size: clamp(1.4rem, 7.4vw, 1.65rem); }
  .authors { grid-template-columns: 1fr; }
  .author-links { flex-direction: row; gap: 6px 14px; }
}

