/* StopLoss project page */

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

  --bg: #fbfcfb;
  --bg-alt: #f1f5f4;
  --surface: #ffffff;
  --surface-2: #f6f8f8;
  --border: #e2e8e6;
  --border-strong: #cad4d1;
  --text: #0f1f1d;
  --text-2: #3c4f4c;
  --text-3: #667875;
  --accent: #00897b;
  --accent-text: #07685e;
  --accent-soft: #e3f3f0;
  --accent-ring: rgba(0, 137, 123, 0.3);
  --mark-sl: #00897b;
  --mark-judge: #8a7fd6;
  --grid: #e7ecea;
  --axis: #8d9d9a;
  --code-bg: #0e1c1b;
  --code-text: #dfece9;
  --code-dim: #7f9894;
  --shadow-sm: 0 1px 2px rgba(15, 31, 29, 0.06);
  --shadow: 0 1px 2px rgba(15, 31, 29, 0.04), 0 22px 44px -28px rgba(15, 31, 29, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --prose: 780px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1211;
    --bg-alt: #0f1817;
    --surface: #131d1c;
    --surface-2: #172322;
    --border: #22302e;
    --border-strong: #2f403d;
    --text: #e7efed;
    --text-2: #b1c1bd;
    --text-3: #82938f;
    --accent: #1f9e8c;
    --accent-text: #66d2c1;
    --accent-soft: rgba(31, 158, 140, 0.14);
    --accent-ring: rgba(102, 210, 193, 0.35);
    --mark-sl: #1f9e8c;
    --mark-judge: #9085e9;
    --grid: #1f2c2a;
    --axis: #5d706c;
    --code-bg: #08100f;
    --code-text: #d7e5e2;
    --code-dim: #6f8783;
    --shadow-sm: none;
    --shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1211;
  --bg-alt: #0f1817;
  --surface: #131d1c;
  --surface-2: #172322;
  --border: #22302e;
  --border-strong: #2f403d;
  --text: #e7efed;
  --text-2: #b1c1bd;
  --text-3: #82938f;
  --accent: #1f9e8c;
  --accent-text: #66d2c1;
  --accent-soft: rgba(31, 158, 140, 0.14);
  --accent-ring: rgba(102, 210, 193, 0.35);
  --mark-sl: #1f9e8c;
  --mark-judge: #9085e9;
  --grid: #1f2c2a;
  --axis: #5d706c;
  --code-bg: #08100f;
  --code-text: #d7e5e2;
  --code-dim: #6f8783;
  --shadow-sm: none;
  --shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.7);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; }
b, strong { font-weight: 650; }
code { font-family: var(--font-mono); font-size: 0.88em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--prose); }
.muted { color: var(--text-3); }
.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; }

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

/* ---------- navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 14.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; }
.nav-links a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
@media (max-width: 820px) { .nav-links a.optional { display: none; } }
@media (max-width: 600px) { .nav-links a { display: none; } }

/* ---------- hero ---------- */

.hero { position: relative; padding: 76px 0 36px; text-align: center; isolation: isolate; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -120px; width: min(1100px, 140vw); height: 560px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, var(--accent-soft), transparent 72%),
    radial-gradient(40% 50% at 78% 30%, color-mix(in srgb, var(--mark-judge) 10%, transparent), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; inset: -62px 0 auto 0; height: 520px; pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.7;
}
.news {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 5px 14px 5px 6px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: 13.5px; box-shadow: var(--shadow-sm);
}
.news:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.news .tag { padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 650; font-size: 12px; letter-spacing: 0.02em; }
.news .arrow { color: var(--text-3); }
.hero h1 {
  max-width: 940px; margin: 24px auto 0;
  font-family: var(--font-serif); font-weight: 600; font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.07; letter-spacing: -0.022em; text-wrap: balance;
}
.hero h1 .name { color: var(--accent-text); }
.authors { margin: 26px auto 0; max-width: 820px; font-size: 18px; line-height: 1.8; color: var(--text); }
.authors span { white-space: nowrap; }
.authors span:not(:last-child)::after { content: "·"; display: inline-block; width: 1.5em; text-align: center; color: var(--text-3); }
.authors a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.authors a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.affil { margin: 4px 0 0; color: var(--text-3); font-size: 15.5px; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px auto 0; max-width: 860px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--text-3); box-shadow: var(--shadow); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn .emoji { font-size: 17px; line-height: 1; }
.btn-ink { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ink:hover { border-color: var(--text); }

/* ---------- sections ---------- */

.section { padding: 76px 0; }
.section.tight-top { padding-top: 20px; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent-text); font-size: 12.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.eyebrow .num {
  display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px;
  border-radius: 6px; background: var(--accent-soft); font-size: 12px; letter-spacing: 0.02em;
}
h2 {
  margin: 12px 0 14px; font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(28px, 3.5vw, 40px); line-height: 1.14; letter-spacing: -0.016em; text-wrap: balance;
}
h3 { margin: 0 0 8px; font-size: 19px; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; }
.lede { max-width: var(--prose); color: var(--text-2); font-size: 18px; }
.sub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin: 52px 0 16px; }
.sub-head h3 { margin: 0; font-size: 21px; }
.sub-head p { margin: 0; color: var(--text-3); font-size: 14.5px; }

/* ---------- figures ---------- */

.figure { margin: 0; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.figure img { width: 100%; border-radius: 10px; background: #fff; }
.figure .zoom { display: block; cursor: zoom-in; }
.figure figcaption { margin: 16px 6px 2px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.figure figcaption b { color: var(--text); }
@media (max-width: 640px) { .figure { padding: 10px; border-radius: var(--radius-sm); } .figure figcaption { margin: 12px 4px 2px; } }

/* ---------- TL;DR ---------- */

.tldr { max-width: 860px; margin: 0 auto; text-align: center; font-family: var(--font-serif); font-size: clamp(21px, 2.4vw, 27px); line-height: 1.45; letter-spacing: -0.008em; text-wrap: balance; }
.tldr em { font-style: normal; color: var(--accent-text); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.stat { padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.stat::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 16px; border-radius: 3px; background: var(--accent); }
.stat .value { font-size: 36px; font-weight: 650; line-height: 1.05; letter-spacing: -0.025em; color: var(--text); }
.stat .label { margin-top: 10px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* ---------- abstract ---------- */

.abstract { font-size: 17.5px; line-height: 1.8; color: var(--text-2); }

/* ---------- method ---------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 32px 0 28px; }
.step { position: relative; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.step .k { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--text-3); font: 600 12px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.step .k b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; }
.step p { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.label-chip { padding: 1px 6px; border-radius: 5px; font: 600 0.78em/1.4 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap; }
.label-chip.abort { background: rgba(194, 65, 45, 0.12); color: #b23a28; }
.label-chip.continue { background: rgba(46, 125, 79, 0.12); color: #2c7a4c; }
.label-chip.deliver { background: rgba(122, 98, 168, 0.14); color: #6c55a3; }
:root[data-theme="dark"] .label-chip.abort { color: #f08d7c; }
:root[data-theme="dark"] .label-chip.continue { color: #7fd3a1; }
:root[data-theme="dark"] .label-chip.deliver { color: #b9a6ee; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .label-chip.abort { color: #f08d7c; }
  :root:not([data-theme="light"]) .label-chip.continue { color: #7fd3a1; }
  :root:not([data-theme="light"]) .label-chip.deliver { color: #b9a6ee; }
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- charts ---------- */

.card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 640px) { .card { padding: 16px; border-radius: var(--radius-sm); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; color: var(--text-2); font-size: 13.5px; }
.legend .key { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.swatch.sl { background: var(--mark-sl); }
.swatch.judge { background: var(--mark-judge); }
.dot-key { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.dot-key.base { border: 2px solid var(--mark-sl); background: var(--surface); }
.dot-key.trained { background: var(--mark-sl); }
.line-key { display: inline-block; width: 2px; height: 14px; border-radius: 1px; background: var(--text-2); }

.multiples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; }
@media (max-width: 780px) { .multiples { grid-template-columns: 1fr; } }
.panel-title { margin: 0 0 4px; font-size: 14.5px; font-weight: 650; color: var(--text); }
.panel-title span { color: var(--text-3); font-weight: 500; }
.chart { position: relative; min-height: 40px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--font-sans); }
.chart .tick { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .zero { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .row-label { font-size: 12.5px; fill: var(--text); }
.chart .row-label.judge { fill: var(--text-2); }
.chart .value { font-size: 12px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .value.strong { fill: var(--text); font-weight: 600; }
.chart .bar.sl { fill: var(--mark-sl); }
.chart .bar.judge { fill: var(--mark-judge); }
.chart .row { outline: none; }
.chart .row .hover { fill: var(--accent-soft); opacity: 0; transition: opacity 0.12s ease; }
.chart .row:hover .hover, .chart .row:focus-visible .hover { opacity: 1; }
.chart .divider { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart .db-line { stroke: var(--mark-sl); stroke-width: 2; stroke-linecap: round; opacity: 0.45; }
.chart .db-base { fill: var(--surface); stroke: var(--mark-sl); stroke-width: 2; }
.chart .db-trained { fill: var(--mark-sl); stroke: var(--surface); stroke-width: 2; }
.chart .ref { stroke: var(--text-2); stroke-width: 1.5; shape-rendering: crispEdges; }
.chart .ref-label { font-size: 11px; fill: var(--text-3); }
.chart .gain { font-size: 12px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.chart-note { margin: 18px 0 0; color: var(--text-3); font-size: 13.5px; line-height: 1.65; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; min-width: 200px; max-width: 280px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.35); color: var(--text); font-size: 13px; line-height: 1.5;
}
.tooltip[hidden] { display: none; }
.tooltip .tt-title { margin-bottom: 7px; font-weight: 650; }
.tooltip .tt-sub { margin: -5px 0 7px; color: var(--text-3); font-size: 12px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.tooltip .tt-row b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- results table ---------- */

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; padding: 4px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 13px; }
.section.alt .tabs { background: var(--surface-2); }
.tab {
  appearance: none; padding: 9px 14px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  color: var(--text-2); font: 600 14px/1.2 var(--font-sans);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border); }
.tab .sub { color: var(--text-3); font-weight: 500; }
.table-meta { margin: 14px 2px 12px; color: var(--text-3); font-size: 14px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table.results { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14.5px; }
.results th, .results td { padding: 11px 16px; text-align: right; white-space: nowrap; }
.results td:not(:first-child) { font-variant-numeric: tabular-nums; }
.results th:first-child, .results td:first-child { text-align: left; }
.results thead th { background: var(--surface-2); color: var(--text-3); font-size: 12.5px; font-weight: 600; line-height: 1.35; vertical-align: bottom; }
.results thead tr.groups th { padding-bottom: 2px; text-align: center; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.results thead tr.cols th { border-bottom: 1px solid var(--border); padding-top: 4px; }
.results thead .arrow { color: var(--text-3); font-weight: 500; }
.results tbody tr + tr td { border-top: 1px solid var(--border); }
.results tbody tr.first-judge td { border-top: 1px solid var(--border-strong); }
.results tr.sl td { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.results td .who { display: inline-flex; align-items: center; gap: 9px; }
.results td .who i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--mark-judge); }
.results tr.sl td .who i { background: var(--mark-sl); }
.results tr.sl td:first-child { font-weight: 600; }
.results td.best { font-weight: 700; color: var(--text); }
.results td.best::after { content: ""; }
.results td { color: var(--text-2); }
.results td:first-child { color: var(--text); }
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 26px; margin: 18px 2px 0; color: var(--text-3); font-size: 13.5px; line-height: 1.55; }
.defs b { color: var(--text-2); font-weight: 650; }

/* ---------- findings ---------- */

.findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.finding { padding: 26px 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.finding .kicker { color: var(--text-3); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.finding .big { margin: 10px 0 10px; color: var(--text); font-size: 30px; font-weight: 650; line-height: 1.12; letter-spacing: -0.022em; }
.finding .big small { color: var(--text-3); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.finding p { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.formula { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: 0; }
@media (max-width: 780px) { .findings { grid-template-columns: 1fr; } }

/* ---------- release ---------- */

.release { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.rcard {
  display: flex; flex-direction: column; gap: 8px; min-height: 170px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.rcard:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent-ring); box-shadow: var(--shadow); }
.rcard .kind { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rcard .kind .emoji { font-size: 16px; letter-spacing: 0; }
.rcard .name { font-size: 15.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.rcard .desc { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.rcard .go { margin-top: auto; color: var(--accent-text); font-size: 13.5px; font-weight: 600; }
@media (max-width: 980px) { .release { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .release { grid-template-columns: 1fr; } }

.quickstart { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: 28px; align-items: start; margin-top: 44px; }
.quickstart h3 { font-size: 21px; }
.quickstart p { color: var(--text-2); font-size: 15.5px; }
@media (max-width: 900px) { .quickstart { grid-template-columns: 1fr; gap: 12px; } }

.code { position: relative; overflow: hidden; background: var(--code-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; color: var(--code-text); font: 13.5px/1.75 var(--font-mono); }
.code .c { color: var(--code-dim); }
.code .copy, .bib .copy {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  color: var(--code-text); font: 600 12.5px/1 var(--font-sans); cursor: pointer;
}
.code .copy:hover { background: rgba(255, 255, 255, 0.12); }
.copy svg { width: 14px; height: 14px; }

/* ---------- bibtex ---------- */

.bib { position: relative; margin-top: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.bib pre { margin: 0; padding: 22px 24px; overflow-x: auto; color: var(--text); font: 13.5px/1.75 var(--font-mono); }
.bib .copy { border-color: var(--border); background: var(--surface-2); color: var(--text-2); }
.bib .copy:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- footer ---------- */

.footer { padding: 36px 0 54px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 14px; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer a { color: var(--text-2); }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 48px 0 24px; }
  .authors { font-size: 16px; }
  .btn { height: 40px; padding: 0 14px; font-size: 14.5px; }
  .abstract { font-size: 16.5px; }
}
