/* Tokens: bare :root is the complete light palette; dark blocks redefine tokens only. */
:root {
  --bg: #f2f4f6;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --ink: #121a22;
  --ink-2: #44505c;
  --muted: #56616c;
  --rule: #d7dde4;
  --grid: #e8ecf0;
  --hl: #d9e6f5;
  --donor: #2467a6;
  --fixed: #1f8a5b;
  --search: #c2571f;
  --crit: #b3261e;
  --donor-text: #1f5c96;
  --fixed-text: #17704a;
  --search-text: #a64716;
  --ord-1: #86b6ef;
  --ord-2: #2a78d6;
  --ord-3: #184f95;
  --seq-lo: #e6eef8;
  --seq-hi: #1c4f8f;
  --seq-text-hi: #ffffff;
  --band: #e9edf1;
  --code-bg: #eef1f4;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --text-col: 41rem;
  --note-col: 15rem;
  --gutter: 3rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1318;
    --panel: #161c22;
    --panel-2: #1b2229;
    --ink: #e7ecf1;
    --ink-2: #b6c0cb;
    --muted: #9aa5b1;
    --rule: #2b343e;
    --grid: #222a33;
    --hl: #1f3a5a;
    --donor: #4f93dc;
    --fixed: #35a472;
    --search: #dd6f35;
    --crit: #ef6b62;
    --donor-text: #6aa8ec;
    --fixed-text: #4fc08c;
    --search-text: #ee8a55;
    --ord-1: #b7d3f6;
    --ord-2: #6da7ec;
    --ord-3: #2a78d6;
    --seq-lo: #1b2633;
    --seq-hi: #6aa6ea;
    --seq-text-hi: #0e1318;
    --band: #1f272f;
    --code-bg: #1b2229;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1318;
  --panel: #161c22;
  --panel-2: #1b2229;
  --ink: #e7ecf1;
  --ink-2: #b6c0cb;
  --muted: #9aa5b1;
  --rule: #2b343e;
  --grid: #222a33;
  --hl: #1f3a5a;
  --donor: #4f93dc;
  --fixed: #35a472;
  --search: #dd6f35;
  --crit: #ef6b62;
  --donor-text: #6aa8ec;
  --fixed-text: #4fc08c;
  --search-text: #ee8a55;
  --ord-1: #b7d3f6;
  --ord-2: #6da7ec;
  --ord-3: #2a78d6;
  --seq-lo: #1b2633;
  --seq-hi: #6aa6ea;
  --seq-text-hi: #0e1318;
  --band: #1f272f;
  --code-bg: #1b2229;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
}
a { color: var(--donor); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--donor); outline-offset: 2px; border-radius: 2px; }
img, svg, canvas { max-width: 100%; }

.wrap {
  max-width: calc(var(--text-col) + var(--gutter) + var(--note-col));
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 2.75rem; }
.topbar .mark {
  font-family: var(--display); font-weight: 700; font-stretch: 80%;
  font-size: 0.95rem; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.topbar nav { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; }
.topbar nav a {
  font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  padding-block: 0.6rem;
}
.topbar nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: 3.25rem 1.5rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}
.hero h1 {
  font-family: var(--display); font-weight: 750; font-stretch: 78%;
  font-size: clamp(2.4rem, 6.4vw, 4.2rem); line-height: 0.98; letter-spacing: -0.012em;
  margin: 0; max-width: 15ch; text-wrap: balance;
}
/* The subtitle sits on its own lines at a smaller size, so the title breaks cleanly. */
.hero h1 .quiet {
  display: block; margin-top: 0.3em; max-width: 30ch;
  font-size: 0.5em; line-height: 1.12; font-weight: 600; font-stretch: 85%; letter-spacing: 0; color: var(--ink-2);
}
.nb { white-space: nowrap; }
.byline { margin: 1.25rem 0 0; font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.links a, .links span {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.8rem; text-decoration: none;
  padding: 0.5rem 0.85rem; border-radius: 4px; border: 1px solid var(--rule); color: var(--ink); background: var(--panel);
}
.links a:hover { border-color: var(--ink-2); }
.links a.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.links span { color: var(--muted); background: transparent; border-style: dashed; }
.lede {
  max-width: var(--text-col); margin: 2rem 0 0; font-size: 1.28rem; line-height: 1.55; color: var(--ink);
}

/* ---------- Findings ---------- */
.findings {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin: 2.5rem 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.findings li { padding: 1.1rem 1.4rem 1.3rem 0; display: grid; grid-template-rows: auto auto 1fr; gap: 0.35rem; }
.findings li + li { padding-left: 1.4rem; border-left: 1px solid var(--rule); }
.findings .k { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.findings .num {
  font-family: var(--display); font-weight: 700; font-stretch: 75%; font-size: 2.6rem; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.findings .num small { font-size: 0.5em; font-weight: 600; color: var(--ink-2); margin-left: 0.15em; }
.findings p { margin: 0.25rem 0 0; font-size: 0.98rem; line-height: 1.5; color: var(--ink-2); }
.findings-note { font-size: 0.95rem; color: var(--ink-2); max-width: var(--text-col); margin: 0.9rem 0 0; }

/* ---------- Sections ---------- */
.sec { padding-block: 3.75rem 1rem; }
.sec-head { max-width: var(--text-col); }
.sec-head .eyebrow { margin-bottom: 0.6rem; }
h2 {
  font-family: var(--display); font-weight: 720; font-stretch: 82%;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem); line-height: 1.05; letter-spacing: -0.005em;
  margin: 0 0 1.25rem; text-wrap: balance;
}
h3 {
  font-family: var(--display); font-weight: 680; font-stretch: 88%;
  font-size: 1.22rem; line-height: 1.2; margin: 2.2rem 0 0.6rem; text-wrap: balance;
}
.prose { max-width: var(--text-col); }
.prose p { margin: 0 0 1.05rem; }
.prose ol, .prose ul { padding-left: 1.3rem; margin: 0 0 1.05rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { font-family: var(--mono); font-size: 0.85em; color: var(--muted); }
.num-inline, .mono { font-family: var(--mono); font-size: 0.88em; font-variant-numeric: tabular-nums; }

/* Margin notes carry the paper's own qualifiers next to the claim. */
.note {
  float: right; clear: right;
  width: var(--note-col); margin: 0.25rem calc(-1 * (var(--note-col) + var(--gutter))) 1rem 0;
  font-family: var(--serif); font-size: 0.86rem; line-height: 1.5; color: var(--ink-2);
  border-top: 1px solid var(--rule); padding-top: 0.5rem;
}
.note b {
  display: block; font-family: var(--mono); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; font-size: 0.72rem;
}

/* ---------- Math ---------- */
math { font-family: "STIX Two Math", "Latin Modern Math", "Cambria Math", math; font-size: 1.04em; }
.katex-display { display: block; margin: 1.1rem 0 1.3rem; overflow-x: auto; overflow-y: hidden; padding-block: 0.2rem; }
.katex-display math { font-size: 1.12em; }
/* The one boxed equation: centred on a quiet panel. */
.eq-box {
  display: flex; justify-content: center; margin: 1.2rem 0 1.4rem; padding: 0.5rem 1rem;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
}
.eq-box .katex-display { margin: 0.3rem 0; }
.eq-box math { font-size: 1.22em; }
.sym { border-radius: 2px; transition: background-color 120ms; cursor: help; }
.hl-eta .sym-eta, .hl-eps .sym-eps, .hl-sig .sym-sig, .hl-R .sym-R,
.hl-B .sym-B, .hl-m .sym-m, .hl-D .sym-D { background: var(--hl); }
.prop {
  margin: 1.2rem 0 1.4rem; padding: 0.9rem 1.1rem; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 4px;
}
.prop > .k { font-family: var(--display); font-weight: 700; font-stretch: 88%; font-size: 1rem; }
.prop p { margin: 0.45rem 0; font-size: 1rem; }

/* ---------- Figures ---------- */
.fig {
  clear: both;
  margin: 2rem 0 2.25rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(0.9rem, 2.4vw, 1.4rem);
}
.fig-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.25rem; margin-bottom: 0.9rem; }
.fig-title { font-family: var(--display); font-weight: 680; font-stretch: 88%; font-size: 1.05rem; margin: 0; }
.fig figcaption, .fig .caption {
  margin-top: 1rem; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); max-width: 52rem;
}
.fig figcaption b { color: var(--ink); font-weight: 600; }
.plot { width: 100%; position: relative; min-height: 120px; }
.plot + .plot { margin-top: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend svg { width: 14px; height: 14px; overflow: visible; }
.diagram-scroll { overflow-x: auto; }
.diagram-scroll svg { min-width: 760px; width: 100%; height: auto; display: block; }

/* Chart text and marks take theme tokens only. */
.chart { display: block; overflow: visible; font-family: var(--mono); }
.chart text { fill: var(--ink-2); font-size: 12.5px; }
.chart .t-ink { fill: var(--ink); }
.chart .t-muted { fill: var(--muted); }
.chart .t-strong { fill: var(--ink); font-weight: 600; }
.chart .t-donor { fill: var(--donor-text); }
.chart .t-fixed { fill: var(--fixed-text); }
.chart .t-search { fill: var(--search-text); }
.chart .t-crit { fill: var(--crit); }
.chart .t-small { font-size: 11.5px; }
.chart .t-label { font-size: 11.5px; letter-spacing: 0.02em; fill: var(--muted); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axisline { stroke: var(--rule); stroke-width: 1; }
.chart .ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; fill: none; }
.chart .band { fill: var(--band); }
.f-donor { fill: var(--donor); } .s-donor { stroke: var(--donor); }
.f-fixed { fill: var(--fixed); } .s-fixed { stroke: var(--fixed); }
.f-search { fill: var(--search); } .s-search { stroke: var(--search); }
.f-crit { fill: var(--crit); } .s-crit { stroke: var(--crit); }
.f-ink { fill: var(--ink); } .s-ink { stroke: var(--ink); }
.f-ink2 { fill: var(--ink-2); } .s-ink2 { stroke: var(--ink-2); }
.f-muted { fill: var(--muted); } .s-muted { stroke: var(--muted); }
.f-panel { fill: var(--panel); } .s-panel { stroke: var(--panel); }
.f-none { fill: none; }
.f-ord-1 { fill: var(--ord-1); } .f-ord-2 { fill: var(--ord-2); } .f-ord-3 { fill: var(--ord-3); }
.s-ord-1 { stroke: var(--ord-1); } .s-ord-2 { stroke: var(--ord-2); } .s-ord-3 { stroke: var(--ord-3); }
.ring { stroke: var(--panel); stroke-width: 1.5; }
.hit { fill: transparent; cursor: crosshair; }
.clickable { cursor: pointer; }

/* ---------- Controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: end; margin-bottom: 1rem; }
.ctl { display: grid; gap: 0.3rem; min-width: 0; }
.ctl > label, .ctl > .lbl { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.01em; color: var(--muted); }
.seg { display: inline-flex; max-width: 100%; border: 1px solid var(--rule); border-radius: 4px; overflow-x: auto; scrollbar-width: none; background: var(--panel-2); }
.seg button {
  font: 500 0.78rem/1 var(--mono); color: var(--ink-2); background: transparent; border: 0;
  padding: 0.55rem 0.75rem; cursor: pointer; white-space: nowrap;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
select {
  width: 100%;
  font: 0.8rem var(--mono); color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.45rem 0.5rem; max-width: 100%;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none; background: transparent;
  width: 12rem; max-width: 100%; height: 1.9rem; margin: 0; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--rule); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--rule); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--panel); border: 2px solid var(--ink);
}
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }
.readout { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.btn-ghost {
  font: 500 0.74rem/1 var(--mono); color: var(--ink-2); background: transparent;
  border: 1px dashed var(--rule); border-radius: 4px; padding: 0.5rem 0.65rem; cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-2); }

.kv {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.45; margin: 1rem 0 0; font-variant-numeric: tabular-nums;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
.kv .sw { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0.05em; }
.status {
  font-family: var(--mono); font-size: 0.78rem; padding: 0.55rem 0.75rem; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--rule); color: var(--ink-2); margin-top: 0.9rem;
}
.status strong { color: var(--ink); font-weight: 600; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem 1.75rem; align-items: start; }
.demo-sub { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.01em; color: var(--muted); margin: 0 0 0.35rem; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 0.25rem 0 0; }
table.results { border-collapse: collapse; width: 100%; min-width: 560px; font-family: var(--mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
table.results th, table.results td { padding: 0.5rem 0.6rem; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.results th:first-child, table.results td:first-child { text-align: left; }
table.results thead th { font-weight: 500; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.05em; border-bottom: 1px solid var(--ink); }
table.results tr.group td { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 0.9rem; padding-top: 0.9rem; border-bottom: 0; }
table.results .best { font-weight: 600; color: var(--ink); background: var(--panel-2); }
table.results .eq { color: var(--muted); }

.spec { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.9rem; }
.spec th, .spec td { text-align: left; padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec thead th { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.spec td.n { font-family: var(--mono); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Scope, cite, footer ---------- */
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2.5rem; max-width: calc(var(--text-col) + var(--gutter) + var(--note-col)); margin: 0; padding: 0; list-style: none; }
.scope li { border-top: 1px solid var(--rule); padding-top: 0.7rem; font-size: 0.98rem; color: var(--ink-2); }
.scope li b { display: block; font-family: var(--display); font-stretch: 88%; font-weight: 680; font-size: 1.02rem; color: var(--ink); margin-bottom: 0.2rem; }
.bib-bar { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }
.bib pre {
  margin: 0; padding: 1rem 1.1rem; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.55; overflow-x: auto; color: var(--ink);
}
footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding-block: 1.75rem 3rem; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); line-height: 1.7; }
footer p { margin: 0 0 0.3rem; max-width: 60rem; }

/* ---------- Tooltip ---------- */
.tip {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  max-width: 19rem; padding: 0.55rem 0.7rem; border-radius: 4px;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 22px rgba(10, 16, 22, 0.22);
}
.tip b { font-weight: 600; }
.tip hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); margin: 0.35rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .note { float: none; width: auto; margin: 0 0 1.1rem; max-width: var(--text-col); padding: 0.55rem 0 0; }
}
@media (max-width: 860px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .findings { grid-template-columns: minmax(0, 1fr); }
  .findings li, .findings li + li { padding: 1rem 0; border-left: 0; }
  .findings li + li { border-top: 1px solid var(--rule); }
  .scope { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 1.05rem; }
  .lede { font-size: 1.14rem; }
  .topbar nav { display: none; }
  .controls { gap: 0.7rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Disclosure ---------- */
details.more { margin-top: 1.2rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
details.more summary { cursor: pointer; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }
details.more summary:hover { color: var(--ink); }
details.more[open] summary { margin-bottom: 0.8rem; }
table.results caption { white-space: normal; }

/* ---------- Overview block diagram ---------- */
.ov-scroll svg.ov { min-width: 720px; }
.ov text { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.ov .t { font-size: 12px; font-weight: 600; fill: var(--ink); }
.ov .h { font-family: var(--display); font-stretch: 88%; font-size: 15px; font-weight: 700; fill: var(--ink); }
.ov .mu { font-size: 11px; fill: var(--muted); }
.ov .tag { font-size: 10px; font-weight: 600; fill: var(--bg); }
.ov .panel { fill: var(--panel-2); stroke: var(--rule); }
.ov .blk { fill: var(--panel); stroke: var(--rule); transition: stroke 120ms; }
.ov a:hover .blk, .ov a:focus-visible .blk { stroke: var(--ink-2); }
.ov .chip { fill: var(--panel-2); stroke: var(--ink-2); stroke-width: 1; }
.ov .dot { fill: var(--ink-2); stroke: var(--panel); stroke-width: 1; }
.ov .dot.drift { fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.3; }
.ov .flow, .ov .flow path { stroke: var(--ink-2); stroke-width: 1.4; fill: none; }
.ov .inform { stroke: var(--ink-2); stroke-width: 1.3; stroke-dasharray: 4 3; fill: none; }
.ov .rt { stroke-width: 1; }
.ov .rt-donor { fill: color-mix(in srgb, var(--donor) 8%, var(--panel-2)); stroke: color-mix(in srgb, var(--donor) 45%, transparent); }
.ov .rt-fixed { fill: color-mix(in srgb, var(--fixed) 8%, var(--panel-2)); stroke: color-mix(in srgb, var(--fixed) 45%, transparent); }
.ov .rt-search { fill: color-mix(in srgb, var(--search) 8%, var(--panel-2)); stroke: color-mix(in srgb, var(--search) 45%, transparent); }
.ov .route { transition: opacity 150ms; }
.ov:has(.route:hover) .route:not(:hover) { opacity: 0.32; }
.scroll-hint { display: none; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin: 0.4rem 0 0; }
@media (max-width: 800px) { .scroll-hint { display: block; } }

/* ---------- Rule demo controls: one aligned row on desktop ---------- */
.rule-controls { display: grid; grid-template-columns: auto auto minmax(10rem, 1fr); gap: 0.8rem 1.5rem; align-items: end; }
.rule-controls .ctl-target { grid-column: 1 / -1; max-width: 30rem; }
.rule-controls input[type="range"] { width: 100%; max-width: 14rem; }
@media (max-width: 760px) { .rule-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .rule-controls { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Reading path ---------- */
.sec-num {
  display: inline-block; min-width: 1.6em; margin-right: 0.5em;
  font-family: var(--mono); font-size: 0.5em; font-weight: 500; letter-spacing: 0;
  color: var(--muted); vertical-align: 0.4em;
}
details.more-figs > summary {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink);
  padding: 0.6rem 0.9rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel);
}
details.more-figs > summary::-webkit-details-marker { display: none; }
details.more-figs > summary::before { content: "▸"; color: var(--muted); }
details.more-figs[open] > summary::before { content: "▾"; }
details.more-figs > summary:hover { border-color: var(--ink-2); }
details.more-figs[open] > summary { margin-bottom: 0.5rem; }
details.more-figs h3 { margin-top: 2rem; }

/* The page ends with the citation; give it room at the bottom. */
#cite { padding-bottom: 5rem; }
