:root {
  --bg: #0b0b0f;
  --bg-raised: #131319;
  --bg-inset: #1a1a22;
  --border: #26262f;
  --text: #f5f5f5;
  --text-dim: #9a9aa5;
  --accent: #f5c518;
  --accent-dim: #7a640c;
  --owner-tag: #7dd3fc;
  --owner-tag-bg: #0c2b3a;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

code,
pre {
  font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
}

a {
  color: var(--accent);
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 15, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand .bolt {
  color: var(--accent);
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.tabs a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.tabs a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

.tabs a.active {
  color: var(--bg);
  background: var(--accent);
}

/* ---------- Panels ---------- */

main {
  min-height: calc(100vh - 60px - 64px);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.panel-inner.narrow {
  max-width: 760px;
}

.panel-inner.with-sidebar {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

/* ---------- Typography ---------- */

h1 {
  font-size: 2rem;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

h2.dim {
  color: var(--text-dim);
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.lead {
  color: var(--text-dim);
  font-size: 1.05rem;
}

p code,
li code {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--text);
}

ul,
ol {
  padding-left: 22px;
}

.feature-list li,
.numbered li {
  margin-bottom: 8px;
}

/* ---------- Overview quickstart ---------- */

.quickstart {
  display: grid;
  gap: 12px;
  margin: 32px 0 40px;
}

.quickstart-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.step-index {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quickstart-step code {
  font-weight: 600;
  font-size: 0.95rem;
}

.quickstart-step p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Commands tab ---------- */

.cmd-nav {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-nav-title {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.cmd-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.cmd-nav a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

.cmd-content h1 {
  margin-bottom: 32px;
}

.cmd {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 76px;
}

.cmd:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cmd h2 {
  border: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.anchor {
  position: absolute;
  left: -20px;
  top: 32px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.cmd:hover .anchor {
  opacity: 1;
}

.tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-inset);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.tag.owner {
  color: var(--owner-tag);
  background: var(--owner-tag-bg);
  border-color: transparent;
}

.note {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Code blocks ---------- */

pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0;
}

pre.usage {
  color: var(--accent);
  font-weight: 600;
}

pre.usage.dim {
  color: var(--text-dim);
  font-weight: 400;
}

pre.example {
  color: var(--text);
}

.comment {
  color: var(--text-dim);
}

/* ---------- How it works: diagram ---------- */

.diagram {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}

.diagram-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.diagram-box {
  flex: 1;
  min-width: 140px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  font-size: 0.85rem;
}

.diagram-box strong {
  display: block;
  margin-bottom: 4px;
}

.diagram-box span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.diagram-box.highlight {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.diagram-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
  white-space: nowrap;
}

.diagram-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Installation ---------- */

.callout {
  background: var(--bg-raised);
  border: 1px solid var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0 32px;
  color: var(--text-dim);
}

.callout strong {
  color: var(--text);
}

/* ---------- Roadmap ---------- */

.roadmap-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadmap-list li {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  position: relative;
  padding-left: 30px;
}

.roadmap-list li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.roadmap-list.shipped li::before {
  background: #4ade80;
}

.roadmap-list.planned li::before {
  background: var(--accent);
}

.roadmap-list.later li::before,
.roadmap-list.deferred li::before {
  background: var(--text-dim);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .topbar-inner {
    gap: 16px;
  }

  .tabs {
    gap: 0;
  }

  .tabs a {
    padding: 8px 8px;
    font-size: 0.85rem;
  }

  .panel-inner.with-sidebar {
    grid-template-columns: 1fr;
  }

  .cmd-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
  }

  .cmd-nav a {
    background: var(--bg-raised);
    border: 1px solid var(--border);
  }

  .anchor {
    display: none;
  }
}
