/* anatomiya site. Tokens first; the dark set is applied by the system unless the reader picks one. */

:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #fbfaf7;
  --bg-alt: #f4f2ec;
  --surface: #ffffff;
  --code-bg: #f6f5f0;
  --line: #e5e1d7;
  --line-strong: #cdc7b8;
  --text: #15181e;
  --muted: #4f5663;
  --faint: #646b78;
  --accent: #0f766e;
  --accent-ink: #0b5a54;
  --accent-soft: #dcf3ee;
  --with: #2a78d6;
  --without: #d4572a;
  --add: #116329;
  --add-bg: #dafbe1;
  --del: #82071e;
  --del-bg: #ffebe9;
  --grid: rgba(21, 24, 30, 0.07);
  --btn-bg: #15181e;
  --btn-text: #fbfaf7;
  --shadow: 0 1px 2px rgba(21, 24, 30, 0.05), 0 12px 32px -12px rgba(21, 24, 30, 0.14);
  --radius: 12px;
  --radius-sm: 7px;
  --wrap: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1c;
    --bg-alt: #0d1322;
    --surface: #111a2d;
    --code-bg: #0c1424;
    --line: #1e2840;
    --line-strong: #2d3a57;
    --text: #e8ecf4;
    --muted: #a4aec2;
    --faint: #8792a8;
    --accent: #2dd4bf;
    --accent-ink: #5eead4;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --with: #4b93ef;
    --without: #e8703f;
    --add: #7ee787;
    --add-bg: rgba(46, 160, 67, 0.16);
    --del: #ffa198;
    --del-bg: rgba(248, 81, 73, 0.16);
    --grid: rgba(232, 236, 244, 0.055);
    --btn-bg: #e8ecf4;
    --btn-text: #0a0f1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg-alt: #0d1322;
  --surface: #111a2d;
  --code-bg: #0c1424;
  --line: #1e2840;
  --line-strong: #2d3a57;
  --text: #e8ecf4;
  --muted: #a4aec2;
  --faint: #8792a8;
  --accent: #2dd4bf;
  --accent-ink: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --with: #4b93ef;
  --without: #e8703f;
  --add: #7ee787;
  --add-bg: rgba(46, 160, 67, 0.16);
  --del: #ffa198;
  --del-bg: rgba(248, 81, 73, 0.16);
  --grid: rgba(232, 236, 244, 0.055);
  --btn-bg: #e8ecf4;
  --btn-text: #0a0f1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

code, pre, kbd { font-family: var(--font-mono); font-size: 0.875em; }

:not(pre) > code {
  padding: 0.12em 0.36em;
  border-radius: 5px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font-size: 0.84em;
  overflow-wrap: anywhere;
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 820px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 600 0.95rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  border-color: var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--btn-text); }

.btn-small { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }

.nav-links { margin-left: auto; }

.nav-links ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); background: var(--bg-alt); }

.menu { display: none; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme .i-moon { fill: currentColor; stroke: none; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme .i-moon { display: none; }
}

/* Shared section shapes */

.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
.section-head .lede { margin-top: 16px; }

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font: 600 0.8125rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eyebrow .as-is { text-transform: none; }

.lede { color: var(--muted); font-size: 1.1875rem; line-height: 1.6; }

.ticks { margin: 20px 0 0; padding: 0; list-style: none; color: var(--muted); }
.ticks li { position: relative; padding-left: 24px; margin-top: 8px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 10px; height: 2px;
  background: var(--accent);
}

/* Hero */

.hero {
  position: relative;
  padding: 88px 0 104px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 750;
}

.hero .lede { margin-top: 24px; }
.lede-2 { margin-top: 14px; color: var(--text); font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Terminal-styled command blocks with a copy button */

.term {
  position: relative;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
}
.term pre {
  margin: 0;
  padding: 16px 92px 16px 18px;
  overflow-x: auto;
  line-height: 1.7;
}
.term .p { color: var(--accent); user-select: none; }
.term.small { margin-top: 10px; }
.term.small pre { padding-top: 12px; padding-bottom: 12px; }

.copy {
  position: absolute;
  top: 10px; right: 10px;
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: 600 0.78rem/1 var(--font-sans);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy:hover { color: var(--text); border-color: var(--text); }
.copy[data-done] { color: var(--accent); border-color: var(--accent); }
html:not(.js) .copy { display: none; }

/* Plates: figures drawn like the plates of an anatomy atlas */

.plate, .anatomy {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.plate-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font: 500 0.78rem/1.3 var(--font-mono);
  color: var(--muted);
  background: linear-gradient(90deg, #2dd4bf, #3b82f6 55%, #7c3aed) top / 100% 2px no-repeat, var(--surface);
}
.plate-head span:first-child {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate-body {
  margin: 0;
  padding: 18px 18px 18px 54px;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  background: var(--code-bg);
}
.plate-body .row { position: relative; }
.plate-body .row.dim { color: var(--faint); }
.plate-body .h { font-weight: 700; }
.plate-body em { font-style: normal; color: var(--accent); font-weight: 700; }
.plate-body i {
  position: absolute;
  left: -38px; top: 0.05em;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font: 700 0.7rem/1 var(--font-sans);
  font-style: normal;
}

.plate-key {
  margin: 0;
  padding: 16px 18px 4px 18px;
  list-style: none;
  counter-reset: key;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}
.plate-key li { position: relative; padding-left: 30px; counter-increment: key; }
.plate-key li::before {
  content: counter(key);
  position: absolute;
  left: 0; top: 0.05em;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font: 700 0.7rem/1 var(--font-sans);
}

.plate figcaption, .panel figcaption {
  padding: 12px 18px 16px;
  font-size: 0.82rem;
  color: var(--faint);
}

/* The problem */

.evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.evidence > div { padding: 28px 28px 8px 0; }
.evidence > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.ev-n {
  font: 700 clamp(2.4rem, 4.2vw, 3.25rem)/1 var(--font-sans);
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.evidence p:not(.ev-n):not(.ev-src) { color: var(--muted); }
.ev-src { margin-top: 12px; font-size: 0.84rem; }

/* Session steps */

.steps {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.step-list {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 2px;
}
.step-list::before {
  content: "";
  position: absolute;
  left: 21px; top: 26px; bottom: 26px;
  width: 2px;
  background: var(--line);
}

.step-list a {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 12px 12px 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.step-list a:hover { background: var(--surface); }
.step-list a[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow); }

.step-n {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg-alt);
  color: var(--muted);
  font: 700 0.78rem/1 var(--font-mono);
}
.step-list a[aria-selected="true"] .step-n { border-color: var(--accent); background: var(--accent); color: var(--surface); }

.step-t { display: grid; line-height: 1.3; }
.step-t strong { font-size: 0.98rem; }
.step-t small { color: var(--faint); font-size: 0.84rem; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel + .panel { margin-top: 24px; }
.js .panel + .panel { margin-top: 0; }
.panel > h3 { padding: 24px 24px 0; font-size: 1.3rem; }
.panel > p { padding: 10px 24px 18px; color: var(--muted); }
.panel figure { margin: 0; }
.panel figcaption { border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .js .panel:not([hidden]) { animation: panel-in 0.28s ease-out; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.code {
  margin: 0;
  padding: 18px 24px;
  overflow-x: auto;
  background: var(--code-bg);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.65;
  tab-size: 2;
}
.code + .code { border-top: 1px dashed var(--line-strong); }
.code.scroll { max-height: 440px; overflow-y: auto; }
.diff .add { display: inline-block; min-width: 100%; color: var(--add); background: var(--add-bg); }
.diff .del { display: inline-block; min-width: 100%; color: var(--del); background: var(--del-bg); }

.aside {
  margin-top: 40px;
  max-width: 820px;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.aside strong { color: var(--text); }

/* Live find */

.find-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}
.find-grid .section-head { margin-bottom: 0; }

.console {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.find-form label { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--muted); }

.field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: hidden;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.prompt {
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--accent);
  font: 600 0.85rem/1 var(--font-mono);
}
.field input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 0.95rem/1.2 var(--font-mono);
}
.field input:focus { outline: none; }
.field .btn { border-radius: 0; min-height: 46px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips button {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: 500 0.8rem/1.2 var(--font-mono);
  cursor: pointer;
}
.chips button:hover { color: var(--text); border-color: var(--line-strong); }

.find-out { margin-top: 20px; }
.find-status { font-size: 0.86rem; color: var(--faint); }
.find-status code { font-size: 0.84em; }

.hits {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  border: 1px solid var(--line);
}
.hits:empty { display: none; }
.hits li {
  padding: 12px 14px;
  font: 400 0.78rem/1.6 var(--font-mono);
  overflow-wrap: anywhere;
  color: var(--muted);
}
.hits li + li { border-top: 1px solid var(--line); }
.hits a { color: var(--text); font-weight: 700; text-decoration: none; }
.hits a:hover { color: var(--accent); text-decoration: underline; }

/* Results */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.stat {
  display: grid;
  gap: 6px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}
.stat-n { font: 750 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-sans); letter-spacing: -0.045em; }
.stat-n small { font-size: 0.42em; font-weight: 600; letter-spacing: -0.01em; color: var(--faint); }
.stat-with .stat-n { color: var(--with); }
.stat-without .stat-n { color: var(--without); }

.chart {
  margin: 0;
  padding: 8px 24px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .note { display: inline; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw.with { background: var(--with); }
.sw.without { background: var(--without); }

.results { width: 100%; border-collapse: collapse; }
.results thead th {
  padding: 14px 0 10px;
  text-align: left;
  font-size: 0.86rem;
  color: var(--text);
}
.results thead th:not(:first-child) { padding-left: 24px; }
.results tbody tr { border-top: 1px solid var(--line); }
.results th[scope="row"] { width: 36%; padding: 12px 12px 12px 0; text-align: left; font-weight: 400; vertical-align: middle; }
.results .task { display: block; font-weight: 600; font-size: 0.92rem; line-height: 1.35; }
.results .helper { display: block; margin-top: 3px; color: var(--faint); font-size: 0.8rem; }
.results td { padding: 10px 0 10px 24px; vertical-align: middle; }

.bars { display: grid; gap: 4px; }
.bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 14px;
  width: max(4px, calc(var(--v) / 20 * 78%));
  border-radius: 3px;
}
.bar.with { background: var(--with); }
.bar.without { background: var(--without); }
.bar b {
  position: absolute;
  left: calc(100% + 8px);
  font: 500 0.76rem/1 var(--font-mono);
  color: var(--muted);
}
.sig .bar b { font-weight: 800; color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .js .chart .bar { transform-origin: left center; transform: scaleX(0); transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .chart .bar b { opacity: 0; transition: opacity 0.3s 0.45s; }
  .js .chart.in .bar { transform: none; }
  .js .chart.in .bar b { opacity: 1; }
}

.honest { max-width: 820px; margin-top: 40px; }
.honest h3 { font-size: 1.35rem; margin-bottom: 12px; }
.honest p { color: var(--muted); }
.honest p + p { margin-top: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }

/* How it works */

.flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.flow-col {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.flow-col h3 { font-size: 1.15rem; margin-bottom: 18px; }
.flow-col ol { margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.flow-col li {
  position: relative;
  padding: 0 0 18px 42px;
  counter-increment: flow;
  color: var(--muted);
  font-size: 0.96rem;
}
.flow-col li:last-child { padding-bottom: 0; }
.flow-col li::before {
  content: counter(flow);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font: 700 0.74rem/1 var(--font-mono);
  z-index: 1;
}
.flow-col li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px; top: 28px; bottom: 2px;
  width: 2px;
  background: var(--line);
}
.flow-col li strong { color: var(--text); font-weight: 600; }
.hook { color: var(--accent) !important; font-weight: 700; }

.anatomy { margin-top: 32px; }
.claim {
  padding: 40px 24px 12px;
  text-align: center;
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
}
.claim code { border: 0; background: none; padding: 0; font-size: 1em; }
.claim .k {
  display: inline-block;
  padding: 0 0.18em;
  border-bottom: 3px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
}
.claim-key {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 24px 0;
  border-top: 1px solid var(--line);
}
.claim-key > div { padding: 18px 16px 4px 0; }
.claim-key > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.claim-key dt { font-weight: 700; font-size: 0.95rem; }
.claim-key dt code { color: var(--accent); }
.claim-key dd { margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; }
.anatomy-note { padding: 18px 24px 24px; color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); margin-top: 18px; }

/* Install */

.install {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.install li {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.install li > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.install h3 { font-size: 1.02rem; }
.install .term.small { margin-top: 0; }
.install-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: 700 0.85rem/1 var(--font-mono);
}

.install-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 48px;
}
.install-more h3 { font-size: 1.15rem; }

.cmds { margin: 16px 0 0; }
.cmds > div { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.cmds dt code { font-weight: 600; }
.cmds dd { margin: 0; color: var(--muted); font-size: 0.95rem; }

.more {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.install-more + .more { margin-top: 48px; }
.more summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
}
.more[open] summary { border-bottom: 1px solid var(--line); }
.more .term { margin: 18px 20px 0; }
.more p { padding: 14px 20px 18px; color: var(--muted); font-size: 0.95rem; }

/* Limits and questions */

.limits-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
.limits { margin: 0; padding: 0; list-style: none; }
.limits li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.limits li:last-child { border-bottom: 1px solid var(--line); }
.limits strong { display: block; color: var(--text); margin-bottom: 4px; }

.faq details {
  border-top: 1px solid var(--line-strong);
}
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 400 1.4rem/1 var(--font-mono);
  color: var(--accent);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 68ch; }

/* Footer */

.footer {
  padding: 56px 0 64px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.brand-line strong { font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-line span { margin-left: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 0.85rem; }
.fine { margin-top: 10px; color: var(--faint); font-size: 0.86rem; }
.footer h2 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; font-family: var(--font-mono); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }

/* Reveal on scroll, only where script runs and motion is welcome */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Without script every panel shows, under its own heading. */
html:not(.js) .step-list { display: none; }
html:not(.js) .steps { grid-template-columns: minmax(0, 1fr); }

/* Narrower screens */

@media (max-width: 1020px) {
  .hero-grid, .find-grid, .limits-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 48px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step-list {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .step-list::before { display: none; }
  .step-list a { flex: none; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); }
  .install li > div { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .section-head { margin-bottom: 32px; }
  .lede { font-size: 1.0625rem; }

  .menu {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: 600 0.875rem/1 var(--font-sans);
    cursor: pointer;
  }
  .nav-row { gap: 10px; }
  .nav-links { margin-left: auto; }
  .nav-links ul {
    position: absolute;
    left: 0; right: 0; top: 64px;
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links ul[data-open] { display: flex; }
  html:not(.js) .nav-links ul { display: none; }
  html:not(.js) .menu { display: none; }
  .nav-links a { padding: 12px 8px; font-size: 1rem; }
  .nav-actions .btn span { display: none; }
  .nav-actions .btn { padding: 0 10px; }

  .evidence { grid-template-columns: minmax(0, 1fr); }
  .evidence > div { padding: 24px 0 4px; }
  .evidence > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }

  .plate-key { grid-template-columns: minmax(0, 1fr); }
  .plate-body { padding-left: 46px; font-size: 0.74rem; }
  .plate-body i { left: -32px; }

  .stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .chart { padding: 4px 14px 12px; }

  .results thead { display: none; }
  .results, .results tbody, .results tr, .results th, .results td { display: block; width: 100%; }
  .results tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; }
  .results th[scope="row"] { grid-column: 1 / -1; width: auto; padding: 0 0 4px; }
  .results td { padding: 0; }
  .results td::before { content: attr(data-model); display: block; margin-bottom: 6px; font-size: 0.72rem; color: var(--faint); }
  .bar { width: max(4px, calc(var(--v) / 20 * 70%)); }

  .flow, .install-more { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .flow-col { padding: 22px; }
  .claim { padding-top: 28px; }
  .claim-key { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 12px 16px 0; }
  .claim-key > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .claim-key > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .anatomy-note { padding: 16px; }

  .cmds > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .term pre { padding-right: 18px; padding-top: 48px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .term.small pre { padding-top: 46px; }
  .install li { align-items: flex-start; }
  .panel > h3 { padding: 20px 18px 0; font-size: 1.15rem; }
  .panel > p { padding: 8px 18px 16px; }
  .code { padding: 16px 18px; }
  .console { padding: 16px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
