:root {
  --ink: #131a26;
  --ink-2: #2b3546;
  --muted: #5c6777;
  --faint: #8b95a5;
  --line: #e2e7ee;
  --line-strong: #cfd6e1;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --navy: #1d2b4a;

  --blue: #2f5aa8;
  --blue-soft: #e9effa;
  --teal: #23a3a1;
  --teal-soft: #e3f4f3;
  --gold: #c98f2e;
  --gold-soft: #fbf2e1;
  --rust: #c2553b;
  --rust-soft: #fbece7;

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);
  --nav-h: 56px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
p, li, figcaption { text-wrap: pretty; }
strong, b { color: var(--ink); font-weight: 600; }
sup { font-size: 0.68em; line-height: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: #eef1f6; padding: 0.1em 0.35em; border-radius: 5px; }

.container { width: min(1040px, 100% - 48px); margin-inline: auto; }
.container.wide { width: min(1180px, 100% - 32px); }
.container.narrow { width: min(860px, 100% - 48px); }

/* ---------- navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.topnav.scrolled { border-bottom-color: var(--line); }
.topnav-inner {
  width: min(1180px, 100% - 32px); height: 100%; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity 0.2s ease; }
.topnav.scrolled .brand { opacity: 1; }
.brand:hover { text-decoration: none; }
.navlinks { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.navlinks a:hover { text-decoration: none; color: var(--ink); background: var(--bg-alt); }
.navlinks a.active { color: var(--ink); background: #eaeef5; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 56px 0 28px;
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(47, 90, 168, 0.12), transparent 70%),
    radial-gradient(600px 300px at 88% 10%, rgba(35, 163, 161, 0.08), transparent 70%),
    radial-gradient(600px 300px at 10% 20%, rgba(201, 143, 46, 0.07), transparent 70%);
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue);
  background: rgba(47, 90, 168, 0.08);
  border: 1px solid rgba(47, 90, 168, 0.16);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow span + span::before { content: "\00b7"; margin: 0 0.45em; }
.title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 700; line-height: 1.04; letter-spacing: -0.02em;
  color: var(--ink); margin: 0;
}
.subtitle {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 500; color: var(--ink-2);
  margin: 14px auto 30px; max-width: 760px; line-height: 1.35;
}
.authors {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px;
  font-size: 1.06rem; font-weight: 500; color: var(--ink); margin: 0 auto 10px; max-width: 1000px;
}
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; color: var(--ink-2); margin: 0 0 4px; }
.author-notes { font-size: 0.88rem; color: var(--muted); margin: 0 0 22px; }
.logos { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 0 0 30px; }
.logos img { height: 46px; width: auto; }
.logos img.logo-wide { height: 38px; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600;
  color: #fff; background: var(--ink);
  border: 1px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; background: var(--navy); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(19, 26, 38, 0.18); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.fill { fill: currentColor; stroke: none; }

/* ---------- figures ---------- */
.teaser { padding: 20px 0 8px; }
.figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.figure img[data-zoom] { cursor: zoom-in; }
.figure figcaption { font-size: 0.92rem; line-height: 1.6; color: var(--muted); margin-top: 14px; }
.figure figcaption strong { color: var(--ink); }
.figure figcaption b { color: var(--ink-2); }
.figure-hero { padding: 26px 26px 20px; }
.figure-narrow img { max-width: min(820px, 100%); margin-inline: auto; }
.figure-feature { margin-top: 26px; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.35rem); line-height: 1.15; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 14px; text-align: center;
}
.section-lead { text-align: center; color: var(--muted); max-width: 760px; margin: 0 auto 40px; font-size: 1.04rem; }
.subtitle, .section-title, .section-lead, .takeaway h3, .stat-label, .readout-label { text-wrap: balance; }

/* ---------- TL;DR ---------- */
#tldr { padding-top: 56px; }
.tldr {
  position: relative;
  background: linear-gradient(135deg, #f3f6fd 0%, #f6fbfb 100%);
  border: 1px solid #dde5f3;
  border-radius: 20px;
  padding: 30px 34px 14px;
  font-size: 1.12rem; line-height: 1.7; color: var(--ink-2);
}
.tldr-label {
  position: absolute; top: -13px; left: 30px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  color: #fff; background: var(--blue); padding: 4px 12px; border-radius: 999px;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 22px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.stat-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }
.abstract { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.abstract summary {
  cursor: pointer; list-style: none; padding: 14px 20px;
  font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px;
}
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.2s ease; margin-right: 2px;
}
.abstract[open] summary::before { transform: rotate(45deg); }
.abstract p { padding: 0 22px 8px; color: var(--ink-2); font-size: 0.98rem; }

/* ---------- takeaways ---------- */
.takeaway {
  --accent: var(--blue); --accent-soft: var(--blue-soft);
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 34px 30px; margin-bottom: 36px; box-shadow: var(--shadow); overflow: hidden;
}
.takeaway::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.takeaway:last-child { margin-bottom: 0; }
.takeaway-head { margin-bottom: 18px; }
.takeaway-num {
  display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; margin-bottom: 10px;
}
.takeaway h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.25; color: var(--ink); margin: 0; }
.takeaway-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: start; margin-bottom: 26px; }
.takeaway-text p { color: var(--ink-2); }
.takeaway-intro { color: var(--ink-2); max-width: 900px; }
.takeaway .figure { box-shadow: none; }

.chips { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font-size: 0.9rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 5px 13px;
}

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin: 6px 0 26px; }
.versus-card { border-radius: 16px; padding: 22px 24px 18px; border: 1px solid; display: flex; flex-direction: column; }
.versus-card p { color: var(--ink-2); font-size: 0.98rem; }
.versus-card h4 { font-family: var(--serif); font-size: 1.45rem; margin: 6px 0 10px; color: var(--ink); }
.tone-neutral { background: var(--bg-alt); border-color: var(--line-strong); }
.tone-blue { background: var(--blue-soft); border-color: #cddaf2; }
.versus-tag { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tone-neutral .versus-tag, .tone-neutral .verdict-tag { color: var(--muted); }
.tone-blue .versus-tag, .tone-blue .verdict-tag { color: var(--blue); }
.versus-num { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed rgba(19, 26, 38, 0.15); font-size: 0.92rem; color: var(--muted); }
.versus-big { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.tone-neutral .versus-big { color: var(--ink-2); }
.tone-blue .versus-big { color: var(--blue); }
.versus-mid { align-self: center; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--faint); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.97rem; }
.data-table th, .data-table td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--line-strong); font-size: 0.9rem; }
.data-table tbody tr:hover { background: #fafbfd; }
.data-table td.win { color: var(--blue); font-weight: 700; }

.growth { background: var(--accent-soft); border-radius: 14px; padding: 18px 20px 14px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.growth-head { font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.growth-row { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 0.93rem; }
.growth-bar { height: 12px; background: rgba(255, 255, 255, 0.85); border-radius: 999px; overflow: hidden; }
.growth-bar span { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 999px; }
.growth-val { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); }

.duel { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 14px; padding: 18px 20px 16px; }
.duel-head { font-weight: 600; color: var(--ink); margin: 0 0 12px; font-size: 0.95rem; }
.duel-group { margin-bottom: 14px; }
.duel-label { display: block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.duel-bar {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: var(--w); height: 30px; border-radius: 8px; padding: 0 10px; margin-bottom: 6px;
  font-size: 0.86rem; font-weight: 600; white-space: nowrap;
}
.duel-bar.base { background: #c3cad6; color: var(--ink); }
.duel-bar.loop { background: var(--blue); color: #fff; }
.duel-bar em { font-style: normal; font-weight: 700; }
.duel-loss { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed rgba(19, 26, 38, 0.15); font-size: 0.92rem; color: var(--muted); }
.duel-loss .loss-base { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--faint); margin-left: auto; }
.duel-loss .loss-loop { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--blue); }

/* ---------- explorer ---------- */
.explorer {
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px;
}
.explorer > * { min-width: 0; }
.ex-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 34px; align-items: end; }
.ex-slider { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; }
.ex-slider label { font-weight: 600; color: var(--ink); }
.ex-slider output { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--blue); min-width: 1.4em; text-align: right; font-variant-numeric: tabular-nums; }
.ex-slider input { grid-column: 1 / -1; }
.ex-presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ex-presets button {
  font: inherit; font-size: 0.88rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
  color: var(--ink-2); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
  transition: all 0.15s ease;
}
.ex-presets button:hover { border-color: var(--faint); color: var(--ink); }
.ex-presets button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--blue) var(--fill, 50%), #dde3ec var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #dde3ec; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
input[type="range"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.ex-diagram-wrap { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 14px; }
.ex-diagram { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 6px 2px 10px; min-height: 72px; }
.ex-diagram > :first-child { margin-left: auto; }
.ex-diagram > :last-child { margin-right: auto; }
.blk {
  flex: none; display: grid; place-items: center; height: 48px; border-radius: 8px;
  font-size: 0.84rem; font-weight: 600; color: var(--ink-2); background: #fff; border: 1.5px solid var(--line-strong);
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.blk.end { width: 72px; background: #eef1f6; }
.blk.loop { width: 34px; }
.blk.fwd { border-style: dashed; color: var(--faint); background: #fbfcfd; }
.blk.trained { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.blk.pulse-f { box-shadow: 0 0 0 3px rgba(19, 26, 38, 0.16); transform: translateY(-2px); }
.blk.pulse-b { box-shadow: 0 0 0 4px rgba(194, 85, 59, 0.35); transform: translateY(-2px); }
.conn { flex: none; width: 12px; height: 2px; background: var(--line-strong); }
.stopg {
  flex: none; width: 20px; height: 20px; margin: 0 3px; border-radius: 50%;
  border: 2px solid var(--rust); position: relative; background: #fff;
}
.stopg::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 22px; background: var(--rust); transform: translate(-50%, -50%) rotate(45deg); }
.ex-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 0.84rem; color: var(--muted); }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 7px; }
.lg-fwd { border: 1.5px dashed var(--line-strong); background: #fbfcfd; }
.lg-trained { border: 1.5px solid var(--blue); background: var(--blue-soft); }
.lg-stop { border: 2px solid var(--rust); border-radius: 50%; background: #fff; }
.lg-fwd-unit { background: #cbd3df; }
.lg-bwd-unit { background: var(--blue); }

.ex-compute { display: grid; gap: 10px; }
.ex-compute-row { display: grid; grid-template-columns: 13.5em 1fr 5.5em; align-items: center; gap: 14px; font-size: 0.92rem; }
.ex-compute-name { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-compute-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ubar { display: flex; gap: 2px; height: 20px; }
.ubar span { display: block; height: 100%; border-radius: 3px; background: #cbd3df; }
.ubar span.bwd { background: var(--blue); }
.ex-compute-legend { margin: 0; font-size: 0.82rem; color: var(--muted); }

.ex-readouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.readout {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff;
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 2px; align-content: start;
}
.readout-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.readout-value { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.readout-sub { font-size: 0.8rem; color: var(--faint); }

.ex-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.verdict { border-radius: 14px; padding: 16px 18px; border: 1px solid; }
.verdict-tag { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; }
.verdict p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.ex-apply {
  margin-top: 10px; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
  color: #fff; background: var(--blue); border: 0; border-radius: 999px; padding: 6px 14px;
}
.ex-apply:hover { background: #24488a; }
.ex-note { margin: 0; font-size: 0.84rem; color: var(--faint); }

/* ---------- the law ---------- */
.law-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 22px; overflow: hidden;
}
.eq-hero { padding: 12px 24px 8px; overflow-x: auto; font-size: 1.08rem; }
/* The 1px gaps over the grid's background draw the dividers, in four columns and in two. */
.props {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
}
/* Subgrid rows keep the names, formulas and descriptions of a row of cells level when a name wraps. */
.prop {
  background: var(--bg-alt); padding: 16px 18px 18px; text-align: center;
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
}
.prop-name { display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.prop-eq { display: block; margin: 8px 0 6px; font-size: 1.16rem; color: var(--ink); }
.prop p { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--muted); text-wrap: balance; }
.nowrap { white-space: nowrap; }
.coef-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 12px; margin-bottom: 26px; }
.coef-groups { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; }
.coef-title { margin: 0 0 2px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue); }
.coef-table th, .coef-table td { text-align: center !important; padding: 9px 8px; }
.table-note { margin: 10px 0 0; font-size: 0.86rem; color: var(--muted); }

/* ---------- citation ---------- */
.codeblock { position: relative; margin: 18px 0 12px; }
.codeblock pre {
  margin: 0; background: #111827; color: #e5e7eb; border-radius: 14px;
  padding: 20px 22px; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; line-height: 1.65;
}
.codeblock pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
#bibtex { white-space: pre; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  color: #e5e7eb; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px; padding: 4px 10px; transition: background 0.15s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); }
.copy-btn.done { color: #a7f3d0; border-color: rgba(167, 243, 208, 0.5); }
#citation p { color: var(--ink-2); }
#citation .section-title { margin-bottom: 18px; }
.ack-title { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); margin: 40px 0 8px; }
.ack { font-size: 0.97rem; }

.footer { padding: 30px 0 40px; border-top: 1px solid var(--line); text-align: center; font-size: 0.86rem; color: var(--faint); }
.footer p { margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 3vw;
  background: rgba(10, 14, 22, 0.86); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; background: #fff; border-radius: 10px; padding: 14px; }
.lightbox-close {
  position: absolute; top: 14px; right: 18px; font-size: 2rem; line-height: 1; color: #fff;
  background: none; border: 0; cursor: pointer; opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

.katex { font-size: 1.05em; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .takeaway-grid { grid-template-columns: 1fr; gap: 18px; }
  .versus { grid-template-columns: 1fr; }
  .versus-mid { justify-self: center; }
  .ex-readouts { grid-template-columns: repeat(2, 1fr); }
  .props { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .container.narrow { width: calc(100% - 32px); }
  .section { padding: 56px 0; }
  .hero { padding-top: 40px; }
  .brand { display: none; }
  .navlinks { width: 100%; }
  .logos { gap: 18px; }
  .logos img { height: 38px; }
  .logos img.logo-wide { height: 30px; }
  .figure, .figure-hero { padding: 12px; border-radius: 12px; }
  .takeaway { padding: 26px 18px 20px; }
  .explorer { padding: 18px; }
  .ex-controls { grid-template-columns: 1fr; }
  .ex-compute-row { grid-template-columns: 1fr auto; }
  .ex-compute-row .ubar { grid-column: 1 / -1; grid-row: 2; }
  .ex-verdicts { grid-template-columns: 1fr; }
  .blk.loop { width: 22px; font-size: 0.7rem; }
  .blk.end { width: 52px; font-size: 0.72rem; }
  .conn { width: 6px; }
  .tldr { padding: 26px 20px 10px; font-size: 1.04rem; }
  .coef-groups { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .coef-table th, .coef-table td { padding: 8px 2px; font-size: 0.8rem; }
  .eq-hero { padding: 6px 10px; font-size: min(0.9rem, 2.85vw); }
  .prop { padding: 14px 10px 16px; }
  /* One tag per keyword: the keywords wrap as whole items, without a dangling separator. */
  .eyebrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; background: none; border: 0; padding: 0; font-size: 0.7rem; }
  .eyebrow span { background: rgba(47, 90, 168, 0.08); border: 1px solid rgba(47, 90, 168, 0.16); border-radius: 999px; padding: 4px 10px; }
  .eyebrow span + span::before { content: none; }
  /* Long first lines would run under the copy button. */
  .codeblock pre { padding-top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
