/* ==========================================================================
   PRFT — Daylight Swiss Scientific Monograph × Distill.pub Precision Lab
   100% Daylight Surface Palette (#ffffff / #f4f6fa) · Architectural Hairlines
   International Klein Cobalt (#0047ff) · Signal Crimson (#e11d48) · Precision Teal (#0d9488)
   Typography: Newsreader · Space Grotesk · IBM Plex Mono
   ========================================================================== */

:root {
  /* Daylight surfaces */
  --bg: #ffffff;
  --paper: #f4f6fa;
  --surface: #f8fafd;
  --surface-hover: #eef3fa;

  /* Architectural hairlines */
  --rule: #dbe2ec;
  --rule-soft: #e6ecf4;
  --rule-strong: #bcc7d8;

  /* Technical inks */
  --ink: #0a1220;
  --ink-2: #334155;
  --slate: #475569;
  --muted: #64748b;

  /* High-contrast scientific ink accents */
  --cobalt: #0047ff;
  --cobalt-deep: #0035c4;
  --cobalt-soft: rgba(0, 71, 255, 0.075);
  --cobalt-border: rgba(0, 71, 255, 0.28);

  --crimson: #e11d48;
  --crimson-deep: #be123c;
  --crimson-soft: rgba(225, 29, 72, 0.08);
  --crimson-border: rgba(225, 29, 72, 0.28);

  --teal: #0d9488;
  --teal-deep: #0f766e;
  --teal-soft: rgba(13, 148, 136, 0.09);
  --teal-border: rgba(13, 148, 136, 0.30);

  --violet: #6d28d9;
  --amber: #b45309;

  /* Compact dark instrument terminals ONLY */
  --terminal: #0f172a;
  --terminal-bar: #162036;
  --terminal-border: #25334d;
  --terminal-ink: #e2e8f0;
  --terminal-muted: #94a3b8;

  /* Typography */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout geometry */
  --masthead-h: 52px;
  --rail-w: 218px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-subtle: 0 1px 2px rgba(10, 18, 32, 0.04), 0 4px 14px rgba(10, 18, 32, 0.04);
  --shadow-card: 0 2px 6px rgba(10, 18, 32, 0.05), 0 12px 28px rgba(10, 18, 32, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

code, pre, output, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

p code, li code, figcaption code, .audit-callout code, .lab-footnote code, .lab-desc code, .scope-question-bar code {
  font-size: 0.87em;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 3px;
}

a {
  color: var(--cobalt);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

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

.ink-cobalt { color: var(--cobalt); }
.ink-teal { color: var(--teal-deep); }
.ink-crimson { color: var(--crimson); }

.dot-grid {
  background-color: var(--bg);
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ==========================================================================
   1. Crisp Top Masthead (52px Pure White + Hairline Bottom Rule)
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.masthead-inner {
  height: var(--masthead-h);
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.masthead-logos {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.masthead-logos img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.masthead-sep {
  width: 1px;
  height: 16px;
  background: var(--rule-strong);
  flex-shrink: 0;
}

.masthead-title {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
  font-size: 13.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none !important;
}

.masthead-title strong {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--cobalt);
  letter-spacing: 0.04em;
}

.masthead-title span {
  color: var(--slate);
  font-weight: 500;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mast-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
  text-decoration: none !important;
}

.mast-link svg {
  width: 14px;
  height: 14px;
}

.mast-link:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.mast-link-pdf {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.mast-link-pdf:hover {
  background: var(--cobalt-deep);
  border-color: var(--cobalt-deep);
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 32px;
  padding: 7px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg);
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-btn span {
  display: block;
  height: 1.8px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

.read-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.read-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--cobalt);
  transition: width 0.08s linear;
}

.mobile-drawer {
  border-top: 1px solid var(--rule);
  background: var(--bg);
  padding: 12px 20px 16px;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-drawer-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  text-decoration: none;
}

.mobile-drawer-grid a span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cobalt);
  font-weight: 700;
}

/* ==========================================================================
   2. Tablet / Mobile Horizontal Sticky Chapter Pill Bar (< 1240px)
   ========================================================================== */

.tablet-chapter-bar {
  display: none;
  position: sticky;
  top: var(--masthead-h);
  z-index: 80;
  background: rgba(244, 246, 250, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.tablet-chapter-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  scrollbar-width: none;
}

.tablet-chapter-scroll::-webkit-scrollbar {
  display: none;
}

.chap-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--slate);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s;
}

.chap-pill span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.chap-pill.active {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.chap-pill.active span {
  color: rgba(255, 255, 255, 0.82);
}

/* ==========================================================================
   3. Monograph Two-Column Shell (Sticky Left Chapter Rail + Main Content)
   ========================================================================== */

.monograph-shell {
  max-width: 1540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
}

.chapter-rail {
  position: sticky;
  top: var(--masthead-h);
  height: calc(100vh - var(--masthead-h));
  border-right: 1px solid var(--rule);
  background: var(--bg);
  overflow-y: auto;
}

.rail-inner {
  padding: 28px 18px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
}

.rail-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 13px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.rail-link:hover {
  color: var(--ink);
  background: var(--paper);
}

.rail-link.active {
  color: var(--cobalt);
  font-weight: 700;
  border-left-color: var(--cobalt);
  background: var(--cobalt-soft);
}

.rail-num {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.rail-link.active .rail-num {
  color: var(--cobalt);
}

.rail-meter {
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}

.rail-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}

.rail-meter-head strong {
  color: var(--ink);
  font-weight: 600;
}

.rail-meter-track {
  height: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 99px;
  overflow: hidden;
}

.rail-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--cobalt);
  transition: width 0.1s linear;
}

.rail-quick {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-pdf-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cobalt-border);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background-color 0.15s, color 0.15s;
}

.rail-pdf-btn:hover {
  background: var(--cobalt);
  color: #ffffff;
}

.rail-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.monograph-main {
  min-width: 0;
}

/* ==========================================================================
   4. Section Cadence & Swiss Architectural Typography
   ========================================================================== */

.section-band {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.band-white {
  background: var(--bg);
}

.band-paper {
  background: var(--paper);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 36px;
}

.sec-head {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.sec-num-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sec-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--cobalt);
  letter-spacing: -0.02em;
}

.sec-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.sec-title-col h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.7vw, 35px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sec-lead {
  margin: 0;
  max-width: 72ch;
  color: var(--slate);
  font-size: 15.5px;
  line-height: 1.62;
}

.inst-code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ==========================================================================
   5. Section 00: Daylight Blueprint Hero + Cut-Knife Oscilloscope
   ========================================================================== */

.hero-band {
  padding: 40px 0 48px;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(244, 246, 250, 0.72) 0%, rgba(255, 255, 255, 0.96) 82%, #ffffff 100%),
    radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.96fr);
  gap: 36px;
  align-items: start;
}

.kicker-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--cobalt-border);
  background: var(--cobalt-soft);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cobalt-deep);
  margin-bottom: 16px;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  background: var(--cobalt);
  border-radius: 1px;
}

.hero-h1 {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-mark {
  font-family: var(--sans);
  font-size: clamp(44px, 4.6vw, 62px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-title-serif {
  font-family: var(--serif);
  font-size: clamp(22px, 2.25vw, 30px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.018em;
  color: var(--ink-2);
}

.hero-abstract {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--slate);
  max-width: 60ch;
}

.hero-abstract strong {
  color: var(--ink);
  font-weight: 600;
}

.author-block {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.author-list a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}

.author-list a:hover {
  color: var(--cobalt);
  text-decoration-color: var(--cobalt);
}

.author-list sup, .affil-row sup, .note-row sup {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cobalt);
  margin-left: 1px;
}

.affil-row, .note-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 12.5px;
  color: var(--slate);
}

.note-row {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.dot-sep {
  color: var(--rule-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-cobalt {
  background: var(--cobalt);
  color: #ffffff;
  border: 1px solid var(--cobalt);
  box-shadow: 0 1px 2px rgba(0, 71, 255, 0.25);
}

.btn-cobalt:hover {
  background: var(--cobalt-deep);
  border-color: var(--cobalt-deep);
  color: #ffffff;
}

.btn-outline {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--paper);
}

/* Hairline 4-Column KPI Spec Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.kpi-cell {
  padding: 12px 12px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-cell:last-child {
  border-right: none;
}

.kpi-val {
  font-family: var(--mono);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.3;
}

/* Right Hero: Interactive Prefix Cut-Knife Oscilloscope */
.scope-card {
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.scope-head {
  padding: 14px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scope-title-group h2 {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.scope-title-group code {
  font-size: 13px;
  color: var(--cobalt);
  background: var(--cobalt-soft);
  padding: 1px 5px;
  border-radius: 3px;
}

.scope-thumb-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 3px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.scope-thumb-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.scope-thumb-btn img {
  width: 34px;
  height: 28px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--rule-soft);
}

.scope-question-bar {
  padding: 9px 16px;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--slate);
  background: var(--bg);
}

.q-chip {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid var(--teal-border);
}

.scope-canvas-wrap {
  padding: 10px 14px 4px;
  background-color: var(--bg);
  background-image: radial-gradient(#d7e0ec 1px, transparent 1px);
  background-size: 20px 20px;
}

.scope-svg {
  width: 100%;
  height: auto;
  display: block;
}

.scope-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-slider-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.scope-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cobalt);
  background: var(--cobalt);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.scope-play-btn:hover {
  background: var(--cobalt-deep);
}

.scope-slider-row input[type="range"],
.wb-scrubber input[type="range"],
.theta-ctrl-bar input[type="range"] {
  width: 100%;
  accent-color: var(--cobalt);
  cursor: pointer;
}

.scope-k-readout {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 78px;
  text-align: right;
}

.scope-snap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snap-btn {
  padding: 4px 9px;
  border-radius: 3px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
}

.snap-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.snap-btn.active {
  background: var(--cobalt-soft);
  border-color: var(--cobalt);
  color: var(--cobalt-deep);
}

.snap-btn.snap-crimson.active {
  background: var(--crimson-soft);
  border-color: var(--crimson);
  color: var(--crimson-deep);
}

.scope-telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--bg);
}

.scope-tele-cell {
  padding: 10px 14px;
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scope-tele-cell:nth-child(2n) {
  border-right: none;
}

.scope-tele-cell:nth-child(n+3) {
  border-bottom: none;
}

.tele-k {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tele-v {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* Collapsible Paper Teaser Plate */
.plate-collapsible {
  margin-top: 34px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.plate-bar {
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plate-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plate-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--ink);
  color: #ffffff;
  letter-spacing: 0.06em;
}

.plate-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.plate-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.plate-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.mini-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: var(--cobalt-soft);
}

.plate-body[hidden] {
  display: none;
}

.teaser-split {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  align-items: stretch;
}

.teaser-figure {
  margin: 0;
  padding: 18px;
  border-right: 1px solid var(--rule);
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
}

.teaser-figure img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-soft);
}

.teaser-figure figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  color: var(--slate);
}

.zoom-cue {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--cobalt);
}

.diagnosis-rail {
  display: flex;
  flex-direction: column;
}

.diag-item {
  flex: 1;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule-soft);
}

.diag-item:last-child {
  border-bottom: none;
}

.diag-idx {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cobalt);
  margin-bottom: 4px;
}

.diag-item h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.diag-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--slate);
}

/* ==========================================================================
   6. Section 01: Interactive Trajectory Slicer & Credit Diff Workbench
   ========================================================================== */

.slicer-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.slicer-tab {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slicer-tab:hover {
  border-color: var(--rule-strong);
  background: var(--surface);
}

.slicer-tab[aria-selected="true"] {
  border-color: var(--cobalt);
  box-shadow: inset 3px 0 0 var(--cobalt), var(--shadow-subtle);
  background: var(--bg);
}

.slicer-tab-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.slicer-tab-tag.tag-teal {
  color: var(--teal-deep);
}

.slicer-tab strong {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.25;
}

.slicer-tab span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.workbench-card {
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.wb-topbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wb-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.wb-thumb-btn {
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 68px;
  height: 50px;
  flex-shrink: 0;
  background: var(--surface);
  cursor: zoom-in;
}

.wb-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wb-query {
  min-width: 0;
}

.wb-dataset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.wb-dataset {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.wb-gold {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid var(--teal-border);
}

.wb-question {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.38;
}

.wb-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ctrl {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-ctrl:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.btn-ctrl-primary {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.btn-ctrl-primary:hover {
  background: var(--cobalt-deep);
  border-color: var(--cobalt-deep);
  color: #ffffff;
}

.wb-scrubber {
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.kv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--cobalt-deep);
  background: var(--cobalt-soft);
  border: 1px solid var(--cobalt-border);
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
}

.kv-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
}

.wb-clock {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 116px;
  text-align: right;
}

.credit-ruler-box {
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.ruler-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ruler-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.ruler-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid var(--teal-border);
}

.ruler-svg {
  width: 100%;
  height: auto;
  display: block;
}

.wb-body {
  display: grid;
  grid-template-columns: minmax(0, 1.56fr) minmax(270px, 0.94fr);
  align-items: stretch;
}

.diff-lanes {
  padding: 16px 18px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diff-card {
  border: 1px solid var(--rule);
  border-left: 3.5px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg);
}

.diff-card.lane-rft {
  border-left-color: var(--crimson);
}

.diff-card.lane-credit {
  border-left-color: var(--muted);
  background: var(--surface);
}

.diff-card.lane-prft {
  border-left-color: var(--cobalt);
  background: linear-gradient(90deg, rgba(0, 71, 255, 0.03) 0%, #ffffff 35%);
}

.diff-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.diff-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.diff-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 8px;
}

.diff-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}

.diff-status.st-good {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid var(--teal-border);
}

.diff-status.st-bad {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
  border: 1px solid var(--crimson-border);
}

.diff-status.st-muted {
  background: var(--paper);
  color: var(--slate);
  border: 1px solid var(--rule);
}

.lane-track {
  position: relative;
  height: 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}

.lane-seg {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: width 0.08s linear;
}

.seg-prefix-rft {
  background: #475569;
  color: #ffffff;
}

.seg-tail-loop {
  background: repeating-linear-gradient(-45deg, #e11d48, #e11d48 7px, #be123c 7px, #be123c 14px);
  color: #ffffff;
}

.seg-prefix-muted {
  background: #94a3b8;
  color: #ffffff;
}

.seg-tail-muted {
  background: #cbd5e1;
  color: #334155;
}

.seg-prefix-prft {
  background: var(--cobalt);
  color: #ffffff;
}

.seg-stop-anchor {
  background: var(--teal);
  color: #ffffff;
  min-width: 14px;
  padding: 0 4px;
  justify-content: center;
}

.seg-masked-tail {
  background: repeating-linear-gradient(-45deg, rgba(225, 29, 72, 0.08), rgba(225, 29, 72, 0.08) 6px, rgba(225, 29, 72, 0.17) 6px, rgba(225, 29, 72, 0.17) 12px);
  border-left: 1.5px dashed var(--crimson);
  color: var(--crimson-deep);
}

.diff-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.5;
}

.diff-events {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diff-event {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--slate);
  opacity: 0.45;
  transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
}

.diff-event.active {
  opacity: 1;
  border-color: var(--cobalt-border);
  background: var(--cobalt-soft);
  color: var(--cobalt-deep);
}

.diff-event.active.ev-stop {
  border-color: var(--teal-border);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.tele-panel {
  padding: 16px 18px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tele-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tele-badge {
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  color: var(--slate);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.tele-badge.fired {
  background: var(--teal-soft);
  border-color: var(--teal-border);
  color: var(--teal-deep);
}

.prob-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.prob-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.prob-lbl {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prob-track {
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.prob-fill {
  height: 100%;
  background: #94a3b8;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.prob-fill.winner {
  background: var(--cobalt);
}

.prob-val {
  text-align: right;
  font-weight: 600;
  color: var(--slate);
}

.prob-row.is-winner .prob-val {
  color: var(--cobalt);
}

.tele-caption {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--slate);
}

.anchor-box {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--teal-border);
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
}

.anchor-lbl {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--teal-deep);
  margin-bottom: 4px;
}

.anchor-code {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.wb-legend {
  padding: 10px 18px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 11.5px;
  color: var(--slate);
}

.wb-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  width: 12px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.sw-cobalt { background: var(--cobalt); }
.sw-teal { background: var(--teal); }
.sw-crimson { background: var(--crimson); }
.sw-hatch {
  background: repeating-linear-gradient(-45deg, rgba(225, 29, 72, 0.12), rgba(225, 29, 72, 0.12) 3px, rgba(225, 29, 72, 0.3) 3px, rgba(225, 29, 72, 0.3) 6px);
  border: 1px dashed var(--crimson);
}
.sw-slate { background: #475569; }

/* ==========================================================================
   7. Section 02: Method Blueprint & Threshold Explorer
   ========================================================================== */

.method-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.step-btn {
  text-align: left;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s;
}

.step-btn:hover {
  border-color: var(--rule-strong);
  background: var(--bg);
}

.step-btn[aria-selected="true"] {
  background: var(--bg);
  border-color: var(--cobalt);
  box-shadow: inset 0 3px 0 var(--cobalt), var(--shadow-subtle);
}

.step-idx {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.step-btn[aria-selected="true"] .step-idx {
  color: var(--cobalt);
}

.step-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.method-split {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.26fr);
  gap: 20px;
  margin-bottom: 28px;
  align-items: stretch;
}

.method-spec-card {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-subtle);
}

.mspec-stage {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.mspec-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.mspec-formula {
  padding: 11px 13px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--cobalt);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  overflow-x: auto;
  line-height: 1.5;
}

.mspec-cost {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.mspec-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-2);
}

.mspec-why {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13px;
  color: var(--slate);
  line-height: 1.55;
}

.mspec-why strong {
  color: var(--ink);
}

.blueprint-plate {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: zoom-in;
}

.plate-head-mini {
  padding: 9px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.plate-img-stage {
  padding: 16px;
  background: var(--bg);
  flex: 1;
  display: flex;
  align-items: center;
}

.plate-img-stage img {
  width: 100%;
  border-radius: 3px;
}

.blueprint-plate figcaption {
  padding: 11px 16px;
  border-top: 1px solid var(--rule-soft);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.5;
}

/* Teacher Probing Lab 2-Column Grid */
.probing-lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lab-panel {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-subtle);
}

.lab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-head h3 {
  margin: 3px 0 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.lab-desc {
  margin: 0;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.52;
}

.lab-footnote {
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.badge-teal, .badge-cobalt, .badge-crimson {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}

.badge-teal {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid var(--teal-border);
}

.badge-cobalt {
  background: var(--cobalt-soft);
  color: var(--cobalt-deep);
  border: 1px solid var(--cobalt-border);
}

.badge-crimson {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
  border: 1px solid var(--crimson-border);
}

.svg-frame {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 8px;
  background-color: var(--bg);
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.theta-ctrl-bar {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theta-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.theta-slider-top strong {
  font-family: var(--mono);
  color: var(--cobalt);
}

.theta-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theta-kpi {
  padding: 7px 9px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}

.theta-kpi small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.theta-kpi strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.census-plate {
  margin: 0;
  cursor: zoom-in;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.census-plate img {
  width: 100%;
  padding: 8px;
  background: var(--bg);
}

.census-plate figcaption {
  padding: 8px 12px;
  border-top: 1px solid var(--rule-soft);
  background: var(--surface);
  font-size: 12px;
  color: var(--slate);
  line-height: 1.48;
}

.race-box {
  margin-top: auto;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.race-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.race-head strong {
  color: var(--cobalt);
}

.probe-race {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.race-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.race-name {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.race-row.is-ours .race-name {
  color: var(--cobalt);
}

.race-bar-track {
  height: 16px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.race-bar-fill {
  height: 100%;
  background: #94a3b8;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.race-row.is-ours .race-bar-fill {
  background: var(--cobalt);
}

.race-row.is-slow .race-bar-fill {
  background: var(--crimson);
}

.race-meta {
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--slate);
  font-weight: 600;
}

/* ==========================================================================
   8. Section 03: Budget-Forcing Frontier & Academic Booktabs Leaderboard
   ========================================================================== */

.frontier-card {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 20px 22px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 28px;
}

.frontier-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.frontier-top h3 {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.frontier-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.series-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.series-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}

.series-pill i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.series-pill.is-off {
  opacity: 0.4;
  background: var(--paper);
}

.series-pill.is-focused {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}

.frontier-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.frontier-stage {
  padding: 10px 12px;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  background: rgba(10, 18, 32, 0.94);
  color: #f8fafc;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(10, 18, 32, 0.22);
  opacity: 0;
  transform: translate(-50%, -112%);
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.chart-tooltip.visible {
  opacity: 1;
}

.audit-callout {
  margin-top: 14px;
  padding: 11px 14px;
  border-left: 3px solid var(--cobalt);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.8px;
  color: var(--slate);
  line-height: 1.55;
}

.audit-callout strong {
  color: var(--ink);
}

/* Academic Booktabs Leaderboard */
.booktabs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.suite-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suite-tab {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.suite-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.suite-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-search {
  height: 32px;
  width: 190px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

.table-search::placeholder {
  color: var(--muted);
}

.booktabs-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-subtle);
}

.booktabs-caption {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.55;
}

.booktabs-scroll {
  overflow-x: auto;
}

.booktabs-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
}

.booktabs-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1.25px solid var(--ink);
  white-space: nowrap;
  user-select: none;
}

.booktabs-table thead th.is-num {
  text-align: right;
}

.booktabs-table thead th.sortable {
  cursor: pointer;
}

.booktabs-table thead th.sortable:hover {
  color: var(--cobalt);
}

.sort-ind {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: var(--muted);
}

.booktabs-table thead th.sorted .sort-ind {
  color: var(--cobalt);
}

.booktabs-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  color: var(--ink-2);
}

.booktabs-table tbody tr:last-child td {
  border-bottom: none;
}

.booktabs-table tbody tr:hover td {
  background: var(--surface-hover);
}

.booktabs-table tbody tr.row-ours td {
  background: var(--cobalt-soft);
  color: var(--ink);
}

.booktabs-table tbody tr.row-ours td:first-child {
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.booktabs-table tbody tr.row-warn td:first-child {
  box-shadow: inset 3px 0 0 var(--crimson);
}

.booktabs-table td.is-num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.booktabs-table td.is-best {
  font-weight: 700;
  color: var(--cobalt-deep);
  text-decoration: underline;
  text-decoration-color: var(--cobalt-border);
  text-underline-offset: 3px;
}

.method-cell-title {
  font-weight: 600;
  color: var(--ink);
}

.row-ours .method-cell-title {
  font-weight: 700;
  color: var(--cobalt-deep);
}

.method-cell-note {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.38;
}

.fam-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--slate);
  white-space: nowrap;
}

.fam-pill.fam-ours {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.fam-pill.fam-rl {
  background: rgba(109, 40, 217, 0.08);
  border-color: rgba(109, 40, 217, 0.25);
  color: var(--violet);
}

.delta-good { color: var(--teal-deep); font-family: var(--mono); font-weight: 600; }
.delta-warn { color: var(--crimson); font-family: var(--mono); font-weight: 600; }
.delta-neutral { color: var(--slate); font-family: var(--mono); }

/* ==========================================================================
   9. Section 04: Visual Grounding & Option-Bias Lab (2x2 Swiss Grid)
   ========================================================================== */

.swiss-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}

.pill-group button {
  padding: 4px 9px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.14s;
}

.pill-group button.active {
  background: var(--cobalt);
  color: #ffffff;
}

.mod-matrix {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.mod-row.grp-ours {
  border-color: var(--cobalt-border);
  background: var(--cobalt-soft);
}

.mod-row.grp-warn {
  border-color: var(--crimson-border);
  background: var(--crimson-soft);
}

.mod-model-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.mod-model-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

.mod-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mod-track {
  flex: 1;
  height: 14px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.mod-fill {
  height: 100%;
  background: var(--slate);
  transition: width 0.25s ease;
}

.grp-ours .mod-fill { background: var(--cobalt); }
.grp-warn .mod-fill { background: var(--crimson); }
.grp-rl .mod-fill { background: var(--violet); }

.mod-val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  color: var(--ink);
}

.mod-drop {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  color: var(--teal-deep);
}

.mod-drop.drop-bad {
  color: var(--crimson);
}

.mod-drop.drop-na {
  color: var(--muted);
}

.bias-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bias-chip {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.bias-chip small {
  display: block;
  font-size: 11px;
  color: var(--slate);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bias-chip strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}

/* ==========================================================================
   10. Section 05: Daylight Scientific Case Archive & Microscope Inspector
   ========================================================================== */

.case-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.case-filter-row button {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.case-filter-row button[aria-selected="true"] {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.case-filter-row button.filter-crimson[aria-selected="true"] {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #ffffff;
}

.contact-sheet {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.plate-card {
  text-align: left;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.15s;
}

.plate-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.plate-card.active {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 1.5px var(--cobalt), var(--shadow-subtle);
}

.plate-card.is-failure.active {
  border-color: var(--crimson);
  box-shadow: 0 0 0 1.5px var(--crimson), var(--shadow-subtle);
}

.plate-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
  overflow: hidden;
}

.plate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plate-num {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(10, 18, 32, 0.82);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
}

.plate-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plate-card-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cobalt);
}

.plate-card.is-teal .plate-card-badge { color: var(--teal-deep); }
.plate-card.is-failure .plate-card-badge { color: var(--crimson); }

.plate-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Daylight Microscope Inspector */
.microscope-card {
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  overflow: hidden;
}

.micro-visual {
  padding: 18px;
  border-right: 1px solid var(--rule);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.micro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.micro-stage {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 10px;
  min-height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.micro-stage.loupe-active {
  cursor: crosshair;
}

.micro-stage img {
  max-height: 410px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.micro-loupe {
  position: absolute;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  border: 2px solid var(--cobalt);
  box-shadow: 0 10px 26px rgba(10, 18, 32, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  pointer-events: none;
  display: none;
  background-repeat: no-repeat;
  background-color: #ffffff;
  z-index: 10;
}

.micro-loupe::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 71, 255, 0.55);
  border-radius: 50%;
}

.micro-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.micro-detail {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-det-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.case-det-split {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.case-det-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.22;
}

.case-q-box {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
}

.case-q-box strong {
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 12px;
}

.case-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.case-stat {
  padding: 8px 10px;
  border-right: 1px solid var(--rule);
  background: var(--bg);
}

.case-stat:last-child { border-right: none; }

.case-stat small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.case-stat strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.case-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-arm {
  padding: 12px 13px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.case-arm.tone-good { border-left-color: var(--teal); background: rgba(13, 148, 136, 0.03); }
.case-arm.tone-bad { border-left-color: var(--crimson); background: rgba(225, 29, 72, 0.03); }
.case-arm.tone-warn { border-left-color: var(--amber); background: rgba(180, 83, 9, 0.03); }

.case-arm h4 {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.case-arm-verdict {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tone-good .case-arm-verdict { color: var(--teal-deep); }
.tone-bad .case-arm-verdict { color: var(--crimson-deep); }
.tone-warn .case-arm-verdict { color: var(--amber); }

.case-arm p {
  margin: 0;
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.5;
}

/* 12-Run Evaluation Tile Matrix (3 Train Seeds x 4 Decode Seeds) */
.tile-matrix-box {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tile-matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tile-row-lbl {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.tile-groups {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile-seed-grp {
  display: flex;
  gap: 3px;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.run-tile {
  width: 21px;
  height: 21px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.run-tile.hit {
  background: var(--teal);
  color: #ffffff;
}

.run-tile.miss {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
  border: 1px solid var(--crimson-border);
}

/* ==========================================================================
   11. Section 06: Compact Dark Instrument Terminals & Hyperparameter Spec
   ========================================================================== */

.code-cite-split {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
  gap: 20px;
  align-items: start;
}

.terminal-frame {
  background: var(--terminal);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.terminal-bar {
  padding: 10px 14px;
  background: var(--terminal-bar);
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.term-dots {
  display: inline-flex;
  gap: 5px;
}

.term-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}

.term-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #93c5fd;
  margin-right: auto;
}

.code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-right: auto;
}

.code-tab {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.14s;
}

.code-tab:hover {
  color: #ffffff;
}

.code-tab.active {
  background: rgba(0, 71, 255, 0.28);
  border-color: rgba(96, 165, 250, 0.45);
  color: #ffffff;
}

.term-copy-btn {
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.14s;
}

.term-copy-btn:hover {
  border-color: #60a5fa;
  color: #ffffff;
}

.terminal-caption {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12.5px;
  color: var(--terminal-muted);
  line-height: 1.5;
}

.terminal-pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--terminal-ink);
}

#citation .terminal-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Code Coming Soon Status Badges & Daylight Release Card */
.mast-link-soon {
  border-style: dashed;
  border-color: var(--rule-strong);
  color: var(--slate);
  background: var(--paper);
}

.mast-link-soon:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: var(--cobalt-soft);
}

.btn-soon {
  border: 1px dashed var(--rule-strong);
  background: var(--paper);
  color: var(--slate);
}

.btn-soon:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: var(--cobalt-soft);
  text-decoration: none;
}

.release-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 22px 24px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.release-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.release-card-head h3 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

.status-pill-soon {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(180, 83, 9, 0.34);
  background: rgba(180, 83, 9, 0.08);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.release-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--slate);
}

.release-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.rel-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.rel-item:last-child {
  border-bottom: none;
}

.rel-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.rel-item.is-live .rel-dot {
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  color: var(--teal-deep);
}

.rel-item.is-soon .rel-dot {
  background: rgba(180, 83, 9, 0.08);
  border: 1px solid rgba(180, 83, 9, 0.32);
  color: var(--amber);
}

.rel-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rel-text strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.rel-text span {
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.45;
}

.rel-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
  margin-top: 2px;
}

.tag-live {
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  color: var(--teal-deep);
}

.tag-soon {
  background: var(--cobalt-soft);
  border: 1px solid var(--cobalt-border);
  color: var(--cobalt-deep);
}

.release-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.tok-comment { color: #64748b; }
.tok-flag { color: #7dd3fc; }
.tok-cmd { color: #5eead4; font-weight: 600; }

.cite-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px 16px;
}

.spec-card-head {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cobalt);
  margin-bottom: 10px;
}

.spec-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.spec-grid dt {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.spec-grid dd {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
}

.spec-wide {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}

/* ==========================================================================
   12. Daylight Architectural Footer
   ========================================================================== */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 40px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.footer-logos {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-logos img {
  height: 26px;
  width: auto;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.footer-nav a {
  color: var(--slate);
}

.footer-nav a:hover {
  color: var(--cobalt);
}

.footer-col-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-author-links a {
  color: var(--ink);
}

.footer-author-links a:hover {
  color: var(--cobalt);
}

.footer-author-links sup, .footer-affils sup {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cobalt);
}

.footer-affils {
  margin: 0;
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.55;
}

.footer-bottom {
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================================================
   13. Universal Lightbox & Toast
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 18, 32, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  width: min(1160px, 100%);
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-topbar {
  padding: 10px 16px;
  border-bottom: 1px solid #25334d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lightbox-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-brand img {
  height: 20px;
  width: auto;
}

.lb-sep {
  width: 1px;
  height: 14px;
  background: #334155;
}

.lb-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.lightbox-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.lightbox-close span {
  font-size: 10px;
  color: #94a3b8;
}

.lightbox-close:hover {
  border-color: #60a5fa;
}

.lightbox-stage {
  padding: 18px;
  background: #ffffff;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.lightbox-stage img {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0;
  padding: 12px 18px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid #25334d;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 250;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(10, 18, 32, 0.25);
}

/* ==========================================================================
   14. Responsive Breakpoints (1240px Tablet / 900px / 640px Mobile)
   ========================================================================== */

@media (max-width: 1239px) {
  .monograph-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .chapter-rail {
    display: none;
  }
  .tablet-chapter-bar {
    display: block;
  }
  html {
    scroll-padding-top: 112px;
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }
  .hero-split,
  .teaser-split,
  .method-split,
  .probing-lab-grid,
  .swiss-2x2,
  .microscope-card,
  .code-cite-split,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .teaser-figure,
  .micro-visual {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .slicer-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wb-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .diff-lanes {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .method-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .contact-sheet {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .masthead-inner {
    padding: 0 16px;
  }
  .hide-sm {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .container {
    padding: 0 16px;
  }
  .section-band {
    padding: 44px 0;
  }
  .sec-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-cell:nth-child(2) {
    border-right: none;
  }
  .kpi-cell:nth-child(1), .kpi-cell:nth-child(2) {
    border-bottom: 1px solid var(--rule);
  }
  .slicer-tabs,
  .method-stepper,
  .case-compare,
  .bias-strip,
  .theta-kpis,
  .case-stats-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-stat {
    border-right: none;
    border-bottom: 1px solid var(--rule-soft);
  }
  .case-stat:last-child { border-bottom: none; }
  .wb-scrubber {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .wb-clock {
    text-align: left;
  }
  .contact-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mod-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .mod-drop {
    text-align: left;
  }
  .race-row {
    grid-template-columns: 112px minmax(0, 1fr) 74px;
    gap: 6px;
  }
  .scope-telemetry {
    grid-template-columns: minmax(0, 1fr);
  }
  .scope-tele-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--rule-soft) !important;
  }
  .scope-tele-cell:last-child {
    border-bottom: none !important;
  }
}

@media (max-width: 440px) {
  .hide-xs {
    display: none !important;
  }
  .masthead-logos img {
    height: 18px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
