:root {
  color-scheme: light dark;
  --paper: #faf9f6;
  --ink: #292927;
  --muted: #64645f;
  --line: #deded8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.7;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
.page { width: min(100% - 3rem, 38rem); margin: 5rem auto 3rem; }
h1, h2, p { margin: 0; }
h1 { margin-bottom: 1.75rem; font-size: 1.75rem; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
h2 { margin-bottom: .85rem; font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
p + p { margin-top: 1rem; }
section { margin-top: 2.75rem; scroll-margin-top: 2rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, main:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.skip-link { position: absolute; top: 1rem; left: 1rem; padding: .5rem; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

@media (max-width: 40rem) {
  .page { width: calc(100% - 2.5rem); margin-top: 2.5rem; }
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #1c1c1b; --ink: #e6e6e1; --muted: #b3b3ab; --line: #444440; }
}

@media print {
  :root { color-scheme: light; --paper: #fff; --ink: #000; --muted: #333; --line: #aaa; font-size: 11pt; }
  @page { margin: 18mm; }
  .page { width: 100%; margin: 0; }
  .skip-link { display: none; }
  section { margin-top: 1.5rem; }
  h1, h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  a[href^="https://"]::after { content: " (" attr(href) ")"; overflow-wrap: anywhere; font-size: .8em; }
}
