:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #59636e;
  --paper: #fbfaf7;
  --panel: #f0eee8;
  --line: #d8d4ca;
  --accent: #005c57;
  --accent-soft: #dcefeb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; padding: .6rem; background: white; z-index: 2; }
.skip-link:focus { left: .5rem; }
.site-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem max(1rem, calc((100vw - 76rem) / 2)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); }
.brand { color: var(--ink); font-size: 1.1rem; font-weight: 800; text-decoration: none; letter-spacing: .04em; }
.brand span { color: var(--muted); font-size: .75rem; font-weight: 600; }
.site-header nav { display: flex; gap: .25rem; }
.site-header nav a { padding: .35rem .6rem; border-radius: .35rem; color: var(--ink); font-size: .82rem; text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.layout { display: grid; grid-template-columns: minmax(13rem, 18rem) minmax(0, 48rem); gap: clamp(2rem, 5vw, 5rem); max-width: 76rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
main { min-width: 0; }
main > h1:first-child { margin-top: 0; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-top: 2.8rem; padding-top: .3rem; border-top: 1px solid var(--line); font-size: 1.55rem; line-height: 1.25; }
h3 { margin-top: 2.2rem; font-size: 1.2rem; line-height: 1.3; }
h4, h5, h6 { margin-top: 1.8rem; }
h1, h2, h3 { text-wrap: balance; }
p, li { max-width: 75ch; }
li + li { margin-top: .35rem; }
.permalink { margin-left: .45rem; opacity: 0; font-size: .75em; text-decoration: none; }
h1:hover .permalink, h2:hover .permalink, h3:hover .permalink, .permalink:focus { opacity: 1; }
.toc { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 7rem); overflow: auto; }
.toc h2 { margin: 0 0 .7rem; padding: 0; border: 0; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: .25rem 0; line-height: 1.35; }
.toc a { color: var(--muted); font-size: .78rem; text-decoration: none; }
.toc a:hover { color: var(--accent); }
.toc-level-3 { padding-left: .8rem; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: .4rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { min-width: 8rem; padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--panel); }
tr:last-child td { border-bottom: 0; }
blockquote { margin: 1.5rem 0; padding: .8rem 1.1rem; border-left: .25rem solid var(--accent); background: var(--accent-soft); }
pre { overflow-x: auto; padding: 1rem; border-radius: .4rem; color: #f8f8f2; background: #20262d; font-size: .82rem; }
code { padding: .08em .25em; border-radius: .2rem; background: var(--panel); font-size: .88em; }
pre code { padding: 0; background: none; }
hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--line); }
.section-ref { white-space: nowrap; }
footer { padding: 1.5rem max(1rem, calc((100vw - 76rem) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
@media (max-width: 760px) {
  :root { font-size: 16px; }
  .site-header { position: static; align-items: flex-start; padding: .75rem 1rem; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; }
  .site-header nav a { padding: .25rem .4rem; }
  .layout { display: block; padding: 2rem 1rem 4rem; }
  .toc { position: static; max-height: none; margin: 0 0 2.5rem; padding: 1rem; border-radius: .4rem; background: var(--panel); }
  .toc-level-3 { display: none; }
  main > h1:first-child { font-size: 2.25rem; }
  h2 { font-size: 1.35rem; }
}
@media print {
  .site-header, .toc, footer, .permalink, .skip-link { display: none; }
  .layout { display: block; max-width: none; padding: 0; }
  a { color: inherit; }
}
