/* ==========================================================================
   Jordan Boomilever: design system
   Tension = orange, compression = blue. Everything else stays out of the way.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-2: #eceef2;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f6;
  --line: rgba(12, 18, 32, 0.09);
  --line-2: rgba(12, 18, 32, 0.16);
  --ink: #0b1220;
  --ink-2: #3a4456;
  --ink-3: #5f6b7e;
  --ink-inv: #ffffff;
  --tension: #e4572e;
  --compression: #1f78d1;
  --chart-t: #e4572e;
  --chart-c: #1f78d1;
  --tension-soft: rgba(228, 87, 46, 0.11);
  --compression-soft: rgba(31, 120, 209, 0.10);
  --wood: #b98a4b;
  --sand: #b88d55;
  --good: #11855a;
  --warn: #a8670e;
  --bad: #c13a1a;
  --good-soft: rgba(17, 133, 90, 0.1);
  --warn-soft: rgba(168, 103, 14, 0.1);
  --bad-soft: rgba(193, 58, 26, 0.09);
  --grid: rgba(31, 120, 209, 0.075);
  --grid-strong: rgba(31, 120, 209, 0.13);
  --glow-t: rgba(228, 87, 46, 0.18);
  --glow-c: rgba(31, 120, 209, 0.16);
  --header-bg: rgba(244, 245, 247, 0.78);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-2: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 32px -12px rgba(16, 24, 40, 0.16);
  --shadow-3: 0 24px 64px -24px rgba(16, 24, 40, 0.35);
  --focus: #1f78d1;
  --selection: rgba(31, 120, 209, 0.18);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #06080c;
    --bg-2: #0a0d13;
    --surface: #0e131a;
    --surface-2: #121821;
    --surface-3: #171e29;
    --line: rgba(255, 255, 255, 0.075);
    --line-2: rgba(255, 255, 255, 0.14);
    --ink: #edf1f7;
    --ink-2: #b2bccb;
    --ink-3: #7c889a;
    --ink-inv: #06080c;
    --tension: #ff7a45;
    --compression: #4cc3ff;
    --chart-t: #eb5b2b;
    --chart-c: #2399e0;
    --tension-soft: rgba(255, 122, 69, 0.12);
    --compression-soft: rgba(76, 195, 255, 0.11);
    --wood: #d9b27a;
    --sand: #d8b47c;
    --good: #3dd598;
    --warn: #f5b847;
    --bad: #ff7a59;
    --good-soft: rgba(61, 213, 152, 0.11);
    --warn-soft: rgba(245, 184, 71, 0.11);
    --bad-soft: rgba(255, 122, 89, 0.11);
    --grid: rgba(76, 195, 255, 0.05);
    --grid-strong: rgba(76, 195, 255, 0.1);
    --glow-t: rgba(255, 122, 69, 0.28);
    --glow-c: rgba(76, 195, 255, 0.25);
    --header-bg: rgba(6, 8, 12, 0.72);
    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --shadow-3: 0 32px 80px -24px rgba(0, 0, 0, 0.8);
    --focus: #4cc3ff;
    --selection: rgba(76, 195, 255, 0.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06080c;
  --bg-2: #0a0d13;
  --surface: #0e131a;
  --surface-2: #121821;
  --surface-3: #171e29;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #edf1f7;
  --ink-2: #b2bccb;
  --ink-3: #7c889a;
  --ink-inv: #06080c;
  --tension: #ff7a45;
  --compression: #4cc3ff;
  --chart-t: #eb5b2b;
  --chart-c: #2399e0;
  --tension-soft: rgba(255, 122, 69, 0.12);
  --compression-soft: rgba(76, 195, 255, 0.11);
  --wood: #d9b27a;
  --sand: #d8b47c;
  --good: #3dd598;
  --warn: #f5b847;
  --bad: #ff7a59;
  --good-soft: rgba(61, 213, 152, 0.11);
  --warn-soft: rgba(245, 184, 71, 0.11);
  --bad-soft: rgba(255, 122, 89, 0.11);
  --grid: rgba(76, 195, 255, 0.05);
  --grid-strong: rgba(76, 195, 255, 0.1);
  --glow-t: rgba(255, 122, 69, 0.28);
  --glow-c: rgba(76, 195, 255, 0.25);
  --header-bg: rgba(6, 8, 12, 0.72);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 32px 80px -24px rgba(0, 0, 0, 0.8);
  --focus: #4cc3ff;
  --selection: rgba(76, 195, 255, 0.25);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--selection); }

img, svg, video, canvas { display: block; max-width: 100%; }
svg { overflow: visible; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--tension); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

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

.sr-only {
  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-link {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ink-inv);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.t { color: var(--tension); }
.c { color: var(--compression); }
.dim { color: var(--ink-2); }
.faint { color: var(--ink-3); }

main { display: block; min-height: 70vh; }
main:focus { outline: none; }

/* ---------------------------------------------------------- grid backdrop */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}


/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 650; font-size: 0.98rem; letter-spacing: -0.02em; }
.brand-sub { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.nav a {
  position: relative;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-3); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface); }
.icon-btn svg { width: 17px; height: 17px; }
.search-btn { padding: 0 8px 0 12px; min-width: 0; }
.search-btn .label { font-size: 0.85rem; }
.kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  background: var(--surface-2);
}

.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}

@media (max-width: 1120px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .search-btn .label, .search-btn .kbd { display: none; }
  .search-btn { padding: 0; min-width: 38px; }
  .brand-sub { display: none; }
}

/* ------------------------------------------------------------- mega menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto 1fr;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
  overflow-y: auto;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.menu-top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.menu-body { padding-block: 24px 64px; }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.menu-link {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-items: start;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), border-color 0.2s;
}
.menu.is-open .menu-link { transform: none; opacity: 1; }
.menu-link:hover { border-color: var(--line-2); }
.menu-link .num { grid-row: span 2; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); padding-top: 3px; }
.menu-link .t1 { font-weight: 600; font-size: 1.05rem; }
.menu-link .t2 { font-size: 0.88rem; color: var(--ink-3); line-height: 1.45; }
.menu-link[aria-current="page"] { border-color: var(--compression); }

/* ----------------------------------------------------------------- buttons */
.btn {
  --b-bg: var(--surface);
  --b-ink: var(--ink);
  --b-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--b-line);
  background: var(--b-bg);
  color: var(--b-ink);
  font-weight: 560;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn-primary { --b-bg: var(--ink); --b-ink: var(--ink-inv); --b-line: var(--ink); }
.btn-ghost { --b-bg: transparent; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.86rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 560;
  text-decoration: none;
  color: var(--ink);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ----------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
a.chip, label.chip { text-decoration: none; cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--ink-inv); border-color: var(--ink); }
.chip .count { font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.7; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.tag.is-t { color: var(--tension); border-color: color-mix(in srgb, var(--tension) 35%, transparent); background: var(--tension-soft); }
.tag.is-c { color: var(--compression); border-color: color-mix(in srgb, var(--compression) 35%, transparent); background: var(--compression-soft); }
.tag.is-good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-soft); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tension) 0 50%, var(--compression) 50% 100%);
}
.kicker.no-bar::before { display: none; }

/* --------------------------------------------------------------- sections */
.section { position: relative; padding-block: clamp(48px, 6vw, 88px); }
.section-tight { padding-block: clamp(40px, 6vw, 80px); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 10px; max-width: 760px; margin-bottom: clamp(20px, 2.6vw, 32px); }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.sub-head { font-size: 1.1rem; margin: 32px 0 14px; }
.card-h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin: 12px 0 8px; }
.plain-list { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--ink-2); }
.plain-list li::marker { font-family: var(--font-mono); color: var(--ink-3); }
.section-head p { font-size: 1rem; color: var(--ink-2); max-width: 680px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head .row { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --------------------------------------------------------------- page hero */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(36px, 5vw, 64px) clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { position: relative; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 14px;
}
.page-hero .lede { margin-top: 14px; font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--ink-2); max-width: 72ch; }
.page-hero .meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(760px, calc(100svh - var(--header-h)));
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-block: 48px 40px;
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 16px;
}
.hero-next { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--ink-2); }
.hero .lede { margin-top: 16px; font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--ink-2); max-width: 52ch; }
.hero-cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stage-wrap { position: relative; }
.hero-stage { position: relative; height: min(760px, 78svh); min-height: 460px; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.hero-stage canvas:active { cursor: grabbing; }

.hud {
  position: absolute;
  left: 0;
  bottom: 4%;
  z-index: 3;
  width: min(300px, 70%);
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-2);
  font-family: var(--font-mono);
}
.hud-title { display: flex; justify-content: space-between; align-items: center; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.hud-live { display: inline-flex; align-items: center; gap: 6px; color: var(--good); }
.hud-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.hud-rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 12px; font-size: 0.82rem; }
.hud-rows dt { color: var(--ink-3); }
.hud-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.hud-score { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; }
.hud-score .k { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.hud-score .v { font-family: var(--font-sans); font-weight: 600; font-size: 2rem; letter-spacing: -0.03em; line-height: 1; }
.hud-bar { margin-top: 12px; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--compression), var(--tension)); border-radius: 4px; }
.hud-note { margin-top: 10px; font-size: 0.66rem; color: var(--ink-3); letter-spacing: 0.04em; }
.hud-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0; transition: opacity 0.3s; }
.hud-badge.on { opacity: 1; }

.legend-float {
  position: absolute;
  right: 4%;
  top: 6%;
  z-index: 3;
  display: grid;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.legend-float span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 16px; height: 3px; border-radius: 3px; display: inline-block; }
.swatch.t { background: var(--tension); box-shadow: 0 0 10px var(--glow-t); }
.swatch.c { background: var(--compression); box-shadow: 0 0 10px var(--glow-c); }
.drag-hint { position: absolute; right: 4%; bottom: 6%; z-index: 3; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; gap: 8px; align-items: center; }

@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; padding-block: 40px 24px; }
  .hero-stage { height: 520px; min-height: 0; margin-inline: calc(var(--gutter) * -1); }
  .hud { left: var(--gutter); bottom: 12px; }
  .legend-float { right: var(--gutter); top: 8px; }
  .drag-hint { display: none; }
}
@media (max-width: 520px) {
  .hero-stage { height: 470px; }
  .hud { width: calc(100% - var(--gutter) * 2); padding: 12px 14px; }
  .hud-rows { grid-template-columns: auto 1fr auto 1fr; font-size: 0.74rem; gap: 4px 10px; }
  .hud-score .v { font-size: 1.6rem; }
}


/* ----------------------------------------------------------------- cards */
.card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  isolation: isolate;
}
.card.pad { padding: clamp(20px, 2.4vw, 28px); }
.card.hover { transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease); }
.card.hover:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--compression) 12%, transparent), transparent 45%);
}
.spot:hover::before { opacity: 1; }
a.card { display: block; text-decoration: none; color: inherit; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ bento (home) */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, auto);
  gap: 14px;
}
.bento > * { grid-column: span 4; }
.bento .b-wide { grid-column: span 8; }
.bento .b-half { grid-column: span 6; }
.bento .b-tall { grid-row: span 2; }
.b-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; min-height: 220px; }
.b-card h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.b-card p { color: var(--ink-2); font-size: 0.97rem; max-width: 42ch; }
.b-card .b-num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.1em; }
.b-card .b-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.b-card .b-art { position: relative; margin: 6px -8px 0; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.b-card .b-art svg { width: 100%; height: auto; max-height: 220px; }
.b-card .b-wall { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: center; margin: 10px 0 0; }
.b-card .b-wall svg { max-height: 250px; }
@media (max-width: 680px) { .b-card .b-wall { grid-template-columns: 1fr; } }
.b-card .b-chart { margin: 6px 0 0; min-height: 150px; }
.b-card .b-chart .chart-legend { font-size: 0.78rem; margin-bottom: 2px; }
button.b-card { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.b-search { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--compression) 7%, var(--surface))); }
.mini-pod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 10px; }
.mp { display: grid; gap: 4px; align-content: end; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-height: 92px; }
.mp-0 { min-height: 128px; border-color: color-mix(in srgb, #e3b341 35%, var(--line)); }
.mp-1 { min-height: 108px; }
.mp b { font-size: 0.86rem; line-height: 1.2; font-weight: 600; }
.mp span:last-child { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-3); }
.mini-thumbs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.mini-thumbs span { aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: var(--surface-3); filter: saturate(0.9); transition: transform 0.6s var(--ease); }
a.b-card:hover .mini-thumbs span { transform: scale(1.04); }
.mini-thumbs .play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.mini-thumbs .play svg { width: 18px; height: 18px; }
.b-card .arrow-ico { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all 0.3s var(--ease); flex-shrink: 0; }
.b-card .arrow-ico svg { width: 15px; height: 15px; }
a.b-card:hover .arrow-ico { background: var(--ink); color: var(--ink-inv); border-color: var(--ink); transform: rotate(-45deg); }
@media (max-width: 1000px) {
  .bento > *, .bento .b-wide, .bento .b-half { grid-column: span 6; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .bento > *, .bento .b-wide, .bento .b-half { grid-column: auto; }
  .bento .b-tall { grid-row: auto; }
}

/* ------------------------------------------------------------- countdown */
.countdowns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .countdowns { grid-template-columns: 1fr; } }
.cd {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  text-decoration: none;
}
.cd-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cd-days { display: flex; align-items: baseline; gap: 10px; }
.cd-days b { font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.cd-days span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cd h3 { font-size: 1.2rem; }
.cd p { color: var(--ink-3); font-size: 0.9rem; }
.cd-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.cd-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.cd.is-next { border-color: color-mix(in srgb, var(--tension) 45%, var(--line)); }
.cd.is-next .cd-bar i { background: linear-gradient(90deg, var(--compression), var(--tension)); }
.cd.is-past { opacity: 0.6; }

/* --------------------------------------------------------------- spec grid */
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.spec { padding: 22px 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.spec:nth-child(4n) { border-right: 0; }
.spec .k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.spec .v { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.spec .d { font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 980px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(4n) { border-right: 1px solid var(--line); }
  .spec:nth-child(2n) { border-right: 0; }
}
@media (max-width: 460px) {
  .specs { grid-template-columns: 1fr; }
  .spec { border-right: 0 !important; }
}

/* -------------------------------------------------------------- figures */
.figure { display: grid; gap: 14px; }
.figure-stage {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: clamp(14px, 2.4vw, 28px);
}
.figure-stage .grid-bg { -webkit-mask-image: none; mask-image: none; opacity: 0.8; }
.figure-stage svg { position: relative; width: 100%; height: auto; }
.figure figcaption { font-size: 0.88rem; color: var(--ink-3); }
.figure-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.seg button {
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--ink-2);
  transition: all 0.2s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .box { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* SVG diagram classes */
.dg-wall { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; }
.dg-wall-face { fill: color-mix(in srgb, var(--wood) 10%, var(--surface-2)); stroke: var(--ink-3); stroke-width: 1.2; }
.dg-line { stroke: var(--ink-2); stroke-width: 1.2; }
.dg-line-faint { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.8; }
.dg-zone-ok { fill: color-mix(in srgb, var(--good) 22%, transparent); stroke: var(--good); stroke-width: 1; }
.dg-zone-no { fill: color-mix(in srgb, var(--bad) 8%, transparent); }
.dg-band { fill: color-mix(in srgb, var(--compression) 14%, transparent); }
.dg-bolt { fill: var(--ink-2); }
.dg-hole { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.2; }
.dg-text { fill: var(--ink-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }
.dg-text-strong { fill: var(--ink); font-family: var(--font-sans); font-weight: 600; font-size: 13px; }
.dg-text-t { fill: var(--tension); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.dg-text-c { fill: var(--compression); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.dg-dim { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.dg-arrow { fill: var(--ink-3); }
.dg-t { stroke: var(--tension); stroke-linecap: round; fill: none; }
.dg-c { stroke: var(--compression); stroke-linecap: round; fill: none; }
.dg-wood { fill: color-mix(in srgb, var(--wood) 55%, var(--surface)); stroke: var(--wood); stroke-width: 1; }
.dg-block { fill: color-mix(in srgb, var(--wood) 30%, var(--surface)); stroke: var(--ink-2); stroke-width: 1.2; }
.dg-hw { stroke: var(--ink-3); stroke-width: 1.4; fill: none; }
.dg-load { fill: var(--ink-2); }
.dg-glow-t { stroke: var(--tension); opacity: 0.18; stroke-linecap: round; fill: none; }
.dg-glow-c { stroke: var(--compression); opacity: 0.18; stroke-linecap: round; fill: none; }

/* 3D model SVG */
.model-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.model-svg .m-T { stroke: var(--tension); stroke-width: 2.2; }
.model-svg .m-C { stroke: var(--compression); stroke-width: 2.2; }
.model-svg .m-B { stroke: var(--compression); stroke-width: 1.1; opacity: 0.6; }
.model-svg .m-K { stroke: var(--wood); stroke-width: 1.4; }
.model-svg .m-H { stroke: var(--ink-3); stroke-width: 1.1; }
.model-svg .m-W { stroke: var(--ink-3); stroke-width: 1; opacity: 0.55; }
.model-svg .m-L { stroke: var(--ink-3); stroke-width: 1; opacity: 0.8; }
.model-svg .m-G { stroke: var(--line-2); stroke-width: 1; }
.model-svg .m-D { stroke: var(--ink-3); stroke-width: 1; }
.model-svg .m-Tg { stroke: var(--tension); stroke-width: 7; opacity: 0.14; }
.model-svg .m-Cg { stroke: var(--compression); stroke-width: 7; opacity: 0.12; }
.model-svg .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; fill: var(--ink-2); text-transform: uppercase; }
.model-svg .lbl-line { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.model-svg .lbl-dot { fill: var(--ink); }

/* ----------------------------------------------------------- designs page */
.designs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1040px) { .designs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .designs { grid-template-columns: 1fr; } }
.design { display: flex; flex-direction: column; }
.design-art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.design-art:active { cursor: grabbing; }
.design-art .grid-bg { -webkit-mask-image: none; mask-image: none; }
.design-art svg { position: absolute; inset: 8% 6%; width: 88%; height: 84%; }
.design-art .rot-hint { position: absolute; right: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); opacity: 0; transition: opacity 0.3s; }
.design-art:hover .rot-hint { opacity: 1; }
.design-body { padding: 22px 22px 24px; display: grid; gap: 12px; flex: 1; align-content: start; }
.design-body h3 { font-size: 1.35rem; }
.design-nick { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.design-body p { color: var(--ink-2); font-size: 0.95rem; }
.design-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.diff { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.diff i { width: 7px; height: 7px; border-radius: 2px; background: var(--line-2); display: inline-block; }
.diff i.on { background: var(--ink); }
.design details { border-top: 1px solid var(--line); padding-top: 12px; }
.design summary { cursor: pointer; font-weight: 560; font-size: 0.9rem; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.design summary::-webkit-details-marker { display: none; }
.design summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-3); transition: transform 0.25s var(--ease); }
.design details[open] summary::after { transform: rotate(45deg); }
.pc { display: grid; gap: 14px; margin-top: 14px; font-size: 0.9rem; }
.pc h4 { font-size: 0.72rem; font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; font-weight: 500; }
.pc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pc li { position: relative; padding-left: 18px; color: var(--ink-2); }
.pc li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 2px; border-radius: 2px; }
.pc .pros li::before { background: var(--good); }
.pc .cons li::before { background: var(--tension); }
.pc .src { font-size: 0.8rem; color: var(--ink-3); }

.anatomy { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .anatomy { grid-template-columns: 1fr; } }
.anatomy-stage { position: sticky; top: calc(var(--header-h) + 24px); aspect-ratio: 760 / 520; min-height: 0; padding: 0; cursor: grab; touch-action: pan-y; }
@media (max-width: 960px) { .anatomy-stage { position: relative; top: 0; } }
.anatomy-stage svg { position: absolute; inset: 4%; width: 92%; height: 92%; }
.parts { display: grid; gap: 0; align-content: start; }
.part { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: default; transition: background-color 0.2s; }
.part:last-child { border-bottom: 0; }
.part .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-2); }
.part b { font-weight: 600; display: block; font-size: 0.98rem; }
.part span { color: var(--ink-2); font-size: 0.9rem; }

/* --------------------------------------------------------------- champions */
.timeline { position: relative; display: grid; gap: 14px; }
.year-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
  align-items: start;
}
.year-row .yr { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.year-row .host { margin-top: 8px; font-size: 0.8rem; color: var(--ink-3); line-height: 1.4; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pod {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  gap: 4px;
}
.pod .pl { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.medal { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.medal.g { background: linear-gradient(135deg, #f7d774, #c9962b); box-shadow: 0 0 0 2px color-mix(in srgb, #e3b341 25%, transparent); }
.medal.s { background: linear-gradient(135deg, #e8edf3, #9aa6b4); box-shadow: 0 0 0 2px color-mix(in srgb, #b8c2cd 25%, transparent); }
.medal.b { background: linear-gradient(135deg, #e7a874, #a55d2d); box-shadow: 0 0 0 2px color-mix(in srgb, #c97e45 25%, transparent); }
.pod b { font-weight: 600; font-size: 0.98rem; line-height: 1.25; }
.pod span { font-size: 0.82rem; color: var(--ink-3); }
.rest { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.86rem; color: var(--ink-2); }
.rest span b { font-family: var(--font-mono); font-weight: 500; color: var(--ink-3); margin-right: 6px; font-size: 0.78rem; }
@media (max-width: 760px) {
  .year-row { grid-template-columns: 1fr; gap: 14px; }
  .podium { grid-template-columns: 1fr; }
}

.dynasty { display: grid; gap: 10px; }
.dyn-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 68px; gap: 14px; align-items: center; font-size: 0.94rem; }
.dyn-row .bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--compression); }
.dyn-row .val { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-2); text-align: right; white-space: nowrap; }
.dyn-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dyn-row .nm small { color: var(--ink-3); margin-left: 6px; }

.history { display: grid; gap: 0; }
.h-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1fr) 90px;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.h-row:last-child { border-bottom: 0; }
.h-row .y { font-family: var(--font-mono); color: var(--ink-3); }
.h-row .e small { display: block; color: var(--ink-3); font-size: 0.8rem; }
.h-row .track { position: relative; height: 8px; border-radius: 8px; background: var(--surface-3); }
.h-row .track i { position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--compression); box-shadow: 0 0 0 3px var(--surface); transform: translateY(-50%); }
.h-row .track i.medal-dot { background: linear-gradient(135deg, #e7a874, #a55d2d); }
.h-row .pl { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-row .pl small { font-weight: 400; color: var(--ink-3); }
.h-head { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 10px; }
.h-head .track { background: none; height: auto; display: flex; justify-content: space-between; }
@media (max-width: 640px) {
  .h-row { grid-template-columns: 52px minmax(0, 1fr) 64px; }
  .h-row .track { grid-column: 1 / -1; grid-row: 2; }
  .h-head .track { display: none; }
}

/* ------------------------------------------------------------------ videos */
.featured-video { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0; }
@media (max-width: 900px) { .featured-video { grid-template-columns: 1fr; } }
.featured-video .fv-body { padding: clamp(22px, 3vw, 40px); display: grid; align-content: center; gap: 14px; }
.featured-video .fv-body h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform 0.6s var(--ease), opacity 0.3s; opacity: 0.92; }
.thumb:hover img { transform: scale(1.05); opacity: 1; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.55)); }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #06080c;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease);
}
.play svg { width: 22px; height: 22px; margin-left: 3px; }
.thumb:hover .play { transform: scale(1.08); }
.thumb .vt-tag { position: absolute; left: 12px; bottom: 10px; z-index: 2; color: #fff; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.9; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } }
.vcard .thumb .play { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
.vcard .v-body { padding: 16px 18px 20px; display: grid; gap: 6px; }
.vcard h3 { font-size: 1.05rem; letter-spacing: -0.015em; line-height: 1.3; }
.vcard .v-ch { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vcard p { font-size: 0.9rem; color: var(--ink-2); }
.vcat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 48px 0 18px; flex-wrap: wrap; }
.vcat-head h2 { font-size: 1.6rem; }
.vcat-head p { color: var(--ink-3); font-size: 0.95rem; }

/* ------------------------------------------------------------------ modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 8, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.modal.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }
.modal-panel {
  width: min(1100px, 100%);
  max-height: calc(100svh - 48px);
  overflow: auto;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.4s var(--ease);
}
.modal.is-open .modal-panel { transform: none; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-body { padding: 20px 24px 24px; display: flex; gap: 20px; align-items: start; justify-content: space-between; flex-wrap: wrap; }
.modal-body h2 { font-size: 1.4rem; }
.modal-body p { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; }
@media (max-width: 600px) { .modal { padding: 0; align-items: end; } .modal-panel { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92svh; } }

/* ---------------------------------------------------------------- palette */
.palette {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: min(14vh, 120px) 16px 16px;
  background: rgba(3, 5, 8, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0s linear 0.2s;
}
.palette.is-open { opacity: 1; visibility: visible; transition: opacity 0.2s var(--ease); }
.palette-panel {
  width: min(680px, 100%);
  max-height: min(70vh, 640px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transform: translateY(-8px) scale(0.99);
  transition: transform 0.25s var(--ease);
}
.palette.is-open .palette-panel { transform: none; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.palette-input input { flex: 1; height: 58px; border: 0; background: transparent; font-size: 1.05rem; outline: none; }
.palette-results { overflow-y: auto; padding: 8px; list-style: none; margin: 0; }
.palette-results li a {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.palette-results li a .ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); font-family: var(--font-mono); font-size: 0.66rem; }
.palette-results li a .tt { font-weight: 550; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-results li a .ss { grid-column: 2; font-size: 0.82rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-results li a .kind { grid-row: 1 / span 2; grid-column: 3; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.palette-results li a[aria-selected="true"] { background: var(--surface-3); }
.palette-results li a mark { background: none; color: var(--tension); }
.palette-empty { padding: 28px; text-align: center; color: var(--ink-3); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--ink-3); }
.palette-foot span { display: inline-flex; gap: 6px; align-items: center; }

/* ------------------------------------------------------------------ prose */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 1000px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 2px; font-size: 0.88rem; }
.toc .toc-k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.toc a { position: relative; display: block; padding: 7px 0 7px 16px; color: var(--ink-3); text-decoration: none; border-left: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); }
.toc a .ix { font-family: var(--font-mono); font-size: 0.7rem; margin-right: 8px; color: var(--ink-3); }

.prose { max-width: 760px; font-size: 1.07rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin-top: 2.4em;
  padding-top: 0.2em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2:first-child { margin-top: 0; }
.prose h2 .ix { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: 14px; }
.prose h3 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: 0.5em; }
.prose ul li::marker { color: var(--ink-3); }
.prose ol li::marker { font-family: var(--font-mono); font-size: 0.85em; color: var(--ink-3); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); }
.prose a:hover { text-decoration-color: var(--tension); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.prose td { color: var(--ink-2); }
.prose td:first-child { color: var(--ink); font-weight: 500; }
.prose .widget { margin-block: 1.8em; }

.callout {
  position: relative;
  padding: 18px 20px 18px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 6px;
}
.callout::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--compression); }
.callout .ct { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.callout p, .callout li { color: var(--ink-2); font-size: 0.98rem; }
.callout ul { padding-left: 1.1em; margin: 4px 0 0; display: grid; gap: 4px; }
.callout.tip::before { background: var(--good); }
.callout.warn { background: color-mix(in srgb, var(--tension) 5%, var(--surface)); border-color: color-mix(in srgb, var(--tension) 25%, var(--line)); }
.callout.warn::before { background: var(--tension); }
.callout.note::before { background: var(--compression); }
.callout.math { background: var(--surface-2); }
.callout.math::before { background: linear-gradient(var(--tension), var(--compression)); }
.callout.math .mathbody { font-family: var(--font-mono); font-size: 0.98rem; color: var(--ink); display: grid; gap: 6px; line-height: 1.5; }
.callout.math .mathbody div:first-child { font-size: 1.12rem; }

/* ------------------------------------------------------------------- tools */
.tool { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 0; }
@media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }
.tool-controls { padding: clamp(20px, 2.4vw, 28px); border-right: 1px solid var(--line); display: grid; gap: 20px; align-content: start; background: var(--surface-2); }
@media (max-width: 900px) { .tool-controls { border-right: 0; border-bottom: 1px solid var(--line); } }
.tool-output { padding: clamp(20px, 2.4vw, 28px); display: grid; gap: 20px; align-content: start; min-width: 0; }
.tool-title { display: grid; gap: 6px; }
.tool-title h3 { font-size: 1.25rem; }
.tool-title p { font-size: 0.9rem; color: var(--ink-3); }

.field { display: grid; gap: 8px; }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field label, .field .lab { font-size: 0.86rem; font-weight: 550; color: var(--ink); }
.field .val { font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.field small { font-size: 0.78rem; color: var(--ink-3); }
.input, .select, textarea.input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus { border-color: var(--compression); box-shadow: 0 0 0 3px var(--compression-soft); outline: none; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .unit { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-3); font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ink) 0 var(--p, 50%), var(--line-2) var(--p, 50%) 100%);
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-2);
  transition: transform 0.15s;
}
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--compression-soft); }

.check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.readout { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 4px; }
.readout .k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.readout .v { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.readout .v small { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.readout .s { font-size: 0.8rem; color: var(--ink-3); }
.readout.t { border-color: color-mix(in srgb, var(--tension) 30%, var(--line)); }
.readout.c { border-color: color-mix(in srgb, var(--compression) 30%, var(--line)); }
.readout .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.readout.t .dot { background: var(--tension); }
.readout.c .dot { background: var(--compression); }

.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 0.93rem; border: 1px solid var(--line); background: var(--surface-2); }
.verdict svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.verdict.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.verdict.good svg { color: var(--good); }
.verdict.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.verdict.warn svg { color: var(--warn); }
.verdict.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.verdict.bad svg { color: var(--bad); }
.verdict b { font-weight: 600; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); font-weight: 550; font-size: 0.9rem; white-space: nowrap; transition: all 0.2s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--ink-inv); }
.tab-panel[hidden] { display: none; }

/* ------------------------------------------------------------------ charts */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ax-base { stroke: var(--line-2); }
.chart .tick { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .axis-title { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.t { stroke: var(--chart-t); }
.chart .ln.c { stroke: var(--chart-c); }
.chart .ln.k { stroke: var(--ink-2); }
.chart .area.c { fill: var(--chart-c); opacity: 0.08; }
.chart .ref { stroke: var(--line-2); stroke-width: 1; }
.chart .ref-label { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10px; }
.chart .pt { stroke: var(--surface); stroke-width: 2; }
.chart .pt.t { fill: var(--chart-t); }
.chart .pt.c { fill: var(--chart-c); }
.chart .pt.k { fill: var(--ink); }
.chart .lbl { fill: var(--ink-2); font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart .bar-h { fill: var(--chart-c); }
.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 0.82rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
}
.chart-tip.on { opacity: 1; transform: none; }
.chart-tip .th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.chart-tip .tr { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chart-tip .tr span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.chart-tip .tr b { font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-tip .key { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-tip .key.t { background: var(--chart-t); }
.chart-tip .key.c { background: var(--chart-c); }
.chart-tip .key.k { background: var(--ink); height: 8px; width: 8px; border-radius: 50%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; color: var(--ink-2); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend .key { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-legend .key.t { background: var(--chart-t); }
.chart-legend .key.c { background: var(--chart-c); }
.chart-legend .key.k { background: var(--ink); width: 9px; height: 9px; border-radius: 50%; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); position: sticky; top: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td .muted { color: var(--ink-3); }
table.data .row-del { border: 0; background: none; color: var(--ink-3); padding: 4px; border-radius: 6px; }
table.data .row-del:hover { color: var(--bad); background: var(--bad-soft); }
table.data .row-del svg { width: 15px; height: 15px; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--ink-3); display: grid; gap: 8px; justify-items: center; }
.empty-state svg { width: 32px; height: 32px; opacity: 0.6; }

/* ---------------------------------------------------------------- stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; }
.stat .k { font-size: 0.84rem; color: var(--ink-3); }
.stat .v { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stat .s { font-size: 0.8rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- roadmap */
.roadmap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.rm { position: relative; padding: 22px 18px 24px; border-right: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.rm:last-child { border-right: 0; }
.rm .m { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.rm .m i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: inline-block; }
.rm.now .m { color: var(--tension); }
.rm.now .m i { border-color: var(--tension); background: var(--tension); box-shadow: 0 0 0 4px var(--tension-soft); }
.rm.done .m i { background: var(--ink-3); }
.rm h4 { font-size: 1rem; letter-spacing: -0.015em; line-height: 1.25; }
.rm p { font-size: 0.85rem; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 1100px) {
  .roadmap { grid-template-columns: 1fr; }
  .rm { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 90px 1fr; column-gap: 16px; }
  .rm:last-child { border-bottom: 0; }
  .rm .m { grid-row: span 2; }
}

/* ---------------------------------------------------------------- checklist */
.checklist { columns: 3 280px; column-gap: 14px; }
.checklist .cl-group { break-inside: avoid; margin-bottom: 14px; display: block; }
.cl-group { padding: 20px 20px 16px; }
.cl-group h3 { font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cl-group h3 small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-3); font-weight: 400; }
.cl-group ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.cl-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 6px; border-radius: var(--r-xs); cursor: pointer; font-size: 0.92rem; color: var(--ink-2); transition: background-color 0.15s; }
.cl-item:hover { background: var(--surface-2); }
.cl-item input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: all 0.15s; background: var(--surface); }
.cl-item input:checked { background: var(--ink); border-color: var(--ink); }
.cl-item input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--ink-inv); border-bottom: 2px solid var(--ink-inv); transform: rotate(-45deg) translate(1px, -1px); }
.cl-item:has(input:checked) span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--compression), var(--tension)); border-radius: 6px; transition: width 0.4s var(--ease); }

/* ---------------------------------------------------------- six-minute plan */
.plan { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.plan-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); align-items: start; }
.plan-row:last-child { border-bottom: 0; }
.plan-row .tm { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-row .tm small { display: block; color: var(--ink-3); font-size: 0.72rem; margin-top: 2px; }
.plan-row b { display: block; font-weight: 600; }
.plan-row span { color: var(--ink-2); font-size: 0.94rem; }
.plan-bar { position: relative; height: 8px; display: flex; gap: 2px; padding: 0 22px 18px; background: var(--surface); }
.plan-bar i { height: 8px; border-radius: 3px; display: block; }

/* ------------------------------------------------------------ flashcards */
.flash-wrap { display: grid; gap: 18px; justify-items: center; }
.flashcard { width: min(640px, 100%); aspect-ratio: 16 / 10; perspective: 1400px; cursor: pointer; border: 0; padding: 0; background: none; }
.flash-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s var(--ease); }
.flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
}
.flash-face .k { position: absolute; top: 18px; left: 22px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.flash-face .hint { position: absolute; bottom: 16px; left: 0; right: 0; font-size: 0.78rem; color: var(--ink-3); }
.flash-front h3 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -0.04em; }
.flash-back { transform: rotateY(180deg); background: var(--surface-2); }
.flash-back p { font-size: clamp(1.02rem, 2.2vw, 1.25rem); color: var(--ink); line-height: 1.5; max-width: 46ch; }
.flash-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.flash-count { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-3); min-width: 80px; text-align: center; }

.quiz { width: min(760px, 100%); margin-inline: auto; display: grid; gap: 18px; }
.quiz-q { font-size: clamp(1.3rem, 2.6vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.25; }
.quiz-choices { display: grid; gap: 10px; }
.quiz-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.98rem;
  transition: all 0.2s var(--ease);
}
.quiz-choice:hover:not([disabled]) { border-color: var(--ink-3); transform: translateX(2px); }
.quiz-choice .lt { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); flex-shrink: 0; }
.quiz-choice.right { border-color: var(--good); background: var(--good-soft); }
.quiz-choice.right .lt { background: var(--good); color: #fff; border-color: var(--good); }
.quiz-choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz-choice.wrong .lt { background: var(--bad); color: #fff; border-color: var(--bad); }
.quiz-choice[disabled] { cursor: default; }
.quiz-explain { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.95rem; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); }
.quiz-result { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 20px; }
.quiz-result .big { font-size: clamp(3.4rem, 9vw, 5.5rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }

.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
@media (max-width: 760px) { .gloss { grid-template-columns: 1fr; } }
.gloss-item { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.gloss-item dt { font-weight: 600; }
.gloss-item dd { margin: 0; color: var(--ink-2); font-size: 0.94rem; }

/* --------------------------------------------------------------- resources */
.res-group { margin-top: 56px; }
.res-group:first-of-type { margin-top: 32px; }
.res-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.res-head h2 { font-size: 1.5rem; }
.res-head p { color: var(--ink-3); font-size: 0.94rem; }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .res-grid { grid-template-columns: 1fr; } }
.res { display: grid; gap: 8px; padding: 18px 18px 16px; align-content: start; }
.res .res-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.res h3 { font-size: 1rem; letter-spacing: -0.01em; line-height: 1.3; }
.res p { font-size: 0.88rem; color: var(--ink-2); }
.res .dom { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.res .dom svg { width: 12px; height: 12px; }
.search-field { position: relative; width: min(440px, 100%); }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); }
.search-field .input { padding-left: 40px; height: 46px; border-radius: 999px; }

/* ------------------------------------------------------------------ misc */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  background: var(--warn-soft);
  font-size: 0.93rem;
  color: var(--ink-2);
}
.notice svg { width: 20px; height: 20px; color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.notice b { color: var(--ink); }


.steps { counter-reset: step; display: grid; gap: 12px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.flow-step { position: relative; padding: 0 16px 0 0; display: grid; gap: 8px; align-content: start; }
.flow-step .dot { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.78rem; position: relative; z-index: 1; }
.flow-step::before { content: ""; position: absolute; left: 34px; right: 0; top: 17px; height: 1px; background: var(--line-2); }
.flow-step:last-child::before { display: none; }
.flow-step h4 { font-size: 1rem; margin-top: 6px; }
.flow-step p { font-size: 0.87rem; color: var(--ink-2); }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 18px; }
  .flow-step { grid-template-columns: 34px 1fr; column-gap: 14px; padding: 0; }
  .flow-step .dot { grid-row: span 2; }
  .flow-step h4 { margin-top: 4px; }
  .flow-step::before { left: 17px; top: 34px; bottom: -18px; right: auto; width: 1px; height: auto; }
}

.tiers { display: grid; gap: 10px; }
.tier { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.tier .tn { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.tier b { display: block; }
.tier span { font-size: 0.9rem; color: var(--ink-2); }
.tier.t1 { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.tier.t1 .tn { color: var(--good); }
.tier.t2 .tn { color: var(--warn); }
.tier.t3 .tn { color: var(--bad); }

.rule-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.rule-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.rule-item:last-child { border-bottom: 0; }
.rule-item .ri { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.rule-item .ri svg { width: 16px; height: 16px; }
.rule-item b { display: block; font-weight: 600; font-size: 0.98rem; }
.rule-item span { font-size: 0.92rem; color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .kit { grid-template-columns: 1fr; } }
.kit-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 0; }
.kit-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.kit-list li:last-child { border-bottom: 0; }
.kit-list li b { font-weight: 550; font-size: 0.95rem; color: var(--ink); }
.kit-list li span { grid-column: 1; font-size: 0.86rem; color: var(--ink-3); }
.kit-list li .tag { grid-row: 1; grid-column: 2; }

.spec-table { display: grid; gap: 0; }
.spec-table div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.spec-table div:last-child { border-bottom: 0; }
.spec-table dt { color: var(--ink-3); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; padding-top: 2px; }
.spec-table dd { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .spec-table div { grid-template-columns: 1fr; gap: 2px; } }

.big-link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.035em; line-height: 1.05; margin-top: 12px; }
.not-found p { margin-top: 16px; color: var(--ink-2); font-size: 1.1rem; }

/* ------------------------------------------------------------------ footer */
.site-footer { position: relative; border-top: 1px solid var(--line); margin-top: 0; background: var(--bg-2); overflow: hidden; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 64px 48px; }
@media (max-width: 900px) { .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { margin-top: 16px; color: var(--ink-3); font-size: 0.92rem; max-width: 40ch; }
.foot-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-col a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px 28px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-3); }
.foot-bottom a { color: var(--ink-3); }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.js-off .reveal { opacity: 1; transform: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page-enter > * { animation: fade-up 0.7s var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: 0.06s; }
.page-enter > *:nth-child(3) { animation-delay: 0.12s; }

.fallback { padding-block: 80px; display: grid; gap: 16px; max-width: 640px; }
.fallback h1 { font-size: 2.2rem; }
.fallback p { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .menu, .palette, .modal, .hero-stage, .toc { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card { box-shadow: none; }
}

/* tools embedded in long-form pages stack vertically */
.prose .tool { grid-template-columns: 1fr; }
.prose .tool-controls { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); column-gap: 24px; }
.prose .tool-controls .tool-title, .prose .tool-controls .seg { grid-column: 1 / -1; }
.prose .tool-controls .seg { justify-self: start; }
.prose h3 { font-size: 1.25rem; }
.prose .card h3 { margin: 0; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 900px) { .sticky-col { position: static; } }

.tool.tool-wide { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
@media (max-width: 900px) { .tool.tool-wide { grid-template-columns: 1fr; } }
.prose .kit-list { padding-left: 0; gap: 0; }
.prose .kit-list li { color: inherit; }
.kit-list .tag { font-size: 0.64rem; }
.prose .spec-table { margin: 0; }
.prose dl { margin: 0; }
.empty-state ul { text-align: left; margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: .9rem; }
.tool-output, .tool-controls { grid-template-columns: minmax(0, 1fr); }
.tool-output > *, .tool-controls > * { min-width: 0; }
@media (max-width: 1000px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc .toc { display: none; }
}
@media (max-width: 960px) {
  .hero-stage { height: 470px; }
  .hud { position: relative; left: auto; bottom: auto; width: auto; margin: 0 0 8px; }
  .hero .wrap { gap: 8px; }
  .hero-stage-wrap { display: grid; }
}
@media (max-width: 520px) {
  .hero-stage { height: 400px; }
  .legend-float { top: 0; }
}
@media (max-width: 960px) {
  .legend-float { top: auto; bottom: 10px; right: var(--gutter); }
}
/* The model labels its members, so the separate legend only crowds small screens. */
@media (max-width: 640px) {
  .legend-float { display: none; }
}
@media (max-width: 1100px) {
  .rm { grid-template-columns: 78px 1fr; align-items: start; padding: 18px; }
  .rm .m { padding-top: 3px; }
}
