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

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --brand:        #1a73e8;
  --brand-light:  #e8f0fe;
  --text:         #202124;
  --text-muted:   #5f6368;
  --border:       #e0e0e0;
  --bg-page:      #fafafa;
  --bg-sidebar:   #ffffff;
  --bg-card:      #ffffff;
  --sidebar-w:    252px;
  --navbar-h:     56px;
  --radius:       6px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --transition:   0.18s ease;
}

/* ─── Base ───────────────────────────────────────────── */
body {
  font-family: "Google Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-page);
  /* flex is NOT needed on body — sidebar + content are positioned independently */
}

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

/* ─── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: fixed;
  top: var(--navbar-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar h2 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 12px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 2px;
}

.sidebar li a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 450;
  transition: background var(--transition), color var(--transition);
  border: none;
}

.sidebar li a:hover {
  background: var(--brand-light);
  color: var(--brand);
  text-decoration: none;
  transform: none;
}

.sidebar li a.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

/* ─── Main content ───────────────────────────────────── */
.content {
  margin-left: var(--sidebar-w);
  margin-top: var(--navbar-h);
  padding: 40px 48px;
  max-width: 900px;
}

.content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.content p {
  margin-bottom: 14px;
  color: var(--text);
}

/* ─── Code blocks ────────────────────────────────────── */
pre {
  position: relative;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
  line-height: 1.6;
}

code {
  font-family: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
  font-size: 0.85em;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content {
    margin-left: 0;
    padding: 24px 20px;
  }
}