:root {
  color-scheme: dark;
  --bg-0: #070812;
  --bg-1: #0B0D1F;
  --surface: #101433;
  --panel: rgba(255, 255, 255, 0.04);
  --border: rgba(244, 246, 255, 0.10);
  --border-strong: rgba(244, 246, 255, 0.18);
  --text: #F4F6FF;
  --muted: rgba(244, 246, 255, 0.70);
  --muted-2: rgba(244, 246, 255, 0.52);
  --accent: #8B5CFF;
  --accent-2: #B79CFF;
  --gold: #FFD46B;
  --green: #22c55e;
  --gradient-hero: linear-gradient(135deg, #8B5CFF 0%, #B79CFF 100%);
  --gradient-glow: radial-gradient(circle at 30% 20%, rgba(139, 92, 255, 0.18), transparent 60%),
                   radial-gradient(circle at 80% 30%, rgba(183, 156, 255, 0.10), transparent 55%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 17px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

.container {
  position: relative;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  z-index: 1;
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.brand-logo { display: block; width: min(140px, 38vw); height: auto; }

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .nav-links a:not(.home) { display: none; }
}

/* DOC */
.doc {
  padding: 56px 0 80px;
}

.doc-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.doc-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(139, 92, 255, 0.12);
  border: 1px solid rgba(139, 92, 255, 0.35);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.doc h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.doc-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.doc h2 {
  margin: 44px 0 14px;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.2;
}

.doc h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.doc p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.doc p strong { color: #fff; }

.doc ul, .doc ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.doc li {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
}

.doc .callout {
  margin: 24px 0;
  padding: 18px 22px;
  background: rgba(139, 92, 255, 0.08);
  border: 1px solid rgba(139, 92, 255, 0.30);
  border-radius: 14px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.doc .callout strong { color: #fff; }

.doc .callout.warning {
  background: rgba(255, 212, 107, 0.06);
  border-color: rgba(255, 212, 107, 0.30);
  color: #fde68a;
}

.doc .callout.warning strong { color: var(--gold); }

.doc .callout.green {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.30);
}

.doc .toc {
  margin: 0 0 32px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.doc .toc h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.doc .toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 16px;
}

.doc .toc li { margin-bottom: 6px; }

.doc .toc a { color: var(--accent-2); text-decoration: none; }
.doc .toc a:hover { color: #fff; text-decoration: underline; }

/* FOOTER */
footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.footer-row a { color: var(--muted); text-decoration: none; }
.footer-row a:hover { color: var(--text); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
