:root {
  --bg: #0a0a0f; --surface: #18181b; --code-bg: #1e1e2e;
  --border: #27272a; --text: #e4e4e7; --muted: #a1a1aa;
  --accent: #7c5cfc; --accent-h: #9b80ff; --green: #4ade80;
  --yellow: #fbbf24; --sidebar-w: 240px;
  --font: system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
code { font-family: var(--mono); background: var(--code-bg); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; overflow-x: auto; font-family: var(--mono); font-size: 0.85rem; line-height: 1.6; margin: 1rem 0; }
pre code { background: none; padding: 0; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(10,10,15,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0.6rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.topbar .logo { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.topbar a { color: var(--muted); font-size: 0.85rem; }
.topbar .spacer { flex: 1; }

/* Doc layout */
.doc-layout { display: flex; min-height: calc(100vh - 45px); }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; border-right: 1px solid var(--border); padding: 1.5rem 0; position: sticky; top: 45px; height: calc(100vh - 45px); overflow-y: auto; }
.sidebar .group { margin-bottom: 1.5rem; }
.sidebar .group-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 0 1.25rem; margin-bottom: 0.4rem; }
.sidebar a { display: block; padding: 0.3rem 1.25rem; font-size: 0.88rem; color: var(--muted); border-left: 2px solid transparent; }
.sidebar a:hover { color: var(--text); background: rgba(124,92,252,0.05); }
.sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(124,92,252,0.08); font-weight: 500; }
.doc-content { flex: 1; max-width: 780px; padding: 2.5rem 3rem 4rem; }
.doc-content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.doc-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.doc-content h2:first-of-type { border-top: none; padding-top: 0; }
.doc-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.75rem 0 0.5rem; color: var(--accent); }
.doc-content p { color: var(--muted); margin-bottom: 1rem; }
.lead { font-size: 1.1rem; color: var(--text); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
td code { color: var(--green); }
.callout { background: var(--surface); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; border-radius: 0 8px 8px 0; margin: 1.25rem 0; }
.callout p { margin: 0; font-size: 0.9rem; }
.page-nav { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.page-nav a { font-size: 0.9rem; }
.page-nav .label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.feature h3 { margin: 0 0 0.4rem; color: var(--text); font-size: 0.95rem; }
.feature p { font-size: 0.85rem; margin: 0; }

/* Hero */
.hero { padding: 5rem 0 3rem; text-align: center; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 3.5rem; font-weight: 800; background: linear-gradient(135deg,#e4e4e7,#a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
.hero .tagline { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; }
.hero .stats { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat .number { font-size: 2rem; font-weight: 800; color: var(--green); }
.stat .label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.cta { display: inline-block; padding: 0.7rem 2rem; background: var(--accent); color: white; border-radius: 8px; font-weight: 600; }
.cta:hover { background: var(--accent-h); color: white; }
footer { padding: 2rem; text-align: center; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .doc-content { padding: 1.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 2.5rem; }
}
