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

:root {
  --bg: #09090b;
  --surface: #111111;
  --border: #1f1f1f;
  --text: #ffffff;
  --text-muted: #888888;
  --text-faint: #555555;
  --accent: #ffffff;
  --sidebar-width: 240px;
}

html { font-size: 15px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-muted);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #0a0a0a;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

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

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-section a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.1s, color 0.1s;
}

.nav-section a:hover,
.nav-section a.active {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.nav-section a.active {
  border-left: 2px solid var(--text);
  border-radius: 0 6px 6px 0;
  margin-left: -1px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: none;
}

.sidebar-footer a:hover { color: var(--text-muted); }

/* ── Main content ────────────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 48px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.topbar a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.1s;
}

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

.topbar .btn-primary {
  background: var(--text);
  color: #09090b;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13px;
}

.topbar .btn-primary:hover { opacity: 0.9; color: #09090b; }

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px;
}

/* ── Typography ──────────────────────────────────────────────── */

h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

p { margin-bottom: 14px; }

a { color: var(--text); }
a:hover { opacity: 0.8; }

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

li { margin-bottom: 6px; }

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

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.page-intro {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* ── Cards ───────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s;
}

.card:hover { border-color: #333; opacity: 1; }

.card-icon { font-size: 20px; margin-bottom: 10px; }

.card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Steps ───────────────────────────────────────────────────── */

.steps { margin: 24px 0; }

.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.step-content h3 { margin-top: 0; }

/* ── Table ───────────────────────────────────────────────────── */

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

th {
  text-align: left;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

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

/* ── Callout ─────────────────────────────────────────────────── */

.callout {
  border: 1px solid rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.06);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #f59e0b;
}

.callout.info {
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.06);
  color: #60a5fa;
}

/* ── FAQ ─────────────────────────────────────────────────────── */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 14px;
}

.faq-a { font-size: 13px; margin: 0; }

/* ── Badge ───────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #1f1f1f;
  color: var(--text-muted);
  margin-left: 6px;
  vertical-align: middle;
}

.badge.owner { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge.staff { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge.all { background: #1f1f1f; color: var(--text-muted); }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .content { padding: 24px 20px; }
}
