:root {
  --bg: #fbfaf7;
  --fg: #1d1a17;
  --muted: #5d5751;
  --accent: #8b3a1a;
  --accent-2: #b8542b;
  --rule: #ddd6cc;
  --card: #f3efe8;
  --code: #ece7df;
  --max: 62rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --fg: #ece7df;
    --muted: #a89f95;
    --accent: #e08a5c;
    --accent-2: #f0a67c;
    --rule: #3a332d;
    --card: #221e1a;
    --code: #2a2521;
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }
header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
header.site .inner {
  max-width: var(--max); margin: 0 auto; padding: 0.8rem 1.2rem;
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem;
}
header.site .brand { font-weight: 700; font-size: 1.05rem; color: var(--fg); letter-spacing: 0.01em; }
header.site nav a { margin-left: 1.1rem; color: var(--muted); font-size: 0.95rem; }
header.site nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
main { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.hero { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.15; margin: 0 0 0.8rem; letter-spacing: -0.01em; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 46rem; margin: 0 0 0.6rem; }
.hero p.by { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.8rem; margin: 1.5rem 0 2rem; }
.stat { background: var(--card); border-radius: 8px; padding: 0.9rem 1rem; }
.stat .n { font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 0.88rem; margin-top: 0.25rem; }
h2 { font-size: 1.45rem; margin: 2.4rem 0 0.6rem; line-height: 1.25; color: var(--accent); }
h3 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }
p, li { max-width: 46rem; }
figure { margin: 1.6rem 0; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; max-width: 50rem; }
table { border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0; width: 100%; }
.tbl { overflow-x: auto; margin: 1rem 0; }
th, td { border: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--card); font-weight: 600; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
code { background: var(--code); padding: 0.05em 0.3em; border-radius: 4px; }
pre { background: var(--code); padding: 0.8rem 1rem; border-radius: 6px; overflow-x: auto; max-width: 100%; }
pre code { background: none; padding: 0; }
.note { border-left: 3px solid var(--accent); background: var(--card); padding: 0.7rem 1rem; margin: 1.2rem 0; border-radius: 0 6px 6px 0; max-width: 50rem; }
.note.warn { border-left-color: #c9a227; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.2rem; }
.dl { list-style: none; padding: 0; }
.dl li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: none; }
.dl li span.sz { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
footer.site { border-top: 1px solid var(--rule); margin-top: 2rem; }
footer.site .inner { max-width: var(--max); margin: 0 auto; padding: 1.2rem 1.2rem 2rem; color: var(--muted); font-size: 0.9rem; }
sup, sub { line-height: 0; }
.toc { background: var(--card); border-radius: 8px; padding: 0.8rem 1.2rem; margin: 1rem 0 1.5rem; font-size: 0.95rem; }
.toc ol { margin: 0.3rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; }
@media (max-width: 40rem) { .toc ol { columns: 1; } html { font-size: 16px; } }
