:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1d1f23;
  --muted: #5b616b;
  --border: #e3e1dc;
  --accent: #2f5d8a;
  --placeholder-bg: #fff3c4;
  --placeholder-text: #6b4e00;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1d2024;
    --text: #e6e6e3;
    --muted: #a3a8b0;
    --border: #30343a;
    --accent: #8fb8e6;
    --placeholder-bg: #4a3b0a;
    --placeholder-text: #ffe28a;
  }
}

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

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

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

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  z-index: 1;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 6vw, 2.375rem);
  line-height: 1.2;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
  line-height: 1.3;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.0625rem;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

main { padding-top: 1.5rem; padding-bottom: 3rem; }

section { scroll-margin-top: 1rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.35rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.toc h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.toc ol { margin: 0; }
.toc li + li { margin-top: 0.15rem; }

address { font-style: normal; }

.placeholder {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.25rem 0 2rem;
}
.site-footer p { margin: 0; }
