:root {
  --bg: #0b0d12;
  --surface: #11141b;
  --border: #232733;
  --text: #e4e7ee;
  --muted: #8b93a7;
  --accent: #4f8cff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --border: #e3e6eb;
    --text: #1b1f27;
    --muted: #5b6472;
    --accent: #2f6fed;
  }
}

* { box-sizing: border-box; }

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

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
}

.brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  padding: 0 8px;
}

.sidebar ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar a {
  display: block;
  padding: 8px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--border);
}

.content {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px;
}

.content h1 { font-size: 1.9rem; margin-top: 0; }
.content h2 { font-size: 1.4rem; margin-top: 2.2em; }
.content h3 { font-size: 1.15rem; }
.content code { background: var(--surface); padding: 0.15em 0.4em; border-radius: 4px; }
.content pre { background: var(--surface); padding: 16px; border-radius: 8px; overflow-x: auto; }
.content a { color: var(--accent); }
.content table { border-collapse: collapse; width: 100%; overflow-x: auto; display: block; }
.content th, .content td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }

@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
