:root {
  color-scheme: light dark;
  --bg: #fbfbf9;
  --fg: #1c1c1a;
  --muted: #5e5e58;
  --line: #deded8;
  --code-bg: #f0f0eb;
  --accent: #b3261e;
  --link: #1a5fb4;
  --note-bg: #fff6e0;
  --note-line: #e0b84c;
  --warn-bg: #fdecea;
  --warn-line: #d9534f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #e6e6e1;
    --muted: #a3a39b;
    --line: #34342f;
    --code-bg: #23231f;
    --accent: #f2766b;
    --link: #8ab4f8;
    --note-bg: #2a2416;
    --note-line: #8a7230;
    --warn-bg: #2e1a19;
    --warn-line: #a8463f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

header.site .brand {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--fg); }

main { padding: 2rem 0 3rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

p, ul, ol, table, pre { margin: 0 0 1rem; }
li { margin: 0.3rem 0; }

a { color: var(--link); }

.lead { font-size: 1.15rem; color: var(--muted); }

.status {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0.05rem 0.5rem;
  margin-bottom: 1rem;
}

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; overflow-wrap: anywhere; }

pre {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.45;
}

pre code { background: none; padding: 0; overflow-wrap: normal; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

.note, .warn {
  border-left: 4px solid var(--note-line);
  background: var(--note-bg);
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  margin: 0 0 1rem;
}

.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }

/* Key fingerprint: groups of 8 hex digits, two rows, for comparing by eye. */
pre.fp { font-size: 1.05rem; letter-spacing: 0.04em; word-spacing: 0.4em; overflow-x: visible; white-space: pre-wrap; }

.placeholder { color: var(--muted); font-style: italic; }

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

footer.site .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }
footer.site p { margin: 0 0 0.5rem; }
footer.site a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  th, td { padding-right: 0.4rem; }
}
