/* ════════════════════════════════════════════════════
   WaveLynk Design System — Stripe/Linear Aesthetic
   Light-mode default · Dark mode via [data-theme="dark"]
   ════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ── */
:root {
  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px;
  --sp-9: 64px; --sp-10: 96px;

  /* Radius */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;

  /* Light mode colours */
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-surface: #f3f4f6;
  --bg-elevated: #ffffff;
  --border: #e5e7eb;
  --border-subtle: #f0f0f0;
  --text: #0f1117;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-hover: #1d4ed8;
  --green: #059669;
  --green-light: #ecfdf5;
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --yellow-500: #eab308;
  --red-500: #ef4444;
  --green-500: #22c55e;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);

  /* Layout */
  --max-w: 1120px;
  --nav-h: 60px;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-secondary: #111117;
  --bg-surface: #18181f;
  --bg-elevated: #1f1f28;
  --border: #27272f;
  --border-subtle: #1e1e26;
  --text: #f0f0f5;
  --text-secondary: #9ca3b0;
  --text-muted: #52525e;
  --accent: #3b82f6;
  --accent-light: #1e2d4a;
  --accent-hover: #60a5fa;
  --green: #10b981;
  --green-light: #0d2e20;
  --red: #f87171;
  --red-light: #2d1616;
  --amber: #fbbf24;
  --amber-light: #2d2310;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.4);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background .2s, color .2s;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4em; }

/* ── Layout ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.wrap-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ── Navigation ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

[data-theme="dark"] header {
  background: rgba(10,10,15,.92);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.4px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.logo-mark { border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: var(--sp-5);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { background: var(--bg-surface); color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-surface); }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon,
:root:not([data-theme="dark"]) .icon-moon { display: none; }

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--sp-4) var(--sp-6);
    gap: var(--sp-2);
    margin-left: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: var(--sp-3) var(--sp-4); }
  .nav-actions .btn-primary { display: none; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-surface); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ── Hero ── */
.hero {
  padding: var(--sp-10) 0 var(--sp-9);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle geometric hero BG — no canvas needed */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(37,99,235,.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(5,150,105,.04) 0%, transparent 60%);
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(59,130,246,.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(16,185,129,.07) 0%, transparent 60%);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.07;
  max-width: 900px;
  margin: 0 auto;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: var(--sp-5) auto 0;
  line-height: 1.65;
}

/* ── Page hero (sub-pages) ── */
.page-hero {
  padding: var(--sp-9) 0 var(--sp-8);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-top: var(--sp-4);
}

.page-hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
  margin-top: var(--sp-4);
}

/* ── Section spacing ── */
.section    { padding: var(--sp-10) 0; }
.section-sm { padding: var(--sp-8) 0; }
.section-lg { padding: 120px 0; }

/* ── Labels ── */
.label-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--sp-7);
}
.section-header h2 { margin-top: var(--sp-3); }
.section-header p  { margin-top: var(--sp-3); color: var(--text-secondary); }

/* ── Typography ── */
h1 { font-size: clamp(28px, 4vw, 52px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
h2 { font-size: clamp(22px, 3vw, 36px); font-weight: 700; letter-spacing: -.8px; line-height: 1.2; }
h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.4px; }
h4 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
h5 { font-size: 14px; font-weight: 600; }
p  { line-height: 1.7; color: var(--text-secondary); }

.large-text {
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── Cards ── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: var(--sp-6); }
.card-body > * + * { margin-top: var(--sp-4); }
.card-body h4 { color: var(--text); }
.card-body p { font-size: 15px; }

/* Elevated card variant */
.card-elevated {
  box-shadow: var(--shadow-md);
}

/* ── Grid ── */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Stats / Metrics ── */
.stat { padding: var(--sp-5); }
.stat-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--sp-2);
  font-weight: 500;
}
.stat-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* ── Badge / Pill ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
}

.dot {
  width: 7px; height: 7px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.dot-green { background: var(--green); box-shadow: 0 0 0 2px rgba(5,150,105,.2); }
.dot-blue  { background: var(--accent); }
.dot-amber { background: var(--amber); }

/* Status chip */
.status-chip {
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-family: var(--mono);
}
.status-chip.warning { background: var(--amber-light); color: var(--amber); border-color: rgba(217,119,6,.2); }
.status-chip.danger  { background: var(--red-light);   color: var(--red);   border-color: rgba(220,38,38,.2); }

/* ── Equation block ── */
.equation {
  font-family: var(--mono);
  font-size: 15px;
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--text);
  overflow-x: auto;
  line-height: 1.8;
}

.equation-large {
  font-size: 18px;
  text-align: center;
  padding: var(--sp-7) var(--sp-8);
}

/* ── Callout ── */
.callout {
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-md);
  background: var(--accent-light);
  border: 1px solid rgba(37,99,235,.15);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

[data-theme="dark"] .callout {
  border-color: rgba(59,130,246,.2);
}

.callout-green {
  background: var(--green-light);
  border-color: rgba(5,150,105,.15);
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
}
.data-table td:first-child { color: var(--text); font-weight: 500; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }

/* Result table with colour highlights */
.result-table .better { color: var(--green); font-weight: 600; }
.result-table .worse  { color: var(--red);   font-weight: 600; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
hr.divider { border-color: var(--border-subtle); }

/* ── Feature grid item ── */
.feature {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.feature-number {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(37,99,235,.15);
}
.feature-content h4 { color: var(--text); margin-bottom: var(--sp-1); }
.feature-content p  { font-size: 14px; margin-top: 0; }

/* ── Clean list ── */
.clean-list { list-style: none; padding: 0; }
.clean-list li {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}
.clean-list li:last-child { border-bottom: none; }
.clean-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Code block ── */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

.code-block .kw  { color: var(--accent); }
.code-block .cm  { color: var(--text-muted); }
.code-block .st  { color: var(--green); }
.code-block .fn  { color: #7c3aed; }

pre.code-block { white-space: pre; }

/* ── Figure / image ── */
.figure {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-secondary);
}
.figure img {
  width: 100%;
  display: block;
}
.figure-caption {
  padding: var(--sp-4) var(--sp-5);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.figure-caption strong { color: var(--text-secondary); }

/* ── Accordion ── */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.accordion summary {
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .15s;
}
.accordion summary:hover { background: var(--bg-secondary); }
.accordion summary::after {
  content: '+';
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
}
.accordion[open] summary::after { content: '−'; }
.accordion-body {
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.accordion-body .equation { margin-top: var(--sp-3); }
.accordion-body p + p { margin-top: var(--sp-3); }

/* ── Flex utilities ── */
.flex-col { display: flex; flex-direction: column; }

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: .05s; }
.stagger > *:nth-child(2) { transition-delay: .1s; }
.stagger > *:nth-child(3) { transition-delay: .15s; }
.stagger > *:nth-child(4) { transition-delay: .2s; }

/* ── Footer ── */
footer {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); text-decoration: none; }

/* ── Nav canvas (keep for dark mode only) ── */
#wave-canvas {
  display: none;
}

/* ── Canvas / chart wrapper ── */
.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

/* ── Slider ── */
.slider-group { display: flex; flex-direction: column; gap: var(--sp-1); }
.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.slider-value { font-family: var(--mono); color: var(--accent); }

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
}

/* ── Demo panels ── */
.demo-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--sp-7);
}
@media (max-width: 900px) { .demo-panel { grid-template-columns: 1fr; } }

.controls-pane { display: flex; flex-direction: column; gap: var(--sp-5); }
.output-pane   { display: flex; flex-direction: column; gap: var(--sp-4); }
.metric-row    { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.status-msg {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.status-msg.warning { border-left: 3px solid var(--yellow-500); background: var(--amber-light); }
.status-msg.danger  { border-left: 3px solid var(--red-500);    background: var(--red-light); }
.status-msg.success { border-left: 3px solid var(--green-500);  background: var(--green-light); }

.cci-display {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
}
.cci-display .mono-val {
  font-family: var(--mono);
  font-size: 13px;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ── Demo number badge ── */
.demo-number {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border: 1px solid rgba(37,99,235,.15);
}
.demo-title-row { display: flex; align-items: flex-start; gap: var(--sp-4); }
.demo-title-row h2 { font-size: 24px; }
.demo-title-row p  { margin-top: 4px; font-size: 14px; }

/* ── Inline step flow ── */
.step-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--sp-4);
  align-items: start;
}
.step-arrow {
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 20px;
  text-align: center;
}
.step-item { text-align: center; }
.step-num {
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 2px solid rgba(37,99,235,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto var(--sp-3);
}
.step-item h4 { font-size: 15px; margin-bottom: var(--sp-1); }
.step-item p  { font-size: 13px; }

@media (max-width: 640px) {
  .step-flow { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
}

/* ── Team card ── */
.team-card {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  transition: box-shadow .2s;
}
.team-card:hover { box-shadow: var(--shadow-md); }
.team-photo {
  width: 88px; height: 88px;
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-5);
  object-fit: cover;
  border: 3px solid var(--border);
}
.team-card h3 { font-size: 18px; color: var(--text); }
.team-card .role { font-size: 13px; color: var(--accent); font-weight: 500; margin-top: var(--sp-1); }
.team-card p { font-size: 14px; margin-top: var(--sp-3); }

/* ── Research module card ── */
.module-card {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: box-shadow .2s, border-color .2s;
}
.module-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.module-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--mono);
}
.module-card h4 { margin-top: var(--sp-2); color: var(--text); }
.module-card p  { font-size: 13px; margin-top: var(--sp-2); }

/* ── Reference list ── */
.ref-list { list-style: none; padding: 0; counter-reset: ref; }
.ref-list li {
  counter-increment: ref;
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ref-list li:last-child { border-bottom: none; }
.ref-list li::before {
  content: '[' counter(ref) ']';
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 28px;
}

/* ── GitHub-style stat ── */
.gh-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.gh-stat svg { color: var(--text-muted); }