/* GRAIL — Borderless Technical Drafting Sheet (illum Draft Rubrication)
 * Upright grotesque (IBM Plex Sans), technical mono (IBM Plex Mono),
 * book serif (Source Serif 4) reserved strictly for specimen prose.
 */

:root {
  --bg: #fcfcfa;
  --paper: rgb(252 252 250);
  --surface: #f3f4f2;
  --surface-2: #e9ebe8;
  --ink: #16171b;
  --ink-mid: #3a3e47;
  --ink-dim: #666c78;
  --rule: #dcdfe5;
  --rule-strong: #16171b;
  --accent: #0047ff;
  --accent-soft: rgba(0, 71, 255, 0.08);
  --rubric: rgb(150 52 36);
  --danger: #d92d20;
  --danger-soft: rgba(217, 45, 32, 0.11);
  --ok: #067647;
  --code-bg: #111318;
  --code-ink: #f1f4f8;
  --code-dim: #9299a8;
  --code-rule: #252a36;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --prose: "Source Serif 4", "Charter", Georgia, serif;
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --paper: rgb(13 15 20);
  --surface: #141720;
  --surface-2: #1b202c;
  --ink: #e8edf4;
  --ink-mid: #bcc4d2;
  --ink-dim: #838c9e;
  --rule: #242a38;
  --rule-strong: #e8edf4;
  --accent: #4d82ff;
  --accent-soft: rgba(77, 130, 255, 0.14);
  --rubric: rgb(232 112 84);
  --danger: #f97066;
  --danger-soft: rgba(249, 112, 102, 0.16);
  --ok: #47cd89;
  --code-bg: #12151e;
  --code-ink: #edf1f7;
  --code-dim: #8e96a8;
  --code-rule: #252b3b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Borderless Top Navigation ─────────────────────────────────── */
.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
}
.mast-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 56px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}
.wordmark .ver {
  font-weight: 400;
  font-size: 0.74rem;
  color: var(--ink-dim);
  letter-spacing: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.84rem;
  font-weight: 500;
}
.nav a {
  color: var(--ink-dim);
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.theme-toggle {
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 4px 6px;
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--ink);
}
@media (max-width: 780px) {
  .mast-inner { padding: 0 20px; }
  .nav { gap: 12px; font-size: 0.8rem; }
  .wordmark .ver { display: none; }
}

/* ── Rubricated Drafting Sheet Host ────────────────────────────── */
.rubric-sheet {
  position: relative;
  overflow-x: clip;
}
.rubric-sheet > canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 0;
}
.rubric-inner {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 56px;
}
@media (max-width: 780px) {
  .wrap { padding: 0 20px; }
}

/* illum Draft Marks & Frames */
hr.draft-cut {
  border: 0;
  height: 4.4em;
  margin: 0.8em 0;
  background: transparent;
}
hr.draft-cut[data-rank="2"] {
  height: 7.8em;
  margin: 1.8em 0 0;
}
aside.draft-note {
  margin: 2.4em 0 0.8em;
  padding: 1.5em 1.8em 1.2em;
  border: 0;
  background: transparent;
}
aside.draft-note h3 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
  color: var(--ink);
}
aside.draft-note p {
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink-mid);
  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;
}
figure.draft-fig {
  margin: 2.6em 0 3.4em;
  padding: 2em 1.8em 3.6em;
}
figure.draft-fig .plate-frame {
  background: transparent;
  border: 0;
  padding: 0;
}
figure.draft-fig figcaption {
  margin-top: 4.8em;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--ink-mid);
}
@media (max-width: 680px) {
  hr.draft-cut { height: 3.6em; }
  figure.draft-fig { margin: 2.2em 0 2.8em; padding: 1.4em 0.8em 3.2em; }
  figure.draft-fig figcaption { margin-top: 4.2em; }
  aside.draft-note { padding: 1.3em 1.1em 1em; }
}

/* ── Borderless Engineering Masthead (Hero) ────────────────────── */
.hero {
  padding: 40px 0 18px;
  border: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: start;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
}
.hero-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.05rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0 0 18px;
  max-width: 22ch;
}
.hero-summary {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--ink-mid);
  margin: 0;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: opacity 0.12s ease;
}
.btn-solid:hover { opacity: 0.88; }
[data-theme="dark"] .btn-solid { color: #0a0c10; }
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
}
.btn-line:hover {
  border-color: var(--ink);
}

/* Command Panel in Hero */
.cmd-panel {
  border: 1px solid var(--rule);
  background: var(--surface);
}
.cmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding: 0 12px;
  height: 36px;
}
.cmd-tabs {
  display: flex;
  gap: 4px;
}
.cmd-tab {
  background: none;
  border: none;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cmd-tab:hover { color: var(--ink); }
.cmd-tab.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}
.cmd-bar {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 14px 16px;
  position: relative;
}
.cmd-bar pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  overflow-x: auto;
  padding-right: 60px;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--code-dim);
  border: 1px solid var(--code-rule);
  font-family: var(--mono);
  font-size: 0.69rem;
  padding: 3px 8px;
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--code-ink);
  border-color: var(--code-dim);
}
.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .telemetry-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tel-cell:nth-child(2n) { border-right: none; }
  .tel-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
.tel-cell {
  padding: 10px 12px;
  border-right: 1px solid var(--rule);
}
.tel-cell:last-child { border-right: none; }
.tel-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.tel-key {
  font-size: 0.69rem;
  color: var(--ink-dim);
  margin-top: 2px;
}

/* ── Borderless Sections ───────────────────────────────────────── */
.band {
  padding: 12px 0 16px;
  border: 0;
}
.band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-bottom: 24px;
}
.band-head h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}
.band-head p {
  font-size: 0.94rem;
  line-height: 1.56;
  color: var(--ink-mid);
  margin: 0;
  max-width: 64ch;
}

/* ── Specimen Comparator Instrument ────────────────────────────── */
.instrument {
  border: 1px solid var(--rule);
  background: var(--bg);
}
.inst-top {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.specimen-list {
  display: flex;
  flex-wrap: wrap;
}
.spec-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 11px 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.spec-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.spec-btn.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: inset 0 2px 0 var(--accent);
}
.mode-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.mode-opt {
  background: none;
  border: 1px solid transparent;
  padding: 5px 10px;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}
.mode-opt:hover { color: var(--ink); }
.mode-opt.active {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--rule);
  font-weight: 500;
}

/* Dynamic Per-Essay Delta Strip */
.delta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.delta-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.delta-model {
  color: var(--ink-dim);
  margin-left: 10px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.74rem;
}
.delta-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.delta-chip { color: var(--ink-dim); }
.delta-chip strong {
  color: var(--ink);
  font-weight: 600;
}
.delta-chip strong.is-good { color: var(--ok); }
.delta-perm {
  color: var(--accent);
  font-weight: 500;
}
.delta-perm:hover { text-decoration: underline; }

/* Split & Flip Reading Panes */
.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 880px) {
  .spread { grid-template-columns: 1fr; }
}
.spread-col {
  padding: 24px 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 680px) {
  .spread-col { padding: 20px 16px; }
}
.spread-col.col-base {
  border-right: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 45%, var(--bg));
}
@media (max-width: 880px) {
  .spread-col.col-base {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}
.col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.col-base .col-head strong { color: var(--ink-dim); font-weight: 500; }
.col-grail .col-head strong { color: var(--accent); font-weight: 600; }
.col-head span { color: var(--ink-dim); }

.prose {
  font-family: var(--prose);
  font-size: 1.03rem;
  line-height: 1.74;
  color: var(--ink);
}
.col-base .prose { color: var(--ink-mid); }
.prose p { margin: 0 0 0.95em; }
.prose p:last-child { margin-bottom: 0; }

.col-foot {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-dim);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.col-grail .col-foot strong { color: var(--ink); font-weight: 600; }

.spread.flip-mode,
.spread.single-pane {
  grid-template-columns: 1fr;
}
.spread.flip-mode .spread-col,
.spread.single-pane .spread-col {
  border-right: none;
  background: var(--bg);
  max-width: 68ch;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 28px;
}
.spread.flip-mode .col-base .prose { color: var(--ink); }
.spread.flip-mode[data-showing="grail"] .col-base { display: none; }
.spread.flip-mode[data-showing="base"] .col-grail { display: none; }

.flip-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-mid);
}
.flip-bar.visible { display: flex; }
.flip-trigger {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  cursor: pointer;
}
.flip-trigger:hover { background: var(--accent); color: #fff; }

mark.tell {
  background: var(--danger-soft);
  color: inherit;
  border-bottom: 1.5px solid var(--danger);
  padding: 0 1px;
}

/* ── Spec Sheet (Mechanism) ────────────────────────────────────── */
.spec-sheet {
  border-top: 1px solid var(--rule);
}
.spec-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 0.75fr) minmax(0, 0.65fr) minmax(0, 1.45fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
@media (max-width: 920px) {
  .spec-row { grid-template-columns: 36px 1fr; gap: 6px 14px; }
  .spec-param, .spec-body { grid-column: 2; }
}
.spec-num {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--rubric);
  font-weight: 600;
}
.spec-name {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  margin: 0;
}
.spec-param {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-dim);
}
.spec-body {
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--ink-mid);
  margin: 0;
}

/* Plotter Plate Viewer inside Draft Figure */
.plate-controls {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-top: 32px;
}
.plate-tab {
  background: none;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--ink-dim);
  cursor: pointer;
}
.plate-tab:hover { color: var(--ink); background: var(--surface-2); }
.plate-tab.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 2px 0 var(--accent);
}
.plate-frame {
  background: #ffffff;
  border: 1px solid var(--rule);
  padding: 18px;
}
.plate-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Unified Drafting-Sheet Benchmark Tables ───────────────────── */
.bench-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.bench-tab {
  background: none;
  border: none;
  padding: 10px 16px;
  margin-bottom: -1px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.bench-tab:hover { color: var(--ink); }
.bench-tab.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}
.bench-panel { display: none; }
.bench-panel.active { display: block; }

.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.data-table th {
  font-size: 0.7rem;
  color: var(--ink-dim);
  font-weight: 500;
  border-bottom-color: var(--rule-strong);
}
.data-table th.num, .data-table td.num { text-align: right; }
.data-table tr.win td {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.data-table tr.win td:first-child {
  border-left: 2px solid var(--accent);
}

/* ── Runtime List ──────────────────────────────────────────────── */
.engine-list {
  border-top: 1px solid var(--rule);
}
.engine-row {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.5fr) auto;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
@media (max-width: 780px) {
  .engine-row { grid-template-columns: 1fr; gap: 4px; }
}
.engine-name {
  font-weight: 600;
  font-size: 0.94rem;
}
.engine-desc {
  font-size: 0.88rem;
  color: var(--ink-mid);
}
.engine-link {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
}
.engine-link:hover { text-decoration: underline; }

/* ── Anthology Page (samples.html) ─────────────────────────────── */
.filter-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-bottom: 24px;
}
.filter-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.73rem;
}
.f-btn {
  background: none;
  border: 1px solid transparent;
  padding: 5px 9px;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}
.f-btn:hover { color: var(--ink); }
.f-btn.active {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--rule);
  font-weight: 500;
}

.anthology-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .anthology-index { grid-template-columns: 1fr; }
}
.anth-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 11px 14px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.anth-link:hover { background: var(--surface); }
.anth-link:hover .anth-title { color: var(--accent); }
.anth-title {
  font-weight: 500;
  font-size: 0.88rem;
}
.anth-model {
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-dim);
  white-space: nowrap;
}

.anth-entry {
  margin-bottom: 44px;
  scroll-margin-top: 66px;
}

/* ── Docs Page (docs.html) ─────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding: 36px 0 32px;
}
@media (max-width: 860px) {
  .docs-grid { grid-template-columns: 1fr; gap: 24px; }
}
.docs-toc {
  position: sticky;
  top: 72px;
  align-self: start;
  padding-top: 8px;
}
@media (max-width: 860px) {
  .docs-toc { position: static; padding-bottom: 12px; }
}
.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-toc li { margin-bottom: 8px; }
.docs-toc a {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-dim);
}
.docs-toc a:hover { color: var(--accent); }

.docs-body section {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border: 0;
  scroll-margin-top: 68px;
}
.docs-body h1 {
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.docs-body h2 {
  font-weight: 600;
  font-size: 1.38rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}
.docs-body h3 {
  font-weight: 600;
  font-size: 1rem;
  margin: 22px 0 8px;
}
.docs-body p, .docs-body li {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-mid);
}
.docs-body ul, .docs-body ol { padding-left: 20px; }
.docs-body li { margin-bottom: 8px; }

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1px 4px;
}
.code-wrap {
  position: relative;
  margin: 14px 0 22px;
}
pre.code {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--code-rule);
  padding: 18px 68px 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.58;
}
pre.code code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.light-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 14px 0 20px;
}
.light-table th, .light-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.light-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule-strong);
}

/* ── Technical Paper Page (paper.html) ─────────────────────────── */
.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin: 0 0 24px;
}
.paper-meta a { color: var(--accent); }
.paper-meta a:hover { text-decoration: underline; }
.math-block {
  overflow-x: auto;
  padding: 6px 0;
  margin: 14px 0;
}
.docs-body .table-scroll {
  margin: 16px 0 22px;
}
.docs-body .data-table {
  font-size: 0.76rem;
}
.docs-body .data-table td,
.docs-body .data-table th {
  padding: 8px 9px;
}

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  padding: 18px 0 44px;
  font-size: 0.8rem;
  color: var(--ink-dim);
  border: 0;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}
.foot-note {
  font-family: var(--mono);
  font-size: 0.74rem;
}
.foot-links {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.74rem;
}
.foot-links a:hover { color: var(--accent); }
