/* ==========================================================================
   OdysseyArena — project page
   Light first: teal on cool paper, amber for anything that glows (a lit bulb,
   a discovered rule). Dark keeps the same roles on deep sea-green ink. The
   layout follows the sibling pages (split hero, byline, article sections,
   resources, BibTeX); the section heads, surfaces and type are this page's own.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — light (default)
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Accent: teal. The ramp runs dark to light so that 100 is always the
     strongest text colour on the current background; links use 300. */
  --accent-100: #0a464c;
  --accent-200: #0e5b62;
  --accent-300: #13757e;
  --accent-400: #1a9099;
  --accent-500: #33a9b1;
  --accent-600: #8ad2d6;

  /* Amber: lit bulbs, the inductive side, highlighted rules */
  --amber-200: #8a4d05;
  --amber-300: #b2650b;
  --amber-400: #d4800f;
  --amber-500: #ef9d23;
  --amber-600: #f8c663;

  /* Blue: the deductive side, proprietary rows */
  --blue-300: #2a5aa8;
  --blue-400: #3a74cc;
  --blue-500: #6093dd;

  /* Coral: failures, invalid actions */
  --coral-300: #a8402c;
  --coral-400: #cc5540;
  --coral-500: #e4745f;

  /* Text */
  --text-hi: #112120;
  --text: #2d403e;
  --text-dim: #586c6a;
  --text-faint: #8a9b99;

  --ok: #1a8a4f;
  --bad: #c2410c;

  /* Surfaces */
  --bg: #f4f7f6;
  --surface-1: rgba(255, 255, 255, 0.84);
  --surface-1b: rgba(250, 253, 252, 0.9);
  --surface-2: rgba(255, 255, 255, 0.96);
  --surface-3: #ffffff;
  --stage: #0d1c1f;            /* the dark screen inside the playground */
  --stage-2: #112529;

  --hairline: rgba(19, 117, 126, 0.22);
  --hairline-strong: rgba(19, 117, 126, 0.46);
  --hairline-cool: rgba(45, 64, 62, 0.14);

  --chart-grid: rgba(45, 64, 62, 0.11);
  --chart-grid-minor: rgba(45, 64, 62, 0.05);
  --chart-axis: rgba(45, 64, 62, 0.36);
  --chart-track: rgba(45, 64, 62, 0.065);
  --logo-plate: rgba(255, 255, 255, 0);

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --page: 1240px;
  --page-wide: 1400px;
  --page-hero: 1340px;
  --r-sm: 7px;
  --r: 12px;
  --r-lg: 18px;

  --shadow: 0 12px 30px -20px rgba(17, 33, 32, 0.32);
  --edge-hi: rgba(255, 255, 255, 0.95);
  --edge-lo: rgba(17, 33, 32, 0.08);
  --glow: rgba(26, 144, 153, 0.18);
  --glow-amber: rgba(239, 157, 35, 0.3);
  --noise-opacity: 0.035;
}

/* --------------------------------------------------------------------------
   2. Tokens — dark
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --accent-100: #e4f8f9;
  --accent-200: #b6ecef;
  --accent-300: #74d4da;
  --accent-400: #3dbcc5;
  --accent-500: #219ea7;
  --accent-600: #167a81;

  --amber-200: #ffe3b0;
  --amber-300: #fdd27f;
  --amber-400: #f5bb53;
  --amber-500: #e9a12d;
  --amber-600: #b7791b;

  --blue-300: #9dbdf2;
  --blue-400: #6f9ce6;
  --blue-500: #4a7fd1;

  --coral-300: #ffb3a4;
  --coral-400: #f08a75;
  --coral-500: #d9654e;

  --text-hi: #eef6f5;
  --text: #c3d0ce;
  --text-dim: #8c9e9c;
  --text-faint: #677977;

  --ok: #4fd18f;
  --bad: #ff8a66;

  --bg: #0a1416;
  --surface-1: rgba(22, 36, 39, 0.72);
  --surface-1b: rgba(16, 28, 31, 0.78);
  --surface-2: rgba(20, 33, 36, 0.94);
  --surface-3: rgba(13, 23, 26, 0.98);
  --stage: #071113;
  --stage-2: #0c1a1d;

  --hairline: rgba(116, 212, 218, 0.18);
  --hairline-strong: rgba(116, 212, 218, 0.4);
  --hairline-cool: rgba(150, 170, 168, 0.16);

  --chart-grid: rgba(150, 170, 168, 0.13);
  --chart-grid-minor: rgba(150, 170, 168, 0.06);
  --chart-axis: rgba(150, 170, 168, 0.34);
  --chart-track: rgba(150, 170, 168, 0.085);
  --logo-plate: rgba(238, 246, 245, 0.94);

  --shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.8);
  --edge-hi: rgba(255, 255, 255, 0.07);
  --edge-lo: rgba(0, 0, 0, 0.4);
  --glow: rgba(61, 188, 197, 0.22);
  --glow-amber: rgba(245, 187, 83, 0.28);
  --noise-opacity: 0.05;
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.66;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-hi);
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  line-height: 1.18;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-300); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--accent-200); }

strong, b { color: var(--text-hi); font-weight: 600; }
em { color: var(--accent-200); font-style: italic; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-200);
  background: var(--chart-track);
  border: 1px solid var(--hairline-cool);
  border-radius: 5px;
  padding: 0.08em 0.36em;
}

::selection { background: rgba(51, 169, 177, 0.28); }

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

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

.skip-link {
  position: absolute; left: 50%; top: -80px; transform: translateX(-50%);
  z-index: 200; background: var(--surface-3); color: var(--accent-300);
  border: 1px solid var(--hairline-strong); border-radius: 0 0 10px 10px;
  padding: 11px 20px; font-size: 15px; transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   4. Backdrop: paper with a teal wash on the left, amber on the right, and a
      dotted grid that fades out under the hero
   -------------------------------------------------------------------------- */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(820px 520px at 8% -6%, rgba(51, 169, 177, 0.20), transparent 64%),
    radial-gradient(760px 500px at 94% 4%, rgba(239, 157, 35, 0.16), transparent 62%),
    radial-gradient(900px 600px at 60% 100%, rgba(51, 169, 177, 0.07), transparent 66%),
    linear-gradient(180deg, #f7faf9 0%, #f4f7f6 50%, #f2f5f4 100%);
}
.cosmos::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(45, 64, 62, 0.22) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 72%);
}
.cosmos::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
}
:root[data-theme="dark"] .cosmos {
  background:
    radial-gradient(820px 520px at 8% -6%, rgba(33, 158, 167, 0.22), transparent 64%),
    radial-gradient(760px 500px at 94% 4%, rgba(233, 161, 45, 0.14), transparent 62%),
    radial-gradient(900px 600px at 60% 100%, rgba(33, 158, 167, 0.08), transparent 66%),
    linear-gradient(180deg, #0d1a1c 0%, #0a1416 50%, #091214 100%);
  box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] .cosmos::after {
  background-image: radial-gradient(rgba(150, 170, 168, 0.3) 1px, transparent 1.2px);
}

/* --------------------------------------------------------------------------
   5. Layout & section heads
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 26px; }
.wrap-wide { max-width: var(--page-wide); }

section { position: relative; }
.band { padding: 84px 0; }
.band-tight { padding: 52px 0; }

/* every band opens on a fading hairline */
main > section.band::before,
main > section.band-tight::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(1100px, 92vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--hairline-cool) 18%, var(--hairline-cool) 82%, transparent);
}
main > section:first-of-type::before { display: none; }

/* Section head: title left, summary right, both sitting on one baseline.
   The eyebrow carries the running index. */
main { counter-reset: section; }
main > section { counter-increment: section; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px 56px;
  align-items: end;
  margin: 0 0 38px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline-cool);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head .section-sub { align-self: end; }
.section-head.single { grid-template-columns: minmax(0, 1fr); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent-300);
  margin-bottom: 4px;
}
.eyebrow::before {
  content: counter(section, decimal-leading-zero);
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--amber-400);
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--chart-track);
  border: 1px solid var(--hairline-cool);
}

h2.section-title { font-size: clamp(30px, 3.6vw, 42px); margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
.section-sub { color: var(--text-dim); font-size: 16.5px; line-height: 1.6; margin: 0; text-wrap: pretty; }

/* The keyword in a title */
.accent { color: var(--accent-300); }
.amber { color: var(--amber-400); }
:root[data-theme="dark"] .amber { color: var(--amber-400); }

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.stuck {
  background: var(--surface-3);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 30px -24px rgba(17, 33, 32, 0.5);
}
.nav.stuck::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong) 30%, var(--hairline-strong) 70%, transparent);
}
.nav .wrap { max-width: var(--page-wide); display: flex; align-items: center; gap: 18px; }

.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  white-space: nowrap;
  color: var(--text-hi);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.nav.stuck .nav-brand { opacity: 1; transform: none; pointer-events: auto; }
.nav-brand img { width: 28px; height: 28px; }

.nav-links {
  margin-left: auto;
  display: flex; align-items: center; gap: 2px;
  list-style: none; padding: 0; margin-block: 0;
}
.nav-links a {
  display: block;
  padding: 7px 12px;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color 0.16s ease, background 0.16s ease;
}
.nav-links a:hover { color: var(--accent-300); background: var(--chart-track); }
.nav-links a.active { color: var(--accent-300); }

.nav-more { position: relative; }
.nav-more > button {
  appearance: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  background: none; border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}
.nav-more > button:hover,
.nav-more[data-open="true"] > button { color: var(--accent-300); background: var(--chart-track); }
.nav-more > button svg { width: 10px; height: 10px; transition: transform 0.18s ease; }
.nav-more[data-open="true"] > button svg { transform: rotate(180deg); }
.nav-more ul {
  position: absolute;
  top: calc(100% + 8px); left: 0;
  min-width: 272px;
  list-style: none;
  margin: 0; padding: 6px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  display: none;
  z-index: 30;
}
.nav-more[data-open="true"] ul { display: block; }
.nav-more ul a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
}
.nav-more ul a:hover { background: var(--chart-track); color: var(--accent-300); }
.nav-more ul a > span { display: flex; flex-direction: column; line-height: 1.3; }
.nav-more ul a small { color: var(--text-faint); font-size: 11px; }
.nav-more ul a img { flex: none; width: 28px; height: 28px; border-radius: 7px; object-fit: contain; }
:root[data-theme="dark"] .nav-more ul a img {
  background: rgba(242, 246, 252, 0.94);
  box-shadow: 0 0 0 1px var(--hairline);
  padding: 2px;
}

.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.icon-btn {
  appearance: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--hairline-cool);
  background: var(--surface-2);
  color: var(--accent-300);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.icon-btn:hover { color: var(--accent-200); border-color: var(--hairline-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; padding: 108px 0 44px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -180px -12% -60px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 58% at 76% 44%, rgba(239, 157, 35, 0.14), transparent 70%),
    radial-gradient(60% 64% at 16% 26%, rgba(51, 169, 177, 0.14), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  gap: 56px;
  align-items: center;
  max-width: var(--page-hero);
}
.hero-content { position: relative; }

.hero h1 {
  font-size: clamp(44px, 5.6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 12px;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--accent-200) 0%, var(--accent-400) 55%, var(--amber-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-hi);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.hero .venue {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-300);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero .lede { font-size: 16.5px; color: var(--text-dim); margin-bottom: 22px; max-width: 600px; text-wrap: pretty; }

.bullets { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; max-width: 620px; }
.bullets li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); line-height: 1.55; }
.bullets .b-ico {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--accent-300);
  background: var(--surface-2);
  border: 1px solid var(--hairline-cool);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo);
  margin-top: 1px;
}
.bullets .b-ico svg { width: 15px; height: 15px; }
.bullets b { color: var(--text-hi); font-weight: 600; }

.hero-art { margin: 0; min-width: 0; }
.hero-art figcaption { text-align: center; font-size: 12.5px; color: var(--text-faint); margin: 0; line-height: 1.5; }

/* --------------------------------------------------------------------------
   8. Byline
   -------------------------------------------------------------------------- */
.byline { padding: 6px 0 2px; }
.byline .panel {
  max-width: var(--page-hero);
  margin: 0 auto;
  border-top: 1px solid var(--hairline-cool);
  border-bottom: 1px solid var(--hairline-cool);
  padding: 22px 30px 20px;
  text-align: center;
}
.authors {
  max-width: 980px;
  margin: 0 auto 10px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--text-hi);
  font-weight: 450;
}
.authors a { color: inherit; }
.authors a:hover { color: var(--accent-300); }
.authors .au { white-space: nowrap; }
.authors .lead { display: inline; }
.authors .au.eq { color: var(--accent-300); font-weight: 600; }
.authors .author-mark { font-size: 0.78em; margin-left: 3px; line-height: 0; color: var(--amber-400); font-weight: 600; }
.author-legend {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 22px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.6;
}
.eq-key { color: var(--accent-300); font-weight: 600; }
.author-role { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.role-mark { color: var(--amber-400); font-weight: 600; }

/* --------------------------------------------------------------------------
   9. Buttons
   -------------------------------------------------------------------------- */
.links { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--text-hi);
  background: var(--surface-2);
  border: 1px solid var(--hairline-cool);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.btn svg, .btn .ic { width: 15px; height: 15px; flex: none; font-size: 14px; line-height: 1; }
.btn:hover { color: var(--text-hi); transform: translateY(-1px); border-color: var(--hairline-strong); }
.btn:active { transform: none; }
.btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-400), var(--accent-300));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px var(--edge-lo), 0 10px 22px -12px var(--accent-400);
  font-weight: 600;
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, var(--accent-500), var(--accent-400)); }
:root[data-theme="dark"] .btn-primary { color: #05191b; background: linear-gradient(180deg, var(--accent-300), var(--accent-500)); }
:root[data-theme="dark"] .btn-primary:hover { color: #05191b; background: linear-gradient(180deg, var(--accent-200), var(--accent-400)); }
.btn.pending {
  color: var(--text-dim);
  border-style: dashed;
  border-color: var(--hairline-strong);
  background: transparent;
  box-shadow: none;
  cursor: default;
}
.btn.pending:hover { transform: none; color: var(--text); background: var(--chart-track); }

/* --------------------------------------------------------------------------
   10. Cards, grids, overview
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--hairline-cool);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo), var(--shadow);
}
.card h3 { font-size: 20px; margin-bottom: 8px; }

.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 24px; align-items: start; }

/* the deductive / inductive comparison */
.dg-card { padding: 22px 24px 18px; }
.dg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dg-pane {
  position: relative;
  border-radius: var(--r);
  border: 1px solid var(--hairline-cool);
  background: var(--surface-1b);
  padding: 14px 14px 10px;
  overflow: hidden;
}
.dg-pane h4 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.dg-pane h4 i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dg-pane.ded h4 { color: var(--blue-300); }
.dg-pane.ded h4 i { background: var(--blue-400); }
.dg-pane.ind h4 { color: var(--amber-300); }
.dg-pane.ind h4 i { background: var(--amber-500); }
.dg-pane svg { display: block; width: 100%; height: auto; }
.dg-pane p { font-size: 13px; color: var(--text-dim); margin: 8px 0 0; line-height: 1.5; }
.dg .lbl { font: 500 11px var(--font-body); fill: var(--text-dim); }
.dg .lbl.k { fill: var(--text-hi); font-weight: 600; }
.dg .stroke { stroke: var(--text-dim); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg .ded .arc { stroke: var(--blue-400); }
.dg .ind .arc { stroke: var(--amber-500); }
.dg .arc { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 5; animation: dg-flow 1.6s linear infinite; }
@keyframes dg-flow { to { stroke-dashoffset: -22; } }
.dg .rules-doc { fill: var(--surface-3); stroke: var(--blue-400); stroke-width: 1.5; }
.dg .rules-line { stroke: var(--blue-400); stroke-width: 1.5; stroke-linecap: round; }
.dg .thought { fill: var(--surface-3); stroke: var(--amber-500); stroke-width: 1.5; stroke-dasharray: 3 3; }
.dg .thought-line { stroke: var(--amber-500); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: dg-write 6s ease-in-out infinite; }
.dg .thought-line:nth-child(2) { animation-delay: 0.9s; }
.dg .thought-line:nth-child(3) { animation-delay: 1.8s; }
@keyframes dg-write { 0%, 10% { stroke-dashoffset: 60; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 60; } }
.dg .qmark { font: 700 16px var(--font-display); fill: var(--amber-500); }
.dg .world { fill: var(--chart-track); stroke: var(--accent-400); stroke-width: 1.5; }
.dg .world-h { fill: none; stroke: var(--accent-400); stroke-width: 1; opacity: 0.7; }
.dg .bot { fill: var(--surface-3); stroke: var(--text-dim); stroke-width: 1.5; }
.dg .bot-eye { fill: var(--accent-400); }

/* capability dimensions */
.dims { display: grid; gap: 12px; }
.cap {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface-1b);
  border: 1px solid var(--hairline-cool);
}
.cap .ico {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent-300);
  background: var(--surface-3); border: 1px solid var(--hairline-cool);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo);
}
.cap .ico svg { width: 20px; height: 20px; }
.cap h3 { font-size: 16.5px; margin: 2px 0 4px; }
.cap p { font-size: 14px; color: var(--text-dim); margin: 0; line-height: 1.55; }

.contrib-card { padding: 24px 28px 22px; }
ol.contribs { counter-reset: c; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
ol.contribs li {
  counter-increment: c;
  position: relative;
  padding-left: 40px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
}
ol.contribs li::before {
  content: counter(c);
  position: absolute;
  left: 0; top: 1px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--amber-400);
  background: var(--surface-3);
  border: 1px solid var(--hairline-cool);
}
ol.contribs b { color: var(--text-hi); }
ol.contribs a { color: inherit; }
ol.contribs a b { border-bottom: 1px solid var(--hairline-strong); }
ol.contribs a:hover b { color: var(--accent-300); }

/* News */
.news-band { padding: 26px 0 0; }
.news { padding: 16px 24px; display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.news .eyebrow { margin: 0; }
.news .eyebrow::before { display: none; }
.news ul { list-style: none; padding: 0; margin: 0; font-size: 15px; line-height: 1.8; display: flex; gap: 6px 28px; flex-wrap: wrap; }
.news time { color: var(--amber-400); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; margin-right: 0.7em; }

/* --------------------------------------------------------------------------
   12. Shared widget controls
   -------------------------------------------------------------------------- */
.wt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; min-width: 32px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-cool);
  background: var(--surface-2);
  color: var(--text-hi);
  font: 500 12.5px/1 var(--font-body);
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.wt-btn:hover { border-color: var(--accent-400); color: var(--accent-200); }
.wt-btn[aria-pressed="true"], .wt-btn.active { background: var(--accent-400); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .wt-btn[aria-pressed="true"], :root[data-theme="dark"] .wt-btn.active { color: #05191b; }
.wt-btn:disabled { opacity: 0.4; pointer-events: none; }
.wt-btn svg { width: 13px; height: 13px; }
.wt-btn.amber[aria-pressed="true"] { background: var(--amber-500); color: #1a1300; }

.seg {
  display: inline-flex;
  padding: 3px; gap: 2px;
  border-radius: 999px;
  background: var(--chart-track);
  border: 1px solid var(--hairline-cool);
}
.seg button {
  appearance: none; border: 0; background: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px; font-weight: 550;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--accent-300); }
.seg button[aria-pressed="true"] { color: #fff; background: var(--accent-400); box-shadow: 0 1px 2px var(--edge-lo); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { color: #05191b; }
.seg button svg { width: 13px; height: 13px; }

.ctl-label { font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.controls .spacer { flex: 1; }

.wt-tip {
  position: fixed; z-index: 60; pointer-events: none;
  max-width: 280px; padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--surface-3);
  box-shadow: var(--shadow);
  color: var(--text); font-size: 12.5px; line-height: 1.45;
  opacity: 0; transition: opacity 0.12s ease;
}
.wt-tip.on { opacity: 1; }
.wt-tip b { color: var(--text-hi); font-weight: 600; }
.wt-tip small { color: var(--text-dim); display: block; }
.wt-note { font-size: 13px; color: var(--text-dim); margin: 12px 0 0; line-height: 1.55; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  font-family: inherit;
  font-size: 12px; font-weight: 550;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--hairline-cool);
  transition: all 0.16s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { color: var(--text-hi); border-color: var(--hairline-strong); }
.chip[aria-pressed="false"] { opacity: 0.4; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip img { width: 16px; height: 16px; border-radius: 50%; object-fit: contain; background: var(--logo-plate); }

/* --------------------------------------------------------------------------
   13. Environment walkthrough
   -------------------------------------------------------------------------- */
.ew-card { padding: 0; overflow: hidden; }
.ew-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--hairline-cool);
  background: var(--surface-1b);
}
.ew-tab {
  appearance: none; border: 0; background: transparent;
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center;
  text-align: left; padding: 14px 18px;
  font-family: inherit; color: var(--text-dim);
  cursor: pointer;
  border-right: 1px solid var(--hairline-cool);
  border-bottom: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.ew-tab:last-child { border-right: 0; }
.ew-tab:hover { background: var(--chart-track); color: var(--text-hi); }
.ew-tab[aria-selected="true"] { color: var(--text-hi); background: var(--surface-3); border-bottom-color: var(--env-c, var(--accent-400)); }
.ew-tab .ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--env-c, var(--accent-300)); background: color-mix(in srgb, var(--env-c, var(--accent-400)) 12%, transparent); }
.ew-tab .ico svg { width: 19px; height: 19px; }
.ew-tab .t { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.ew-tab .p { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.02em; display: block; margin-top: 2px; }

.ew-modebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 24px; border-bottom: 1px solid var(--hairline-cool); background: var(--surface-1b); }
.ew-modebar[hidden] { display: none; }
.ew-modelabel { font-size: 13px; color: var(--text-dim); margin-right: auto; }
.ew-playground { padding: 22px 24px 18px; }
.ew-playground[hidden], .ew-body[hidden] { display: none; }
.ew-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.ew-obs { padding: 22px 24px; border-right: 1px solid var(--hairline-cool); display: flex; flex-direction: column; }
.ew-obs .ew-h, .ew-act .ew-h { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.ew-obs .ew-h i, .ew-act .ew-h i { width: 7px; height: 7px; border-radius: 50%; background: var(--env-c, var(--accent-400)); }
.ew-screen { flex: 1; border-radius: 12px; padding: 16px 18px; background: var(--stage); color: #d7e6e4; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; min-height: 230px; position: relative; overflow: hidden; }
.ew-screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--env-c, var(--accent-400)) 18%, transparent), transparent 70%); pointer-events: none; }
.ew-screen > * { position: relative; }
.ew-screen .dim { color: rgba(215, 230, 228, 0.5); }
.ew-screen .hi { color: #ffd98a; }
.ew-screen .ok { color: #9ff0c0; }
.ew-screen .no { color: #ff9f8a; }
.ew-screen .k { color: rgba(215, 230, 228, 0.55); }
.ew-screen .row { display: flex; gap: 14px; flex-wrap: wrap; }
.ew-screen .tile { flex: 1 1 90px; padding: 9px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(215, 230, 228, 0.1); }
.ew-screen .tile .l { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(215, 230, 228, 0.5); }
.ew-screen .tile .v { font-size: 15px; color: #fff; margin-top: 2px; }
.ew-screen .tile .s { font-size: 11px; color: rgba(215, 230, 228, 0.6); }
.ew-screen .tile .v.up { color: #9ff0c0; }
.ew-screen .tile .v.dn { color: #ff9f8a; }
.ew-screen .gauge { display: grid; grid-template-columns: 64px 1fr 72px; gap: 10px; align-items: center; font-size: 12px; margin: 5px 0; }
.ew-screen .gauge .bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.ew-screen .gauge .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--env-c, var(--accent-400)); transition: width 0.4s ease; }
.ew-screen .gauge .bar i.plan { background: rgba(255, 255, 255, 0.22); }
.ew-screen .gauge .n { text-align: right; color: rgba(215, 230, 228, 0.8); }
.ew-screen .term { white-space: pre-wrap; word-break: break-word; }
.ew-screen .term .cmd { color: #9fe0e6; }
.ew-screen .term .cmd::before { content: ">>> "; color: rgba(215, 230, 228, 0.4); }
.ew-screen .mini-bulbs { display: flex; gap: 6px; justify-content: center; margin: 12px 0 10px; }
.ew-screen .mini-bulbs .mb { width: 28px; height: 36px; display: grid; place-items: center; }
.ew-screen .mini-bulbs svg { width: 24px; height: 32px; overflow: visible; }
.ew-screen .mini-bulbs .glass { fill: rgba(255, 255, 255, 0.04); stroke: rgba(215, 230, 228, 0.5); stroke-width: 1.4; }
.ew-screen .mini-bulbs .on .glass { fill: rgba(255, 199, 90, 0.8); stroke: #ffd98a; filter: drop-shadow(0 0 6px rgba(255, 199, 90, 0.9)); }
.ew-screen .mini-bulbs .base { fill: rgba(215, 230, 228, 0.2); }
.ew-screen .mini-bulbs .mi { font-size: 10px; color: rgba(215, 230, 228, 0.5); text-align: center; }
.ew-screen .state { text-align: center; color: rgba(215, 230, 228, 0.7); }
.ew-screen .news { margin-top: 10px; padding: 8px 10px; border-radius: 8px; border: 1px dashed rgba(255, 217, 138, 0.4); color: #ffd98a; font-size: 12px; }
.ew-screen .kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.ew-screen .kv .k { text-align: right; }

.ew-act { padding: 22px 24px; display: flex; flex-direction: column; }
.ew-steps { flex: 1; display: grid; gap: 6px; align-content: start; max-height: 352px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.ew-step {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid transparent;
  opacity: 0.45;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.ew-step:hover { opacity: 0.8; }
.ew-step.cur { opacity: 1; background: var(--surface-1b); border-color: var(--hairline-cool); }
.ew-step .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 600 11px var(--font-mono); color: var(--env-c, var(--accent-300)); background: color-mix(in srgb, var(--env-c, var(--accent-400)) 12%, transparent); margin-top: 1px; }
.ew-step .a { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-hi); word-break: break-word; }
.ew-step .f { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; display: flex; gap: 6px; align-items: baseline; }
.ew-step .f i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ok); position: relative; top: -1px; }
.ew-step .f .dim { color: var(--text-faint); }
.ew-step .f.no i { background: var(--bad); }
.ew-step .f.hi i { background: var(--amber-500); }
.ew-ctl { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline-cool); }
.ew-ctl .count { margin-left: auto; font: 500 12px var(--font-mono); color: var(--text-dim); }
.ew-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline-cool); background: var(--surface-1b); }
.ew-facts div { padding: 14px 20px; border-right: 1px solid var(--hairline-cool); }
.ew-facts div:last-child { border-right: 0; }
.ew-facts .l { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-bottom: 3px; }
.ew-facts .v { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.ew-facts .v code { font-size: 12px; }

/* --------------------------------------------------------------------------
   14. Benchmark: suites, flow, comparison
   -------------------------------------------------------------------------- */
.suites { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.suite { padding: 24px 26px; }
.suite .tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
.suite .tag i { width: 8px; height: 8px; border-radius: 50%; }
.suite.lite .tag { color: var(--accent-300); }
.suite.lite .tag i { background: var(--accent-400); }
.suite.chal .tag { color: var(--amber-300); }
.suite.chal .tag i { background: var(--amber-500); }
.suite h3 { font-size: 22px; margin-bottom: 8px; }
.suite p { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; margin: 0 0 14px; }
.suite dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; padding-top: 14px; border-top: 1px solid var(--hairline-cool); }
.suite dt { color: var(--text-faint); }
.suite dd { margin: 0; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.horizon { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.horizon .track { flex: 1; height: 8px; border-radius: 4px; background: var(--chart-track); position: relative; overflow: hidden; }
.horizon .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.suite.lite .horizon .track i { background: linear-gradient(90deg, var(--accent-500), var(--accent-300)); }
.suite.chal .horizon .track i { background: linear-gradient(90deg, var(--amber-500), var(--amber-300)); animation: horizon-grow 2.2s ease-out both; }
@keyframes horizon-grow { from { width: 0; } }
.horizon .lab { font: 500 12px var(--font-mono); color: var(--text-dim); flex: none; }

.bf-card { padding: 24px 28px 22px; }
.bf { display: grid; grid-template-columns: minmax(0, 0.9fr) 48px minmax(0, 1.4fr); gap: 0; align-items: stretch; }
.bf-col { display: grid; gap: 10px; align-content: start; }
.bf-node {
  padding: 13px 15px; border-radius: 12px;
  background: var(--surface-1b); border: 1px solid var(--hairline-cool);
  box-shadow: inset 0 1px 0 var(--edge-hi);
}
.bf-node h4 { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin: 0 0 3px; display: flex; align-items: center; gap: 8px; }
.bf-node h4 .k { font: 600 10.5px var(--font-mono); color: var(--amber-400); padding: 2px 6px; border-radius: 5px; background: var(--chart-track); }
.bf-node p { font-size: 12.5px; color: var(--text-dim); margin: 0; line-height: 1.5; }
.bf-node.cfg { border-color: var(--hairline); }
.bf-node .ok { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ok); margin-top: 6px; }
.bf-node .ok svg { width: 12px; height: 12px; }
.bf-arrow { display: grid; place-items: center; color: var(--accent-400); }
.bf-arrow svg { width: 26px; height: 26px; }
.bf-loop { position: relative; border-radius: 14px; border: 1px dashed var(--hairline-strong); padding: 16px 18px 14px; }
.bf-loop .ring { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; }
.bf-fn { text-align: center; padding: 12px 10px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--hairline-cool); box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo); position: relative; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.bf-fn code { font-size: 13px; color: var(--accent-200); background: none; border: 0; padding: 0; }
.bf-fn small { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.bf-fn.lit { border-color: var(--amber-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber-500) 22%, transparent), 0 0 24px -6px var(--glow-amber); }
.bf-agent { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.bf-agent > div { flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--hairline-cool); font-size: 13px; font-weight: 600; color: var(--text-hi); }
.bf-agent > div small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-faint); }
.bf-wire { display: flex; justify-content: center; margin: -4px 0 8px; }
.bf-wire svg { width: 100%; max-width: 420px; height: 34px; display: block; overflow: visible; }
.bf-wire path { fill: none; stroke: var(--accent-400); stroke-width: 1.5; stroke-dasharray: 5 5; animation: dg-flow 1.4s linear infinite; }
.bf-wire text { font: 500 10.5px var(--font-body); fill: var(--text-dim); }
.bf-out { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.bf-out span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hairline-cool); display: inline-flex; align-items: center; gap: 6px; }
.bf-out span i { width: 7px; height: 7px; border-radius: 50%; }
.bf-out .win { color: var(--ok); }
.bf-out .win i { background: var(--ok); }
.bf-out .fail { color: var(--bad); }
.bf-out .fail i { background: var(--bad); }

table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cmp th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hairline); }
table.cmp td { padding: 9px 10px; border-bottom: 1px solid var(--chart-grid); color: var(--text); }
table.cmp tr:last-child td { border-bottom: 0; }
table.cmp td.y { color: var(--ok); font-weight: 600; }
table.cmp td.n { color: var(--text-faint); }
table.cmp tr.ours td { background: color-mix(in srgb, var(--accent-400) 10%, transparent); color: var(--text-hi); font-weight: 600; }
table.cmp tr.ours td:first-child { border-radius: 8px 0 0 8px; }
table.cmp tr.ours td:last-child { border-radius: 0 8px 8px 0; }
table.cmp .pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--hairline-cool); font-size: 12px; }
table.cmp .pill.xl { color: var(--amber-300); border-color: var(--amber-500); }

/* --------------------------------------------------------------------------
   15. Charts
   -------------------------------------------------------------------------- */
.chart-card { padding: 24px 28px 20px; display: flex; flex-direction: column; }
.chart-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-head h3 { font-size: 18px; font-weight: 600; margin: 0; }
.chart-head h3::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--amber-500); margin: 0 9px 2px 0; }
.chart-note { font-size: 13.5px; color: var(--text-dim); margin: 0 0 14px; line-height: 1.55; max-width: 720px; }
.ch { position: relative; width: 100%; }
.ch svg { display: block; width: 100%; height: auto; max-width: var(--ch-w, 640px); margin: 0 auto; overflow: visible; font-family: var(--font-body); }
.ch .axis line, .ch .axis path { stroke: var(--chart-axis); }
.ch .grid line { stroke: var(--chart-grid); }
.ch .tick { font-size: 11px; fill: var(--text-dim); }
.ch .alab { font-size: 11.5px; fill: var(--text-dim); font-weight: 500; }
.ch .vlab { font-size: 10.5px; fill: var(--text-hi); font-weight: 600; }
.ch .title { font-size: 12.5px; fill: var(--text-hi); font-weight: 600; }
.ch .bar { transition: opacity 0.15s ease; }
.ch .bar:hover { opacity: 0.8; }
.ch .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: opacity 0.2s ease, stroke-width 0.2s ease; }
.ch .ln.dim { opacity: 0.18; }
.ch .ln.hot { stroke-width: 3; }
.ch .pt { transition: opacity 0.2s ease; cursor: default; }
.ch .pt.dim { opacity: 0.2; }
.ch .region { fill: var(--chart-track); stroke: none; }
.ch .region-lab { font-size: 11px; fill: var(--text-faint); font-style: italic; }
.ch .human { stroke: var(--text-dim); stroke-dasharray: 4 4; }
.ch .mlogo { pointer-events: none; }
.ch .hl { fill: var(--chart-track); }
.ch .seg-ann { font-size: 11px; fill: var(--text-dim); }
.legend-row { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-dim); }
.legend-row .li { display: inline-flex; align-items: center; gap: 7px; line-height: 1.4; }
.legend-row .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-row .sw.round { border-radius: 50%; }
.legend-row .sw.hatch { background: repeating-linear-gradient(45deg, var(--accent-400) 0 2px, transparent 2px 4px); border: 1px solid var(--accent-400); }
.ch-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-pair .ch svg { max-width: 100%; }

.findings { display: grid; gap: 12px; margin-bottom: 22px; }
.finding {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start;
  padding: 14px 18px; border-radius: var(--r);
  background: var(--surface-1b); border: 1px solid var(--hairline-cool);
  font-size: 14.5px; color: var(--text);
}
.finding .k { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--hairline-cool); font: 600 12px var(--font-mono); color: var(--amber-400); }
.finding b { display: block; color: var(--text-hi); margin-bottom: 2px; }
.finding p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.55; }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini { padding: 18px 20px 14px; }
.mini h3 { font-size: 15.5px; margin-bottom: 2px; }
.mini .sub { font-size: 12.5px; color: var(--text-dim); margin: 0 0 10px; line-height: 1.5; }
.mini .ch svg { max-width: 100%; }

/* --------------------------------------------------------------------------
   16. Leaderboard
   -------------------------------------------------------------------------- */
.table-shell { border: 1px solid var(--hairline-cool); border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-3);
  color: var(--text-dim);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  user-select: none;
}
table.data thead tr.group th { text-align: center; color: var(--text-hi); padding-bottom: 5px; border-bottom: 0; font-size: 11.5px; letter-spacing: 0.05em; text-transform: none; }
table.data thead tr.group th .env-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { color: var(--accent-300); }
table.data thead th .arrow { opacity: 0.26; margin-left: 5px; font-size: 9px; }
table.data thead th[aria-sort] .arrow { opacity: 1; color: var(--accent-300); }
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 16px; }
table.data td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--chart-grid); color: var(--text); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.14s ease; }
table.data tbody tr:hover { background: var(--chart-track); }
table.data tbody tr.prop { background: color-mix(in srgb, var(--blue-400) 7%, transparent); }
table.data tbody tr.prop:hover { background: color-mix(in srgb, var(--blue-400) 12%, transparent); }
table.data tbody tr.human { background: color-mix(in srgb, var(--amber-500) 10%, transparent); font-weight: 600; }
table.data tbody tr.human td { border-bottom: 1px solid var(--hairline); color: var(--text-hi); }
table.data td.best { color: var(--accent-300); font-weight: 700; }
table.data .rank { color: var(--text-faint); font-family: var(--font-mono); font-size: 11.5px; width: 30px; padding-right: 0; text-align: right; }
.model-cell { display: flex; align-items: center; gap: 9px; }
.model-cell .nm { color: var(--text-hi); font-weight: 500; }
.model-cell img { width: 20px; height: 20px; object-fit: contain; flex: none; border-radius: 50%; padding: 2px; background: var(--logo-plate); box-shadow: 0 0 0 1px var(--hairline-cool); }
.model-cell .hu { width: 20px; height: 20px; display: grid; place-items: center; color: var(--amber-400); }
.model-cell .hu svg { width: 16px; height: 16px; }
.tag { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; padding: 2px 6px; border-radius: 5px; border: 1px solid transparent; }
.tag.closed { color: var(--blue-300); border-color: color-mix(in srgb, var(--blue-400) 40%, transparent); }
.tag.open { color: var(--text-faint); border-color: var(--hairline-cool); }
.cellbar { position: relative; display: inline-block; min-width: 46px; text-align: right; }
.cellbar i { position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--accent-400); opacity: 0.6; border-radius: 2px; transform-origin: left; }
.lb-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); margin-top: 12px; }
.lb-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lb-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.lb-legend .p { background: color-mix(in srgb, var(--blue-400) 22%, transparent); }
.lb-legend .h { background: color-mix(in srgb, var(--amber-500) 32%, transparent); }

/* --------------------------------------------------------------------------
   17. Resources & BibTeX
   -------------------------------------------------------------------------- */
.feature { padding: 22px 22px; }
.feature .ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 14px; background: var(--surface-3); border: 1px solid var(--hairline-cool); color: var(--accent-300); box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--edge-lo); }
.feature .ico svg { width: 19px; height: 19px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--text-dim); margin: 0; line-height: 1.55; }
a.card.feature { transition: transform 0.16s ease, border-color 0.18s ease; }
a.card.feature:not(.pending-card):hover { transform: translateY(-3px); border-color: var(--hairline-strong); }
.pending-card { cursor: default; }
.pending-card .ico { opacity: 0.65; }
.pending-card .soon { font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; font-weight: 600; color: var(--amber-400); border: 1px dashed var(--hairline-strong); border-radius: 6px; padding: 3px 8px; }

.bibtex { position: relative; background: var(--surface-2); border: 1px solid var(--hairline-cool); border-radius: var(--r); overflow: hidden; }
.bibtex-bar { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--hairline-cool); background: var(--chart-track); }
.bibtex-bar .dots { display: flex; gap: 6px; }
.bibtex-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline-cool); }
.bibtex-bar .fn { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.copy-btn { margin-left: auto; appearance: none; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--accent-300); background: transparent; border: 1px solid var(--hairline-strong); border-radius: 7px; padding: 5px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.16s ease; }
.copy-btn:hover { background: var(--chart-track); color: var(--accent-200); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }
.bibtex pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.68; color: var(--text); }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
footer.site { position: relative; border-top: 1px solid var(--hairline-cool); padding: 46px 0 38px; margin-top: 30px; }
footer.site .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; margin-bottom: 28px; }
footer.site h2 { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent-300); margin-bottom: 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.95; }
footer.site ul a { color: var(--text-dim); }
footer.site ul a:hover { color: var(--accent-300); }
footer.site .brand-line { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text-hi); margin-bottom: 9px; }
footer.site .brand-line img { width: 32px; height: 32px; }
footer.site .fine { font-size: 12.5px; color: var(--text-faint); padding-top: 20px; border-top: 1px solid var(--hairline-cool); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer.site .fine a { color: var(--text-dim); }

/* --------------------------------------------------------------------------
   19. Reveal-on-scroll (scoped to .js so the page reads without scripts)
   -------------------------------------------------------------------------- */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity 0.5s cubic-bezier(0.22, 0.68, 0.35, 1), transform 0.5s cubic-bezier(0.22, 0.68, 0.35, 1); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .band { padding: 60px 0; }
  .br-lg { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .hero { padding: 90px 0 34px; }
  .hero-split { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { max-width: 620px; margin: 0 auto; width: 100%; }
  .nav-links {
    position: absolute;
    top: 60px; left: 12px; right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 14px;
    background: var(--surface-3);
    border: 1px solid var(--hairline);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-more ul { position: static; min-width: 0; margin-top: 2px; box-shadow: none; backdrop-filter: none; }
  .nav-toggle { display: grid; }
  .nav-tools { margin-left: auto; }
  .nav-brand { opacity: 1; transform: none; pointer-events: auto; font-size: 16px; }
  .nav-brand img { width: 26px; height: 26px; }
  .card { padding: 22px 18px; }
  .chart-card { padding: 20px 14px 16px; }
  .dg { grid-template-columns: 1fr; }
  .ew-tabs { grid-template-columns: repeat(2, 1fr); }
  .ew-tab { border-bottom: 1px solid var(--hairline-cool); }
  .ew-tab:nth-child(even) { border-right: 0; }
  .ew-body { grid-template-columns: 1fr; }
  .ew-obs { border-right: 0; border-bottom: 1px solid var(--hairline-cool); }
  .ew-facts { grid-template-columns: 1fr; }
  .ew-facts div { border-right: 0; border-bottom: 1px solid var(--hairline-cool); }
  .suites { grid-template-columns: 1fr; }
  .bf { grid-template-columns: 1fr; }
  .bf-arrow { transform: rotate(90deg); padding: 6px 0; }
  .ch-pair { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; gap: 24px; }
  .byline { text-align: left; }
  .authors { text-align: left; }
  .author-legend { justify-content: flex-start; gap: 6px 18px; }
}

@media (max-width: 620px) {
  .authors { font-size: 15px; line-height: 1.9; }
  .seg { flex-wrap: wrap; border-radius: 16px; }
  .controls { gap: 8px; }
  .btn { height: 38px; padding: 0 15px; font-size: 13.5px; }
  .bf-loop .ring { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .cosmos, .nav { display: none !important; }
  body { background: #fff; color: #111; }
  .card, .chart-card { border-color: #ccc; background: #fff; box-shadow: none; }
}
