:root {
  color-scheme: light dark;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --rule: rgba(0, 0, 0, 0.12);
  --accent: #0066cc;
  --code-bg: rgba(0, 0, 0, 0.05);
  --note-bg: rgba(0, 102, 204, 0.08);
  --warn-bg: rgba(204, 102, 0, 0.10);
  --warn-edge: #cc6600;
  --img-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f5f7;
    --muted: #98989d;
    --rule: rgba(255, 255, 255, 0.16);
    --accent: #4da3ff;
    --code-bg: rgba(255, 255, 255, 0.1);
    --note-bg: rgba(77, 163, 255, 0.16);
    --warn-bg: rgba(255, 170, 80, 0.16);
    --warn-edge: #ffaa50;
    --img-bg: #ffffff;
  }
}
body {
  font: 14px/1.7 -apple-system, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
  color: var(--text);
  margin: 0;
  padding: 0 28px 48px;
  max-width: 760px;
}
h1 { font-size: 24px; line-height: 1.25; margin: 22px 0 10px; }
h2 { font-size: 18px; margin: 30px 0 8px; }
h3 { font-size: 15px; margin: 22px 0 6px; }
p, li { margin: 6px 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
code {
  font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
}
table { border-collapse: collapse; margin: 14px 0; width: 100%; }
th, td { border-bottom: 1px solid var(--rule); padding: 7px 12px 7px 0; text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
td ul, td p { margin: 2px 0; }
kbd {
  font: 11px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  margin-bottom: 6px;
  font-size: 13px;
}
.nav.bottom { border-bottom: none; border-top: 1px solid var(--rule); margin-top: 34px; }
.nav .spacer { flex: 1; }
.nav .disabled { color: var(--muted); }
.lead { font-size: 15px; color: var(--muted); margin: 0 0 18px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc > li { margin: 18px 0 4px; font-weight: 600; color: var(--muted); }
.toc ul { list-style: none; margin: 6px 0 0; padding: 0; }
.toc ul li { margin: 3px 0; font-weight: 400; }
.admonition {
  background: var(--note-bg);
  border-radius: 6px;
  padding: 11px 15px;
  margin: 14px 0;
}
.admonition.warning { background: var(--warn-bg); border-left: 3px solid var(--warn-edge); }
.admonition-title { font-weight: 600; margin: 0 0 4px; }
.admonition p:last-child { margin-bottom: 0; }
figure { margin: 18px 0; }
figure img, figure svg {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
figure img.photo { background: var(--img-bg); }
figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1.4;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-edge);
  vertical-align: 1px;
}
dl { margin: 10px 0; }
dt { font-weight: 600; margin-top: 12px; }
dd { margin: 2px 0 0 0; }
.footer { font-size: 12px; color: var(--muted); margin-top: 30px; }
