:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5d6068;
  --line: #e4e2db;
  --accent: #9a5b00;
  --accent-bg: #fdf3e1;
  --link: #1f4fd6;
  --code-bg: #f1efe8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317;
    --surface: #181b21;
    --text: #e8e8ea;
    --muted: #a0a4ad;
    --line: #2a2e36;
    --accent: #e3a33a;
    --accent-bg: #231c0e;
    --link: #8ab0ff;
    --code-bg: #20242c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--link); }
header.site, main, footer.site {
  max-width: 720px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
header.site {
  padding-top: 20px;
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  border-bottom: 1px solid var(--line);
}
header.site .brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
}
header.site nav a {
  margin-right: 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
}
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
main { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .4em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 .5em; line-height: 1.3; }
h3 { font-size: 1.05rem; margin: 1.6em 0 .3em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
.lede { color: var(--muted); font-size: 1.1rem; }
.box {
  background: var(--accent-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 1.2em 0;
}
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
code, kbd {
  background: var(--code-bg);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .92em;
}
details {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 10px 16px;
  margin: 0 0 10px;
}
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .6em; }
.toc { padding-left: 1.2em; }
.small { font-size: .9rem; color: var(--muted); }
footer.site {
  padding-top: 20px;
  padding-bottom: 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .92rem;
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.65rem; }
}

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td code { word-break: break-all; font-size: .85em; }
h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
