/* ==========================================================================
   GAM - Geometric Action Model · Project Page
   Purple/yellow GAM project page theme
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #fcfbfd;
  --surface-2: #fbf9ff;
  --card: #ffffff;
  --ink: #1f1f1f;
  --ink-2: #444746;
  --ink-3: #5f6368;
  --line: #e4def0;
  --blue: #5f2eea;
  --blue-bright: #6f3ff1;
  --blue-soft: #d9ccff;
  --blue-ghost: #f7f4ff;
  --yellow: #d8bd27;
  --yellow-soft: #fff4b8;
  --yellow-ghost: #fff9df;
  --green: #146c2e;
  --green-soft: #c4eed0;
  --red: #c5221f;
  --grad: linear-gradient(95deg, #4d26b8 0%, #6f3ff1 52%, #d8bd27 105%);
  --grad-soft: linear-gradient(135deg, #faf8ff 0%, #fcfbff 55%, #fffbed 100%);
  --nav-bg: rgba(255, 255, 255, .66);
  --bar-rest: #dadce0;
  --dot-grid: rgba(60, 64, 67, .14);
  --btn-primary-bg: #5f2eea;
  --btn-primary-ink: #ffffff;
  --btn-primary-hover: #4d26b8;
  --chart-gam: #5f2eea;
  --chart-pi: #d8bd27;
  --chart-cosmos: #5f6368;
  --chart-rocket: #c4c7c5;
  --suite-spatial: #5f2eea;
  --suite-object: #d8bd27;
  --suite-goal: #00897b;
  --suite-long: #e8554d;
  --mix-oxe: #5f2eea;
  --mix-mimicgen: #d8bd27;
  --mix-robocasa: #9aa0a6;
  --blob-1: #f1edff;
  --blob-2: #fff9df;
  --blob-3: #f8f4ff;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(31, 35, 40, .06), 0 5px 14px rgba(31, 35, 40, .05);
  --shadow-float: 0 10px 28px rgba(31, 35, 40, .08), 0 1px 4px rgba(31, 35, 40, .05);
  --font-display: "Google Sans", "Google Sans Text", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Google Sans Text", "Google Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 64px;
}

html[data-theme="dark"] {
  --bg: #15121b;
  --surface: #1c1725;
  --surface-2: #2b243a;
  --card: #1f1929;
  --ink: #f2eff8;
  --ink-2: #d6cee6;
  --ink-3: #afa5c4;
  --line: #3b3052;
  --blue: #c4b5fd;
  --blue-bright: #a78bfa;
  --blue-soft: rgba(167, 139, 250, .35);
  --blue-ghost: rgba(167, 139, 250, .14);
  --yellow: #f4d84d;
  --yellow-soft: rgba(244, 216, 77, .28);
  --yellow-ghost: rgba(244, 216, 77, .12);
  --red: #f28b82;
  --grad: linear-gradient(95deg, #c4b5fd 0%, #8b5cf6 55%, #f4d84d 105%);
  --nav-bg: rgba(21, 18, 27, .72);
  --bar-rest: #4e455f;
  --dot-grid: rgba(232, 234, 237, .12);
  --btn-primary-bg: #c4b5fd;
  --btn-primary-ink: #24124d;
  --btn-primary-hover: #a78bfa;
  --chart-gam: #a78bfa;
  --chart-pi: #f4d84d;
  --chart-cosmos: #9aa0a6;
  --chart-rocket: #5f6368;
  --suite-spatial: #a78bfa;
  --suite-object: #f4d84d;
  --suite-goal: #6fd3c7;
  --suite-long: #f28b82;
  --mix-oxe: #a78bfa;
  --mix-mimicgen: #f4d84d;
  --mix-robocasa: #80868b;
  --blob-1: #1d2c4f;
  --blob-2: #2c2344;
  --blob-3: #3a2126;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .28), 0 5px 14px rgba(0, 0, 0, .18);
  --shadow-float: 0 10px 28px rgba(0, 0, 0, .32), 0 1px 4px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] body { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ------------------------------------------------------------------ utils */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.nowrap { white-space: nowrap; }

.section { padding: 96px 0 32px; }
.section--tint {
  background: var(--surface-2);
  border-radius: 40px;
  margin: 48px 12px;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 3px;
  border-radius: 2px;
  background: var(--grad);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 18px;
  max-width: 21ch;
}
.h2-wide { max-width: 31ch; }
.section-head { margin-bottom: 40px; }
.section-head p.lede { font-size: 1.13rem; color: var(--ink-2); max-width: 62ch; }

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  font-size: 1.25rem;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero h1 .grad-text {
  background: linear-gradient(95deg, #4d26b8 0%, #5f2eea 52%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ------------------------------------------------------------ scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .6, .2, 1), transform .7s cubic-bezier(.2, .6, .2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob { animation: none !important; }
}

/* -------------------------------------------------------------- progress bar */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 1001;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(9px);
  backdrop-filter: saturate(160%) blur(9px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .logo-dot {
  width: 26px; height: 26px;
  border-radius: 9px;
  background: var(--grad);
  display: inline-block;
  flex: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--blue-ghost); color: var(--blue); text-decoration: none; }

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 48px) 0 40px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(250, 247, 255, .46) 0%, rgba(255, 251, 237, .16) 48%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(1.5px 1.5px at 50% 50%, var(--dot-grid) 0 1px, transparent 1.5px);
  background-size: 100% 100%, 28px 28px;
  background-repeat: no-repeat, repeat;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 18%, #000 30%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 18%, #000 30%, transparent 72%);
}
.blob {
  position: absolute;
  display: none;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .55;
  z-index: -1;
  pointer-events: none;
}
.blob--1 { width: 480px; height: 480px; left: -140px; top: -80px; background: var(--blob-1); animation: drift 18s ease-in-out infinite alternate; }
.blob--2 { width: 420px; height: 420px; right: -120px; top: 40px; background: var(--blob-2); animation: drift 22s ease-in-out infinite alternate-reverse; }
.blob--3 { width: 360px; height: 360px; left: 38%; top: 380px; background: var(--blob-3); opacity: .4; animation: drift 26s ease-in-out infinite alternate; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 26px) scale(1.08); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-ghost);
  border: 1px solid var(--blue-soft);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
  max-width: 24ch;
  margin: 0 auto 18px;
}
.hero h1 .title-tail {
  display: inline-block;
  font-size: .86em;
  line-height: 1.04;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 auto 26px;
}
.hero-sub b { color: var(--ink); font-weight: 600; }

/* authors */
.authors {
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  max-width: 760px;
  margin: 0 auto 10px;
  line-height: 1.7;
}
.authors a { color: var(--ink); font-weight: 500; }
.authors a:hover { color: var(--blue); }
.authors sup { color: var(--blue); font-weight: 600; }

.affils {
  font-size: .95rem;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.affils sup { color: var(--blue); font-weight: 600; }
.author-note { font-size: .85rem; color: var(--ink-3); margin-bottom: 22px; }

/* buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  border-color: var(--ink-3);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-logo { width: 18px; height: 18px; flex: none; object-fit: contain; }
.btn--muted {
  color: #85858f;
  background: #f1f1f4;
  border-color: #dedee6;
}
.btn--muted:hover {
  color: #6d6d78;
  background: #e9e9ef;
  border-color: #d3d3dc;
  box-shadow: none;
}
.btn--primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
}
.btn--primary:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); box-shadow: 0 4px 14px rgba(95, 46, 234, .18); }

/* hero teaser */
.hero-teaser {
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: clamp(8px, 1.4vw, 14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 2px rgba(31, 35, 40, .05), 0 8px 22px rgba(31, 35, 40, .06);
}
.hero-teaser img {
  width: 100%;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-in;
}
.hero-teaser figcaption {
  max-width: 72ch;
  margin: 12px auto 0;
  color: var(--ink-3);
  font-size: .9rem;
}

/* hero video card */
.hero-media {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .56fr);
  gap: 14px 22px;
  align-items: center;
  text-align: left;
}
.hero-media .media-card {
  grid-column: 1;
  grid-row: 1 / span 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .08);
  border: 1px solid rgba(60, 64, 67, .14);
  background: #000;
}
.hero-media video { width: 100%; height: auto; }
.hero-media .chapters {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-start;
  align-self: end;
  margin-top: 0;
}
.hero-caption {
  grid-column: 2;
  grid-row: 2;
  font-size: .9rem;
  color: var(--ink-3);
  margin-top: 0;
  max-width: 34ch;
}

/* ---------------------------------------------------------------- stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.stat {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  text-align: left;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}
.stat .num small { font-size: .55em; font-weight: 600; }
.stat .label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  margin-top: 6px;
  color: var(--ink);
}
.stat .sub { font-size: .85rem; color: var(--ink-3); margin-top: 2px; }

/* ------------------------------------------------------------------ figures */
.figure-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 2.5vw, 28px);
  box-shadow: 0 1px 3px rgba(60, 64, 67, .06);
}
.figure-card img { width: 100%; border-radius: 8px; cursor: zoom-in; }
.figure-card figcaption {
  font-size: .9rem;
  color: var(--ink-3);
  margin-top: 14px;
  text-align: center;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}
.figure-card figcaption b { color: var(--ink-2); }

/* method steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  position: relative;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--blue-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 1;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.step-card .step-no {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--blue);
  background: var(--card);
  border: 1px solid var(--blue-soft);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step-card p { font-size: .94rem; color: var(--ink-2); }

/* paradigm trio */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.trio-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 20px;
  background: var(--card);
}
.trio-card.is-ours {
  border-color: var(--blue-soft);
  background: linear-gradient(180deg, var(--blue-ghost) 0%, #ffffff 100%);
}
.trio-card .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--ink-2);
  margin-bottom: 10px;
}
.trio-card.is-ours .tag { background: var(--blue); color: #fff; }
.trio-card h3 { font-size: 1rem; margin-bottom: 6px; }
.trio-card p { font-size: .9rem; color: var(--ink-2); }
.trade-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.trade-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 8px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 600;
}
.trade-icon {
  width: 22px;
  height: 22px;
  margin-top: .04em;
  flex: none;
  overflow: visible;
}
.trade-icon circle {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}
.trade-icon path {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.trade-list li.pro {
  color: var(--blue);
  font-weight: 600;
}
.trade-list li.pro .trade-icon circle {
  fill: var(--blue);
  stroke: var(--blue);
}
.trade-list li.pro .trade-icon path {
  stroke: #fff;
}

/* ------------------------------------------------------------------- tables */
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--line); }
table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 640px;
  background: var(--card);
}
table.results th, table.results td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.results th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: 0;
  color: var(--ink-2);
  background: var(--surface);
  position: sticky;
  top: 0;
}
table.results td:first-child, table.results th:first-child { text-align: left; }
table.results tbody tr:last-child td { border-bottom: none; }
table.results tbody tr { transition: background .15s ease; }
table.results tbody tr:hover { background: var(--surface); }
table.results .drop { color: var(--red); font-size: .85em; }
table.results tr.ours {
  background: var(--blue-ghost);
  font-weight: 600;
}
table.results tr.ours:hover { background: var(--blue-soft); }
table.results tr.ours td:first-child { color: var(--blue); }
table.results .best { font-weight: 700; color: var(--blue); }
.table-note { font-size: .85rem; color: var(--ink-3); margin-top: 12px; }

/* latency bars */
.latency {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.lat-row { display: grid; grid-template-columns: 168px 1fr; align-items: center; gap: 14px; }
.lat-row .who { font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: var(--ink-2); text-align: right; }
.lat-row .who small { display: block; color: var(--ink-3); font-weight: 400; font-size: .78rem; }
.lat-track { position: relative; height: 30px; }
.lat-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 8px;
  background: var(--bar-rest);
  transition: width 1.1s cubic-bezier(.2, .6, .2, 1);
  display: flex;
  align-items: center;
}
.lat-row.ours .lat-fill { background: var(--grad); }
.lat-val {
  position: absolute;
  left: calc(var(--w) + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.lat-row.ours .lat-val { color: var(--blue); }

/* two-up layouts */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 24px;
}
.duo--13 { grid-template-columns: 1.45fr 1fr; }

/* ------------------------------------------------------------------- video */
.video-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(60, 64, 67, .12);
}
.video-shell video { width: 100%; height: auto; }

.chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}
.chapter-chip {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .18s ease;
}
.chapter-chip:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--blue-ghost); }
.chapter-chip.is-active {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
}
.chapter-chip .t { opacity: .65; font-weight: 400; margin-left: 5px; font-size: .92em; }

/* ----------------------------------------------------------------- carousel */
.carousel { position: relative; }
.car-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 18px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  min-width: 0;
}
.car-slide--card { flex: 0 0 min(420px, 86%); scroll-snap-align: start; }

.car-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}
.car-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
  flex: none;
}
.car-btn:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--blue-ghost); box-shadow: var(--shadow-card); }
.car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.car-btn svg { width: 20px; height: 20px; }

.car-dots { display: flex; gap: 8px; }
.car-dot {
  width: 8px; height: 8px;
  border-radius: 100px;
  background: var(--bar-rest);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all .25s ease;
}
.car-dot.is-active { width: 26px; background: var(--blue); }

/* rollout placeholder cards */
.rollout-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.rollout-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.rollout-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 12% 8%, var(--blob-1) 0%, transparent 55%),
    radial-gradient(120% 140% at 88% 92%, var(--blob-2) 0%, transparent 55%),
    var(--surface-2);
}
.rollout-thumb video, .rollout-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rollout-thumb .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-3);
}
.rollout-thumb .placeholder .icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  box-shadow: var(--shadow-card);
}
.rollout-thumb .placeholder .icon svg { width: 22px; height: 22px; margin-left: 2px; }
.rollout-thumb .placeholder span {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}
.rollout-thumb .shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, var(--shimmer, rgba(255, 255, 255, .65)) 48%, transparent 65%);
  background-size: 220% 100%;
  animation: shimmer 2.6s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 130% 0; }
  100% { background-position: -90% 0; }
}
.rollout-body { padding: 18px 20px 20px; }
.rollout-body .suite {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-ghost);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 9px;
}
.rollout-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.rollout-body p { font-size: .88rem; color: var(--ink-3); }

/* ---------------------------------------------------- rollout explorer */
.suite-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.suite-tab {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 20px;
  cursor: pointer;
  transition: all .18s ease;
}
.suite-tab:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--blue-ghost); }
.suite-tab.is-active {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
}

.rollout-group { margin-bottom: 30px; }
.rollout-group .car-nav { margin-top: 0; }
.rollout-group--difficulty { margin-top: 4px; }
.rg-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rg-head h3 { font-size: 1.12rem; }
.rg-head p { font-size: .9rem; color: var(--ink-3); }
.difficulty-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 14px;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 500;
}
.difficulty-scale i {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 100px;
  background: linear-gradient(90deg, rgba(126, 87, 194, .22), rgba(126, 87, 194, .82));
}
.difficulty-scale i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(126, 87, 194, .82);
  border-right: 2px solid rgba(126, 87, 194, .82);
  transform: translateY(-50%) rotate(45deg);
}

.car-slide--vid { flex: 0 0 min(380px, 82%); scroll-snap-align: start; }
.rollout-thumb--wide { aspect-ratio: 2 / 1; background: #000; }
.rollout-thumb--wide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rollout-thumb--external { aspect-ratio: 1 / 1; }
.rollout-thumb--external video {
  width: 200%;
  max-width: none;
  height: 100%;
  object-fit: fill;
  object-position: left center;
}
.rollout-vbody {
  padding: 10px 16px 12px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  justify-content: space-between;
}
.rollout-vbody .vlabel { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.rollout-vbody .vsub { font-size: .8rem; color: var(--ink-3); }
.rollout-card--difficulty .vlabel { color: var(--blue); }
.vmeta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.success-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--blue-soft);
  background: var(--blue-ghost);
  color: var(--blue);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
}

/* ------------------------------------------------------------------ bibtex */
.bibtex-card {
  position: relative;
  background: #202124;
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
}
.bibtex-card pre {
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.7;
  color: #e8eaed;
  overflow-x: auto;
  white-space: pre;
}
.bibtex-card .key { color: #c4b5fd; }
.bibtex-card .field { color: var(--yellow); }
.copy-btn {
  position: absolute;
  top: 16px; right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: #e8eaed;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 100px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .2s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, .2); }
.copy-btn svg { width: 15px; height: 15px; }

/* ----------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 18, 24, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  width: auto; height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.lightbox .lb-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox .lb-cap {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  max-width: 80ch;
  text-align: center;
  padding: 0 16px;
}

/* ------------------------------------------------------------------ footer */
footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  font-size: .9rem;
  color: var(--ink-3);
}
footer .foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}
footer .nav-brand { margin-bottom: 10px; }
footer p { max-width: 64ch; }

/* ------------------------------------------------------------- theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.theme-toggle:hover { border-color: var(--blue-soft); color: var(--blue); background: var(--blue-ghost); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* dark-mode component tweaks */
html[data-theme="dark"] .trio-card.is-ours {
  background: linear-gradient(180deg, rgba(167, 139, 250, .16) 0%, rgba(167, 139, 250, .06) 100%);
  border-color: rgba(167, 139, 250, .42);
}
html[data-theme="dark"] { --shimmer: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .hero-bg {
  background:
    linear-gradient(180deg, rgba(55, 42, 83, .42) 0%, rgba(68, 55, 30, .12) 54%, rgba(21, 18, 27, 0) 100%),
    radial-gradient(1.5px 1.5px at 50% 50%, var(--dot-grid) 0 1px, transparent 1.5px);
  background-size: 100% 100%, 28px 28px;
  background-repeat: no-repeat, repeat;
}
html[data-theme="dark"] .hero-teaser {
  background: rgba(31, 25, 41, .9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .24), 0 8px 22px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .figure-card img { background: #fff; }
html[data-theme="dark"] .bibtex-card { border: 1px solid var(--line); }
html[data-theme="dark"] .btn--primary:hover { box-shadow: 0 4px 14px rgba(167, 139, 250, .18); }

/* --------------------------------------------------------------- line chart */
.line-chart { width: 100%; }
.line-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.line-chart .grid-line { stroke: var(--line); stroke-width: 1; }
.line-chart .axis-label {
  font-family: var(--font-display);
  font-size: 13px;
  fill: var(--ink-3);
}
.line-chart .axis-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  fill: var(--ink-2);
}
.line-chart .series-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-chart .series-dot { stroke: var(--card); stroke-width: 2; }
.line-chart .series--gam .series-line { stroke: var(--chart-gam); stroke-width: 3.5; }
.line-chart .series--gam .series-dot { fill: var(--chart-gam); }
.line-chart .series--pi .series-line { stroke: var(--chart-pi); }
.line-chart .series--pi .series-dot { fill: var(--chart-pi); }
.line-chart .series--cosmos .series-line { stroke: var(--chart-cosmos); }
.line-chart .series--cosmos .series-dot { fill: var(--chart-cosmos); }
.line-chart .series--rocket .series-line { stroke: var(--chart-rocket); }
.line-chart .series--rocket .series-dot { fill: var(--chart-rocket); }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 10px;
}
.chart-legend .leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.chart-legend .leg i {
  width: 18px; height: 4px;
  border-radius: 2px;
  display: inline-block;
}
.chart-legend .leg.gam { color: var(--blue); font-weight: 700; }
.chart-legend .leg.gam i { background: var(--chart-gam); }
.chart-legend .leg.pi i { background: var(--chart-pi); }
.chart-legend .leg.cosmos i { background: var(--chart-cosmos); }
.chart-legend .leg.rocket i { background: var(--chart-rocket); }

.line-chart .series--suite-spatial .series-line { stroke: var(--suite-spatial); }
.line-chart .series--suite-spatial .series-dot { fill: var(--suite-spatial); }
.line-chart .series--suite-object .series-line { stroke: var(--suite-object); }
.line-chart .series--suite-object .series-dot { fill: var(--suite-object); }
.line-chart .series--suite-goal .series-line { stroke: var(--suite-goal); }
.line-chart .series--suite-goal .series-dot { fill: var(--suite-goal); }
.line-chart .series--suite-long .series-line { stroke: var(--suite-long); }
.line-chart .series--suite-long .series-dot { fill: var(--suite-long); }

.chart-legend .leg.suite-spatial i { background: var(--suite-spatial); }
.chart-legend .leg.suite-object i { background: var(--suite-object); }
.chart-legend .leg.suite-goal i { background: var(--suite-goal); }
.chart-legend .leg.suite-long i { background: var(--suite-long); }
.suite-legend { margin: 0 0 16px; }

/* ------------------------------------------------- robustness mini grid */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 18px;
  margin-bottom: 10px;
}
.mini-chart { padding: 10px 8px 4px; border-radius: 14px; }
.mini-chart h4 {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  color: var(--ink-2);
}
.mini-chart--avg { background: var(--blue-ghost); }
.mini-chart--avg h4 { color: var(--blue); }
.mini-chart .series-line { stroke-width: 2.4 !important; }

/* ------------------------------------------------------ mixture chart */
.mixture {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px 44px;
  align-items: center;
  padding: 10px 6px;
}
.mix--oxe { stroke: var(--mix-oxe); background-color: var(--mix-oxe); }
.mix--mimicgen { stroke: var(--mix-mimicgen); background-color: var(--mix-mimicgen); }
.mix--robocasa { stroke: var(--mix-robocasa); background-color: var(--mix-robocasa); }
circle.mix--oxe, circle.mix--mimicgen, circle.mix--robocasa { background-color: transparent; }

.mix-donut svg { width: 100%; max-width: 250px; margin: 0 auto; display: block; }
.mix-center-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  fill: var(--ink);
}
.mix-center-sub { font-family: var(--font-display); font-size: 12.5px; fill: var(--ink-3); }

.mix-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; align-items: center; }
.mix-legend .leg {
  display: flex;
  gap: 9px;
  align-items: center;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  min-width: 215px;
}
.mix-legend .leg i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.mix-legend .leg b { color: var(--ink); margin-left: auto; }

.mix-bars { display: flex; flex-direction: column; gap: 5px; }
.mix-row {
  display: grid;
  grid-template-columns: 168px 1fr 40px;
  align-items: center;
  gap: 10px;
}
.mix-name {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mix-track { height: 12px; }
.mix-track i { display: block; height: 100%; width: 0; border-radius: 3px 6px 6px 3px; transition: width .9s cubic-bezier(.2, .6, .2, 1); }
.mix-bars.is-in .mix-track i { width: var(--bw); }
.mix-val { font-family: var(--font-display); font-size: .78rem; font-weight: 600; color: var(--ink-3); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps, .trio { grid-template-columns: 1fr; }
  .duo, .duo--13 { grid-template-columns: 1fr; }
  .hero-media {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-media .media-card,
  .hero-media .chapters,
  .hero-caption {
    grid-column: 1;
    grid-row: auto;
  }
  .hero-media .chapters { justify-content: center; }
  .hero-caption { max-width: 68ch; margin-left: auto; margin-right: auto; }
  .panel-grid { grid-template-columns: repeat(2, 1fr); }
  .mixture { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .section { padding: 64px 0 24px; }
  .section--tint { margin: 32px 6px; padding: 56px 0; border-radius: var(--radius-lg); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 18px 16px; border-radius: var(--radius-lg); }
  .nav-inner { padding: 0 14px; }
  .nav-links a { padding: 8px 10px; font-size: 13.5px; }
  .wrap { padding: 0 16px; }
  .btn { font-size: 14px; padding: 10px 18px; }
  .lat-row { grid-template-columns: 108px 1fr; }
  .lat-row .who { font-size: .8rem; }
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero-sub { margin-bottom: 20px; }
  .author-note { margin-bottom: 16px; }
  .btn-row { margin-bottom: 12px; }
  .car-slide--card { flex-basis: 88%; }
  .panel-grid { gap: 10px; }
  .mix-row { grid-template-columns: 118px 1fr 38px; gap: 8px; }
  .mix-name { font-size: .72rem; }
}
