:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1d252d;
  --muted: #4f5b66;
  --link: #0b57a4;
  --line: #d5dbe1;
  --soft: #f3f5f7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171c;
    --text: #e6eaee;
    --muted: #aab4be;
    --link: #8cc2ff;
    --line: #333d47;
    --soft: #1b232a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

.site-header, main, .site-footer {
  width: min(100% - 2rem, 44rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand { margin: 0; font-size: 1.25rem; font-weight: 700; }
.brand a { color: var(--text); text-decoration: none; }

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

.site-header nav a[aria-current="page"] {
  background: var(--soft);
  font-weight: 700;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.skip { position: absolute; left: 1rem; top: -10rem; background: var(--bg); padding: 0.5rem 1rem; }
.skip:focus { top: 0.5rem; z-index: 1; }

main { padding-block: 1.5rem 2.5rem; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); margin-block: 0.5rem 1rem; }
h2 { font-size: 1.375rem; margin-block: 2.25rem 0.75rem; }
h3 { font-size: 1.125rem; margin-block: 1.5rem 0.5rem; }
.lead { font-size: 1.25rem; }
.updated { color: var(--muted); }
li { margin-block: 0.35rem; }
dt { font-weight: 700; margin-top: 1rem; }
dd { margin: 0.25rem 0 0; }
code { font-size: 0.9em; overflow-wrap: anywhere; }

.notice { background: var(--soft); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.75rem 1rem; }

.toc { background: var(--soft); border-radius: 0.5rem; padding: 0.25rem 1rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: 0.6rem; text-align: left; vertical-align: top; }
th[scope="row"] { font-weight: 400; }
thead th { background: var(--soft); }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1rem 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media print {
  .site-header nav, .skip { display: none; }
}
