:root { --bg: #fff; --fg: #1b1f23; --muted: #57606a; --line: #d8dee4; --code: #f6f8fa; --link: #0a58ca; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1117; --fg: #e6edf3; --muted: #8b949e; --line: #30363d; --code: #161b22; --link: #58a6ff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; gap: 1.5rem; padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--line); }
.top .brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); }
.top nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.page { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 2rem; max-width: 80rem; margin: 0 auto; padding: 1.5rem; }
.side { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; font-size: 0.9rem; }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li { padding: 0.1rem 0; }
.side li.current a { font-weight: 700; }
.side-title { margin: 0 0 0.5rem; color: var(--muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
.content { min-width: 0; }
.content h1, .content h2, .content h3 { line-height: 1.25; }
.content h1 { margin-top: 0; }
.content h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.25rem; margin-top: 2rem; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
code { background: var(--code); padding: 0.1em 0.3em; border-radius: 4px; }
pre { background: var(--code); padding: 1rem; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
th, td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--code); }
blockquote { margin: 0; padding: 0 1rem; color: var(--muted); border-left: 4px solid var(--line); }
img { max-width: 100%; }
.meta { color: var(--muted); font-size: 0.9rem; }
.meta a { margin-right: 1rem; }
.notice { border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem 1rem; background: var(--code); }
@media (max-width: 60rem) { .page { grid-template-columns: 1fr; } .side { position: static; max-height: none; } }
