/* ARCADE story site — rebuilt design system
   Navy / teal / amber · Exo + IBM Plex Mono · full-bleed hero · purposeful motion */

:root {
  --navy: #0b1c2c;
  --navy-mid: #14324a;
  --teal: #0d9488;
  --teal-deep: #0f766e;
  --amber: #c27803;
  --ink: #0f172a;
  --muted: #5a6b7c;
  --line: #d0dbe6;
  --paper: #f3f6fa;
  --surface: #ffffff;
  --hero-fg: #eef3f8;
  --hero-muted: #9eb0c2;
  --ring: #0d9488;
  --radius: 2px;
  --font: "Exo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 42rem;
  --wide: 64rem;
  --header-h: 3.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > *, .pipe-stage, .hero-visual img {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 148, 136, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(193, 120, 3, 0.06), transparent 45%),
    var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: rgba(11, 28, 44, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header-inner {
  max-width: var(--wide); margin: 0 auto; height: 100%; padding: 0 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand {
  font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em;
  color: #fff; text-decoration: none; flex-shrink: 0;
}
.brand span { font-weight: 500; opacity: 0.55; margin-left: 0.4rem; font-size: 0.82rem; }
.nav { display: none; flex-wrap: wrap; gap: 0.1rem 0.2rem; margin-left: auto; align-items: center; justify-content: flex-end; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  color: rgba(238, 243, 248, 0.72); text-decoration: none; font-size: 0.88rem;
  font-weight: 500; padding: 0.4rem 0.65rem; border-radius: var(--radius);
  transition: color 180ms var(--ease), background 180ms var(--ease); cursor: pointer;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.08); }
.nav-dd { position: relative; }
.nav-dd-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 12rem;
  background: var(--navy-mid); border: 1px solid rgba(255,255,255,0.08); padding: 0.35rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: block; }
.nav-dd-menu a { display: block; white-space: nowrap; }
.nav-toggle {
  margin-left: auto; background: transparent; border: 0; color: #fff;
  width: 2.5rem; height: 2.5rem; cursor: pointer; display: grid; place-items: center;
}
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 1.35rem; height: 1.35rem; }
.nav-drawer {
  display: none; flex-direction: column; gap: 0.25rem; padding: 1rem 1.25rem 1.5rem;
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-drawer.open { display: flex; }
.nav-drawer a { color: var(--hero-fg); text-decoration: none; padding: 0.65rem 0.5rem; font-weight: 500; cursor: pointer; }
.nav-drawer-sub { opacity: 0.7; padding-left: 1.25rem !important; font-size: 0.92rem; }

.hero {
  position: relative;
  background:
    linear-gradient(160deg, rgba(11,28,44,0.55), rgba(11,28,44,0.88)),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, #0a3d38 100%);
  color: var(--hero-fg); overflow: hidden; min-height: auto; display: grid; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 85% 40%, rgba(13,148,136,0.28), transparent 60%),
    radial-gradient(ellipse 40% 50% at 15% 80%, rgba(193,120,3,0.12), transparent 55%);
}
.hero-grid {
  position: relative; z-index: 1; max-width: var(--wide); margin: 0 auto; width: 100%;
  padding: 3rem 1.25rem 2.5rem; display: grid; gap: 1.75rem;
}
.brand-line {
  margin: 0 0 0.35rem; font-size: clamp(2.4rem, 6vw, 3.75rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.05; color: #fff;
}
.brand-sub {
  margin: 0 0 1.5rem; font-family: var(--mono); font-size: 0.85rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
}
.hero h1 {
  margin: 0 0 1rem; font-size: clamp(1.35rem, 2.8vw, 1.85rem); font-weight: 600;
  line-height: 1.35; max-width: 28ch; color: #fff;
}
.hero .lede {
  margin: 0 0 1.75rem; font-size: 1.05rem; line-height: 1.6;
  color: var(--hero-muted); max-width: 38ch;
}
.hero-visual {
  position: relative; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25); overflow: hidden;
}
.hero-visual img { animation: heroIn 900ms var(--ease) both; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 0.95; transform: none; }
}
.hero-visual figcaption {
  padding: 0.65rem 0.9rem; font-family: var(--mono); font-size: 0.72rem;
  color: var(--hero-muted); border-top: 1px solid rgba(255,255,255,0.08);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.15rem; font-family: var(--font); font-weight: 600; font-size: 0.92rem;
  border-radius: var(--radius); text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: transform 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #042f2e; }
.btn-primary:hover { background: #14b8a6; color: #042f2e; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-teal { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-teal:hover { background: rgba(13,148,136,0.12); }
.btn-outline { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-deep); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 3.25rem; }
.wrap-wide { max-width: var(--wide); }
.mast { background: linear-gradient(180deg, #e8eef4 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.mast-inner { max-width: var(--wide); margin: 0 auto; padding: 1.75rem 1.25rem 1.35rem; }
.crumb { margin: 0 0 0.75rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.layer-note {
  margin: 0 0 0.5rem; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep);
}
.mast h1, .wrap h1 {
  margin: 0 0 0.75rem; font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.2; letter-spacing: -0.02em;
}
.mast .lede, .section-lead { margin: 0; color: var(--muted); font-size: 1.08rem; max-width: 48ch; }
.wrap h2 { margin: 2rem 0 0.55rem; font-size: 1.35rem; letter-spacing: -0.015em; }
.prose-block { margin: 0 0 1.25rem; color: var(--ink); max-width: 62ch; }

.figure-card, .viz {
  margin: 1.25rem 0 1.65rem; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15,23,42,0.03), 0 12px 28px rgba(11,28,44,0.04); overflow: hidden;
  max-width: 52rem;
}
.wrap-wide .figure-card { max-width: 56rem; }
.figure-meta {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.84rem; background: #fafcfd;
}
.figure-meta a { font-family: var(--mono); font-size: 0.72rem; }
.figure-card .figure-media {
  display: block;
  margin: 0;
  padding: 0;
  background: #ffffff;
  line-height: 0;
}
.figure-card img, .viz img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  background: #ffffff;
}
/* Keep aspect ratio; do not crush diagrams with tiny max-heights */
.figure-card.is-anim .figure-media { background: #0b1c2c; }
.figure-card.is-anim.is-light .figure-media { background: #f7f9fb; }
.figure-card.is-anim img {
  width: 100%;
  height: auto;
  max-height: none;
}
.figure-card.is-plot img,
.figure-card.is-photo img {
  width: 100%;
  height: auto;
  max-height: none;
}
.hero-visual {
  background: rgba(0, 0, 0, 0.2);
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 0;
  opacity: 0.98;
}
.figure-cap, figcaption { margin: 0; padding: 0.65rem 0.9rem 0.85rem; font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.viz-pair {
  display: grid; gap: 1rem; margin: 1.25rem 0 1.65rem;
}
@media (min-width: 900px) {
  .viz-pair { grid-template-columns: 1fr 1fr; align-items: start; }
  .viz-pair .figure-card { margin: 0; max-width: none; }
}
/* Wide diagrams: stack full-bleed instead of squeezing two 960px SVGs side-by-side */
.viz-pair.is-wide {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .viz-pair.is-wide { grid-template-columns: 1fr; }
}
.figure-grid { display: grid; gap: 1.25rem; margin: 1.5rem 0; }
@media (min-width: 800px) { .figure-grid { grid-template-columns: repeat(3, 1fr); } }
.figure-grid figure { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.figure-grid figcaption { font-size: 0.82rem; padding: 0.65rem 0.85rem 0.85rem; }

.usecase-grid, .method-grid { display: grid; gap: 1rem; margin: 1.75rem 0; }
@media (min-width: 720px) { .usecase-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 800px) { .method-grid { grid-template-columns: 1fr 1fr; } }
.method-grid.cols-1 { grid-template-columns: 1fr; }
.usecase-card, .method-card {
  padding: 1.35rem 1.25rem 1.2rem; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--teal);
}
.usecase-card.nisq { border-left-color: var(--amber); }
.usecase-kicker, .method-card .kicker {
  margin: 0 0 0.4rem; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.usecase-card h3, .method-card h3 { margin: 0 0 0.55rem; font-size: 1.15rem; }
.usecase-card p, .method-card p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.98rem; }
.usecase-card a { font-weight: 600; font-size: 0.9rem; }

.pipeline-strip {
  list-style: none; margin: 2rem 0; padding: 0; display: grid; gap: 0.5rem;
}
@media (min-width: 700px) { .pipeline-strip { grid-template-columns: repeat(5, 1fr); gap: 0.35rem; } }
.pipeline-strip li {
  padding: 0.85rem 0.75rem; background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--navy); font-size: 0.88rem;
}
.pipeline-strip li.active { border-top-color: var(--teal); background: #f0fdfa; }
.pipeline-strip strong { display: block; margin-bottom: 0.2rem; }
.pipeline-strip span { color: var(--muted); font-size: 0.82rem; }

.pipe { display: grid; gap: 0.45rem; margin: 1.25rem 0; }
@media (min-width: 800px) { .pipe { grid-template-columns: repeat(6, 1fr); gap: 0.35rem; } }
.pipe-stage {
  position: relative; padding: 1rem 0.75rem; background: var(--navy); color: #fff;
  text-align: center; font-size: 0.82rem; font-weight: 600;
  opacity: 0; transform: translateY(10px); animation: stageIn 500ms var(--ease) forwards;
}
.pipe-stage:nth-child(1) { animation-delay: 0.05s; }
.pipe-stage:nth-child(2) { animation-delay: 0.12s; }
.pipe-stage:nth-child(3) { animation-delay: 0.19s; background: var(--teal-deep); }
.pipe-stage:nth-child(4) { animation-delay: 0.26s; }
.pipe-stage:nth-child(5) { animation-delay: 0.33s; }
.pipe-stage:nth-child(6) { animation-delay: 0.4s; background: var(--amber); color: #1c1400; }
@keyframes stageIn { to { opacity: 1; transform: none; } }
.pipe-stage small {
  display: block; margin-top: 0.35rem; font-weight: 500; font-size: 0.68rem;
  opacity: 0.75; font-family: var(--mono);
}
.pipe-note { margin: 0.75rem 0 0; font-size: 0.92rem; color: var(--muted); }

.paths { display: grid; gap: 0.75rem; margin: 2rem 0 1rem; }
@media (min-width: 720px) { .paths { grid-template-columns: 1fr 1fr; } }
.path {
  display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem;
  padding: 1.1rem 1.15rem; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease); cursor: pointer;
}
.path:hover { border-color: var(--teal); transform: translateY(-2px); color: inherit; }
.path-kicker {
  grid-column: 1 / -1; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-deep);
}
.path strong { font-size: 1.02rem; }
.path span span { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.path-go { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); align-self: center; }

.takeaways { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: 0.85rem; }
.takeaways li {
  padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
}
.takeaways strong { display: block; margin-bottom: 0.3rem; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-family: var(--mono); }
table.data th, table.data td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: #eef3f8; font-weight: 600; cursor: pointer; user-select: none; }
table.data th:hover { background: #e2ebf3; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.chart { margin: 1.5rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--line); }
.chart-cap { margin: 0.65rem 0 0; font-size: 0.85rem; color: var(--muted); }

.checklist, .note, .lab-band {
  margin: 1.75rem 0; padding: 1.15rem 1.25rem; background: #ecfdf8; border: 1px solid #99f6e4;
}
.lab-band { background: var(--navy); color: var(--hero-fg); border: 0; }
.lab-band h2 { margin-top: 0; color: #fff; }
.lab-band a.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.glossary { margin: 1.5rem 0; }
.glossary dt { font-weight: 700; margin-top: 0.85rem; font-size: 0.95rem; }
.glossary dd { margin: 0.25rem 0 0; color: var(--muted); max-width: 55ch; }
.terminal {
  margin: 1rem 0; background: #0b1220; border-radius: var(--radius); overflow: hidden; border: 1px solid #1e293b;
}
.terminal-bar { display: flex; gap: 0.35rem; padding: 0.55rem 0.75rem; background: #111827; }
.terminal-bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #4b5563; display: block; }
.terminal pre {
  margin: 0; padding: 1rem 1.1rem 1.15rem; overflow-x: auto; color: #e5e7eb;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.55;
}
.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 1.25rem 2.5rem;
  text-align: center; color: var(--muted); font-size: 0.88rem;
}
.site-footer a { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 550ms var(--ease), transform 550ms var(--ease); }
.reveal.in, .reveal.visible { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal-stagger.in > *:nth-child(1),
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.in > *:nth-child(2),
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.in > *:nth-child(3),
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.in > *:nth-child(4),
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger.in > *,
.reveal-stagger.visible > * { opacity: 1; transform: none; }
/* Children that became .reveal.visible on their own also show */
.reveal-stagger > *.reveal.visible,
.reveal-stagger > *.reveal.in { opacity: 1; transform: none; }
/* Figures must never stay invisible if JS is delayed */
.figure-card.reveal { opacity: 1; transform: none; }

.doc-grid { display: grid; gap: 1rem; margin: 1.5rem 0; grid-template-columns: 1fr; }
.doc-card { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); }
.doc-meta {
  margin: 0 0 0.35rem; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.doc-card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.doc-card p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.92rem; }

/* —— Classifiers architecture animation —— */
.arch-anim {
  margin: 1rem 0 1.35rem; padding: 0.9rem 1rem 0.85rem;
  background: linear-gradient(165deg, #0b1c2c 0%, #123048 55%, #0f766e 140%);
  color: #e8eef4; border: 1px solid #1e3a4f; max-width: 52rem;
}
.arch-track {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.35rem 0.25rem; margin-bottom: 1rem;
}
.arch-node {
  min-width: 4.6rem; padding: 0.5rem 0.45rem; text-align: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px; transition: background 400ms var(--ease), border-color 400ms var(--ease), transform 400ms var(--ease);
}
.arch-node span { display: block; font-weight: 600; font-size: 0.88rem; }
.arch-node small {
  display: block; margin-top: 0.25rem; font-family: var(--mono);
  font-size: 0.65rem; opacity: 0.65;
}
.arch-node.is-on {
  background: rgba(45, 212, 191, 0.22); border-color: #2dd4bf;
  transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(45,212,191,0.35);
}
.arch-arrow {
  width: 1.1rem; height: 2px; background: rgba(255,255,255,0.25);
  position: relative; flex-shrink: 0;
}
.arch-arrow::after {
  content: ""; position: absolute; right: -2px; top: -3px;
  border: 4px solid transparent; border-left-color: rgba(255,255,255,0.35);
}
.arch-caption { margin: 0; text-align: center; font-size: 0.82rem; color: rgba(232,238,244,0.82); min-height: 1.6em; }
@media (max-width: 700px) {
  .arch-arrow { display: none; }
  .arch-track { flex-direction: column; }
}

.paper-list { display: grid; gap: 0.85rem; margin: 1.25rem 0 2rem; }
@media (min-width: 800px) { .paper-list { grid-template-columns: 1fr 1fr; } }
.paper-card {
  padding: 1.2rem 1.15rem; background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
}
.paper-card .kicker {
  margin: 0 0 0.35rem; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.paper-card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.paper-card p { margin: 0 0 0.55rem; color: var(--muted); font-size: 0.94rem; }
.paper-meta { font-family: var(--mono); font-size: 0.78rem !important; color: var(--teal-deep) !important; }
.paper-meta a { color: var(--teal-deep); }

.dataset-card {
  margin: 1.25rem 0 2rem; padding: 1.35rem 1.25rem;
  background: linear-gradient(135deg, #f0f7fb 0%, #fff 60%);
  border: 1px solid var(--line); border-left: 3px solid var(--navy);
}
.dataset-card h3 { margin: 0 0 0.75rem; }
.dataset-card ul { margin: 0 0 0.85rem; padding-left: 1.15rem; color: var(--muted); }
.dataset-card li { margin-bottom: 0.4rem; }

.freeze-list {
  margin: 1.25rem 0 2rem; padding: 0; list-style: none; counter-reset: freeze;
  display: grid; gap: 0.65rem;
}
.freeze-list li {
  counter-increment: freeze; position: relative;
  padding: 1rem 1rem 1rem 3.25rem; background: var(--surface); border: 1px solid var(--line);
}
.freeze-list li::before {
  content: counter(freeze, decimal-leading-zero);
  position: absolute; left: 0.85rem; top: 1rem;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: var(--teal-deep);
}

.steps { margin: 1.25rem 0 2rem; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.15rem; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 1.25rem 1.25rem 1.15rem 3.5rem; background: var(--surface); border: 1px solid var(--line);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1.25rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--mono); font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; margin-bottom: 0.35rem; font-size: 1.05rem; }
.steps p { margin: 0 0 0.75rem; color: var(--muted); }
.cmd {
  margin: 0; padding: 0.75rem 0.9rem; background: #0b1220; color: #e5e7eb;
  font-family: var(--mono); font-size: 0.82rem; overflow-x: auto; border-radius: 2px;
}
.cmd code { font-family: inherit; color: inherit; }
.chart-panel {
  margin: 1.25rem 0 2rem; padding: 1rem 1.15rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line);
}
.chart-panel h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.chart-wrap { position: relative; width: 100%; max-width: 100%; }
.nav-drawer-sub { padding-left: 1.5rem !important; font-size: 0.9rem; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .arch-node, .arch-node.is-on { transition: none; transform: none; }
  .pipe-stage { animation: none; opacity: 1; transform: none; }
}

.chart-wrap { height: 260px; }
.chart-wrap-tall { min-height: 240px; }
.chart-wrap { min-height: 240px; height: 280px; }
.figure-grid.three { display: grid; gap: 0.75rem; padding: 0.75rem; }
@media (min-width: 800px) { .figure-grid.three { grid-template-columns: repeat(3, 1fr); } }
.figure-grid.three figure { margin: 0; background: #f8fafc; border: 1px solid var(--line); }
.figure-grid.three img { width: 100%; display: block; }
.figure-grid.three figcaption { padding: 0.5rem 0.65rem; font-size: 0.82rem; color: var(--muted); }

@media (min-width: 900px) { .method-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.lab-band .cta-row { margin-top: 0.75rem; }
.lab-band p { color: rgba(238,243,248,0.78); max-width: 52ch; }


/* —— Hero pipeline component (HTML, not raster SVG) —— */
.hero-grid {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 2rem;
  padding: 3rem 1.25rem 2.75rem;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 3.25rem 1.25rem 3rem;
  }
}
.hero-copy { max-width: 40rem; }
.hero-pipeline {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(165deg, rgba(11,28,44,0.92) 0%, rgba(15,68,64,0.88) 100%);
  padding: 1.25rem 1.15rem 1.1rem;
  animation: heroIn 700ms var(--ease) both;
}
.hero-pipeline-title {
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero-pipeline-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
}
@media (max-width: 720px) {
  .hero-pipeline-track { grid-template-columns: 1fr 1fr; }
  .hero-pipeline-track .hp-node:last-child { grid-column: 1 / -1; }
}
.hp-node {
  position: relative;
  padding: 0.85rem 0.65rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(45, 212, 191, 0.35);
  text-align: center;
  min-height: 4.5rem;
}
.hp-node strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
  font-weight: 700;
}
.hp-node span {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(153, 246, 228, 0.85);
}
.hp-node.is-swap {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}
.hp-node.is-swap em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #fbbf24;
}
.hero-pipeline-ends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.hp-end {
  padding: 0.75rem 0.85rem;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.1);
}
.hp-end strong { display: block; color: #fff; font-size: 0.88rem; }
.hp-end span {
  display: block; margin-top: 0.25rem;
  font-family: var(--mono); font-size: 0.68rem; color: var(--hero-muted);
}
.hero-pipeline-note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: rgba(232,238,244,0.75);
  text-align: center;
}
.hero-pipeline-cap {
  margin: 0;
  padding: 0.75rem 0.15rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--hero-muted);
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 0.85rem;
}


/* —— Text left · figure right —— */
.split-section,
.figure-with-prose {
  display: grid;
  gap: 1.35rem;
  margin: 1.5rem 0 1.85rem;
  align-items: start;
}
@media (min-width: 820px) {
  .split-section,
  .figure-with-prose {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}
.split-section .split-copy .layer-note { margin-top: 0; }
.split-section .split-copy h2 { margin-top: 0.35rem; }
.split-section .split-copy .section-lead,
.split-section .split-copy p {
  max-width: none;
}
.figure-with-prose .figure-card,
.split-section .figure-card {
  margin: 0;
  max-width: none;
}
.figure-with-prose .figure-prose,
.split-section .split-copy {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}
.figure-with-prose .figure-prose h3,
.split-section .split-copy h3 {
  margin: 0.85rem 0 0.45rem;
  font-size: 1.05rem;
  color: var(--ink);
}
.figure-with-prose .figure-prose p { margin: 0 0 0.75rem; }
.figure-with-prose .figure-prose p:last-child { margin-bottom: 0; }

/* Pipeline strip + prose side-by-side */
.pipe-with-prose {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.35rem;
  align-items: center;
}
@media (min-width: 860px) {
  .pipe-with-prose {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
}
.pipe-with-prose .pipe { margin: 0; }
.pipe-with-prose .pipe-stage { padding: 0.7rem 0.55rem; font-size: 0.78rem; }
.pipe-with-prose .pipe-copy p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.pipe-with-prose .pipe-copy p:last-child { margin-bottom: 0; }

/* Endings: each plot as text|figure split stacked */
.endings-stack { display: grid; gap: 1.5rem; margin: 1.25rem 0 1.75rem; }

/* Dual half-size IQ panels */
.iq-dual {
  display: grid;
  gap: 0.85rem;
  margin: 1.15rem 0 1.5rem;
}
@media (min-width: 720px) {
  .iq-dual { grid-template-columns: 1fr 1fr; }
}
.iq-dual .figure-card { margin: 0; max-width: none; }

/* Animated classifier families carousel */
.family-anim {
  margin: 1.15rem 0 1.5rem;
  padding: 1.15rem 1.1rem 1rem;
  background: linear-gradient(165deg, #0b1c2c 0%, #123048 60%, #0f766e 140%);
  color: #e8eef4;
  border: 1px solid #1e3a4f;
  max-width: 52rem;
}
.family-anim-tabs {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.85rem;
}
.family-anim-tabs button {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(232,238,244,0.85);
  cursor: pointer;
  border-radius: 2px;
}
.family-anim-tabs button.is-on {
  background: rgba(45,212,191,0.22);
  border-color: #2dd4bf;
  color: #fff;
}
.family-panel { display: none; min-height: 7.5rem; }
.family-panel.is-on { display: block; animation: familyIn 400ms var(--ease); }
@keyframes familyIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.family-panel h3 { margin: 0 0 0.45rem; font-size: 1.15rem; color: #fff; }
.family-panel p { margin: 0; color: rgba(232,238,244,0.82); font-size: 0.95rem; line-height: 1.55; max-width: 48ch; }
.family-panel .family-examples {
  margin-top: 0.65rem; font-family: var(--mono); font-size: 0.72rem; color: #99f6e4;
}
.compare-block { margin: 1.5rem 0 2rem; max-width: 52rem; }
.compare-block h3 { margin: 1.35rem 0 0.45rem; font-size: 1.1rem; }
.compare-block p { color: var(--muted); margin: 0 0 0.65rem; max-width: 62ch; }

@media (prefers-reduced-motion: reduce) {
  .family-panel.is-on { animation: none; }
}

/* —— Quickstart: YAML + report preview —— */
.step-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 62ch;
}
.step-note code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
.yaml-panel {
  margin: 0.85rem 0 0;
  background: #0b1220;
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  overflow: hidden;
}
.yaml-panel-bar {
  padding: 0.5rem 0.9rem;
  background: #111827;
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.yaml-block {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  overflow-x: auto;
  color: #e5e7eb;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}
.yaml-block .yk { color: #7dd3fc; }
.yaml-block .ys { color: #86efac; }
.yaml-block .yn { color: #fcd34d; }
.yaml-block .yc { color: #64748b; }

.report-preview {
  margin: 2rem 0 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.report-preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}
.report-preview-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #475569;
}
.report-preview-path {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #94a3b8;
}
.report-preview-head {
  padding: 1.5rem 1.35rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.report-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.report-preview-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}
.report-sub {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.9rem;
}
.report-h3 {
  margin: 1.25rem 1.35rem 0.65rem;
  font-size: 1.05rem;
}
.report-table-wrap {
  margin: 0 1rem 1.25rem;
  overflow-x: auto;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--mono);
}
.report-table th,
.report-table td {
  padding: 0.45rem 0.55rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.report-table th {
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.report-table td:first-child,
.report-table th:first-child {
  text-align: left;
}
.report-table tr.is-best td {
  font-weight: 600;
  background: #ecfdf8;
}
.report-table .cell-best { color: #0f766e; font-weight: 600; }
.report-table .cell-mid { color: var(--muted); }
.report-rec {
  margin: 0 1.35rem 1.35rem;
  padding: 1rem 1.15rem;
  background: #d5f5e3;
  border: 1px solid #86efac;
  border-radius: 4px;
}
.report-rec-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.report-rec pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #134e4a;
}
.report-figures {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1.25rem;
}
@media (min-width: 800px) {
  .report-figures { grid-template-columns: repeat(3, 1fr); }
}
.report-figures figure {
  margin: 0;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.report-figures img {
  width: 100%;
  display: block;
  background: #fff;
}
.report-figures figcaption {
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.report-foot {
  margin: 0;
  padding: 0.9rem 1.35rem 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 70ch;
}
.report-foot code {
  font-family: var(--mono);
  font-size: 0.85em;
}
