*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fff;
  --border: #e8e8e4;
  --text: #000;
  --muted: #999993;
  --surface: #f5f5f2;
  --font: 'Manrope', system-ui, sans-serif;
  --mono: 'Geist Mono', monospace;
  --toc-w: 200px;
  --content-max: 680px;
}

html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; }

/* ── LAYOUT ── */
.page {
  display: flex;
  justify-content: center;
  padding: 4rem 2rem 6rem;
  gap: 3rem;
}

/* ── CONTENT ── */
.content {
  flex: 1;
  max-width: var(--content-max);
  min-width: 0;
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2.5rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .cur { color: var(--text); }

.nav-item:hover { background: var(--surface); }
@media (max-width: 520px) {
  .grid-2col { grid-template-columns: 1fr; }
}
/* typography */
h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.75rem; }
h2 { font-size: 1.1rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
h2:first-of-type { margin-top: 2rem; padding-top: 0; border-top: none; }
h3 { font-size: 0.9rem; font-weight: 500; margin-top: 1.5rem; margin-bottom: 0.35rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
p { font-size: 14.5px; color: #3a3a36; margin-bottom: 0.85rem; line-height: 1.75; }
a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; }
pre { background: #1c1c1a; border-radius: 8px; padding: 1.1rem 1.25rem; overflow-x: auto; margin: 1rem 0; }
pre code { background: none; border: none; padding: 0; font-size: 12.5px; color: #d4d4c8; line-height: 1.65; }
blockquote { border-left: 2px solid var(--border); padding-left: 1.1rem; color: #6b6b65; font-style: italic; margin: 1.1rem 0; }

/* ── TOC ── */
.toc {
  width: var(--toc-w);
  flex-shrink: 0;
}

.toc-inner {
  position: sticky;
  top: 3rem;
}

.toc-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
  padding-left: 8px;
}

.toc-link {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 5px;
  border-left: 2px solid transparent;
  transition: color 0.12s;
  line-height: 1.45;
}

.toc-link:hover { color: var(--text); }

.toc-link.active {
  color: var(--text);
  font-weight: 500;
  border-left-color: var(--text);
}

.toc-link[data-depth="3"] { padding-left: 18px; font-size: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .toc { display: none; }
  .page { padding: 2.5rem 1.25rem 5rem; }
}
