:root {
  --bg: #ffffff; --fg: #1d2330; --muted: #5b6577; --line: #e2e6ee; --code-bg: #f4f6fa;
  --link: #1557c0; --accent: #f5a300; --accent-fg: #2a1a00; --notice: #fff6dd; --notice-line: #f1d48a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c; --fg: #e3e8f0; --muted: #98a3b6; --line: #273041; --code-bg: #1a202b;
    --link: #8bb8ff; --notice: #2a2412; --notice-line: #5c4a18;
  }
}
* { 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, sans-serif; }
a { color: var(--link); }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 12px 14px; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }

.top { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; color: var(--fg); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }
.nav a[aria-current] { font-weight: 600; }

.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.layout.home .content { max-width: 820px; margin: 0 auto; }
.layout.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.content { min-width: 0; padding: 24px 0 48px; }
.toc { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto;
  padding: 24px 0; font-size: 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { padding-left: 12px; }
.toc li { margin: 4px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
@media (max-width: 860px) {
  .layout.doc { display: block; }
  .toc { position: static; max-height: none; padding: 16px 0 0; border-bottom: 1px solid var(--line); }
}

h1, h2, h3 { line-height: 1.25; scroll-margin-top: 64px; }
h1 { font-size: 2em; margin: 0.2em 0 0.6em; }
h2 { margin-top: 2em; padding-bottom: 0.25em; border-bottom: 1px solid var(--line); }
.headerlink { margin-left: 0.3em; color: var(--muted); text-decoration: none; opacity: 0; }
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink { opacity: 1; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.content > table, .scroll { display: block; overflow-x: auto; }
.source { margin-top: 3em; color: var(--muted); font-size: 14px; }

.banner { display: block; width: 100%; max-width: 600px; height: auto; margin: 8px auto 0; }
.lead { font-size: 1.1em; }
.notice { background: var(--notice); border: 1px solid var(--notice-line); border-radius: 6px; padding: 10px 14px; }
.button { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: var(--accent-fg);
  font-weight: 700; text-decoration: none; }
.button:hover { filter: brightness(1.08); }
.install { margin-top: 16px; }
.install td:first-child { white-space: nowrap; font-weight: 600; }
.docs dt { font-weight: 600; margin-top: 12px; }
.docs dd { margin: 2px 0 0; color: var(--muted); }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 16px; text-align: center; }
