/* ==========================================================================
   DaRo Project Page — Obsidian Dark Theme
   Palette echoes paper figures: GPT Blue (#2A78D6 / #4da3ff) & MJ Emerald (#1BAF7A / #34d399)
   ========================================================================== */

:root {
  --bg-obsidian: #06070a;
  --bg-surface: #0c0f16;
  --bg-elevated: rgba(18, 22, 32, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f5f7fb;
  --text-secondary: #a2aab9;
  --text-muted: #6c7486;

  --accent-gpt: #4da3ff;
  --accent-gpt-soft: rgba(77, 163, 255, 0.16);
  --accent-mj: #2dd498;
  --accent-mj-soft: rgba(45, 212, 152, 0.16);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --max-width: 1680px;
}

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

html {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-obsidian);
  overflow-x: hidden;
  position: relative;
}

/* Subtle Ambient Top Glow */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  width: 680px;
  height: 460px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.15;
}

.ambient-orb--blue {
  top: -190px;
  left: calc(50% - 540px);
  background: radial-gradient(circle, #2a78d6 0%, transparent 72%);
}

.ambient-orb--emerald {
  top: -170px;
  right: calc(50% - 540px);
  background: radial-gradient(circle, #1baf7a 0%, transparent 72%);
}

/* Main Container */
.page-shell {
  position: relative;
  z-index: 1;
  width: min(96vw, var(--max-width));
  margin: 0 auto;
  padding: 48px 16px 88px;
}

/* ==========================================================================
   HERO HEADER
   ========================================================================== */

.hero {
  text-align: center;
  max-width: 1440px;
  margin: 0 auto 42px;
}

.project-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.project-tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.project-tab:hover,
.project-tab[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.project-tab:focus-visible,
.showcase-subtitle:focus-visible {
  outline: 2px solid var(--accent-gpt);
  outline-offset: 2px;
}

.paper-title {
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 0 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.028em;
  color: var(--text-primary);
}

.title-lead {
  display: block;
  font-size: clamp(1.9rem, 3.3vw, 3.15rem);
  background: linear-gradient(180deg, #ffffff 0%, #dce3f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-sub {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.45rem, 2.85vw, 2.75rem);
  color: #e4e9f5;
  font-weight: 700;
  white-space: nowrap;
}

/* Authors & Affiliations */
.authors-block {
  margin-bottom: 30px;
}

.author-list,
.affiliation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.author-list {
  gap: 8px 22px;
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.author-list a {
  color: #e5e9f4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.author-list a:hover {
  color: var(--accent-gpt);
  border-bottom-color: rgba(77, 163, 255, 0.45);
}

.author-list sup,
.affiliation-list sup {
  font-size: 0.72em;
  color: var(--text-muted);
  margin-left: 2px;
}

.affiliation-list {
  gap: 6px 24px;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* Resource Action Buttons */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  backdrop-filter: blur(12px);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.resource-btn:hover {
  transform: translateY(-1.5px);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.resource-btn:active {
  transform: translateY(0);
}

.resource-btn--primary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #dce3f2;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   INTERACTIVE COMPARISON SHOWCASE ("Generate like GPT or MJ")
   ========================================================================== */

.showcase-section {
  margin-top: 8px;
}

.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.showcase-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.accent-gpt {
  color: var(--accent-gpt);
}

.accent-mj {
  color: var(--accent-mj);
}

.showcase-subtitle {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.showcase-subtitle strong {
  color: #e6ebf5;
  font-weight: 600;
}

/* Comparison Card Wrapper */
.compare-card {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 14px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

/* Split Stage */
.compare-stage {
  position: relative;
  width: 100%;
  max-width: calc(602px * var(--compare-ratio, 16 / 9));
  margin-inline: auto;
  aspect-ratio: var(--compare-ratio, 16 / 9);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #050608;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  outline: none;
}

.compare-stage:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-gpt);
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.compare-stage.is-switching .compare-img {
  opacity: 0.45;
}

/* Clipped Base Model Layer on Left */
.compare-before-clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  will-change: clip-path;
}

/* Corner Labels */
.stage-badge {
  position: absolute;
  top: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.8rem;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stage-badge--left {
  left: 16px;
}

.stage-badge--right {
  right: 16px;
}

.stage-badge.is-occluded {
  opacity: 0;
  transform: translateY(-4px);
}

.badge-tag {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.badge-detail {
  color: #c6cddb;
  font-weight: 500;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gpt);
  box-shadow: 0 0 10px var(--accent-gpt);
}

.stage-badge--right[data-target="mj"] .badge-dot {
  background: var(--accent-mj);
  box-shadow: 0 0 10px var(--accent-mj);
}

/* Vertical Divider & Drag Handle */
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 4;
  width: 0;
  pointer-events: none;
  will-change: left;
}

.divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 16px rgba(255, 255, 255, 0.38);
}

.divider-handle {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 13, 20, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.55),
    0 0 0 4px rgba(255, 255, 255, 0.08);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.divider-handle svg {
  width: 20px;
  height: 20px;
}

.compare-stage:hover .divider-handle,
.compare-stage.is-dragging .divider-handle {
  transform: translate(-50%, -50%) scale(1.07);
  background: rgba(18, 24, 36, 0.92);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.68),
    0 0 0 6px rgba(255, 255, 255, 0.14);
}

/* Toolbar & Scene Switcher Strip */
.compare-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.scene-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}

.scene-strip::-webkit-scrollbar {
  display: none;
}

.scene-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.scene-chip img {
  width: 46px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  opacity: 0.78;
  transition: opacity 0.16s ease;
}

.scene-chip:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

.scene-chip:hover img,
.scene-chip.is-active img {
  opacity: 1;
}

.scene-chip.is-active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--text-primary);
}

.chip-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1;
}

.chip-title {
  font-size: 0.775rem;
  font-weight: 600;
}

.chip-target {
  font-size: 0.675rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.chip-target--gpt {
  color: var(--accent-gpt);
}

.chip-target--mj {
  color: var(--accent-mj);
}

/* Auto-Sweep Toggle Button */
.sweep-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sweep-toggle:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.sweep-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.sweep-toggle.is-sweeping {
  color: var(--text-primary);
  border-color: rgba(45, 212, 152, 0.32);
}

.sweep-toggle.is-sweeping .sweep-indicator {
  background: var(--accent-mj);
  box-shadow: 0 0 8px var(--accent-mj);
}

/* Subtle Status Toast */
.status-toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 30;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(16, 20, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .page-shell {
    width: 100%;
    padding: 36px 14px 64px;
  }

  .hero {
    margin-bottom: 36px;
  }

  .title-sub {
    white-space: normal;
  }

  .stage-badge {
    top: 10px;
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  .stage-badge--left {
    left: 10px;
  }

  .stage-badge--right {
    right: 10px;
  }

  .badge-detail {
    display: none;
  }

  .divider-handle {
    width: 38px;
    height: 38px;
  }
}

/* Arena leaderboard */
.arena-page {
  max-width: 1260px;
}

.arena-hero {
  position: relative;
  margin-bottom: 26px;
}

.arena-home {
  position: absolute;
  top: 4px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.arena-home:hover {
  background: rgba(255, 255, 255, 0.08);
}

.arena-home:focus-visible,
.arena-table-wrap:focus-visible {
  outline: 2px solid var(--accent-gpt);
  outline-offset: 3px;
}

.arena-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.arena-meta {
  margin: 5px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.arena-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.arena-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.arena-table th,
.arena-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
}

.arena-table thead th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.arena-table tbody th,
.arena-table th:nth-child(2),
.arena-table :is(th, td):nth-child(3) {
  text-align: left;
}

.arena-table tbody th {
  color: var(--text-primary);
  font-weight: 600;
}

.arena-table tbody tr:last-child > * {
  border-bottom: 0;
}

.arena-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.arena-notes {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 22px 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.arena-notes dt {
  color: var(--text-primary);
  font-weight: 600;
}

.arena-notes dd {
  margin: 0;
}

@media (max-width: 640px) {
  .arena-home {
    position: static;
    display: flex;
    width: fit-content;
    margin: 0 auto 18px;
  }

  .arena-notes {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .arena-notes dd + dt {
    margin-top: 8px;
  }
}

/* Method animation */
.method-migration {
  width: min(100%, 1100px);
  margin: 0 auto;
}

.method-migration h1 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3.4vw, 2.65rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-align: center;
}

.migration-controls,
.migration-steps,
.migration-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.migration-controls {
  justify-content: space-between;
  margin-bottom: 10px;
}

.migration-controls button {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.migration-controls button:hover,
.migration-controls button[aria-current="step"] {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.migration-controls button:focus-visible {
  outline: 2px solid var(--accent-gpt);
  outline-offset: 2px;
}

#migration-motion,
#adaptation-motion {
  min-width: 72px;
}

.migration-stage {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: #000 url("./assets/distribution-migration-backdrop.webp") center / 100% 100% no-repeat;
}

.migration-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

.migration-legend {
  justify-content: center;
  gap: 8px 20px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  list-style: none;
}

.migration-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}

.migration-key--base { background: #a4adbc; }
.migration-key--gpt { background: #58a8ff; }
.migration-key--mj { background: #38d6a0; }

.method-migration figcaption {
  max-width: 90ch;
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}


/* ==========================================================================
   EXTENDED SECTIONS — OVERVIEW, METHOD & USER STUDY
   ========================================================================== */

.content-section,
.method-block {
  width: min(100%, 1180px);
  margin: 76px auto 0;
}

.method-page .method-hero {
  margin-bottom: 24px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-gpt);
}

.section-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.section-desc {
  max-width: 72ch;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.method-desc--two-line {
  max-width: 860px;
}

@media (min-width: 960px) {
  .method-desc--two-line span {
    display: block;
  }
}

.section-header--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  flex-wrap: wrap;
}

.section-header--split .section-desc {
  margin: 0;
}

/* Filter & Tab Pills */
.filter-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
}

.filter-pill {
  padding: 7px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.filter-pill:hover {
  color: var(--text-primary);
}

.filter-pill.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-primary);
}

.filter-pill:focus-visible {
  outline: 2px solid var(--accent-gpt);
  outline-offset: 2px;
}

/* Overview Lead + Bento Stats */
.overview-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.overview-lead-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.overview-prose {
  margin: 6px 0 22px;
  font-size: 0.975rem;
  line-height: 1.72;
  color: #c2cad8;
}

.overview-prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.overview-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(77, 163, 255, 0.12);
  border: 1px solid rgba(77, 163, 255, 0.3);
  color: #dcebff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.inline-cta:hover {
  background: rgba(77, 163, 255, 0.2);
  border-color: rgba(77, 163, 255, 0.5);
  transform: translateY(-1px);
}

.inline-cta--muted {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.inline-cta--muted:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
}

.stat-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-value {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.stat-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #dde3f0;
}

.stat-desc {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.52;
  color: var(--text-secondary);
}

/* Visual Bento Gallery */
.gallery-bento {
  --gallery-columns: 4;
  --gallery-row-height: 245px;
  --gallery-gap: 14px;
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr));
  grid-auto-rows: var(--gallery-row-height);
  gap: var(--gallery-gap);
}

.gallery-bento.has-gallery-rows {
  display: flex;
  flex-direction: column;
}

.gallery-row {
  display: flex;
  gap: var(--gallery-gap);
  height: var(--gallery-row-height);
  transition: height 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-row > .gallery-item {
  --gallery-span: 1;
  min-width: 0;
  flex: var(--gallery-span) 1 calc((var(--gallery-span) - 1) * var(--gallery-gap));
  transition: flex-grow 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.gallery-row > .gallery-item--wide {
  --gallery-span: 2;
}

.gallery-row--partial::after {
  content: "";
  flex: var(--gallery-empty) 1 calc((var(--gallery-empty) - 1) * var(--gallery-gap));
}

.gallery-row.is-gallery-focused {
  height: clamp(350px, 45vw, 440px);
}

.gallery-row:has(+ .gallery-row.is-gallery-focused),
.gallery-row.is-gallery-focused + .gallery-row {
  height: calc(var(--gallery-row-height) - 28px);
}

.gallery-row > .gallery-item.is-gallery-focused {
  flex-grow: calc(var(--gallery-span) + 5);
  border-color: var(--border-strong);
}

.has-gallery-focus .gallery-item:not(.is-gallery-focused) {
  opacity: 0.76;
}

.gallery-row > .gallery-item:focus-visible {
  outline: 2px solid var(--accent-gpt);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-row,
  .gallery-row > .gallery-item {
    transition: none;
  }
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.gallery-item[hidden] {
  display: none !important;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item.is-gallery-focused img {
  object-fit: contain;
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 11, 0.88) 72%);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.gal-badge {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gal-badge--gpt {
  background: rgba(77, 163, 255, 0.2);
  border: 1px solid rgba(77, 163, 255, 0.45);
  color: #93c8ff;
}

.gal-badge--mj {
  background: rgba(45, 212, 152, 0.18);
  border: 1px solid rgba(45, 212, 152, 0.45);
  color: #6ee7b7;
}

.gal-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: #e4e9f5;
}

/* Sample Diversity Showcase */
.diversity-showcase {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diversity-row-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.diversity-row-card--daro {
  border-color: rgba(45, 212, 152, 0.32);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

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

.diversity-model-tag {
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd3e3;
}

.diversity-model-tag--daro {
  color: #ffffff;
}

.diversity-stat {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
}

.diversity-stat--warn {
  background: rgba(245, 158, 98, 0.14);
  border: 1px solid rgba(245, 158, 98, 0.32);
  color: #f7b27d;
}

.diversity-stat--good {
  background: rgba(45, 212, 152, 0.14);
  border: 1px solid rgba(45, 212, 152, 0.35);
  color: #6ee7b7;
}

.diversity-row-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Benchmark Tables Override & Highlighting */
.bench-table th,
.bench-table td,
.bench-table :is(th, td):nth-child(3) {
  text-align: right;
}

.bench-table thead th:first-child,
.bench-table thead th:nth-child(2),
.bench-table tbody th,
.bench-table td.cell-group {
  text-align: left;
}

.bench-table td.cell-group {
  color: var(--text-secondary);
  font-weight: 600;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.018);
  border-right: 1px solid var(--border-subtle);
}

.group-divider > * {
  border-top: 1.5px solid rgba(255, 255, 255, 0.14);
}

.arena-table tbody tr.row-daro {
  background: rgba(56, 214, 160, 0.055);
}

.arena-table tbody tr.row-daro:hover {
  background: rgba(56, 214, 160, 0.1);
}

.arena-table tbody tr.row-daro th {
  color: #ffffff;
}

.arena-table strong {
  color: #ffffff;
  font-weight: 700;
}

.table-footnote {
  margin: 10px 4px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Rank Medals on Leaderboard */
.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-medal--gold {
  background: rgba(247, 201, 72, 0.2);
  border: 1px solid rgba(247, 201, 72, 0.5);
  color: #ffd86b;
}

.rank-medal--silver {
  background: rgba(203, 213, 225, 0.18);
  border: 1px solid rgba(203, 213, 225, 0.45);
  color: #e2e8f0;
}

.rank-medal--bronze {
  background: rgba(235, 149, 96, 0.2);
  border: 1px solid rgba(235, 149, 96, 0.48);
  color: #f6ad7b;
}

/* Citation / BibTeX Block */
.citation-card {
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.citation-header .section-title {
  margin-bottom: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

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

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.copy-btn.is-copied {
  border-color: rgba(45, 212, 152, 0.5);
  color: var(--accent-mj);
}

.bibtex-pre {
  margin: 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: #07090e;
  border: 1px solid rgba(255, 255, 255, 0.065);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.65;
  color: #d6deee;
}

/* ==========================================================================
   METHOD PAGE VISUAL BLOCKS
   ========================================================================== */

.paradigm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.paradigm-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.paradigm-card--daro {
  grid-column: 1 / -1;
  border-color: rgba(45, 212, 152, 0.34);
  background: linear-gradient(180deg, rgba(16, 28, 28, 0.55) 0%, var(--bg-surface) 100%);
}

.paradigm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.paradigm-badge {
  font-size: 0.88rem;
  font-weight: 700;
}

.paradigm-badge--muted { color: #dbe2f0; }
.paradigm-badge--daro  { color: #ffffff; }

.paradigm-limit,
.paradigm-ok {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

.paradigm-limit {
  background: rgba(245, 158, 98, 0.12);
  border: 1px solid rgba(245, 158, 98, 0.3);
  color: #f5b17e;
}

.paradigm-ok {
  background: rgba(45, 212, 152, 0.14);
  border: 1px solid rgba(45, 212, 152, 0.38);
  color: #6ee7b7;
}

.rollout-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daro-dual-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.corridor-connectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  align-items: center;
  padding: 2px 0;
}

.loss-pill {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: rgba(45, 212, 152, 0.16);
  border: 1px solid rgba(45, 212, 152, 0.45);
  color: #7ef0c4;
  font-size: 0.76rem;
  font-weight: 700;
}

.state-thumb {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.state-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: block;
}

.state-thumb--focus-warn img { border-color: #f59e62; }
.state-thumb--focus-blue img { border-color: var(--accent-gpt); }
.state-thumb--focus-daro img { border-color: var(--accent-mj); }

.state-thumb span {
  display: block;
  margin-top: 5px;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.strip-arrow {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.teacher-box {
  flex: 1.15 1 0;
  padding: 12px 10px;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teacher-box strong {
  font-size: 0.78rem;
  color: var(--text-primary);
}

.teacher-box span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.teacher-box--locked {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.teacher-box--data {
  background: rgba(45, 212, 152, 0.1);
  border: 1px solid rgba(45, 212, 152, 0.35);
}

.paradigm-caption {
  margin: 14px 0 0;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Vector Architecture Card & Pillars */
.arch-diagram-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.arch-svg {
  width: 100%;
  min-width: 780px;
  height: auto;
  display: block;
}

.method-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.pillar-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.pillar-num {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-mj);
}

.pillar-card h3 {
  margin: 6px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pillar-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.pillar-card code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce6f7;
  font-size: 0.8em;
}

/* Scientific Dark Plot Cards */
.dark-plot-card {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.dark-plot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.adaptation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.3vw, 16px);
}

.adaptation-stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #0c0f16;
}

.adaptation-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.adaptation-panel h3 {
  margin: 6px 0 0;
  font-size: 0.86rem;
  text-align: center;
  color: var(--text-primary);
}

.adaptation-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Visual Checkpoint Evolution Loop */
.evolution-card {
  max-width: 944px;
  margin: 0 auto;
}

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

.evolution-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 128px;
}

.evolution-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-mj);
  box-shadow: 0 0 8px rgba(45, 212, 152, 0.7);
  flex-shrink: 0;
}

.evolution-track {
  flex: 1 1 320px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evolution-track-rail {
  position: relative;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.evolution-track-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-gpt) 0%, var(--accent-mj) 100%);
  will-change: width;
}

.evolution-ticks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.evolution-tick {
  transition: color 0.2s ease;
}

.evolution-tick.is-passed {
  color: var(--text-secondary);
}

.evolution-tick.is-active {
  color: var(--text-primary);
}

.evolution-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1456 / 816;
  overflow: hidden;
  border-radius: 10px;
  background: #0c0f16;
  border: 1px solid var(--border-subtle);
}

.evolution-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  will-change: opacity;
}

.evolution-stage img.is-base {
  opacity: 1;
  z-index: 1;
}

@media (max-width: 800px) {
  .adaptation-grid {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
    gap: 14px;
  }
}

.dark-plot-card figcaption {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.plot-takeaways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.text-warn {
  color: #f59e62;
}

.corridor-visual-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.corridor-stage {
  position: relative;
  isolation: isolate;
}

.corridor-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#corridor-violin .migration-controls[hidden] {
  display: none;
}

.corridor-sigma {
  color: var(--text-secondary);
  padding-inline: 4px;
}

.corridor-motion {
  min-width: 72px;
}

.ablation-wrap {
  margin-top: 18px;
}

.arena-heatmap-card {
  max-width: 940px;
  margin: 0 auto;
}

/* Responsive Breakpoints for Extended Sections */
@media (max-width: 980px) {
  .overview-grid,
  .paradigm-grid,
  .method-pillars,
  .plot-takeaways {
    grid-template-columns: 1fr;
  }

  .gallery-bento {
    --gallery-columns: 2;
    --gallery-row-height: 220px;
  }
}

@media (max-width: 640px) {
  .content-section,
  .method-block {
    margin-top: 52px;
  }

  .stat-bento {
    grid-template-columns: 1fr;
  }

  .gallery-bento {
    --gallery-columns: 1;
  }

  .gallery-item--wide {
    grid-column: span 1;
  }

  .rollout-strip {
    flex-wrap: wrap;
  }
}
