/* ==========================================================================
   RELAY — Readout-Driven Early Stopping and Visual Relay
   Editorial Visual System inspired by SolarRenderer (Show Lab, NUS)
   ========================================================================== */

:root {
  --ink: #13232b;
  --ink-2: #44555d;
  --ink-3: #7a878c;
  --muted: var(--ink-3);
  --paper: #ffffff;
  --paper-2: #f5f7f9;
  --card: #ffffff;
  --line: #e0e5e9;
  --night: #0c1418;
  --night-2: #13212a;
  --night-3: #192b36;
  --ivory: #f4efe4;
  --ivory-2: #efe7d6;
  --gold: #d9a548;
  --c-input: #b58a38;
  --teal: #5fbfae;
  --c-persist: #388f80;
  --blue: #2866a8;
  --verm: #d55e00;
  --verm-soft: #fdf1e8;

  --sans: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Inter", "Mulish", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --content: 1120px;
  --wide: 1280px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  line-height: 1.65;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #3689b0;
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
::selection { background: #f3dfae; color: var(--ink); }

.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;
}

.content-width { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.wide-width { width: min(var(--wide), calc(100% - 48px)); margin-inline: auto; }
.head-row > *,
.sim-cards > *,
.sim-lanes > *,
.bento > *,
.case-inspector > *,
.method-grid > *,
.sens-controls-bar > *,
.sens-charts-grid > *,
.eff-grid > *,
.code-cite-grid > *,
.footer-main > * {
  min-width: 0;
}
.lb-panel, .code-panel, .citation-panel, .pareto-panel, .sens-card, .sim-stage, .case-inspector {
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   Typography & Editorial Rhythm
   -------------------------------------------------------------------------- */
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}
h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--c-persist);
}
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.018em;
}

.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-input);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.dark-section .kicker { color: var(--gold); }
.dark-section {
  background: var(--night);
  color: var(--ivory-2);
}
.dark-section h2 { color: var(--ivory); }
.dark-section h2 em { color: var(--gold); }
.dark-section .head-row > p,
.dark-section .head-row > div > p { color: rgba(239, 231, 214, 0.74); }

.head-row {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 52px;
  align-items: end;
  margin-bottom: 44px;
}
.head-row > p, .head-row > div > p {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.head-row > p:last-child, .head-row > div > p:last-child { margin-bottom: 0; }
.lead {
  font-size: 20px !important;
  line-height: 1.55 !important;
  color: var(--ink) !important;
  font-weight: 500;
}
.dark-section .lead { color: var(--ivory) !important; }

.paper-body {
  position: relative;
  background: var(--paper);
}
.paper-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.30 0 0 0 0 0.22 0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.paper-body > * { position: relative; z-index: 1; }

.block { padding: 88px 0; }
.band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Sticky Morphing Glassmorphic Header
   -------------------------------------------------------------------------- */
.site-header {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(28px, calc((100vw - 1400px) / 2));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.site-header.is-dark {
  background: rgba(12, 20, 24, 0.78);
  color: var(--ivory);
  border-color: rgba(255, 255, 255, 0.08);
}
.site-header.is-dark.is-top {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  flex-shrink: 0;
}
.wordmark svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-header nav a {
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.2s, background 0.2s;
  white-space: nowrap;
}
.site-header nav a:hover,
.site-header nav a.active {
  opacity: 1;
  background: rgba(127, 127, 127, 0.16);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-institutions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-swap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 30px;
}
.nav-logo-swap img {
  height: 30px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.3s;
}
.nav-logo-swap .logo-dark { display: none; }
.site-header.is-dark .nav-logo-swap .logo-light { display: none; }
.site-header.is-dark .nav-logo-swap .logo-dark { display: block; }
.nav-divider {
  width: 1px;
  height: 20px;
  background: currentColor;
  opacity: 0.22;
}

.nav-paper {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: transform 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-paper:hover { transform: translateY(-1px); }
.site-header.is-dark .nav-paper {
  background: rgba(244, 239, 228, 0.1);
  color: var(--ivory);
  border-color: rgba(244, 239, 228, 0.28);
}
.site-header.is-dark .nav-paper:hover {
  background: var(--ivory);
  color: var(--night);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px 8px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Hero Section (Dark Night + Ambient Neural Token/Visual Relay Canvas)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 680px;
  padding: 108px 0 112px;
  margin-top: -64px;
  background: var(--night);
  color: var(--ivory);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.92;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 62% 54% at 50% 45%, rgba(12, 20, 24, 0.42), rgba(12, 20, 24, 0.78) 64%, rgba(12, 20, 24, 0.94)),
    linear-gradient(180deg, rgba(12, 20, 24, 0.72) 0%, rgba(12, 20, 24, 0) 20%, rgba(12, 20, 24, 0) 76%, var(--night) 100%);
}

.hero-copy {
  position: relative;
  text-align: center;
  padding: 0 24px;
  width: 100%;
  max-width: 1040px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px;
  border: 1px solid rgba(95, 191, 174, 0.36);
  border-radius: 999px;
  background: rgba(95, 191, 174, 0.08);
  margin-bottom: 18px;
}
.hero-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(68px, 11.5vw, 148px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 6px 0 18px;
  color: #f8f5ee;
}
.hero h1 span {
  background: linear-gradient(120deg, #f3cf83, var(--gold) 44%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 31px);
  line-height: 1.38;
  letter-spacing: -0.01em;
  max-width: 820px;
  margin: 0 auto 22px;
  color: var(--ivory-2);
}

.hero-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 16px;
  font-weight: 600;
  margin: 0 auto 12px;
  max-width: 860px;
}
.hero-authors a {
  text-decoration: none;
  color: var(--ivory);
  border-bottom: 1px solid rgba(244, 239, 228, 0.22);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.hero-authors a:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.hero-authors sup {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--teal);
  margin-left: 2px;
}

.hero-affils {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin: 0 auto 28px;
}
.hero-affils span {
  font-size: 13px;
  color: rgba(239, 231, 214, 0.78);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 231, 214, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.hero-affils sup {
  font-family: var(--mono);
  color: var(--gold);
  margin-right: 4px;
}

.hero-btns {
  display: flex;
  gap: 11px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.hbtn:hover { transform: translateY(-2px); }
.hbtn svg { width: 17px; height: 17px; flex-shrink: 0; }
.hbtn-solid {
  background: #f8f5ee;
  color: var(--night);
}
.hbtn-solid:hover { background: #ffffff; }
.hbtn-accent {
  background: rgba(95, 191, 174, 0.16);
  border-color: rgba(95, 191, 174, 0.45);
  color: #d7f5ef;
}
.hbtn-accent:hover { background: rgba(95, 191, 174, 0.28); }
.hbtn-glass {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: var(--ivory);
}
.hbtn-glass:hover { background: rgba(255, 255, 255, 0.15); }
.hbtn-soon {
  border-color: rgba(217, 165, 72, 0.36);
  background: rgba(217, 165, 72, 0.09);
}
.hbtn-soon:hover { background: rgba(217, 165, 72, 0.18); }
.hbtn-soon-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 165, 72, 0.2);
  color: #f3d28e;
  letter-spacing: 0.03em;
}

.hero-logos {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(12, 20, 24, 0.52);
  backdrop-filter: blur(8px);
}
.hero-logos img { height: 34px; width: auto; object-fit: contain; }
.hero-logos .logo-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.2); }

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 32px;
  font-size: 12.5px;
  color: rgba(244, 239, 228, 0.62);
}
.hero-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta b { color: var(--teal); font-weight: 600; }

.hero-cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  text-decoration: none;
  color: rgba(244, 239, 228, 0.7);
}
.hero-cue i {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--teal), transparent);
  animation: heroCue 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes heroCue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

.hero-pause {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ivory);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.hero-pause:hover { background: rgba(255, 255, 255, 0.18); }
.hero-pause svg { width: 14px; height: 14px; fill: currentColor; }

/* --------------------------------------------------------------------------
   Section 1: Live Paradigm & Trajectory Simulator (.dark-section)
   -------------------------------------------------------------------------- */
.sim-section {
  padding: 56px 0 92px;
  background: linear-gradient(180deg, var(--night) 0%, #0f1b22 50%, var(--night) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.sim-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(239, 231, 214, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.sim-card:hover {
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-2px);
}
.sim-card.on {
  border-color: var(--gold);
  background: rgba(217, 165, 72, 0.09);
  box-shadow: 0 14px 34px -20px rgba(217, 165, 72, 0.45);
}
.sim-card img {
  width: 96px;
  height: 70px;
  object-fit: cover;
  border-radius: 9px;
  background: #1a272e;
}
.sim-card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 5px;
}
.tag-teal { background: rgba(95, 191, 174, 0.18); color: var(--teal); }
.tag-gold { background: rgba(217, 165, 72, 0.2); color: #f3cf83; }
.tag-blue { background: rgba(98, 160, 234, 0.2); color: #8ec5ff; }
.tag-verm { background: rgba(213, 94, 0, 0.22); color: #ff9c57; }
.sim-card b { display: block; font-size: 14.5px; color: var(--ivory); line-height: 1.25; }
.sim-card small { display: block; font-size: 12.5px; color: rgba(239, 231, 214, 0.65); margin-top: 3px; line-height: 1.35; }

.sim-stage {
  background: var(--night-2);
  border: 1px solid rgba(239, 231, 214, 0.14);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 36px 80px -36px rgba(0, 0, 0, 0.72);
}

.sim-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 20px;
}
.sim-query-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.sim-thumb-wrap {
  position: relative;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.sim-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0c1418;
}
.sim-crop-preview {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--gold);
  opacity: 0.22;
  transform: scale(0.9);
  transition: opacity 0.45s, transform 0.45s, box-shadow 0.45s;
}
.sim-crop-preview.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 22px rgba(217, 165, 72, 0.45);
}
.sim-crop-preview img { width: 100%; height: 100%; object-fit: cover; }
.sim-crop-preview span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
  background: rgba(12, 20, 24, 0.85);
  color: var(--gold);
  padding: 2px;
}

.sim-query-text small {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--teal);
  display: block;
  margin-bottom: 4px;
}
.sim-query-text p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ivory);
  line-height: 1.45;
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sim-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 231, 214, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}
.sim-btn:hover { background: rgba(255, 255, 255, 0.14); }
.sim-btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}
.sim-btn-primary:hover { background: #e5b762; }
.sim-btn.on {
  background: rgba(95, 191, 174, 0.2);
  border-color: var(--teal);
  color: var(--teal);
}

.sim-scrubber {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(239, 231, 214, 0.72);
}
.sim-scrubber input[type="range"] {
  flex: 1;
  accent-color: var(--teal);
  cursor: pointer;
}
.sim-cache-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(95, 191, 174, 0.12);
  border: 1px solid rgba(95, 191, 174, 0.34);
  color: var(--teal);
  font-size: 11.5px;
  white-space: nowrap;
}
.sim-cache-pill i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
}

.sim-lanes {
  display: grid;
  gap: 16px;
}
.sim-lane {
  background: rgba(12, 20, 24, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color 0.3s;
}
.sim-lane.lane-relay {
  border-color: rgba(95, 191, 174, 0.38);
  background: linear-gradient(180deg, rgba(95, 191, 174, 0.07), rgba(12, 20, 24, 0.65));
}
.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lane-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.lane-title strong { font-size: 15px; color: var(--ivory); }
.lane-title small { font-size: 12.5px; color: rgba(239, 231, 214, 0.6); }
.lane-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
}
.lane-tok { color: var(--ivory); font-weight: 600; }
.lane-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-running { background: rgba(255, 255, 255, 0.09); color: rgba(239, 231, 214, 0.72); }
.badge-ok { background: rgba(95, 191, 174, 0.22); color: #8be6d5; border: 1px solid rgba(95, 191, 174, 0.45); }
.badge-bad { background: rgba(213, 94, 0, 0.24); color: #ffab6e; border: 1px solid rgba(213, 94, 0, 0.48); }
.badge-save { background: rgba(217, 165, 72, 0.2); color: #f6d58f; }

.lane-track-wrap {
  position: relative;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.lane-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  transition: width 0.08s linear;
  border-right: 1px solid rgba(12, 20, 24, 0.45);
}
.seg-latent { background: linear-gradient(90deg, #64748b, #7d8fa6); color: #fff; }
.seg-gen-bad { background: linear-gradient(90deg, #b85422, #d55e00); color: #fff; }
.seg-gen-warn { background: linear-gradient(90deg, #9d7a36, #d9a548); color: #1f1404; }
.seg-gen-good { background: linear-gradient(90deg, #2d7a6d, #5fbfae); color: #08201b; }
.seg-probe { background: #f3cf83; color: #2b1d04; }
.seg-perceiver { background: #d9a548; color: #1c1304; }
.seg-quickcheck { background: #72e0cc; color: #06211c; }
.seg-verifier { background: linear-gradient(90deg, #2866a8, #4d94e0); color: #fff; }

.lane-markers {
  position: relative;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.probe-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(239, 231, 214, 0.55);
  opacity: 0.35;
  transform: translateY(3px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s, background 0.3s;
}
.probe-chip.fired {
  opacity: 1;
  transform: none;
  color: var(--ivory);
}
.probe-chip.fired.st-stop { border-color: var(--teal); background: rgba(95, 191, 174, 0.16); color: #b7f5e9; }
.probe-chip.fired.st-reset { border-color: var(--gold); background: rgba(217, 165, 72, 0.18); color: #fae0a5; }
.probe-chip.fired.st-mismatch { border-color: #6ab0f3; background: rgba(40, 102, 168, 0.24); color: #b9dcff; }

.lane-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(239, 231, 214, 0.72);
  line-height: 1.5;
}

.sim-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(239, 231, 214, 0.68);
}
.sim-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sim-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* --------------------------------------------------------------------------
   Section 2: Overview, Headline Stats & Empirical Motivation Bento
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -26px rgba(19, 35, 43, 0.34);
}
.stat-card strong {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 2.05vw, 29px);
  letter-spacing: -0.035em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--c-persist);
}
.stat-card.accent-gold strong { color: var(--c-input); }
.stat-card.accent-blue strong { color: var(--blue); }
.stat-card span {
  display: block;
  margin-top: 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.stat-card small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.finding {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.finding:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -30px rgba(19, 35, 43, 0.32);
}
.finding-hero {
  grid-column: 1 / -1;
  background: var(--night);
  color: var(--ivory-2);
  border-color: transparent;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: center;
  gap: 42px;
}
.finding-idx {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.finding-hero .finding-idx { color: var(--gold); }
.finding h3 { font-size: 24px; line-height: 1.22; margin: 10px 0 12px; }
.finding-hero h3 { font-size: clamp(25px, 2.5vw, 32px); color: var(--ivory); }
.finding p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.68; }
.finding-hero p { color: rgba(239, 231, 214, 0.78); }

.tier-bars { display: grid; gap: 14px; }
.tier-row {
  display: grid;
  grid-template-columns: 155px 1fr 78px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.tier-row .track {
  height: 11px;
  border-radius: 99px;
  background: rgba(239, 231, 214, 0.14);
  overflow: hidden;
}
.finding:not(.finding-hero) .tier-row .track { background: var(--paper-2); }
.tier-row i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--c, var(--teal));
  width: 0;
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}
.in .tier-row i { width: var(--w); }
.tier-row b { font-family: var(--mono); font-weight: 600; text-align: right; }

.big-metric {
  font-family: var(--mono);
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c-persist);
  margin-bottom: 10px;
}
.big-metric.gold { color: var(--c-input); }
.big-metric small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.scope-footnote {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 12px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Section 3: Interactive Verified Case Explorer with Crop Loupe (.dark-section)
   -------------------------------------------------------------------------- */
.case-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.case-filters button {
  border: 1px solid rgba(239, 231, 214, 0.2);
  background: transparent;
  color: var(--ivory-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.case-filters button:hover { border-color: rgba(239, 231, 214, 0.52); }
.case-filters button[aria-selected="true"] {
  background: var(--ivory-2);
  color: var(--night);
  border-color: var(--ivory-2);
}
.case-filters button.filter-boundary[aria-selected="true"] {
  background: var(--verm);
  border-color: var(--verm);
  color: #fff;
}

.case-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.case-thumb-btn {
  position: relative;
  border: 1px solid rgba(239, 231, 214, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 8px;
  text-align: left;
  color: var(--ivory);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.case-thumb-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.08); }
.case-thumb-btn.active {
  border-color: var(--gold);
  background: rgba(217, 165, 72, 0.12);
}
.case-thumb-btn.hidden { display: none; }
.case-thumb-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 7px;
  background: #14222a;
}
.case-thumb-btn span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.case-thumb-btn small {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(239, 231, 214, 0.6);
  margin-top: 2px;
}

.case-inspector {
  display: grid;
  grid-template-columns: 1.02fr 1.15fr;
  gap: 28px;
  background: var(--night-2);
  border: 1px solid rgba(239, 231, 214, 0.14);
  border-radius: 22px;
  padding: 28px;
}

.case-visual-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-view-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.view-mode-pills {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.view-mode-pills button {
  border: 0;
  background: transparent;
  color: rgba(239, 231, 214, 0.72);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.view-mode-pills button.active {
  background: var(--gold);
  color: var(--night);
}
.view-mode-pills button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.case-canvas-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #080f13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 14px;
  cursor: crosshair;
}
.case-img-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.case-img-frame img {
  max-height: 340px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
}
.case-bbox {
  position: absolute;
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(8, 15, 19, 0.42), 0 0 18px rgba(217, 165, 72, 0.6);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.25s;
}
.case-bbox-tag {
  position: absolute;
  top: -24px;
  left: -2px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  background: var(--gold);
  color: var(--night);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.case-loupe {
  position: absolute;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  border: 2.5px solid var(--teal);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), inset 0 0 0 2px rgba(12, 20, 24, 0.5);
  pointer-events: none;
  display: none;
  background-repeat: no-repeat;
  z-index: 10;
}
.case-loupe-hint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(239, 231, 214, 0.58);
  text-align: center;
}

.case-detail-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.case-title {
  font-size: 24px;
  line-height: 1.22;
  color: var(--ivory);
  margin: 4px 0 2px;
}
.case-backbone {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(239, 231, 214, 0.62);
}
.case-qbox {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
}
.case-qbox p { margin: 0 0 8px; font-size: 14.5px; font-weight: 700; color: var(--ivory); }
.case-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.case-opt {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(239, 231, 214, 0.8);
}
.case-opt.gt {
  background: rgba(95, 191, 174, 0.22);
  color: #9bf0e0;
  border: 1px solid rgba(95, 191, 174, 0.45);
}

.case-readout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.case-ro-pill {
  flex: 1 1 160px;
  background: rgba(12, 20, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 10px 12px;
}
.case-ro-pill small { display: block; font-family: var(--mono); font-size: 11px; color: var(--gold); }
.case-ro-pill strong { display: block; font-family: var(--mono); font-size: 14px; color: var(--ivory); margin: 2px 0; }
.case-ro-pill span { display: block; font-size: 12px; color: rgba(239, 231, 214, 0.68); }

.case-compare-grid {
  display: grid;
  gap: 12px;
}
.case-outcome-card {
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.case-outcome-card.tone-good {
  background: rgba(95, 191, 174, 0.1);
  border-color: rgba(95, 191, 174, 0.36);
}
.case-outcome-card.tone-bad {
  background: rgba(213, 94, 0, 0.11);
  border-color: rgba(213, 94, 0, 0.38);
}
.case-outcome-card.tone-warn {
  background: rgba(217, 165, 72, 0.1);
  border-color: rgba(217, 165, 72, 0.35);
}
.case-outcome-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.case-outcome-head strong { font-size: 14px; color: var(--ivory); }
.case-outcome-head em { font-style: normal; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.tone-good .case-outcome-head em { color: var(--teal); }
.tone-bad .case-outcome-head em { color: #ff9c57; }
.tone-warn .case-outcome-head em { color: var(--gold); }
.case-outcome-tok {
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(239, 231, 214, 0.65);
  margin-bottom: 6px;
}
.case-outcome-card p { margin: 0; font-size: 13.5px; color: rgba(239, 231, 214, 0.86); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Section 4: Method Explorer & Interactive Stage-1 Sensitivity Curve (.band)
   -------------------------------------------------------------------------- */
.method-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 48px;
}
.method-fig-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 48px -36px rgba(19, 35, 43, 0.3);
}
.method-fig-card img {
  width: 100%;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.25s;
}
.method-fig-card img:hover { transform: scale(1.01); }
.method-fig-cap {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.method-inspector {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}
.method-node-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}
.method-node-pills button {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.method-node-pills button:hover { border-color: var(--ink-3); color: var(--ink); }
.method-node-pills button.active {
  background: var(--night);
  border-color: var(--night);
  color: var(--ivory);
}

.method-detail-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.method-stage-label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-persist);
  margin-bottom: 6px;
}
.method-detail-box h3 { font-size: 21px; margin: 0 0 12px; }
.method-formula {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--night);
  color: #f3dfae;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.method-cost-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 143, 128, 0.12);
  color: var(--c-persist);
  margin-bottom: 12px;
}
.method-detail-box p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 10px; }
.method-why {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13.5px !important;
  color: var(--ink) !important;
  margin-bottom: 0 !important;
}

/* Interactive Stage-1 Sensitivity Explorer */
.sens-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: 0 28px 56px -40px rgba(19, 35, 43, 0.28);
}
.sens-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sens-header h3 { font-size: 22px; margin: 0 0 4px; }
.sens-header p { margin: 0; font-size: 14.5px; color: var(--ink-2); max-width: 640px; }
.sens-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pair-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.2s;
}
.pair-toggle i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pair-toggle.active {
  background: var(--card);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 6px 16px -10px rgba(19, 35, 43, 0.45);
}

.sens-controls-bar {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.slider-wrap label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.slider-wrap label strong {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--c-persist);
}
.slider-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--c-persist);
}
.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}
.sens-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sens-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.sens-kpi small { display: block; font-size: 11.5px; color: var(--ink-3); }
.sens-kpi strong { display: block; font-family: var(--mono); font-size: 19px; color: var(--ink); margin-top: 2px; }
.sens-kpi span { display: block; font-family: var(--mono); font-size: 11px; color: var(--c-persist); }

.sens-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chart-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 10px;
}
.chart-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chart-box-title small { font-family: var(--mono); font-weight: 500; color: var(--ink-3); }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* --------------------------------------------------------------------------
   Section 5: Interactive Accuracy–Cost Pareto Frontier & Leaderboard
   -------------------------------------------------------------------------- */
.suite-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.suite-tab {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}
.suite-tab:hover { border-color: var(--ink-3); color: var(--ink); }
.suite-tab.active {
  background: var(--night);
  border-color: var(--night);
  color: var(--ivory);
}

.pareto-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: 0 28px 58px -42px rgba(19, 35, 43, 0.3);
}
.pareto-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pareto-head h3 { font-size: 20px; margin: 0 0 3px; }
.pareto-head small { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.pareto-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--ink-2);
}
.pareto-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pareto-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.pareto-svg-wrap { position: relative; }
.pareto-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--night);
  color: var(--ivory);
  border: 1px solid rgba(239, 231, 214, 0.22);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 280px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s, transform 0.16s;
  z-index: 20;
}
.pareto-tooltip.show { opacity: 1; transform: none; }
.pareto-tooltip strong { display: block; color: var(--gold); font-size: 13.5px; margin-bottom: 3px; }
.pareto-tooltip .tt-mono { font-family: var(--mono); color: var(--teal); font-size: 12px; }

.scope-banner {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--paper-2);
  border-left: 3px solid var(--c-input);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.58;
}
.scope-banner strong { color: var(--ink); }

/* Leaderboard Table (SolarRenderer styling) */
.lb-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 26px 56px -42px rgba(19, 35, 43, 0.3);
}
.lb-scroll { overflow-x: auto; }
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.lb-table th {
  text-align: left;
  padding: 13px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  user-select: none;
}
.lb-table th.sortable { cursor: pointer; transition: color 0.15s; }
.lb-table th.sortable:hover { color: var(--ink); }
.lb-table th.sort-active { color: var(--c-persist); }
.lb-table th .sort-ind { margin-left: 4px; opacity: 0.5; font-size: 10px; }
.lb-table th.sort-active .sort-ind { opacity: 1; }
.lb-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #eef1f4;
  vertical-align: middle;
}
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table tbody tr { transition: background 0.15s; }
.lb-table tbody tr:hover { background: #f6f9fb; }
.lb-table tbody tr.row-ours {
  background: linear-gradient(90deg, rgba(95, 191, 174, 0.14), rgba(95, 191, 174, 0.04) 65%, transparent);
}
.lb-table tbody tr.row-ours td:first-child { font-weight: 800; color: #114b42; }
.lb-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.lb-num.best { font-weight: 800; color: var(--c-persist); }
.lb-method-note { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.lb-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-good { background: rgba(56, 143, 128, 0.13); color: #1b6b5d; }
.pill-warn { background: rgba(213, 94, 0, 0.11); color: #a84900; }
.pill-neutral { background: var(--paper-2); color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Section 6: B200 Speedup, Execution Paths & Ablation Study (.band)
   -------------------------------------------------------------------------- */
.eff-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 24px;
  margin-bottom: 28px;
}
.eff-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
}
.eff-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.eff-card-head h3 { font-size: 19px; margin: 0; }

.mini-pills {
  display: inline-flex;
  gap: 4px;
  background: var(--paper-2);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.mini-pills button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  transition: all 0.18s;
}
.mini-pills button.active {
  background: var(--night);
  color: var(--ivory);
}

.lat-bars { display: grid; gap: 15px; }
.lat-row { display: grid; gap: 6px; }
.lat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.lat-row-top strong { font-weight: 700; }
.lat-row.is-ours .lat-row-top strong { color: var(--c-persist); }
.lat-row-top span { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.lat-track {
  height: 14px;
  border-radius: 99px;
  background: var(--paper-2);
  overflow: hidden;
}
.lat-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8aa0aa, #617882);
  transition: width 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lat-row.is-ours .lat-fill {
  background: linear-gradient(90deg, #2b7b6e, var(--teal));
}

/* Execution Path Stacked Bars */
.route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.route-legend span { display: inline-flex; align-items: center; gap: 6px; }
.route-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.route-list { display: grid; gap: 13px; }
.route-item {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s;
}
.route-item:hover, .route-item.active {
  background: var(--paper-2);
  border-color: var(--line);
}
.route-item-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.route-item-head small { font-family: var(--mono); font-weight: 600; color: var(--blue); }
.route-bar {
  display: flex;
  height: 22px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--paper-2);
}
.route-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.65);
}
.route-seg:last-child { border-right: 0; }
.rs-s1 { background: #388f80; color: #fff; }
.rs-nat { background: #8cc5e3; color: #13232b; }
.rs-qc { background: #d9a548; color: #1c1304; }
.rs-rs { background: #2866a8; color: #fff; }

.route-detail-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.route-detail-box strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* Stage 2 Continuation Parity Strip */
.s2-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.s2-mini {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
}
.s2-mini small { display: block; font-size: 11.5px; color: var(--ink-3); }
.s2-mini strong { display: block; font-family: var(--mono); font-size: 15px; color: var(--ink); margin-top: 2px; }
.s2-mini span { display: block; font-size: 11.5px; color: var(--c-persist); margin-top: 2px; }

/* Ablation Study Card */
.abl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
}
.abl-list { display: grid; gap: 9px; margin-top: 16px; }
.abl-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) 74px 78px 1fr 70px;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.abl-row.is-base {
  background: linear-gradient(90deg, rgba(95, 191, 174, 0.14), rgba(95, 191, 174, 0.03));
  border-color: rgba(56, 143, 128, 0.35);
}
.abl-name strong { display: block; font-size: 14px; }
.abl-name small { display: block; font-size: 12px; color: var(--ink-3); }
.abl-val { font-family: var(--mono); font-size: 13.5px; font-weight: 700; text-align: right; }
.abl-delta { font-family: var(--mono); font-size: 12px; text-align: right; font-weight: 600; }
.abl-delta.neg { color: var(--verm); }
.abl-delta.pos { color: var(--c-persist); }
.abl-bar-track { height: 9px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.abl-bar-fill { height: 100%; border-radius: 99px; background: var(--blue); }
.abl-row.is-base .abl-bar-fill { background: var(--c-persist); }
.abl-bar-fill.high { background: var(--verm); }

/* --------------------------------------------------------------------------
   Section 7: Code Quickstart & Citation
   -------------------------------------------------------------------------- */
.code-cite-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  align-items: start;
}
.code-panel, .citation-panel {
  background: var(--night);
  color: #dce5e2;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px -36px rgba(12, 20, 24, 0.65);
}
.code-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}
.code-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.code-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(239, 231, 214, 0.72);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s;
}
.code-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ivory);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: var(--teal); }
.code-caption {
  padding: 12px 20px 0;
  font-size: 13px;
  color: rgba(239, 231, 214, 0.68);
  margin: 0;
}
.code-panel pre, .citation-panel pre {
  margin: 0;
  padding: 16px 20px 22px;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.65;
  overflow-x: auto;
  color: #e6efec;
}
.citation-panel pre { white-space: pre-wrap; word-break: break-word; }

.release-pill-soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #f3d28e;
  background: rgba(217, 165, 72, 0.14);
  border: 1px solid rgba(217, 165, 72, 0.38);
}
.release-pill-soon i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.release-body {
  padding: 18px 20px 22px;
}
.release-desc {
  margin: 0 0 16px;
  font-size: 13.8px;
  line-height: 1.65;
  color: rgba(239, 231, 214, 0.78);
}
.release-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.release-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.release-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.release-item.is-live .release-dot {
  background: var(--teal);
  box-shadow: 0 0 10px rgba(95, 191, 174, 0.7);
}
.release-item.is-soon .release-dot {
  background: var(--gold);
  opacity: 0.85;
}
.release-item-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--ivory);
  margin-bottom: 2px;
}
.release-item-text span {
  display: block;
  font-size: 12.2px;
  line-height: 1.45;
  color: rgba(239, 231, 214, 0.65);
}
.release-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
}
.release-tag.is-link {
  background: rgba(95, 191, 174, 0.16);
  border: 1px solid rgba(95, 191, 174, 0.42);
  color: #cff3ec;
  transition: background 0.2s, transform 0.2s;
}
.release-tag.is-link:hover { background: rgba(95, 191, 174, 0.28); transform: translateY(-1px); }
.release-tag.is-done {
  background: rgba(95, 191, 174, 0.12);
  border: 1px solid rgba(95, 191, 174, 0.28);
  color: var(--teal);
}
.release-tag.is-pending {
  background: rgba(217, 165, 72, 0.12);
  border: 1px solid rgba(217, 165, 72, 0.32);
  color: #f3d28e;
}

/* --------------------------------------------------------------------------
   Atmospheric Dark Footer (SolarRenderer Signature)
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 68px 0 32px;
  background: radial-gradient(120% 140% at 0% 0%, #152630 0%, var(--night) 58%);
  color: rgba(239, 231, 214, 0.68);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.2fr;
  gap: 52px;
  align-items: start;
}
.footer-brand-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.footer-brand-logos img { height: 32px; width: auto; object-fit: contain; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 0 18px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a {
  font-size: 13px;
  text-decoration: none;
  color: var(--ivory-2);
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.footer-links a:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

.footer-authors h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 4px 0 16px;
}
.footer-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 20px;
  font-size: 15.5px;
  color: var(--ivory-2);
}
.footer-names a { text-decoration: none; transition: color 0.2s; }
.footer-names a:hover { color: var(--gold); }
.footer-names sup, .footer-affiliations sup {
  font-family: var(--mono);
  font-size: 10px;
  margin-left: 2px;
  color: var(--teal);
}
.footer-affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  color: rgba(239, 231, 214, 0.72);
}
.footer-affiliations sup { margin: 0 3px 0 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: rgba(239, 231, 214, 0.48);
}

/* Lightbox Modal for Method Flow Figure */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 14, 18, 0.88);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 28px;
}
.lightbox.open { display: grid; }
.lightbox-inner {
  position: relative;
  max-width: min(1040px, 94vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  overflow: auto;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--night);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--night);
  color: var(--ivory);
  border: 1px solid rgba(95, 191, 174, 0.45);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 220;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .head-row { grid-template-columns: 1fr; gap: 20px; }
  .sim-cards { grid-template-columns: 1fr; }
  .case-strip { grid-template-columns: repeat(3, 1fr); }
  .case-inspector { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .sens-controls-bar { grid-template-columns: 1fr; }
  .sens-charts-grid { grid-template-columns: 1fr; }
  .eff-grid { grid-template-columns: 1fr; }
  .code-cite-grid { grid-template-columns: 1fr; }
  .finding-hero { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 12px 18px 20px;
    background: var(--night);
    color: var(--ivory);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }
  .site-header.nav-open nav a { padding: 11px 14px; font-size: 15px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; }
  .abl-row { grid-template-columns: 1fr 70px 76px; }
  .abl-bar-track, .abl-ratio-cell { display: none; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .block { padding: 64px 0; }
}

@media (max-width: 580px) {
  .content-width, .wide-width { width: calc(100% - 28px); }
  .site-header { padding: 0 14px; }
  .nav-institutions, .nav-paper { display: none; }
  .hero { padding: 92px 0 116px; min-height: 600px; }
  .hero-copy { padding: 0 14px; max-width: 100%; }
  .hero-eyebrow { font-size: 10.5px; letter-spacing: 0.08em; padding: 6px 12px; max-width: 100%; }
  .hero h1 { font-size: clamp(54px, 16vw, 76px); }
  .hero-sub { font-size: 18px; }
  .hero-authors { font-size: 14px; gap: 6px 12px; }
  .hero-affils span { font-size: 11.5px; white-space: normal; text-align: center; }
  .hero-btns { gap: 8px; }
  .hbtn { height: 42px; padding: 0 15px; font-size: 13.5px; }
  .hero-logos { gap: 14px; padding: 8px 16px; }
  .hero-logos img { height: 26px; }
  .hero-foot { padding: 0 16px; }
  .hero-meta { display: none; }
  .sim-card { grid-template-columns: 76px 1fr; gap: 10px; padding: 10px; }
  .sim-card img { width: 76px; height: 56px; }
  .sim-topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .sim-scrubber { flex-wrap: wrap; gap: 8px; }
  .sim-scrubber input[type="range"] { min-width: 160px; }
  .sim-cache-pill { font-size: 10.5px; }
  .stats-grid { grid-template-columns: 1fr; }
  .case-strip { grid-template-columns: repeat(2, 1fr); }
  .sens-readout-grid { grid-template-columns: 1fr; }
  .s2-summary-strip { grid-template-columns: 1fr; }
  .tier-row { grid-template-columns: 112px 1fr 56px; font-size: 11.5px; }
  .sim-stage, .case-inspector, .pareto-panel, .sens-card, .eff-card, .abl-card { padding: 16px; }
  .code-panel pre, .citation-panel pre { font-size: 11.5px; padding: 14px; }
}

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