:root {
  color-scheme: light dark;
  --background: #faf9f6;
  --text: #262a30;
  --muted: #565d66;
  --link: #235b90;
  --border: #d9dce0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body {
  max-width: 78ch;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--background);
  color: var(--text);
  overflow-wrap: anywhere;
}

nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
nav a { font-size: .9rem; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; }
h1 { margin: 2.5rem 0 1rem; font-size: clamp(2.25rem, 7vw, 3.25rem); }
h2 { margin: 3rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
h3 { margin: 2rem 0 .75rem; font-size: 1.2rem; }
blockquote { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.15rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: .45rem; }
code { font-size: .9em; }
table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-weight: 650; }
th:first-child, td:first-child { white-space: nowrap; }
.skip-link { position: absolute; top: -5rem; }
.skip-link:focus { top: .5rem; background: var(--background); padding: .5rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --background: #181b20;
    --text: #e2e5ea;
    --muted: #b1bac7;
    --link: #9cc8f5;
    --border: #383e47;
  }
}

@media print {
  :root { color-scheme: light; --background: white; --text: black; --muted: #444; --link: black; --border: #ccc; }
  body { max-width: none; padding: 0; font-size: 10pt; }
  header, .skip-link { display: none; }
  h2, h3 { break-after: avoid; }
  table { display: table; }
}
