:root {
  --bg: #0a0e14;
  --bg-panel: #0f1319;
  --bg-hover: #151b24;
  --bg-card: #121820;
  --border: #1e2733;
  --border-bright: #2a3545;
  --text: #c5cdd8;
  --text-dim: #5c6978;
  --text-bright: #e8ecf1;
  --accent: #3ddc84;
  --accent-dim: rgba(61, 220, 132, 0.15);
  --danger: #e05252;
  --warn: #f0c040;
  --phase-1: #e05252;
  --phase-2: #34d1bf;
  --phase-3: #3ddc84;
  --phase-4: #4dd0e1;
  --phase-5: #e8b84d;
  --phase-6: #f06292;
  --phase-7: #42a5f5;
  --phase-8: #3ddc84;
  --body: 'Atkinson Hyperlegible Next', sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(91, 156, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(61, 220, 132, 0.03) 0%, transparent 50%),
    radial-gradient(circle, rgba(200, 200, 220, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
}

.doc-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  position: relative;
}

.doc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}

.doc-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
  padding: 4px 0;
}

.doc-nav a:hover,
.doc-nav a.active {
  color: var(--accent);
}

.doc-nav .nav-sep {
  color: var(--border);
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 32px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 14px;
}

strong {
  color: var(--text-bright);
  font-weight: 600;
}

em {
  color: var(--text);
  font-style: italic;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

a:hover {
  border-bottom-color: var(--accent);
}

blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
}

blockquote strong {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

thead th {
  background: var(--bg-card);
  color: var(--text-bright);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody td code {
  font-size: 12px;
}

ul, ol {
  margin: 12px 0 12px 24px;
}

li {
  margin-bottom: 6px;
}

li strong {
  color: var(--text-bright);
}

/* Landing page specific */
.landing-hero {
  text-align: center;
  padding: 80px 0 48px;
}

.landing-hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.landing-hero .subtitle {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 8px;
  line-height: 1.6;
}

.landing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 48px 0;
}

.landing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
}

.landing-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.landing-card .card-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.landing-card .card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.landing-card .card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  flex: 1;
}

.landing-card .card-cta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 16px;
}

.landing-meta {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.landing-meta a {
  color: var(--accent);
}

.phase-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

@media (max-width: 700px) {
  .doc-container { padding: 24px 16px 48px; }
  .landing-cards { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .landing-hero h1 { font-size: 28px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 6px 8px; }
}
