:root {
    color-scheme: dark;
    font: 16px/1.6 system-ui, sans-serif;
    background: #0b1117;
    color: #e8eeed;
    --muted: #acbcc3;
    --line: #34454d;
    --accent: #cffe82;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: -5rem; padding: .6rem; background: #18282e; }
.skip:focus { top: .4rem; left: .7rem; }
.masthead, .layout, footer { max-width: 1200px; margin: auto; padding-inline: clamp(16px, 4vw, 56px); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 65px; border-bottom: 1px solid var(--line); }
.masthead a { text-decoration: none; white-space: nowrap; }
.masthead a:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: baseline; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: #f4f7ed; }
.brand span { color: var(--accent); font-size: 1.55rem; }
.layout { display: grid; grid-template-columns: minmax(170px, 210px) minmax(0, 1fr); align-items: start; gap: clamp(22px, 5vw, 76px); padding-block: 2.4rem; }
.chapters { position: sticky; top: 1.2rem; }
.chapter-disclosure { display: none; }
.nav-title { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-weight: 650; }
.nav-title span { color: var(--muted); font: .78rem ui-monospace, monospace; }
.chapters ul { list-style: none; padding: 0; margin: .85rem 0 0; border-left: 1px solid var(--line); }
.chapters a { display: block; padding: .46rem .75rem; color: var(--muted); text-decoration: none; line-height: 1.35; }
.chapters a:hover { color: #fff; text-decoration: underline; }
.chapters a[aria-current] { color: var(--accent); background: #182921; box-shadow: -2px 0 var(--accent); }
main { min-width: 0; overflow-wrap: anywhere; outline: none; }
h1, h2, h3 { color: #f6f8f5; line-height: 1.15; scroll-margin-top: 1rem; }
h1 { font-size: clamp(2.05rem, 5vw, 3.6rem); letter-spacing: -.055em; margin: 0 0 1rem; }
h2 { border-top: 1px solid var(--line); padding-top: 1.3rem; margin: 2.25rem 0 .7rem; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.028em; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 .4rem; }
main p, main li { max-width: 75ch; }
main p { margin: .6rem 0 1rem; }
main li { margin: .5rem 0; }
code { font: .89em/1.45 ui-monospace, monospace; color: #d6e9df; background: #19262b; border-radius: .2rem; padding: .08em .22em; }
pre { max-width: 100%; overflow: auto; margin: .75rem 0; padding: .9rem 1rem; background: #121e26; border: 1px solid var(--line); border-radius: .4rem; }
pre code { background: none; padding: 0; font-size: .87rem; }
pre:has(.language-text) { border-left: 3px solid #65a383; color: #c7e7ce; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; margin: .95rem 0 1.1rem; }
th, td { padding: .62rem .65rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #19262c; color: #e5f1eb; }
td:first-child { color: #edf4ed; }
main img { display: block; width: 100%; max-width: 650px; height: auto; margin: 1rem 0; }
.heading-permalink { margin-left: .45em; color: #839b90; text-decoration: none; font-size: .68em; }
.heading-permalink:hover { color: var(--accent); }
footer { border-top: 1px solid var(--line); padding-block: 1.2rem 2.2rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) {
    .layout { display: block; padding-top: 1rem; }
    .chapters { position: static; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
    .chapter-sidebar { display: none; }
    .chapter-disclosure { display: block; }
    .chapter-disclosure summary { padding: .55rem 0; cursor: pointer; color: var(--accent); }
    .chapters ul { display: grid; grid-template-columns: 1fr 1fr; margin-top: .5rem; border-left: none; }
    .chapters a { padding: .55rem; font-size: .9rem; }
    th, td { padding: .45rem .35rem; }
}
