:root {
  color-scheme: light dark;
  --page: #f7f4ec;
  --surface: #fffdf8;
  --text: #1f2933;
  --muted: #52606d;
  --line: #d7d2c6;
  --accent: #145a8d;
  --accent-hover: #083e66;
  --focus: #ad5a00;
  --shadow: 0 0.5rem 1.5rem rgb(31 41 51 / 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  font-weight: 650;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
}

a:hover, a:focus-visible {
  color: var(--accent-hover);
  text-decoration-style: double;
}

:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.22rem;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.65rem 0.85rem;
  background: var(--text);
  color: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.shell { width: min(100% - 2rem, 72ch); margin-inline: auto; }

.site-header, .site-footer { border-color: var(--line); border-style: solid; }
.site-header { border-width: 0 0 1px; background: var(--surface); }
.site-footer { border-width: 1px 0 0; margin-top: 3rem; padding: 1.5rem 0; }

.masthead, .footer-row, .nav-list {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.masthead, .footer-row { justify-content: space-between; padding: 1rem 0; }
.brand { color: var(--text); font-size: 1.2rem; text-decoration: none; }
.nav-list { flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }

main { padding: 3rem 0 1rem; }
h1, h2, h3 { color: var(--text); line-height: 1.18; }
h1 { max-width: 18ch; font-size: clamp(2.25rem, 7vw, 4.5rem); margin: 0 0 1rem; }
h2 { margin-top: 2.8rem; font-size: clamp(1.45rem, 4vw, 2rem); }
p, li { max-width: 72ch; }

.lede { max-width: 60ch; font-size: 1.25rem; color: var(--muted); }
.notice, .card {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card h3 { margin-top: 0; }
.meta { color: var(--muted); }
code { padding: 0.1em 0.25em; background: color-mix(in srgb, var(--line) 45%, transparent); border-radius: 0.2rem; }

@media (max-width: 48rem) {
  .masthead, .footer-row { align-items: flex-start; flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  main { padding-top: 2rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #13191f;
    --surface: #1d2730;
    --text: #f4f1e8;
    --muted: #c4d0d9;
    --line: #40515d;
    --accent: #72c2ed;
    --accent-hover: #c0e9ff;
    --focus: #ffbf69;
    --shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition: none; }
}
