/* Material Discovery Bench — shared styles.
   Chart/ink tokens follow the validated reference palette (light + dark). */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --good: #0ca30c;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --accent-ink: #86b6ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --accent-ink: #86b6ef;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .formula { font-family: var(--mono); font-size: 0.92em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  height: 3.5rem;
}
.brand {
  font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
  display: flex; align-items: center; gap: 0.55rem; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 1.35rem; height: 1.35rem; border-radius: 4px; flex: none;
  background: conic-gradient(from 220deg, var(--accent), #1baf7a, var(--accent));
}
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-2); font-size: 0.95rem; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; width: 2rem; height: 2rem; cursor: pointer; font-size: 0.9rem;
}

/* ---- hero ---- */
.hero { padding: 3.5rem 0 2rem; }
.hero .kicker {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.8rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 1rem;
  max-width: 21em;
}
.hero p.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 44em; margin: 0 0 1.5rem; }
.hero-intro { color: var(--ink-2); max-width: 46em; font-size: 1.02rem; margin: 0; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.body-text p { color: var(--ink-2); max-width: 46em; font-size: 1.02rem; margin: 0 0 1rem; }
.body-text p sup a { text-decoration: none; }
/* .body-text only styled <p>; lists need to inherit the same measure and ink */
.body-text ul { color: var(--ink-2); max-width: 46em; font-size: 1.02rem; margin: 0 0 1rem; padding-left: 1.2rem; }
.body-text li { margin: 0 0 0.5rem; }
.body-text li b { color: var(--ink); }
.footnote {
  font-size: 0.82rem !important; color: var(--muted) !important;
  border-top: 1px solid var(--grid); padding-top: 0.6rem; margin-top: 1.4rem !important;
}
.btn {
  display: inline-block; padding: 0.55rem 1.1rem; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

.hero h1.masthead {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
}
.gh-star { display: inline-flex; align-items: center; gap: 0.45rem; }
.gh-star svg { flex: none; }
.star-count:not(:empty) {
  font-variant-numeric: tabular-nums;
  font-size: 0.82em;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  margin-left: 0.15rem;
  color: var(--ink-2);
}
.site-nav a.nav-star {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.25rem 0.75rem; color: var(--ink); font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.site-nav a.nav-star:hover { border-color: var(--accent); text-decoration: none; }

/* ---- quotes (first fold) ---- */
.quotes { padding: 1.5rem 0 0.5rem; }
.quotes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.quote-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.7rem;
}
.quote-card .org {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.quote-card blockquote { margin: 0; font-size: 0.97rem; color: var(--ink); flex: 1; }
.quote-card blockquote::before { content: "\201C"; color: var(--accent); font-size: 1.4em; line-height: 0; margin-right: 0.05em; }
.quote-card .attr { font-size: 0.85rem; color: var(--ink-2); }
.quote-card .attr b { color: var(--ink); }

/* ---- quote carousel ---- */
.quote-carousel {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.6rem 3.4rem 1.2rem;
  min-height: 15rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.qc-body { transition: opacity 0.18s ease; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; justify-content: center; }
.qc-body.fading { opacity: 0; }
.qc-body .org {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.qc-body blockquote { margin: 0; font-size: 1.05rem; color: var(--ink); max-width: 60em; }
.qc-body blockquote::before { content: "\201C"; color: var(--accent); font-size: 1.4em; line-height: 0; margin-right: 0.05em; }
.qc-body .attr { font-size: 0.88rem; color: var(--ink-2); }
.qc-body .attr b { color: var(--ink); }
.qc-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.qc-btn:hover { border-color: var(--accent); color: var(--ink); }
.qc-prev { left: 0.65rem; }
.qc-next { right: 0.65rem; }
.qc-dots { display: flex; gap: 0.45rem; justify-content: center; margin-top: 1rem; }
.qc-dot {
  width: 8px; height: 8px; border-radius: 50%; padding: 0;
  border: none; background: var(--baseline); cursor: pointer;
}
.qc-dot.on { background: var(--accent); }
@media (max-width: 700px) {
  .quote-carousel { padding: 1.2rem 2.6rem 1rem; min-height: 19rem; }
}

/* ---- sections / cards ---- */
section.band { padding: 2.5rem 0; }
/* A band's top padding is sized to sit under a heading. The band right after
   the hero has none — it is the hero's paragraph continuing — so the full
   32px + 40px reads as a gap where the copy should just carry on. */
.hero + section.band { padding-top: 0; }
section.band h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 0.4rem; }
section.band p.sub { color: var(--ink-2); margin: 0 0 1.4rem; max-width: 46em; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card .card-figure {
  margin: -1.25rem -1.25rem 1rem;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.card .card-figure img { display: block; width: 100%; height: auto; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.card .card-cta { display: inline-block; margin-top: 0.8rem; font-weight: 600; font-size: 0.92rem; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.55rem;
  color: var(--muted); margin-bottom: 0.6rem;
}

/* ---- chart ---- */
.chart-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1rem 0.6rem;
}
.chart-panel svg { display: block; width: 100%; height: auto; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; padding: 0.6rem 0.4rem 0.4rem;
  font-size: 0.85rem; color: var(--ink-2); align-items: center;
}
.chart-legend .li { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend svg { width: 14px; height: 14px; flex: none; }
.mdb-tooltip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.5rem 0.7rem; font-size: 0.82rem; color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); max-width: 260px;
  display: none;
}
.mdb-tooltip .t-name { font-weight: 700; }
.mdb-tooltip .t-row { color: var(--ink-2); }
.mdb-tooltip .t-row b { color: var(--ink); font-weight: 600; }
details.table-view { margin-top: 0.8rem; font-size: 0.9rem; }
details.table-view summary { cursor: pointer; color: var(--ink-2); }

/* ---- tables ---- */
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.92rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
table.data th, table.data td {
  text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--grid);
}
table.data th {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 600; background: var(--surface);
}
/* Symbols and units opt out of the uppercasing above. Transformed, κ and ε
   become Κ and Ε — the same glyphs as Latin K and E, so the reader sees a
   typo — and W/m·K becomes W/M·K, which is a different unit. Applied by
   chart.js's thHTML() to any generated header holding a non-ASCII character,
   and by hand in the markup where a header is written out. */
.sym { text-transform: none; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.ref-row td { color: var(--ink-2); background: color-mix(in srgb, var(--surface) 70%, var(--page)); }

/* ---- foldable per-model submissions table ---- */
.synth-table .fold-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--ink);
}
.synth-table .chev {
  font-size: 0.72em; color: var(--muted); transition: transform 0.15s;
}
.synth-table tbody.open .chev { transform: rotate(90deg); }
.synth-table tr.effort-row { display: none; }
.synth-table tbody.open tr.effort-row { display: table-row; }
.synth-table tr.effort-row td { background: color-mix(in srgb, var(--surface) 70%, var(--page)); }
.synth-table tr.effort-row td:first-child {
  padding-left: 2rem; color: var(--ink-2);
  font-family: var(--mono); font-size: 0.85em;
}
.synth-table td.muted { color: var(--muted); }
.synth-table td.no-fold { color: var(--ink-2); }
.synth-table td strong { font-weight: 700; }
.table-scroll { overflow-x: auto; border-radius: 12px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.45rem; vertical-align: baseline; }
.bar-cell { display: flex; align-items: center; gap: 0.6rem; }
.bar-cell .bar { height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.pill {
  font-size: 0.72rem; font-family: var(--mono); border-radius: 999px;
  padding: 0.08rem 0.5rem; border: 1px solid var(--border); color: var(--ink-2);
}
.pill.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }

/* ---- explorer layout ---- */
.explorer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.filter-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; align-items: center;
  font-size: 0.9rem;
}
.filter-row .hint { color: var(--muted); font-size: 0.82rem; }
.model-chip {
  display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: 0.28rem 0.8rem;
  background: var(--surface); color: var(--ink-2); font-size: 0.88rem; user-select: none;
}
.model-chip input { display: none; }
.model-chip.on { color: var(--ink); border-color: var(--chip-color, var(--accent)); box-shadow: inset 0 0 0 1px var(--chip-color, var(--accent)); }
/* action chips (All / None) are real buttons, which don't inherit type styling */
button.model-chip { font: inherit; font-size: 0.88rem; line-height: inherit; }
/* keeps an All / None pair together when the row wraps, and sets them slightly
   apart from the filter chips they act on */
.chip-actions { display: inline-flex; gap: 0.5rem; margin-left: 0.35rem; }
.chip-actions .action-chip { color: var(--muted); }
/* line-style sample inside a chip — the MLIP figure has no legend, so the
   reasoning chips carry the dash key themselves. Beats .chart-panel svg,
   which would otherwise stretch it to the panel width. */
.model-chip .chip-dash { width: 20px; height: 10px; flex: none; color: inherit; }
/* the stepper and the panel travel together, so the sticky offset moves to
   their column — a sticky panel with a static stepper above it would separate
   the two on scroll */
.detail-col { position: sticky; top: 4.5rem; }
.detail-panel { position: static; }
.stepper {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.stepper button {
  font: inherit; font-size: 0.85rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); padding: 0.22rem 0.7rem;
}
.stepper button:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.stepper button:disabled { opacity: 0.45; cursor: default; }
.stepper .step-at {
  font-size: 0.8rem; color: var(--muted); margin: 0 auto;
  font-variant-numeric: tabular-nums;
}
.detail-panel .placeholder { color: var(--muted); font-size: 0.92rem; padding: 2rem 0.5rem; text-align: center; }
.detail-panel h3 { margin: 0.2rem 0 0.1rem; font-size: 1.3rem; }
.detail-panel .sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.7rem; }
.prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.8rem 0; }
.prop {
  border: 1px solid var(--grid); border-radius: 8px; padding: 0.45rem 0.6rem;
}
.prop .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.prop .v { font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.prop .v small { font-size: 0.72em; font-weight: 400; color: var(--ink-2); }
.reasoning {
  border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 0.8rem;
  color: var(--ink-2); font-size: 0.9rem; margin: 0.8rem 0 0;
}
.recipe {
  margin-top: 0.9rem; border: 1px solid var(--grid); border-radius: 8px;
  padding: 0.65rem 0.8rem;
}
.recipe .k {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 0.4rem;
}
details.recipe summary.k { cursor: pointer; margin-bottom: 0; }
details.recipe[open] summary.k { margin-bottom: 0.4rem; }
.recipe-text { font-size: 0.88rem; color: var(--ink-2); white-space: pre-line; }
.structure-canvas { width: 100%; border-radius: 8px; background: color-mix(in srgb, var(--surface) 60%, var(--page)); cursor: grab; touch-action: none; }

/* ---- explorer download line ---- */
.download-line { margin-top: 0.7rem; }

/* ---- the invented number (transcript quote + prompt excerpt) ---- */
.fib-quote {
  margin: 1.4rem 0; padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--surface) 55%, var(--page));
  border-radius: 0 8px 8px 0; font-size: 1.02rem; color: var(--ink);
}
.fib-quote p { margin: 0 0 0.5rem; }
.fib-quote footer { font-size: 0.8rem; color: var(--muted); }
.fib-table .val-measured { color: var(--ink-2); font-size: 0.82rem; white-space: nowrap; }
.fib-table .val-invented {
  color: color-mix(in srgb, #d64545 75%, var(--ink)); font-size: 0.82rem;
  font-style: italic; white-space: nowrap;
}
.prompt-excerpt {
  margin-top: 0.6rem; padding: 0.8rem 1rem; border: 1px dashed var(--baseline);
  border-radius: 8px; font-family: ui-monospace, Menlo, monospace;
  font-size: 0.82rem; color: var(--ink-2); line-height: 1.55;
}
.prompt-excerpt p { margin: 0 0 0.7rem; }
.prompt-excerpt p:last-child { margin-bottom: 0; }
.prompt-excerpt mark {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink); padding: 0 0.15em; border-radius: 3px;
}
h3.subhead { margin: 2rem 0 0.6rem; font-size: 1.15rem; }
/* a figure's one-line reading, directly under it and tied to it by the
   tight top margin — not a body paragraph that happens to follow */
.fig-caption {
  margin: 0.55rem 0 0; color: var(--ink-2); font-size: 0.95rem;
  max-width: 46em;
}
/* the caption belongs to the figure above it, so prose that follows needs a
   gap — without one the two run together as a single block */
.fig-caption + .body-text { margin-top: 1.1rem; }
/* a caption under a folded figure hangs off the card, so it needs the gap the
   card's own bottom padding would otherwise have given it */
details.fold-card + .fig-caption { margin-top: 0.8rem; }
/* A subsection folded into a card: the subhead becomes the clickable summary,
   so a long exhibit can sit closed without losing its heading. The figure
   inside draws to a fixed viewBox and scales with CSS, so it renders correctly
   whether the card is open at load or not. */
details.fold-card {
  margin: 2rem 0 0.6rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 0 1.25rem;
}
details.fold-card > summary {
  cursor: pointer; list-style: none;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em;
  padding: 1rem 0; display: flex; align-items: center; gap: 0.6rem;
}
details.fold-card > summary::-webkit-details-marker { display: none; }
details.fold-card > summary::before {
  content: "▸"; color: var(--muted); font-size: 0.85em; flex: none;
  transition: transform 0.15s ease;
}
details.fold-card[open] > summary::before { transform: rotate(90deg); }
details.fold-card > summary:hover { color: var(--accent-ink); }
details.fold-card > *:last-child { padding-bottom: 1.25rem; }
/* the figure sits directly in the card rather than in a card of its own —
   nested panels read as two frames around one thing */
details.fold-card .chart-panel { border: 0; background: none; padding: 0 0 0.9rem; }
.sol-q {
  margin: 0.8rem 0; padding: 0.65rem 1rem;
  border-left: 3px solid var(--baseline);
  background: color-mix(in srgb, var(--surface) 55%, var(--page));
  border-radius: 0 8px 8px 0; font-size: 0.95rem; color: var(--ink);
}
.sol-q p { margin: 0 0 0.35rem; }
/* a quoted recipe comes as steps, so the block has to hold a list too */
.sol-q ul { margin: 0 0 0.35rem; padding-left: 1.15rem; }
.sol-q li { margin: 0 0 0.35rem; }
.sol-q li:last-child { margin-bottom: 0; }
.sol-q footer { font-size: 0.78rem; color: var(--muted); }
.sol-nudge {
  margin: 1.1rem 0 1.1rem 2rem; padding: 0.65rem 1rem;
  border: 1px dashed var(--baseline); border-radius: 8px;
  font-size: 0.85rem; color: var(--ink-2);
}
.sol-nudge .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.35rem; }
.sol-nudge p { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; }

/* ---- photocopier film strip ---- */
.copier-strip {
  display: flex; align-items: flex-end; gap: 0.9rem; overflow-x: auto;
  padding: 0.8rem 0.4rem 0.4rem;
}
.copier-cell { text-decoration: none; flex-shrink: 0; text-align: center; }
.copier-cell canvas {
  border-radius: 8px; background: color-mix(in srgb, var(--surface) 60%, var(--page));
  border: 1px solid var(--grid);
}
.copier-cap { font-size: 0.78rem; color: var(--ink-2); margin-top: 0.35rem; line-height: 1.35; }
.copier-cap b { color: var(--ink); }

/* ---- stat strip ---- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; }
.stat .v { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.stat .k { color: var(--ink-2); font-size: 0.88rem; }

/* ---- blog ---- */
.post-list { display: grid; gap: 1rem; }
article.post { max-width: 46em; margin: 0 auto; padding: 3rem 0; }
article.post h1 { font-size: 2.1rem; letter-spacing: -0.02em; line-height: 1.15; }
article.post .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
article.post p { font-size: 1.03rem; }
article.post figure { margin: 2rem 0; }
article.post figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.photo-placeholder {
  border: 1.5px dashed var(--baseline); border-radius: 12px;
  min-height: 260px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.9rem; background: var(--surface);
  text-align: center; padding: 1rem;
}
blockquote.pull {
  border-left: 3px solid var(--accent); margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.2rem;
  font-size: 1.15rem; color: var(--ink);
}
blockquote.pull footer { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 3rem; padding: 2rem 0 3rem;
  color: var(--muted); font-size: 0.88rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- prose pages (about) ---- */
.prose { max-width: 46em; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.prose h3 { margin-top: 1.6rem; font-size: 1.05rem; }
.prose li { margin: 0.3rem 0; }
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 0.9rem 1.1rem; margin: 1.4rem 0; font-size: 0.95rem; color: var(--ink-2);
}

@media (max-width: 860px) {
  .quotes-grid, .card-grid, .stat-strip { grid-template-columns: 1fr; }
  .explorer-grid { grid-template-columns: 1fr; }
  .detail-col { position: static; }
  .site-nav { gap: 0.8rem; font-size: 0.9rem; }
}
@media (max-width: 700px) {
  .site-header .wrap {
    flex-wrap: wrap; height: auto; gap: 0.15rem 1rem;
    padding-top: 0.55rem; padding-bottom: 0.55rem;
  }
  .brand { flex: 1; }
  .site-nav { margin-left: 0; width: 100%; order: 2; flex-wrap: wrap; row-gap: 0.3rem; }
  .theme-toggle { order: 1; }
}

/* ---- methods (generated from METHODS.md by data/render_methods.py) ---- */
.methods h3 { margin: 2rem 0 0.5rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.methods h4 { margin: 1.5rem 0 0.4rem; font-size: 1rem; }
.methods table.data { font-size: 0.86rem; }
.methods .table-scroll { margin: 0.9rem 0; max-width: 46em; }
/* equations are centred, roomy and allowed to scroll rather than wrap: a
   broken line reads as two statements */
.methods-eq {
  font-family: var(--mono); font-size: 0.9rem; color: var(--ink) !important;
  margin: 0.5rem 0 !important; padding: 0.5rem 0.8rem;
  background: color-mix(in srgb, var(--surface) 60%, var(--page));
  border-radius: 8px; overflow-x: auto; white-space: nowrap;
  max-width: 46em;
}
.methods-pre {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.5;
  background: color-mix(in srgb, var(--surface) 60%, var(--page));
  border: 1px solid var(--grid); border-radius: 8px;
  padding: 0.8rem 1rem; overflow-x: auto; max-width: 46em;
  white-space: pre-wrap; color: var(--ink-2);
}
.methods .callout b { color: var(--ink); }
/* open TODOs from the draft — amber so they read as unfinished, not as prose */
.methods-todo {
  border-left-color: #d99b1c;
  background: color-mix(in srgb, #d99b1c 8%, var(--surface));
}

/* ---- Methods tool carousel ---- */
.carousel { margin: 1.2rem 0; max-width: 46em; }
.carousel-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.carousel-tab {
  font: inherit; font-size: 0.84rem; cursor: pointer; text-align: left;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); padding: 0.3rem 0.8rem;
}
.carousel-tab:hover { border-color: var(--accent); color: var(--ink); }
.carousel-tab[aria-selected="true"] {
  border-color: var(--accent); color: var(--ink);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.carousel-panel {
  border: 1px solid var(--grid); border-radius: 10px;
  padding: 0.4rem 1.2rem 1.1rem; background: var(--surface);
}
.carousel-panel > h4:first-child { margin-top: 0.9rem; }
.carousel-nav { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.carousel-nav button {
  font: inherit; font-size: 0.85rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); padding: 0.22rem 0.7rem;
}
.carousel-nav button:hover { border-color: var(--accent); color: var(--ink); }
.carousel-at {
  font-size: 0.8rem; color: var(--muted); margin: 0 auto;
  font-variant-numeric: tabular-nums;
}
/* footnote markers and the reference list they point at */
.methods sup.fn { font-size: 0.7em; line-height: 0; }
.methods sup.fn a { text-decoration: none; padding: 0 0.08em; }
.methods-refs { font-size: 0.88rem; color: var(--ink-2); }
.methods-refs li { margin-bottom: 0.5rem; }
.methods-refs li:target { background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* MathML: browsers typeset it natively, this only sets scale and scrolling */
.methods math { font-size: 1.06em; }
.methods-eq {
  margin: 1rem 0; padding: 0.7rem 0.9rem; overflow-x: auto; max-width: 46em;
  background: color-mix(in srgb, var(--surface) 60%, var(--page)); border-radius: 8px;
}
.methods-eq math { font-size: 1.12em; }
/* long recipes scroll inside their block rather than running the page long */
.methods-pre { max-height: 24rem; overflow-y: auto; }
