:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --border: #222222;
  --accent: #ff5a4e;
  --text: #e8e8e8;
  --text-dim: #888888;
  --text-code: #f0c060;
  --sidebar-w: 260px;
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.sidebar-brand img { width: 28px; height: 28px; }
.sidebar-brand span { font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
.sidebar-brand em { color: var(--accent); font-style: normal; }

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section {
  margin-bottom: 4px;
}

.nav-section-label {
  display: block;
  padding: 6px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 12px;
}

.sidebar-nav a {
  display: block;
  padding: 6px 16px 6px 24px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--bg3);
}

.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(255,90,78,0.06);
}

.sidebar-nav a.section-link {
  padding-left: 16px;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.sidebar-nav a.section-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
}

.sidebar-footer a { color: var(--text-dim); text-decoration: none; }
.sidebar-footer a:hover { color: var(--accent); }

/* ── Main content ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  max-width: 820px;
  padding: 48px 56px;
}

/* ── Typography ── */
h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

h1 .page-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.page-intro {
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  line-height: 1.6;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 12px;
  padding-top: 8px;
  letter-spacing: -0.01em;
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--text);
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 20px; margin-bottom: 14px; }
li { margin-bottom: 4px; }

/* ── Code ── */
code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-code);
  background: var(--bg3);
  padding: 1px 5px;
  border-radius: 3px;
}

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

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

/* ── Info boxes ── */
.callout {
  border-left: 3px solid var(--accent);
  background: rgba(255,90,78,0.06);
  padding: 14px 16px;
  border-radius: 0 6px 6px 0;
  margin: 20px 0;
  font-size: 14px;
}

.callout.note {
  border-color: #4e9fff;
  background: rgba(78,159,255,0.06);
}

.callout.warn {
  border-color: #ffb84e;
  background: rgba(255,184,78,0.06);
}

.callout strong { display: block; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.callout.note strong { color: #4e9fff; }
.callout.warn strong { color: #ffb84e; }
.callout strong { color: var(--accent); }

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

th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

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

tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-alpha { background: rgba(255,90,78,0.15); color: #ff5a4e; }
.badge-beta  { background: rgba(255,184,78,0.15); color: #ffb84e; }

/* ── Command reference cards ── */
.cmd-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 12px 0;
  overflow: hidden;
}

.cmd-card-header {
  padding: 10px 14px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-card-header code {
  background: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cmd-card-body {
  padding: 12px 14px;
  font-size: 13px;
}

/* ── Step list ── */
.steps { list-style: none; padding: 0; counter-reset: steps; }
.steps li {
  counter-increment: steps;
  padding: 10px 12px 10px 44px;
  border-left: 2px solid var(--border);
  margin-left: 14px;
  margin-bottom: 4px;
  position: relative;
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: -14px;
  top: 10px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Nav toggle (mobile) ── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 72px 20px 40px; }
  .nav-toggle { display: flex; }
}

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