:root {
  --bg: #ffffff;
  --fg: #1c2430;
  --muted: #5b6675;
  --line: #dfe4ea;
  --band: #f4f6f8;
  --accent: #c2410c;
  --accent-soft: #fff1e8;
  --link: #0b5cad;
  --code-bg: #f1f3f5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --fg: #e6e9ee;
    --muted: #9aa5b3;
    --line: #2a313b;
    --band: #1a2028;
    --accent: #fb923c;
    --accent-soft: #2a1d14;
    --link: #7cb6ff;
    --code-bg: #1d232c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--link); text-underline-offset: 2px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--fg); text-decoration: none; letter-spacing: 0.02em; }
.mark { width: 18px; height: 18px; border-radius: 4px; background: linear-gradient(135deg, var(--accent) 0 50%, var(--link) 50% 100%); }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
header.site nav a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
header.site nav a:hover { color: var(--fg); }
header.site nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
main { padding-top: 24px; padding-bottom: 48px; }
h1 { font-size: 32px; line-height: 1.2; margin: 8px 0 16px; }
h2 { font-size: 22px; margin: 36px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 24px 0 8px; }
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor { display: none; }
h2:hover .anchor, h3:hover .anchor { display: inline; margin-left: -18px; width: 18px; color: var(--muted); text-decoration: none; }
.lead { font-size: 19px; color: var(--muted); max-width: 760px; }
p, li { max-width: 820px; }
code { font: 0.9em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--code-bg); padding: 1px 4px; border-radius: 4px; }
pre { background: var(--code-bg); padding: 12px 14px; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--band); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
td:first-child a { font-weight: 600; }
blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 24px 0 8px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--fg); text-decoration: none; background: var(--band); }
.card strong { font-size: 17px; }
.card span { color: var(--muted); font-size: 15px; }
.card:hover { border-color: var(--accent); }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 16px; padding-bottom: 32px; }
footer.site a { color: var(--muted); }
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  .lead { font-size: 17px; }
}
tr:has(> th:empty + th:empty:last-child) { display: none; }
