/* ===== Custom Properties ===== */
:root {
  --color-bg:             #faf9f5;
  --color-bg-alt:         #f1efe7;
  --color-surface:        #fffefb;
  --color-text:           #1d1c1a;
  --color-text-secondary: #5e5b54;
  --color-accent:         #c45e3b;
  --color-accent-hover:   #a64a2b;
  --color-accent-light:   #f6e7df;
  --color-border:         #e7e3d8;
  --color-border-light:   #efece3;
  --color-code-bg:        #1d1d1b;
  --color-code-text:      #d4d4d4;
  --shadow:               0 1px 2px rgba(40,30,20,.05);
  --shadow-lg:            0 18px 40px -16px rgba(60,40,20,.22);
  --shadow-card:          0 1px 2px rgba(40,30,20,.05), 0 14px 32px -18px rgba(60,40,20,.16);

  --color-warm-low:       #fff8e6;
  --color-warm-high:      #b10026;
  --color-cool:           #0e7490;
  --fig-baseline:         #3a4671;  /* agent-centric points/frontier in the scatter */

  /* Site unified to a single typeface (Inter). --font-serif is kept as an alias
     of the sans stack so the many existing var(--font-serif) references resolve
     to Inter without touching each declaration. */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: var(--font-sans);
  --font-mono:  ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --max-width:       920px;
  --max-width-wide:  1080px;
  --nav-height:      56px;
  --section-spacing: 6rem;
  --radius:          14px;
}

[data-theme="dark"] {
  --color-bg:             #211b12;
  --color-bg-alt:         #2b2416;
  --color-surface:        #282115;
  --color-text:           #ece9e2;
  --color-text-secondary: #a8a399;
  --color-accent:         #e58a5f;
  --color-accent-hover:   #f0a07d;
  --color-accent-light:   rgba(229,138,95,0.18);
  --color-border:         #3a3120;
  --color-border-light:   #2f2818;
  --color-code-bg:        #1b1610;
  --shadow-card:          0 1px 2px rgba(0,0,0,.3), 0 14px 32px -18px rgba(0,0,0,.55);
  --fig-baseline:         #9aa2cc;  /* lighter on the dark page */
  --color-warm-low:       #3a2a10;
  --color-warm-high:      #ff6b5b;
  --color-cool:           #5cc6db;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 2rem);
  overflow-x: clip;
}
body {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent-hover); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--color-text); }
em { font-style: italic; }
strong { font-weight: 600; }

/* ===== Typographic refinement ===== */
/* Balance line lengths in short display text so headings never strand a lone
   last word; apply widow/orphan control to running prose. Progressive
   enhancement — engines without text-wrap support wrap exactly as before. */
h1, h2, h3, h4, h5, h6,
.nav-name, .tagline {
  text-wrap: balance;
}
p, li, figcaption {
  text-wrap: pretty;
}

/* All inline code is monospace and uniform */
code, kbd, samp { font-family: var(--font-mono); font-size: 0.875em; }
:not(pre) > code {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  padding: 0.08em 0.36em;
  color: var(--color-text);
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 0 0 6px 6px;
  z-index: 200;
}
.skip-link:focus { top: 0; color: #fff; }

/* ===== Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--color-border-light); }
[data-theme="dark"] .site-header { background: rgba(31, 29, 27, 0.85); }
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-name {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.nav-name:hover { color: var(--color-accent); }
.nav-links { display: flex; gap: 1.35rem; margin-left: 0; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }

/* The toggle used to sit in the site header; the header was dropped in
   5e68140 and took the button with it, leaving the theme CSS unreachable.
   It now floats in the top-right corner instead of bringing the header back. */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-border);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.theme-toggle:hover { color: var(--color-accent); border-color: var(--color-accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: block; }

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--wide { max-width: var(--max-width-wide); }
section { padding-top: var(--section-spacing); }
section:last-of-type { padding-bottom: var(--section-spacing); }

/* ===== Section Headings ===== */
h2 {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}
h2::after {
  content: '';
  display: block;
  width: 32px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  border-radius: 2px;
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

/* ===== Hero Section ===== */
/* No bottom padding: the following section's padding-top supplies the gap,
   matching every other section transition. (Adding both doubled it to 240px.) */
.hero-section {
  padding: clamp(4rem, 9vw, 7rem) 0 0;
  text-align: center;
}
.conf-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-accent-hover);
  background: var(--color-accent-light);
  padding: 0.25rem 0.85rem;
  border-radius: 3px;
  margin-bottom: 1.3rem;
}
.hero-section h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 820px;
  margin: 0 auto 1.4rem;
  color: var(--color-text);
}
.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto 1.6rem;
  line-height: 1.55;
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text);
  margin: -0.65rem auto 1.35rem;
  line-height: 1.35;
}
.authors {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.4rem;
  line-height: 1.9;
}
.institutions {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}
/* ===== Concept diagram (native; replaces the hero teaser PNG) ===== */
.concept { max-width: 1000px; margin: 2.4rem auto 0; padding: 0 1.5rem; }
/* Figure 1 from the paper (all three panels: the two concept panels plus the
   solve-rate-vs-cost scatter), recolored per theme by
   scripts/make_concept_figure.py so it sits on the page background instead of
   inside a light card. Loaded as a background so only the active theme's asset
   is fetched. */
.concept-art {
  aspect-ratio: 2822 / 911;
  background: center / contain no-repeat url("../images/main_concept.png?v=2026-07-22f");
}
[data-theme="dark"] .concept-art {
  background-image: url("../images/main_concept_dark.png?v=2026-07-22f");
}
/* The restacked-scatter div only exists on phones (see the 640px block). */
.concept-art--scatter { display: none; }
.concept > figcaption {
  font-size: 0.82rem; font-style: italic; color: var(--color-text-secondary);
  line-height: 1.55; max-width: 640px; margin: 1rem auto 0; text-align: center;
}
/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.01em;
  font-family: var(--font-sans);
}
.btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.btn svg, .btn i { width: 1em; height: 1em; flex-shrink: 0; }

.hero-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.hero-links .btn { box-shadow: var(--shadow); }
.btn--primary { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #fff; }
.btn--primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #fff; filter: brightness(0.92); }
[data-theme="dark"] .btn--primary { color: #211b12; }

/* ===== Abstract ===== */
.abstract-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
}
.abstract-text + .abstract-text { margin-top: 0.9rem; }

/* ===== Key Findings ===== */
.findings-list { display: grid; gap: 0.85rem; }
.finding {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-left: 2.5px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-bg);
}
.finding-icon {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.finding-content h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  color: var(--color-text);
}
.finding-content p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ===== Method ===== */
.method-figure { margin: 1.8rem 0; text-align: center; }
.method-figure img { margin: 0 auto; border-radius: var(--radius); }
.method-figure--portrait img { max-width: 520px; }
.method-figure--wide img { max-width: 100%; }
.method-figure--shadow img { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
[data-theme="dark"] .method-figure img {
  background: #f7f4ee;
  padding: 0.75rem;
  border-radius: var(--radius);
}
.method-figure figcaption {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-text-secondary);
  margin: 0.85rem auto 0;
  max-width: 720px;
  line-height: 1.6;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (max-width: 780px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr); }
}
.stage-card {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--kc-c, var(--color-border));
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--kc-c-soft, var(--color-bg));
  position: relative;
}
.stage-num {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kc-c-deep, var(--color-accent-hover));
}
.stage-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.5rem;
  color: var(--color-text);
}
.stage-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Multi-paragraph prose in the intro. The site has no global paragraph margin
   (spacing is per-class), so running text needs its own rule. Scoped rather
   than set on bare `p` to avoid shifting every other section. */
.prose p {
  line-height: 1.75;
  margin-bottom: 1.05rem;
}
.prose p:last-of-type { margin-bottom: 1.6rem; }

/* The paper's central claim, set apart once in the intro. */
.thesis {
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--color-text);
  border-left: 3px solid var(--color-accent);
  padding: 0.15rem 0 0.15rem 1.1rem;
  margin: 1.5rem 0 1.4rem;
  text-wrap: pretty;
}

/* Verbatim forum post pulled from the shipped knowledge base. */
.forum-quote {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  padding: 1rem 1.15rem 0.85rem;
  margin: 1.2rem 0 1.3rem;
}
.forum-quote p { margin: 0 0 0.55rem; line-height: 1.6; }
.forum-quote cite {
  font-style: normal;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
}
.forum-quote cite span { font-family: var(--font-mono); }

/* Task ids and identifiers in running prose. */
.mono { font-family: var(--font-mono); font-size: 0.9em; }

/* ===== Tables ===== */
.results-intro {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
/* Solve-rate-vs-cost scatter that leads the Results section. Generated from the
   paper's figures/polyglot_haiku_efficiency.py (real data), exported to SVG and
   inlined with its colors rewritten to site tokens, so it renders in Inter and
   adapts to light/dark like the rest of the page. */
.results-figure {
  max-width: 480px;
  margin: 0.5rem auto 2.4rem;
}
.scatter { width: 100%; height: auto; display: block; }
.results-figure figcaption {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.55;
  text-align: center;
  max-width: 520px;
  margin: 0.7rem auto 0;
}
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  min-width: 520px;
}
.results-table--wide { min-width: 680px; }
/* Tables with only 2–3 columns (Terminal-Bench, prompt-optimization) fit a
   phone without scrolling; the 520px floor would shove their data columns
   out of view. */
.results-table--narrow { min-width: 0; }
.results-table th,
.results-table td {
  padding: 0.6rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.results-table td:first-child,
.results-table th:first-child { text-align: left; }
.results-table thead th {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.4;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: var(--color-accent-light); }
.results-table .group-head {
  background: var(--color-bg-alt);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.results-table .ours td { background: var(--color-accent-light); font-weight: 600; }
.results-table .ours td:first-child { color: var(--color-accent-hover); }
.results-table .best { font-weight: 700; color: var(--color-accent-hover); }
/* Pin the numeric data cells so the Unicode line-breaker can't split "86.7%" at
   the % sign. Data cells only (the method-name first column may still wrap), and
   never the prose-filled comparison table. */
.results-table:not(.compare-table) td:not(:first-child) { white-space: nowrap; }
/* Stack each ±std under its mean rather than beside it. Side by side, the pair
   sets a min-content width that pushed the 9-column tables (ARC/Polyglot/SWE-bench,
   and the LLM swap) past the content box, so they scrolled horizontally inside
   .table-wrap. Stacking roughly halves each data cell, and it matches how the
   transfer heatmaps already render their std (.kt-cell .pm below). */
.results-table .pm { display: block; margin-left: 0; }
/* Comparison table in the intro: mostly prose cells, so left-align everything
   except the single verdict column, and keep the marks quiet enough that the
   prose stays the thing you read. */
.compare-table { min-width: 620px; }
.compare-table th,
.compare-table td { text-align: left; }
.compare-table th:last-child,
.compare-table td:last-child { text-align: center; }
.compare-table td:nth-child(2),
.compare-table td:nth-child(3) { color: var(--color-text-secondary); }
.compare-table .ours td { color: var(--color-text); }
.compare-table .mark-no { color: var(--color-text-secondary); opacity: 0.55; font-size: 0.95rem; }
.compare-table .mark-yes { color: var(--color-accent-hover); font-weight: 700; }
[data-theme="dark"] .compare-table .mark-yes { color: var(--color-accent); }
/* Method name is the cell; the family it represents sits under it, muted. */
.approach-cat {
  display: block;
  font-weight: 400;
  font-size: 0.78em;
  color: var(--color-text-secondary);
  margin-top: 1px;
}
/* ±std after a mean: muted and smaller so the mean stays the headline number. */
.pm {
  font-weight: 400;
  font-size: 0.82em;
  color: var(--color-text-secondary);
  margin-left: 0.1em;
  white-space: nowrap;
}
.table-caption {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-top: 0.4rem;
  margin-bottom: 2rem;
}

/* Results: sticky side scrollspy + table column */
/* Horizontal tab row above the tables. It used to be a vertical left rail,
   which read as a second page outline next to the sticky TOC — same font,
   same left-border active marker, same position. Pills sit above the content
   instead, so the TOC is the only vertical outline on the page. */
/* Numbered findings under the "Results" banner. Finding 2 heads its own
   <section> (#transfer) so the anchors and reveal animation are untouched,
   but both findings share this one heading style. */
.finding-head {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 0.9rem;
  color: var(--color-text);
  scroll-margin-top: calc(var(--nav-height) + 2rem);
}
.finding-head:not(:first-child) { margin-top: 2.6rem; }
.finding-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent-hover);
  margin-bottom: 0.2rem;
}
[data-theme="dark"] .finding-kicker { color: var(--color-accent); }

.results-subhead {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--color-text);
  scroll-margin-top: calc(var(--nav-height) + 2rem);
}
.results-subhead:not(:first-child) { margin-top: 2.2rem; }
/* Benchmark categories nested under a comparison-group subhead */
.results-benchhead {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 1.6rem 0 0.4rem;
  color: var(--color-text-secondary);
}
.results-subhead + .results-benchhead { margin-top: 0.9rem; }

/* Knowledge Transfer heatmap */
.kt-pair {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.3rem 0 0.6rem;
}
/* min-width:0 lets a block narrow past its table's min-content instead of
   pushing the page wide; the table then scrolls inside .kt-scroll. */
.kt-block {
  flex: 1 1 300px;
  min-width: 0;
  max-width: 460px;
}
.kt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Tighten the cells on a phone so the whole 3-donor heatmap fits on screen
   rather than scrolling inside .kt-scroll — it only reads as a heatmap whole. */
@media (max-width: 520px) {
  .kt-block h4 { font-size: 0.85rem; }
  .kt-table { font-size: 0.82rem; }
  .kt-table th,
  .kt-table td { padding: 0.5rem 0.4rem; }
}
@media (max-width: 340px) {
  .kt-table th,
  .kt-table td { padding: 0.5rem 0.28rem; }
}
.kt-block h4 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.kt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.kt-table th, .kt-table td {
  padding: 0.6rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.kt-table thead th {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.4;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
}
.kt-table tbody tr:last-child td { border-bottom: none; }
.kt-table td.row-h {
  font-weight: 500;
  text-align: left;
  background: var(--color-bg-alt);
}
.kt-cell {
  /* Backgrounds are fixed light/dark per-cell (inline), so text color is pinned
     to read on those fixed backgrounds in both themes. Dark cells set color:#fff inline. */
  color: #1a1a1c;
}
/* ±std inside a heatmap cell: inherit the cell's pinned text colour (not the
   theme-dependent .pm grey, which would misfire on the fixed backgrounds) and
   just dim it, and let it sit on its own line so the mean stays legible. */
.kt-cell .pm { color: inherit; opacity: 0.6; display: block; margin-left: 0; }

/* Generation-by-generation explorer */
.generation-explorer {
  margin-top: 1rem;
}
.generation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.generation-full-link {
  margin-left: auto;
}
.generation-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.generation-tab {
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.generation-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.generation-tab.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}
.generation-figure {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  padding: 1.05rem 1.15rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.generation-figure-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.generation-eyebrow {
  display: block;
  color: var(--color-accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.12rem;
}
[data-theme="dark"] .generation-eyebrow { color: var(--color-accent); }
.generation-figure-head h3 {
  font-family: var(--font-sans);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--color-text);
}
.generation-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.generation-score span {
  display: block;
}
.generation-score span:first-child {
  color: var(--color-accent-hover);
  font-family: var(--font-sans);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}
[data-theme="dark"] .generation-score span:first-child { color: var(--color-accent); }
.generation-score span:last-child {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}
.generation-timeline {
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-bg-alt);
  padding: 0.7rem 0.75rem 0.55rem;
  margin-bottom: 0.95rem;
}
.generation-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.generation-pick {
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.3rem 0.45rem;
}
.generation-pick:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.generation-pick.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
}
[data-theme="dark"] .generation-pick.is-active { color: var(--color-accent); }
.generation-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.generation-figure.is-loading {
  opacity: 0.72;
}
/* Card colors come from the kc-s-blue/gold/green stage utility classes on each
   article — the same warmed, theme-aware tokens the Method stage cards use, so
   a stage looks identical in both sections. */
.generation-card {
  position: relative;
  min-height: 260px;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--kc-c, var(--color-accent));
  border-radius: var(--radius);
  background: var(--kc-c-soft, var(--color-bg));
  color: var(--color-text);
  padding: 0.9rem 0.95rem 1rem;
  box-shadow: var(--shadow-card);
}
.generation-card--task::after,
.generation-card--cross::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.68rem;
  width: 0.72rem;
  border-top: 2px solid var(--color-text-secondary);
}
.generation-card--task::before,
.generation-card--cross::before {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  right: -0.74rem;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--color-text-secondary);
  border-right: 2px solid var(--color-text-secondary);
  transform: rotate(45deg);
}
.generation-card-label {
  display: block;
  color: var(--kc-c-deep, var(--color-accent-hover));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.generation-card h4 {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin: 0 0 0.65rem;
}
.generation-card p,
.generation-card li {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.55;
}
.generation-card ul {
  margin: 0;
  padding-left: 1.05rem;
}
.generation-card li + li {
  margin-top: 0.36rem;
}
.generation-card-note {
  margin-top: 0.7rem;
}
.generation-card-meta {
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.generation-task-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.generation-task-chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
}
.generation-caption {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.6;
  margin-top: 0.75rem;
}
.generation-caption strong {
  color: var(--color-text);
  font-style: normal;
}

@media (max-width: 900px) {
  .generation-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .generation-card {
    min-height: 0;
  }
  .generation-card--task::before,
  .generation-card--task::after,
  .generation-card--cross::before,
  .generation-card--cross::after {
    display: none;
  }
}
@media (max-width: 640px) {
  .generation-toolbar {
    align-items: stretch;
  }
  .generation-tabs,
  .generation-full-link {
    width: 100%;
  }
  .generation-tab {
    flex: 1 1 0;
  }
  .generation-score {
    text-align: left;
  }
}

/* Example showcase */
.example-grid {
  display: grid;
  gap: 2rem;
  margin-top: 1rem;
}
.example-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.4rem;
  background: var(--color-bg);
}
.example-card h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  color: var(--color-text);
}
.example-card .scale-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-hover);
  background: var(--color-accent-light);
  padding: 1px 7px;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}
.example-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.example-card img {
  border-radius: 6px;
  border: 1px solid var(--color-border-light);
}
[data-theme="dark"] .example-card img { background: #f7f4ee; padding: 0.5rem; }

/* ===== Code Blocks ===== */
.code-block {
  background: var(--color-code-bg);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  position: relative;
  margin-top: 1.2rem;
}
.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-code-text);
  white-space: pre;
  margin: 0;
}
.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;
}

.code-label {
  position: absolute;
  top: 0; left: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  background: var(--color-code-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 0 0 4px 4px;
}
.code-block .comment { color: #5dba9e; }
.code-block .cmd     { color: #dcdcaa; }
.copy-btn {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}
.copy-btn:hover { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ===== Footer ===== */
footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}
footer a { color: var(--color-text-secondary); }
footer a:hover { color: var(--color-accent); }

/* ===== Scroll Animations ===== */
.animate-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: none;
}
.animate-in.visible > .container > * { animation: kc-rise 0.6s ease both; }
.animate-in.visible > .container > *:nth-child(2) { animation-delay: 0.06s; }
.animate-in.visible > .container > *:nth-child(3) { animation-delay: 0.12s; }
@keyframes kc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Consistent keyboard focus ring across landing controls */
.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.generation-tab:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== Mobile Nav Toggle ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s ease;
}
.nav-toggle.active span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle.active span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  :root { --section-spacing: 4rem; }
  .hero-section h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  /* The full three-panel figure is only ~110px tall on a phone and the scatter
     goes illegible. Restack it: the two concept panels up top, the scatter
     below at its own size. Each crop uses background-position p% = x0 / (2822
     − crop-width) to pin its left edge (panel content spans 128–1594 and
     1669–2680; the panel-2/3 gutter runs 1594–1669). */
  .concept-art {
    aspect-ratio: 1530 / 911;
    background-size: auto 100%;
    background-position: 7.43% center;   /* x≈96–1626 of 2822 */
  }
  .concept-art--scatter {
    display: block;
    aspect-ratio: 1050 / 911;
    background-position: 93.1% center;   /* x≈1650–2700 of 2822 */
    max-width: 300px;
    margin: 1rem auto 0;
  }
  /* Stacked, the caption's side-by-side left/middle/right panel pointers no
     longer apply — hide them (the prose still reads). */
  .concept .pan { display: none; }
  .btn { width: 100%; max-width: 220px; justify-content: center; }
  .finding { flex-direction: column; gap: 0.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    padding: 1rem 1.5rem 1.25rem;
    gap: 0.8rem;
    border-bottom: 1px solid var(--color-border-light);
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  [data-theme="dark"] .nav-links { background: rgba(31, 29, 27, 0.96); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

/* ===== Key Contributions (TL;DR) ===== */
.tldr { background: var(--color-accent-light); border: 1px solid color-mix(in srgb, var(--color-accent) 28%, transparent); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.tldr-head { font-family: var(--font-sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent-hover); margin-bottom: 0.8rem; font-weight: 700; }
.tldr-head::after { display: none; }            /* suppress the global h2::after underline */
.tldr ul { list-style: none; display: grid; gap: 0.6rem; }
.tldr li { position: relative; padding-left: 1.5rem; line-height: 1.55; }
.tldr li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-accent); }

/* ===== Body grid + TOC rail ===== */
.body-grid { max-width: var(--max-width-wide); margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 13rem minmax(0,1fr); gap: 2.4rem; align-items: start; }
.body-grid .container { padding-left: 0; padding-right: 0; }   /* sections inside already centered by grid */
.toc { position: sticky; top: calc(var(--nav-height) + 1.2rem); align-self: start; font-family: var(--font-sans); font-size: 0.8rem; }
.toc-title { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; color: var(--color-text-secondary); margin-bottom: 0.7rem; font-weight: 700; }
.toc a { display: block; padding: 0.28rem 0 0.28rem 0.7rem; color: var(--color-text-secondary); border-left: 2px solid var(--color-border); }
.toc a.toc-sub { padding-left: 1.6rem; font-size: 0.74rem; }
.toc a.is-current { color: var(--color-accent); border-left-color: var(--color-accent); font-weight: 600; }
.toc a:hover { color: var(--color-text); }
/* minmax(0,1fr), not a bare 1fr: a bare 1fr floors the column at the
   min-content width of the wide result tables, pushing the whole page past the
   viewport instead of letting those tables scroll inside .table-wrap. */
@media (max-width: 860px) { .body-grid { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

/* ===== Pull Quote ===== */
.pull { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.4; color: var(--color-text); border-top: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); padding: 1.3rem 0; margin: 2rem 0; }
.pull span { color: var(--color-accent-hover); }

/* ===== References ===== */
.refs-note { font-family: var(--font-sans); font-size: 0.8rem; color: var(--color-text-secondary); font-weight: 400; }
.refs { counter-reset: r; list-style: none; font-size: 0.95rem; }
.refs li { counter-increment: r; position: relative; padding-left: 2rem; margin-bottom: 0.7rem; color: var(--color-text-secondary); line-height: 1.5; }
.refs li::before { content: "[" counter(r) "]"; position: absolute; left: 0; top: 0.15em; font-family: var(--font-sans); font-size: 0.78rem; color: var(--color-accent); font-weight: 600; }
.bib { position: relative; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: 1.2rem; }
.bib pre { font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.6; color: var(--color-text-secondary); white-space: pre-wrap; margin: 0; }
.bib-copy { position: absolute; top: 0.6rem; right: 0.6rem; font-family: var(--font-sans); font-size: 0.72rem; padding: 0.25rem 0.55rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); color: var(--color-text-secondary); cursor: pointer; }

/* ===== Micro-interactions ===== */
.btn, .stage-card, .generation-tab { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.is-pending:hover { transform: none; }
.stage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg, 0 18px 40px -16px rgba(60,40,20,.22)); }
.generation-flow { transition: opacity 0.25s ease; }

/* ===== Reduced-motion guard ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .animate-in { opacity: 1 !important; transform: none !important; }
  .animate-in.visible > .container > * { animation: none !important; }
}

/* ============================================================================
   Narrative / IA pass (lab6): byline, graceful placeholder buttons, results
   stat band, abstract disclosure, section handoff, no-JS protocol fallback.
   ============================================================================ */

/* Hero byline (replaces the two-line authors/institutions stack) + centered links */
.byline {
  font-size: 0.86rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.6rem;
  line-height: 1.6;
}
.byline-affil { font-size: 0.92em; opacity: 0.7; }
.hero-links { justify-content: center; }
.hero-links-note {
  font-size: 0.74rem;
  color: var(--color-text-secondary);
  margin-top: 0.7rem;
  letter-spacing: 0.01em;
}

/* Placeholder links during double-blind review: read as "pending", not broken. */
.btn.is-pending {
  cursor: default;
  opacity: 0.62;
  box-shadow: none;
}
.btn.is-pending:hover {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-bg);
}
.btn--primary.is-pending,
.btn--primary.is-pending:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  filter: none;
}
[data-theme="dark"] .btn--primary.is-pending,
[data-theme="dark"] .btn--primary.is-pending:hover { color: #211b12; }

/* ===== Abstract disclosure (folded under Key contributions) ===== */
.abstract-disclosure {
  margin-top: 1.1rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.4rem;
}
.abstract-disclosure > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-hover);
  padding: 0.5rem 0;
}
[data-theme="dark"] .abstract-disclosure > summary { color: var(--color-accent); }
.abstract-disclosure > summary::-webkit-details-marker { display: none; }
.abstract-disclosure > summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.18s ease;
}
.abstract-disclosure[open] > summary::before { transform: rotate(90deg); }
.abstract-disclosure[open] > summary { margin-bottom: 0.4rem; }
.abstract-disclosure .abstract-text { margin-bottom: 0.4rem; }

/* ===== Exchange callout (worked forum example, Method section) ===== */
.exchange-callout {
  margin-top: 1.8rem;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.35rem 1rem;
}
.exchange-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-hover);
}
[data-theme="dark"] .exchange-eyebrow { color: var(--color-accent); }
.exchange-title {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.15rem 0 0.8rem;
}
.exchange-steps {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.exchange-steps li {
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
}
.exchange-step-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-hover);
}
[data-theme="dark"] .exchange-step-label { color: var(--color-accent); }
.exchange-footer {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ===== Section handoff (Method → Knowledge explorer) ===== */
.section-handoff {
  text-align: center;
  margin: 2.2rem 0 0.5rem;
}
.section-handoff a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent-hover);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.section-handoff a:hover { border-bottom-color: currentColor; }
.section-handoff a span { display: inline-block; transition: transform 0.2s ease; }
.section-handoff a:hover span { transform: translateY(2px); }
[data-theme="dark"] .section-handoff a { color: var(--color-accent); }

/* Inline stage-colored ink used in the knowledge-explorer intro */
.kc-ink { font-weight: 600; }
.kc-ink.kc-s-blue  { color: #2f6db0; }
.kc-ink.kc-s-gold  { color: #b07b1e; }
.kc-ink.kc-s-green { color: #2e8b57; }
.kc-ink.kc-s-neutral { color: #79716b; }
[data-theme="dark"] .kc-ink.kc-s-blue  { color: #7fb0e6; }
[data-theme="dark"] .kc-ink.kc-s-gold  { color: #e3b765; }
[data-theme="dark"] .kc-ink.kc-s-green { color: #74c79a; }
[data-theme="dark"] .kc-ink.kc-s-neutral { color: #a8a29b; }

/* A caption that leads (sits above) its table rather than below it */
.table-caption--lead { margin: 0 0 0.7rem; }

/* No-JS protocol fallback: the static three-stage strip only shows when JS is
   absent; with JS the interactive animation above is the single source of truth. */
.js .method-fallback { display: none; }

/* ---- Interactive constellation embed (whole knowledge base as a 3D map) ---- */
.constellation-embed { margin: 2rem 0 0; }
.constellation-embed .embed-frame {
  position: relative; height: clamp(420px, 68vh, 620px);
  border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden;
  background: #0a0d18; box-shadow: var(--shadow-card);
}
.constellation-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.constellation-embed figcaption {
  margin-top: .7rem; font-size: .9rem; color: var(--color-text-secondary); line-height: 1.5;
}
.constellation-embed figcaption a {
  color: var(--color-accent); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.constellation-embed figcaption a:hover { text-decoration: underline; }

/* Extra breathing room between the generation-explorer and the "zoom out" transition. */
.constellation-lead { margin-top: 3rem; }
