/*
 * Project page in the style of the Function blog article layout (after claude.dev/blog):
 * warm paper, near-black ink, a sticky left rail with the section tree and reading
 * progress, and the article on columns 5–12 of a 12-column grid.
 */

@font-face { font-family: "Anthropic Sans"; src: url("fonts/anthropic-sans-roman.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Anthropic Sans"; src: url("fonts/anthropic-sans-italic.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Anthropic Mono"; src: url("fonts/anthropic-mono-roman.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Anthropic Mono"; src: url("fonts/anthropic-mono-italic.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }

/* ---------- palette ---------- */
:root {
  color-scheme: light;
  --bg: #faf9f5;
  --code-bg: #f1efe8;
  --ink-rgb: 20, 20, 19;
  --ink: #141413;
  --ink-2: #4c4b45;
  --ink-3: #7b7a72;
  --ink-4: #a8a69d;
  --line: #14141338;
  --line-soft: #1414131c;
  --accent: #c96442;            /* clay: the one data accent */
  --accent-wash: rgba(201, 100, 66, 0.10);
  --accent-soft: #e2a58c;
  --neutral-mark: #b0aea5;      /* fp16 baseline */
  --good-text: #3d6b22;
  --good-fill: rgba(61, 107, 34, 0.08);
  --bad: #b3261e;
  --bad-fill: rgba(179, 38, 30, 0.07);

  --sans: "Anthropic Sans", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Anthropic Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Songti SC", serif;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --gutter: 36px;
  --rail-top: 36px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141413;
  --code-bg: #1a1a18;
  --ink-rgb: 250, 249, 245;
  --ink: #faf9f5;
  --ink-2: #b0aea5;
  --ink-3: #87867f;
  --ink-4: #5e5d59;
  --line: #faf9f529;
  --line-soft: #faf9f517;
  --accent: #d4714f;
  --accent-wash: rgba(212, 113, 79, 0.14);
  --accent-soft: #8a4a35;
  --neutral-mark: #6b6a64;
  --good-text: #8dbb6c;
  --good-fill: rgba(141, 187, 108, 0.10);
  --bad: #e0705f;
  --bad-fill: rgba(224, 112, 95, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #141413;
    --code-bg: #1a1a18;
    --ink-rgb: 250, 249, 245;
    --ink: #faf9f5;
    --ink-2: #b0aea5;
    --ink-3: #87867f;
    --ink-4: #5e5d59;
    --line: #faf9f529;
    --line-soft: #faf9f517;
    --accent: #d4714f;
    --accent-wash: rgba(212, 113, 79, 0.14);
    --accent-soft: #8a4a35;
    --neutral-mark: #6b6a64;
    --good-text: #8dbb6c;
    --good-fill: rgba(141, 187, 108, 0.10);
    --bad: #e0705f;
    --bad-fill: rgba(224, 112, 95, 0.10);
  }
}
/* names used by the chart and animation scripts */
:root {
  --surface-1: var(--bg);
  --surface-2: var(--code-bg);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --grid: var(--line-soft);
  --axis: var(--ink-4);
  --border: var(--line-soft);
  --series-1: var(--accent);
  --baseline: var(--neutral-mark);
  --ord-1: var(--accent-soft);
  --band: var(--accent-wash);
  --good: var(--good-text);
  --critical: var(--bad);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--rail-top); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--accent-wash); }

/* 1px ink hairline at the very top, driven by the scroll timeline */
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .reading-progress {
    animation: reading-progress linear both;
    animation-timeline: scroll(root block);
    background: var(--ink);
    display: block;
    height: 1px;
    inset: 0 0 auto 0;
    position: fixed;
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 100;
  }
}
@keyframes reading-progress { to { transform: scaleX(1); } }

.topbar {
  align-items: center;
  display: flex;
  font-family: var(--mono);
  font-size: 13.5px;
  justify-content: space-between;
  padding: 22px var(--gutter) 0;
}
.topbar__home { color: var(--ink-2); text-decoration: none; letter-spacing: 0.02em; }
.topbar__home:hover { color: var(--ink); }
.theme-toggle {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  height: 30px;
  width: 30px;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 56px var(--gutter) 72px;
  position: relative;
}
.hero::after {
  background: color-mix(in srgb, rgb(var(--ink-rgb)) 9%, var(--bg));
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}
.hero__content { grid-column: 5 / 13; }
.chip {
  border: 1px solid var(--line-soft);
  color: var(--ink-3);
  display: inline-block;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  padding: 2px 8px;
}
.title {
  font-family: var(--serif);
  font-size: clamp(32px, 20px + 1.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
  margin: 0;
  max-width: 780px;
  text-wrap: balance;
}
.description {
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 720px;
}
.hero .meta {
  display: grid;
  font-family: var(--mono);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 0;
}
.hero .meta > div { min-width: 0; padding-right: 18px; }
.hero .meta dt { color: var(--ink-3); font-size: 13.5px; letter-spacing: 0.02em; margin-bottom: 7px; }
.hero .meta dd {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.75px;
  line-height: 1.5;
  margin: 0;
  padding-left: 1.2em;
  text-indent: -1.2em;
}
.hero .meta dd::before { color: var(--ink-4); content: "└ "; display: inline-block; font-family: var(--mono); text-indent: 0; width: 1.2em; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: rgba(var(--ink-rgb), 0.05); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn span { color: var(--ink-4); margin-left: 6px; }
.btn[aria-disabled="true"] { color: var(--ink-3); cursor: default; }
.btn[aria-disabled="true"]:hover { background: none; }

/* ---------- body: rail on 1–4, article on 5–12 ---------- */
.body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 72px var(--gutter) 96px;
}
.rail {
  align-self: start;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  grid-column: 1 / 5;
  margin: -2px 32px 0 0;
  min-height: calc(100dvh - var(--rail-top) - 36px);
  position: sticky;
  top: var(--rail-top);
}
.rail__title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  max-height: 0;
  max-width: 34ch;
  opacity: 0;
  overflow: hidden;
  text-wrap: balance;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease), max-height 0.4s ease, margin 0.4s ease;
}
.rail__title.is-on { margin-bottom: 26px; max-height: 200px; opacity: 1; transform: none; }
.rail__label { color: var(--ink-3); font-size: 13.5px; letter-spacing: 0.02em; margin: 0 0 12px; }
.tree a {
  color: var(--ink-2);
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.15s, transform 0.25s var(--ease);
  white-space: nowrap;
}
.tree__branch { color: var(--ink-4); margin-right: 10px; }
.tree a:hover, .tree a.is-active { color: var(--ink); }
.tree a:hover { transform: translateX(3px); }
.tree a.is-active .tree__branch { color: var(--ink-2); }
.rail__progress { color: var(--ink-4); font-size: 15.75px; margin-top: 26px; overflow: hidden; white-space: nowrap; }
.rail__progress b { color: var(--ink); font-weight: 400; }
.rail__pct { color: var(--ink-2); margin-left: 8px; }
.rail__hint { color: var(--ink-3); font-size: 13.5px; letter-spacing: 0.02em; margin: 12px 0 0; }
.rail__share { margin-top: auto; padding-top: 26px; }
.rail__share a, .rail__share button {
  background: none;
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 2px 0;
  text-align: left;
  text-decoration: none;
}
.rail__share a::before, .rail__share button::before { color: var(--ink-4); content: "└ "; }
.rail__share a:hover, .rail__share button:hover { color: var(--ink); }
.rail__share [hidden] { display: none; }

.column { counter-reset: section; grid-column: 5 / 13; max-width: 780px; min-width: 0; }

/* ---------- prose ---------- */
.column section { margin: 0 0 80px; }
.column h2 {
  color: var(--ink);
  counter-increment: section;
  font-family: var(--mono);
  font-size: 15.75px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0 0 22px;
  scroll-margin-top: var(--rail-top);
  text-transform: uppercase;
}
.column h2::before { color: var(--ink-4); content: counter(section, decimal-leading-zero) "  "; white-space: pre; }
.column section:first-child h2 { margin-top: -2px; }
.column p { color: var(--ink-2); font-size: 18px; line-height: 1.7; margin: 0 0 14px; max-width: 680px; }
.column p.lead { color: var(--ink); }
.column p.statement {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 14px;
}
.column em { font-style: italic; }
.column strong { color: var(--ink); font-weight: 500; }

/* figures: claude.dev's bordered card */
.figure { border: 1px solid var(--line-soft); margin: 28px 0; padding: 22px; position: relative; }
.figure figcaption { color: var(--ink-3); font-size: 14px; line-height: 1.55; margin-top: 18px; }
.figure figcaption.viz-head { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.hero-anim { padding: 6px; margin-top: 0; }
#heroAnim svg { display: block; height: auto; width: 100%; }
.video-box { background: #000; padding: 0; }
.video-box video { aspect-ratio: 16 / 9; display: block; height: auto; width: 100%; }

/* stats: a hairline table of headline numbers */
.stats { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 30px 0 0; }
.stat { border-bottom: 1px solid var(--line-soft); padding: 16px 16px 16px 0; }
.stat + .stat { border-left: 1px solid var(--line-soft); padding-left: 16px; }
.stat__label { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; }
.stat__value { color: var(--ink); font-size: 23px; font-weight: 500; margin: 8px 0 4px; }
.stat__note { color: var(--ink-3); font-size: 13px; line-height: 1.45; }

/* ---------- method figures ---------- */
.contrast { display: flex; flex-direction: column; gap: 22px; }
.flow-row { align-items: center; display: grid; gap: 14px; grid-template-columns: 128px 1fr; }
.flow-tag { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; }
.flow-tag small, .lane-label small { color: var(--ink-3); display: block; font-size: 12px; font-weight: 400; margin-top: 3px; }
.flow-tag.muted { color: var(--ink-3); }
.flow { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.fnode, .node {
  background: var(--code-bg);
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  min-width: 92px;
  padding: 10px 8px;
  text-align: center;
}
.fnode small, .node small { color: var(--ink-3); display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 400; margin-top: 3px; }
.fnode.out, .node.accent { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }
.fnode.in { background: var(--bg); border: 1px solid var(--line-soft); min-width: 0; }
.contract { border: 1px solid var(--accent); display: grid; flex: 2.4; gap: 6px; grid-template-columns: repeat(3, 1fr); padding: 24px 8px 8px; position: relative; }
.contract-label { color: var(--accent); font-family: var(--mono); font-size: 11px; left: 0; letter-spacing: 0.06em; position: absolute; right: 0; text-align: center; text-transform: uppercase; top: 6px; }
.arrow { color: var(--ink-4); font-family: var(--mono); }
.arch-lane { align-items: center; display: grid; gap: 14px; grid-template-columns: 128px 1fr; }
.lane-label { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.arch-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-mid { margin: 14px 0 14px 142px; }
.envelope { border: 1px solid var(--accent); color: var(--ink-2); display: inline-block; font-family: var(--mono); font-size: 12.5px; padding: 6px 12px; }
.envelope strong { color: var(--ink); font-weight: 500; margin-right: 6px; }
.transport { color: var(--ink-3); font-family: var(--mono); font-size: 12px; margin-top: 8px; }

.components { counter-reset: comp; list-style: none; margin: 30px 0 0; padding: 0; }
.components li { border-top: 1px solid var(--line-soft); counter-increment: comp; padding: 22px 0 8px; }
.components li:last-child { border-bottom: 1px solid var(--line-soft); }
.components h3 { font-size: 20px; font-weight: 500; margin: 0 0 8px; }
.components h3::before { color: var(--accent); content: counter(comp) "  "; font-family: var(--mono); font-size: 15px; white-space: pre; }
.components p { font-size: 16.5px; }
.eq { color: var(--ink); font-size: 0.95em; overflow-x: auto; }
.katex { color: var(--ink); }

/* ---------- charts ---------- */
.chart { width: 100%; }
.chart svg { display: block; height: auto; overflow: visible; width: 100%; }
.chart text { fill: var(--ink-3); font-family: var(--mono); font-size: 11.5px; }
.chart text.lab { fill: var(--ink-2); font-family: var(--sans); font-size: 12.5px; }
.chart text.val { fill: var(--ink); font-family: var(--sans); font-weight: 500; }
.chart .gridline { stroke: var(--line-soft); stroke-width: 1; }
.chart .axisline { stroke: var(--ink-4); stroke-width: 1; }
.chart .mark { transition: opacity 0.15s; }

.controls { align-items: center; display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 16px; }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg button {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-right: -1px;
  padding: 6px 12px;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); position: relative; }
.slider-label { align-items: center; color: var(--ink-3); display: flex; flex: 1; font-family: var(--mono); font-size: 13px; gap: 10px; min-width: 240px; }
.slider-label output { color: var(--ink); min-width: 64px; }
input[type="range"] { accent-color: var(--accent); flex: 1; }
.legend { color: var(--ink-2); display: flex; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; gap: 6px 18px; margin-top: 10px; }
.legend span { align-items: center; display: inline-flex; gap: 7px; }
.legend i { display: inline-block; height: 10px; width: 10px; }
.legend i.hatch { background: repeating-linear-gradient(45deg, var(--accent) 0 2px, transparent 2px 5px) !important; border: 1px solid var(--accent); }
.legend i.band { background: var(--accent-wash) !important; border: 1px solid var(--ink-4); }
.verdict { border-left: 2px solid var(--accent); color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 16px 0 0; padding: 2px 0 2px 14px; }
.verdict b { color: var(--ink); font-weight: 500; }

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: 14.5px; width: 100%; }
th { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0.02em; }
th, td { border-bottom: 1px solid var(--line-soft); padding: 10px 10px; text-align: left; vertical-align: middle; }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.slo-matrix th, .slo-matrix td { text-align: center; }
.slo-matrix td:first-child, .slo-matrix th:first-child { color: var(--ink); font-weight: 500; text-align: left; }
.cell { border: 1px solid transparent; padding: 8px 4px; }
.cell .dp { font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 500; }
.cell .meta { color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; }
.cell .st { font-family: var(--mono); font-size: 11.5px; margin-top: 2px; }
.cell.pass { background: var(--good-fill); }
.cell.pass .st { color: var(--good-text); }
.cell.fail { background: var(--bad-fill); }
.cell.fail .st { color: var(--bad); }
.cell.best { border-color: var(--ink); }
.tag { border: 1px solid var(--line-soft); color: var(--ink-3); display: inline-block; font-family: var(--mono); font-size: 10.5px; margin-left: 6px; padding: 0 5px; }

/* resolver */
.resolver-inputs { display: grid; gap: 14px 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.resolver-inputs label { color: var(--ink-3); display: flex; flex-direction: column; font-family: var(--mono); font-size: 12.5px; gap: 6px; grid-column: span 2; letter-spacing: 0.02em; }
.resolver-inputs label.wide { grid-column: span 3; }
.resolver-inputs label output { color: var(--ink); }
.resolver-inputs select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  padding: 7px 8px;
}
.presets { align-items: center; color: var(--ink-3); display: flex; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; gap: 6px; margin: 16px 0 18px; }
.presets span { margin-right: 4px; }
.presets button { background: none; border: 1px solid var(--line-soft); color: var(--ink-2); cursor: pointer; font: inherit; padding: 3px 9px; }
.presets button:hover { border-color: var(--line); color: var(--ink); }
.verdict-card { border: 1px solid var(--line-soft); border-left: 3px solid var(--accent); margin-bottom: 14px; padding: 14px 18px; }
.verdict-card.infeasible { border-left-color: var(--bad); }
.verdict-card.fp16 { border-left-color: var(--ink-4); }
.verdict-card .k { color: var(--ink-3); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.verdict-card .v { font-family: var(--serif); font-size: 27px; font-weight: 500; margin: 4px 0; }
.verdict-card .why { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.cand td { font-variant-numeric: tabular-nums; }
.cand tr.chosen td { background: var(--accent-wash); color: var(--ink); font-weight: 500; }
.cand .fine { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.ok { color: var(--good-text); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.unk { color: var(--ink-4); font-weight: 700; }

/* future work */
.future { list-style: none; margin: 0; max-width: 680px; padding: 0; }
.future li { color: var(--ink-2); font-size: 17px; line-height: 1.65; margin: 0 0 10px; padding-left: 1.6em; text-indent: -1.6em; }
.future li::before { color: var(--ink-4); content: "└ "; display: inline-block; font-family: var(--mono); text-indent: 0; width: 1.6em; }

/* code card (BibTeX) */
.code { border: 1px solid var(--line-soft); max-width: 680px; }
.code__head {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-3);
  display: flex;
  font-family: var(--mono);
  font-size: 11.25px;
  justify-content: space-between;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  text-transform: uppercase;
}
.code__head button { background: none; border: 0; color: var(--ink-3); cursor: pointer; font: inherit; padding: 0; text-transform: uppercase; }
.code__head button:hover { color: var(--ink); }
.code pre { color: var(--ink-2); font-family: var(--mono); font-size: 13px; line-height: 1.75; margin: 0; overflow-x: auto; padding: 16px; }

.footer { border-top: 1px solid var(--line-soft); color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; padding-top: 22px; }

/* back to top */
.to-top {
  background: var(--ink-4);
  border: 0;
  border-radius: 50%;
  bottom: 28px;
  color: var(--bg);
  cursor: pointer;
  font-size: 18px;
  height: 46px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 28px;
  transition: opacity 0.25s, background 0.15s;
  width: 46px;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--ink-3); }

/* tooltip */
.tooltip {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  max-width: 280px;
  opacity: 0;
  padding: 8px 11px;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.1s;
  z-index: 50;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-weight: 600; }
.tooltip .sw { display: inline-block; height: 9px; margin-right: 6px; width: 9px; }

/* hero animation (SVG) */
#heroAnim text { font-family: var(--sans); }
.ha-title { fill: var(--ink); font-size: 19px; font-weight: 500; }
.ha-size { fill: var(--accent); font-family: var(--mono); font-size: 13px; }
.ha-cap { fill: var(--ink-2); font-size: 15px; }
.ha-note { fill: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.ha-node { fill: var(--code-bg); stroke: var(--line-soft); }
.ha-node-t { fill: var(--ink); font-size: 15px; font-weight: 500; }
.ha-node-s { fill: var(--ink-3); font-size: 12.5px; }
.ha-gpu { fill: var(--bg); stroke: var(--ink-4); }
.ha-gpu-t { fill: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.ha-link { stroke: var(--ink-4); stroke-width: 1.5; }
.ha-link-t, .ha-lane { fill: var(--ink-2); font-size: 13px; }
.ha-lane { font-weight: 500; }
.ha-kv, .ha-pf { fill: var(--neutral-mark); }
.ha-pc, .ha-bar { fill: var(--accent); }
.ha-booth { fill: var(--accent-wash); stroke: var(--accent-soft); stroke-width: 1.5; }
.ha-booth.on { stroke: var(--accent); stroke-width: 2; }
.ha-booth-t { fill: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.ha-timer { fill: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 500; }
.ha-timer.win { fill: var(--good-text); }
.ha-card { fill: var(--code-bg); }
.ha-big { fill: var(--ink); font-size: 22px; font-weight: 600; }
.anim-btn {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--ink-3);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 9px;
  position: absolute;
  right: 12px;
  top: 12px;
}
.anim-btn:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero__content, .column { grid-column: 4 / 13; }
  .rail { grid-column: 1 / 4; margin-right: 24px; }
}
@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .hero__content, .column { grid-column: 1 / -1; }
  .rail { display: none; }
  .body { padding-top: 48px; }
  .hero .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .resolver-inputs label, .resolver-inputs label.wide { grid-column: 1 / -1; }
  .flow-row, .arch-lane { grid-template-columns: 1fr; }
  .arch-mid { margin-left: 0; }
  .contract { grid-template-columns: 1fr; }
  .column p.statement { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reading-progress { display: none; }
  * { transition: none !important; }
}
@media print { .topbar, .rail, .to-top, .controls, .presets, .anim-btn { display: none; } .hero__content, .column { grid-column: 1 / -1; } }
