/* ==========================================================================
   Seeing Right, Writing Wrong — Academic Project Page Stylesheet (v2)
   Palette harmonized with the paper figures:
     Slate:      #B9BEC6
     Steel blue: #9BBAD9 (deep #3B6A94)
     Warm sand:  #E2B28F (deep #9B5F32)
     Terracotta: #DC8A7E (deep #B45245)
   ========================================================================== */

:root {
  --slate: #B9BEC6;
  --slate-soft: #F2F4F7;
  --blue: #9BBAD9;
  --blue-deep: #346088;
  --blue-tint: rgba(155, 186, 217, 0.17);
  --sand: #E2B28F;
  --sand-deep: #8F5429;
  --sand-tint: rgba(226, 178, 143, 0.17);
  --coral: #DC8A7E;
  --coral-deep: #A9473B;
  --coral-tint: rgba(220, 138, 126, 0.15);

  --bg: #FFFFFF;
  --band: #F6F7FA;
  --surface: #F7F8FA;
  --surface-warm: #FAF8F5;
  --ink: #182029;
  --text: #2A323E;
  --text-2: #525C6C;
  --muted: #5A6474; /* >= 5.7:1 contrast on #FFFFFF */
  --border: #E3E7EE;
  --border-strong: #C6CDD8;

  --serif: "Newsreader", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --col: 760px;
  --wide: 1040px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.66;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

[id] {
  scroll-margin-top: 96px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #FFFFFF;
  padding: 8px 14px;
  z-index: 200;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 6px;
}

a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-decoration-color: rgba(52, 96, 136, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 2px;
}

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

/* Reserve code styling strictly for prompt literals and code snippets */
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--slate-soft);
  color: var(--ink);
  padding: 0.08em 0.36em;
  border-radius: 4px;
  border: 1px solid rgba(185, 190, 198, 0.45);
}

/* Clean typographic emphasis for model/benchmark names without gray pill clutter */
.mname {
  font-weight: 550;
  color: var(--ink);
}

.col {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 24px;
}

.wide {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Sticky Navigation
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--blue-deep);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--slate-soft);
  color: var(--ink);
}

/* ==========================================================================
   Hero Header (split layout: text left, illustration right)
   ========================================================================== */
.hero {
  overflow-x: clip;
  background: #F4F1E8;
  border-bottom: 1px solid #E6E0D0;
  padding: 34px 0 30px;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 32px;
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.hero-subtitle {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  line-height: 1.25;
  color: var(--ink);
  margin: 10px 0 0;
  letter-spacing: -0.01em;
}

.hero-intro {
  margin: 20px 0 0;
  font-size: 1.04rem;
  line-height: 1.6;
  color: var(--text);
}

.hero-points {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hero-point {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text);
}

.hero-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-top: 1px;
}

.hero-icon svg {
  width: 26px;
  height: 26px;
}

.hero-point-head,
.hero-point a {
  font-weight: 650;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(24, 32, 41, 0.3);
  text-underline-offset: 3px;
}

.hero-point a:not(.hero-point-head) {
  font-weight: inherit;
}

.hero-point-head:hover,
.hero-point a:hover {
  color: var(--blue-deep);
  text-decoration-color: var(--blue-deep);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 120%;
  max-width: 800px;
  height: auto;
  display: block;
}

.hero .action-links {
  justify-content: flex-start;
  margin-top: 24px;
}

/* Section jump cards */
.jump-section {
  padding: 0 0 40px;
}

.jump-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.jump-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 14px 10px;
  background: #E3EEF9;
  border: 2.5px solid #6E9BD6;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.jump-card svg {
  width: 34px;
  height: 34px;
}

.jump-card:hover {
  background: #D4E5F7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 96, 136, 0.18);
}

.jump-hint {
  margin: 18px auto 0;
  max-width: 820px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(24, 32, 41, 0.08);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--blue-deep);
}

.jump-hint svg {
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.thesis-section {
  padding: 10px 0 0;
}

.byline {
  text-align: center;
  padding: 20px 24px 0;
}

.teaser-section {
  padding: 4px 0 28px;
}

.teaser-section .thesis-banner {
  margin-top: 18px;
}

.authors {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
}

.authors a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.authors a:hover {
  color: var(--blue-deep);
  border-bottom-color: var(--blue-deep);
}

.authors sup {
  font-size: 0.72em;
  color: var(--text-2);
  margin-left: 1px;
}

.affiliations {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-2);
}

.action-links {
  margin: 22px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.89rem;
  font-weight: 550;
  text-decoration: none;
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.btn-chip svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-chip:not(:disabled):hover {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-chip.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.btn-chip.btn-primary:not(:disabled):hover {
  background: #2C3645;
  border-color: #2C3645;
  color: #FFFFFF;
}

.btn-chip.is-placeholder:disabled {
  opacity: 0.84;
  cursor: not-allowed;
}

.placeholder-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--slate-soft);
  padding: 1px 6px;
  border-radius: 999px;
}

.btn-primary .placeholder-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* TL;DR banner */
.thesis-label {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.thesis-banner {
  margin: 28px auto 0;
  max-width: 820px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(155, 186, 217, 0.14) 0%, rgba(220, 138, 126, 0.13) 100%);
  border: 1px solid rgba(185, 190, 198, 0.6);
  border-radius: var(--radius);
  text-align: center;
}

.thesis-quote {
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2.2vw, 1.52rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.32;
  color: var(--ink);
  margin: 0;
}

.thesis-sub {
  margin: 6px auto 0;
  max-width: 720px;
  font-size: 0.99rem;
  line-height: 1.55;
  color: var(--text-2);
}

/* Hero Visual: Panel (a) Twins + Clean HTML/SVG Before/After Summary */
.hero-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: stretch;
  text-align: left;
  margin-top: 26px;
}

.hero-panel {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(24, 32, 41, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.hero-panel-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  margin: 0;
}

.hero-panel-meta {
  font-size: 0.78rem;
  color: var(--text-2);
}

.hero-twins-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.hero-twins-wrap img {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
}

.hero-mini-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  justify-content: center;
}

.hero-bar-group {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 4px;
}

.hero-bar-group:first-child {
  margin-top: 0;
}

.hero-bar-row {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.hero-bar-label {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
}

.hero-bar-tracks {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-bar-track {
  display: block;
  height: 7px;
  background: #EEF1F6;
  border-radius: 999px;
  overflow: hidden;
}

.hero-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}

.hero-bar-fill.before { background: var(--blue); }
.hero-bar-fill.after-lock { background: var(--coral); }
.hero-bar-fill.after-ok { background: var(--blue-deep); }

.hero-bar-val {
  font-family: var(--mono);
  font-size: 0.76rem;
  text-align: right;
  white-space: nowrap;
  color: var(--text-2);
}

.hero-bar-val .v-lock { color: var(--coral-deep); font-weight: 600; }
.hero-bar-val .v-ok { color: var(--blue-deep); font-weight: 600; }

.hero-caption {
  margin: 12px auto 0;
  max-width: 860px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-2);
  text-align: center;
}

.hero-caption strong {
  color: var(--ink);
}

/* ==========================================================================
   At-a-Glance: 4 Key-Number Cards + 3-Stage Clickable Pipeline (B1)
   ========================================================================== */
.glance-section {
  padding: 20px 0 22px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.kpi-card.accent-blue { background: var(--blue-tint); border-color: rgba(155, 186, 217, 0.55); }
.kpi-card.accent-coral { background: var(--coral-tint); border-color: rgba(220, 138, 126, 0.55); }
.kpi-card.accent-sand { background: var(--sand-tint); border-color: rgba(226, 178, 143, 0.6); }

.kpi-num {
  font-family: var(--serif);
  font-size: 1.62rem;
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
}

.kpi-card.accent-coral .kpi-num { color: var(--coral-deep); }
.kpi-card.accent-blue .kpi-num { color: var(--blue-deep); }
.kpi-card.accent-sand .kpi-num { color: var(--sand-deep); }

.kpi-text {
  font-size: 0.86rem;
  line-height: 1.46;
  color: var(--text);
  margin: 0;
}

.kpi-text strong {
  color: var(--ink);
}

.kpi-jump {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-deep);
}

.kpi-jump:hover {
  text-decoration: underline;
}

/* 3-Stage Clickable Flow Graphic */
.stage-flow {
  margin-top: 16px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stage-flow-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}

.stage-flow-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.stage-node {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-left: 4px solid var(--coral-deep);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface);
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.stage-node.s2 { border-left-color: var(--blue-deep); }
.stage-node.s3 { border-left-color: var(--sand-deep); }

.stage-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(24, 32, 41, 0.08);
  border-color: var(--border-strong);
}

.stage-node-step {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 3px;
}

.stage-node.s2 .stage-node-step { color: var(--blue-deep); }
.stage-node.s3 .stage-node-step { color: var(--sand-deep); }

.stage-node-title {
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
}

.stage-node-stat {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.38;
}

.stage-arrow {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
  user-select: none;
}

/* ==========================================================================
   Narrative Sections & Alternating Bands
   ========================================================================== */
.story-section {
  padding: 48px 0 42px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.story-section.band-alt {
  background: var(--band);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 10px;
}

.section-kicker.pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
}

.section-kicker.pill-coral {
  background: var(--coral-tint);
  border-color: rgba(169, 71, 59, 0.3);
  color: var(--coral-deep);
}

.section-kicker.pill-blue {
  background: var(--blue-tint);
  border-color: rgba(52, 96, 136, 0.3);
  color: var(--blue-deep);
}

.section-kicker.pill-sand {
  background: var(--sand-tint);
  border-color: rgba(143, 84, 41, 0.32);
  color: var(--sand-deep);
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate);
}

.kicker-dot.blue { background: var(--blue-deep); }
.kicker-dot.coral { background: var(--coral-deep); }
.kicker-dot.sand { background: var(--sand-deep); }

.story-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.8vw, 2.02rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: balance;
}

.story-section h3 {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1.06rem;
  line-height: 1.35;
  color: var(--ink);
  margin: 22px 0 8px;
}

.story-section p {
  margin: 0 0 14px;
}

.section-sub {
  color: var(--text-2);
  font-size: 0.94rem;
}

.lead-para {
  font-size: 1.04rem;
  color: var(--ink);
  line-height: 1.65;
}

/* ==========================================================================
   Figures, Floating Zoom Button & Lightbox
   ========================================================================== */
.paper-figure {
  margin: 26px auto;
}

.figure-frame {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 2px 10px rgba(24, 32, 41, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.figure-frame.zoomable {
  cursor: zoom-in;
}

.figure-frame.zoomable:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 20px rgba(24, 32, 41, 0.08);
}

.figure-frame img {
  margin: 0 auto;
  border-radius: 4px;
}

.zoom-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.88;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.figure-frame.zoomable:hover .zoom-badge {
  opacity: 1;
  background: #FFFFFF;
}

.paper-figure figcaption {
  margin-top: 10px;
  font-size: 0.89rem;
  line-height: 1.54;
  color: var(--text-2);
}

.paper-figure figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Glossary, Callouts, Equation & Collapsible Technical Details
   ========================================================================== */
.glossary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 24px;
}

.glossary-card {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 0.84rem;
  line-height: 1.44;
  color: var(--text-2);
}

.glossary-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.insight-callout {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--blue-deep);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.93rem;
  line-height: 1.58;
}

.insight-callout.sand {
  border-left-color: var(--sand-deep);
  background: rgba(226, 178, 143, 0.12);
}

.insight-callout.coral {
  border-left-color: var(--coral-deep);
  background: rgba(220, 138, 126, 0.11);
}

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

.takeaway-list {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.takeaway-list li {
  font-size: 0.92rem;
  line-height: 1.52;
}

/* Styled Equation Card (B6 / #8) */
.equation-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
}

.eq-term {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.eq-term.eq-s1 {
  background: var(--coral-tint);
  border-color: rgba(169, 71, 59, 0.3);
}

.eq-term.eq-s3 {
  background: var(--sand-tint);
  border-color: rgba(143, 84, 41, 0.32);
}

.eq-math {
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
}

.eq-term.eq-s1 .eq-math { color: var(--coral-deep); }
.eq-term.eq-s3 .eq-math { color: var(--sand-deep); }

.eq-note {
  font-size: 0.76rem;
  color: var(--text-2);
  margin-top: 3px;
}

.eq-op {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Collapsible Secondary Details */
.tech-details {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}

.tech-details summary {
  padding: 11px 15px;
  font-size: 0.89rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tech-details summary::-webkit-details-marker {
  display: none;
}

.tech-details summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--blue-deep);
  font-weight: 600;
}

.tech-details[open] summary::after {
  content: "−";
}

.tech-details[open] summary {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tech-details-body {
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--text);
}

.tech-details-body p:last-child {
  margin-bottom: 0;
}

/* Wider Split Editorial Grid (B5: 0.78fr text / 1.22fr figure) */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 30px;
  align-items: center;
  margin: 16px 0 8px;
}

.split-grid .paper-figure {
  margin: 0;
}

/* Stage 3 Converse Demo */
.converse-demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.converse-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #FFFFFF;
}

.converse-card.ok { border-top: 3px solid var(--blue-deep); }
.converse-card.fail { border-top: 3px solid var(--sand-deep); background: rgba(226, 178, 143, 0.1); }

.converse-tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.converse-card.ok .converse-tag { color: var(--blue-deep); }
.converse-card.fail .converse-tag { color: var(--sand-deep); }

.converse-stat {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 6px;
}

.converse-card p {
  font-size: 0.88rem;
  line-height: 1.48;
  color: var(--text-2);
  margin: 0;
}

/* ==========================================================================
   Interactive Charts (Stage 2, Frontier, Pilot)
   ========================================================================== */
.interactive-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  margin: 24px 0 26px;
  box-shadow: 0 2px 10px rgba(24, 32, 41, 0.03);
}

.interactive-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.interactive-title {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 650;
  color: var(--ink);
}

.interactive-sub {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.45;
}

.tab-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #ECEFF4;
  padding: 4px;
  border-radius: 10px;
}

.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 32, 41, 0.1);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  font-size: 0.84rem;
  color: var(--text-2);
  margin-bottom: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.swatch-blue { background: var(--blue); border: 1px solid rgba(52, 96, 136, 0.35); }
.swatch-blue-deep { background: var(--blue-deep); }
.swatch-coral { background: var(--coral); border: 1px solid rgba(169, 71, 59, 0.35); }
.swatch-slate { background: var(--slate); border: 1px solid rgba(90, 100, 116, 0.35); }
.swatch-sand { background: var(--sand); border: 1px solid rgba(143, 84, 41, 0.35); }

/* Axis Scale Header */
.chart-axis-row {
  display: grid;
  grid-template-columns: 162px minmax(0, 1fr) 174px;
  align-items: center;
  gap: 14px;
  padding: 0 10px 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-2);
}

.chart-axis-ticks {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: 162px minmax(0, 1fr) 174px;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgba(227, 231, 238, 0.9);
}

.bar-row.is-summary {
  background: rgba(155, 186, 217, 0.13);
  border-color: rgba(155, 186, 217, 0.55);
}

.bar-model {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.bar-model small {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 2px;
}

.bar-tracks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background-image: linear-gradient(
    to right,
    transparent 24.7%, rgba(185, 190, 198, 0.32) 24.7%, rgba(185, 190, 198, 0.32) 25.1%, transparent 25.1%,
    transparent 49.7%, rgba(185, 190, 198, 0.32) 49.7%, rgba(185, 190, 198, 0.32) 50.1%, transparent 50.1%,
    transparent 74.7%, rgba(185, 190, 198, 0.32) 74.7%, rgba(185, 190, 198, 0.32) 75.1%, transparent 75.1%
  );
  padding: 2px 0;
}

.bar-track {
  position: relative;
  height: 10px;
  background: #E9EDF3;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 2px;
}

.bar-fill.direct { background: var(--blue); }
.bar-fill.fixed { background: var(--coral); }
.bar-fill.reground { background: var(--blue-deep); }
.bar-fill.base-bar { background: var(--slate); }
.bar-fill.match-bar { background: var(--blue-deep); }
.bar-fill.cf-bar { background: var(--sand); }

.bar-nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.38;
  white-space: nowrap;
}

.num-direct { color: var(--blue-deep); font-weight: 600; }
.num-fixed { color: var(--coral-deep); font-weight: 600; }
.num-reground { color: var(--blue-deep); font-weight: 600; }
.num-ci { color: var(--text-2); font-size: 0.73rem; font-weight: 400; margin-left: 3px; }

.group-separator {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 2px 2px;
}

.chart-summary-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text-2);
}

.chart-summary-bar strong { color: var(--ink); }

/* Pilot 3-Metric Grouped Visual Chart (B5) */
.pilot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.pilot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pilot-card-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}

.pilot-card-sub {
  font-size: 0.79rem;
  color: var(--text-2);
  margin: -6px 0 0;
  line-height: 1.35;
}

.pilot-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pilot-bar-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.pilot-arm {
  font-weight: 600;
  color: var(--ink);
}

.pilot-val {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  color: var(--ink);
}

.pilot-val.v-match { color: var(--blue-deep); }
.pilot-val.v-cf { color: var(--sand-deep); }

/* ==========================================================================
   Native HTML Verbatim Trace Viewer (B3)
   ========================================================================== */
.trace-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0 28px;
  box-shadow: 0 2px 10px rgba(24, 32, 41, 0.03);
}

.trace-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}

.trace-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trace-side img {
  width: 100%;
  max-width: 185px;
  margin: 0 auto;
  border-radius: 4px;
}

.trace-question {
  font-size: 0.85rem;
  line-height: 1.44;
  color: var(--ink);
  font-weight: 550;
}

.trace-meta {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.42;
}

.trace-pill-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trace-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.trace-pill.ok {
  background: rgba(52, 96, 136, 0.1);
  border-color: rgba(52, 96, 136, 0.3);
  color: var(--blue-deep);
}

.trace-pill.err {
  background: var(--coral-tint);
  border-color: rgba(169, 71, 59, 0.35);
  color: var(--coral-deep);
}

.trace-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trace-step-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 126px;
  gap: 10px;
  padding: 0 10px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}

.trace-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 126px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid transparent;
  font-size: 0.86rem;
  line-height: 1.42;
}

.trace-step.is-commit {
  background: var(--coral-tint);
  border-color: rgba(169, 71, 59, 0.45);
  font-weight: 600;
  color: var(--ink);
}

.trace-step.is-true {
  background: var(--blue-tint);
  border-color: rgba(52, 96, 136, 0.32);
}

.trace-step.is-warn {
  background: var(--sand-tint);
  border-color: rgba(143, 84, 41, 0.4);
  font-weight: 600;
}

.step-idx {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

.step-idx .jstar-tag {
  display: inline-block;
  margin-left: 3px;
  color: var(--coral-deep);
  font-weight: 700;
}

.step-prob {
  display: flex;
  align-items: center;
  gap: 7px;
}

.step-prob-bar {
  flex: 1;
  height: 9px;
  background: #E5E9F0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.step-prob-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(24, 32, 41, 0.25);
}

.step-prob-fill {
  height: 100%;
  border-radius: 999px;
}

.step-prob-fill.high { background: var(--blue); }
.step-prob-fill.low { background: var(--coral); }

.step-prob-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  width: 34px;
  text-align: right;
  color: var(--ink);
}

.step-prob-num.low { color: var(--coral-deep); }

.trace-turn-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.trace-turn-box.reground {
  background: var(--blue-tint);
  border-color: rgba(52, 96, 136, 0.35);
}

.trace-footnote {
  margin-top: 10px;
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.45;
}

/* ==========================================================================
   Clean Academic Tables (Sticky First Column on Mobile)
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #FFFFFF;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.44;
}

.data-table caption {
  text-align: left;
  padding: 12px 14px 10px;
  font-size: 0.86rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.data-table caption strong {
  color: var(--ink);
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  white-space: normal;
  min-width: 160px;
}

.data-table thead th {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.8rem;
  border-bottom: 1.5px solid var(--border-strong);
}

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

.data-table tbody tr.row-highlight-coral { background: rgba(220, 138, 126, 0.12); }
.data-table tbody tr.row-highlight-blue { background: rgba(155, 186, 217, 0.14); }
.data-table tbody tr.row-highlight-sand { background: rgba(226, 178, 143, 0.13); }

.data-table .ci {
  display: block;
  font-size: 0.75rem;
  color: var(--text-2);
  font-family: var(--mono);
}

.data-table .val-neg { color: var(--coral-deep); font-weight: 600; }
.data-table .val-pos { color: var(--blue-deep); font-weight: 600; }
.data-table .val-warn { color: var(--sand-deep); font-weight: 600; }

.table-note {
  font-size: 0.84rem;
  color: var(--text-2);
  margin: 0 0 22px;
  line-height: 1.48;
}

.table-scroll-hint {
  display: none;
  font-size: 0.8rem;
  color: var(--text-2);
  text-align: right;
  margin: 0 0 4px;
}

/* ==========================================================================
   BibTeX & Footer
   ========================================================================== */
.bibtex-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 12px;
}

.bibtex-card pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.66;
  color: var(--ink);
}

.bibtex-card pre code {
  white-space: pre;
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--ink);
  background: #FFFFFF;
}

.copy-btn.copied {
  border-color: var(--blue-deep);
  color: var(--blue-deep);
  background: var(--blue-tint);
}

.site-footer {
  padding: 30px 0 44px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-2);
}

.site-footer p {
  margin: 4px 0;
}

/* ==========================================================================
   Accessible Lightbox Modal (supports 1:1 pan on mobile)
   ========================================================================== */
.lightbox[hidden] {
  display: none;
}

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

.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lightbox-btn {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(24, 32, 41, 0.8);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: #FFFFFF;
  color: var(--ink);
}

.lightbox-content {
  max-width: min(1260px, 95vw);
  max-height: 84vh;
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox-content img {
  max-height: 70vh;
  width: auto;
  margin: 0 auto;
}

.lightbox-content.actual-size img {
  max-width: none;
  max-height: none;
  width: 1100px;
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 960px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .hero-image img {
    width: 104%;
  }
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 24px;
  }

  .hero-image img {
    width: 100%;
    max-width: 480px;
    margin: 12px auto 0;
  }
}

@media (max-width: 920px) {
  .hero-visual-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glossary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-grid {
    grid-template-columns: 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .trace-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stage-flow-track {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stage-arrow {
    transform: rotate(90deg);
    line-height: 1;
  }
}

@media (max-width: 760px) {
  .jump-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .jump-card {
    min-height: 92px;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15.5px;
  }

  .col,
  .wide {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 8px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .nav-links {
    width: 100%;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    font-size: 0.875rem; /* 14px */
    padding: 4px 8px;
  }

  .hero {
    padding: 22px 0 26px;
  }

  .hero-inner {
    padding: 0 16px;
  }

  .hero-point {
    font-size: 0.93rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .glossary-strip {
    grid-template-columns: 1fr;
  }

  .story-section {
    padding: 34px 0 28px;
  }

  .figure-frame {
    padding: 10px;
  }

  .kpi-text,
  .stage-node-stat,
  .glossary-card,
  .interactive-sub,
  .chart-legend,
  .chart-summary-bar,
  .pilot-card-sub,
  .pilot-bar-item,
  .pilot-val,
  .trace-question,
  .trace-meta,
  .trace-pill,
  .trace-footnote,
  .table-note,
  .converse-card p,
  figcaption {
    font-size: 0.875rem; /* >= 14px on mobile */
  }

  .hero-bar-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    font-size: 0.875rem;
  }

  .hero-bar-label { grid-column: 1 / 2; grid-row: 1; }
  .hero-bar-val { grid-column: 2 / 3; grid-row: 1; }
  .hero-bar-tracks { grid-column: 1 / 3; grid-row: 2; }

  .interactive-card,
  .trace-card {
    padding: 16px 14px;
  }

  .chart-axis-row {
    display: none;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 9px 10px;
  }

  .bar-nums {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
  }

  .num-ci {
    font-size: 0.82rem;
  }

  .bar-model {
    font-size: 0.9rem;
  }

  .bar-model small {
    font-size: 0.82rem;
  }

  .trace-step-head {
    display: none;
  }

  .trace-step {
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px 8px;
    font-size: 0.88rem;
  }

  .step-prob {
    grid-column: 1 / 3;
  }

  .table-scroll-hint {
    display: block;
  }

  .data-table {
    font-size: 0.875rem;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    background: #FFFFFF;
    z-index: 2;
    min-width: 136px;
    box-shadow: 2px 0 6px rgba(24, 32, 41, 0.06);
  }

  .data-table thead th:first-child {
    background: var(--surface);
  }

  .data-table tbody tr.row-highlight-coral td:first-child { background: #FAF0EE; }
  .data-table tbody tr.row-highlight-blue td:first-child { background: #EEF4F9; }
  .data-table tbody tr.row-highlight-sand td:first-child { background: #FAF3EC; }

  .converse-demo {
    grid-template-columns: 1fr;
  }

  .bibtex-card pre {
    padding-top: 38px;
    font-size: 0.82rem;
  }
}
