:root {
  --bg: #0a0e1a;
  --surface: #131a2c;
  --surface-2: #1a2238;
  --border: #2a3654;
  --text: #f1f5fb;
  --text-muted: #a3b0c9;
  --primary: #2563eb;
  --primary-2: #3b82f6;
  --accent: #06b6d4;
  --focus: #fbbf24;
  --radius: 14px;
  --max: 880px;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(60% 40% at 0% 0%, rgba(37,99,235,0.14), transparent 60%),
    radial-gradient(45% 35% at 100% 100%, rgba(6,182,212,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--primary-2); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--focus); color: #000; padding: 8px 14px; z-index: 100;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
header.site, footer.legal {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
}
header.site { padding-bottom: 0; }
header.site a.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700;
}
header.site .brand-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
main {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}
.page-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 8px 0 24px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
  scroll-margin-top: 24px;
}
h3 { font-size: 1.05rem; margin: 20px 0 6px; }
p, li { color: var(--text); }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 28px;
}
.toc h2 { margin-top: 0; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.toc ol { margin: 8px 0 0; padding-left: 22px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.callout {
  background: rgba(37,99,235,0.08);
  border-left: 3px solid var(--primary-2);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
  color: var(--text);
}
.callout strong { color: #cbd5ff; }
table {
  border-collapse: collapse; width: 100%; margin: 12px 0 20px;
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 12px; text-align: left; vertical-align: top;
}
th { background: var(--surface); font-weight: 600; }
footer.legal {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer.legal nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
footer.legal nav a { color: var(--text-muted); text-decoration: none; }
footer.legal nav a:hover { color: var(--text); text-decoration: underline; }
footer.legal .credit a { color: var(--accent); }
