html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { max-height: 1000000px; }
:root {
  --bg: #000000;
  --bg-alt: #0a0a0a;
  --panel: #1a1a1a;
  --border: #262626;
  --text: #f1f1f1;
  --text-dim: #b5b5b5;
  --text-faint: #6e6e6e;
  --white: #ffffff;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--white); text-decoration: none; }

code, pre {
  font-family: var(--font-mono);
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

pre {
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  z-index: 100;
  height: 70px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* Sidebar */
.wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding-top: 100px;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-group {
  margin-bottom: 32px;
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  font-weight: 600;
  text-align: center;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.sidebar-links a {
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  display: block;
  text-align: center;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: var(--panel);
  color: var(--text);
}

/* Main Content */
.content {
  padding-bottom: 80px;
}

section {
  margin-bottom: 80px;
  scroll-margin-top: 100px;
}

h1 {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 24px;
  letter-spacing: -0.01em;
}

h2:first-child { margin-top: 0; }

h3 {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 16px;
}

p {
  margin-bottom: 16px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 720px;
}

ul, ol {
  margin: 16px 0 16px 24px;
  color: var(--text-dim);
}

li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  background: var(--panel);
  text-align: center;
}

.feature-card h3 {
  margin-top: 0;
}
.feature-card p {
  margin-left: auto;
  margin-right: auto;
}
.fc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-alt);
  color: var(--text);
  margin-bottom: 16px;
}
.fc-icon svg { width: 22px; height: 22px; }

.code-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
  overflow-x: auto;
}

.code-block code {
  background: none;
  padding: 0;
  color: #e8e8e8;
}

.highlight {
  color: var(--white);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-right: 8px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px;
  background: var(--bg-alt);
  text-align: center;
  color: var(--text-faint);
}

/* Responsive */
@media (max-width: 599px) {
  .wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sidebar {
    position: static;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .container { padding: 0 16px; }
}
.docs-donut { position: relative; width: 260px; margin: 28px 0; }
.docs-donut svg { width: 100%; height: auto; display: block; }
.docs-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.docs-donut-center b { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--text); }
.docs-donut-center span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--text-faint); margin-top: 3px; }
.tok-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: baseline; }

@media (hover: none) and (pointer: coarse) {
  p, li { font-size: 19px !important; line-height: 1.75 !important; }
  .sidebar-links a { font-size: 16px !important; }
  .sidebar-title { font-size: 13px !important; }
  .nav-links a { font-size: 16px !important; }
  code, pre, .code-block code { font-size: 15px !important; }
  .badge { font-size: 13.5px !important; }
}

@media (hover: none) and (pointer: coarse) {
  .container, .header-inner { max-width: 800px; }
}
