:root {
  color-scheme: light dark;
  --bg: #f3f1e9;
  --fg: #23231f;
  --muted: #5f5d54;
  --rule: #d9d5c7;
  --panel: #fbfaf5;
  --accent: #8a5a2b;
  --code-bg: #e9e6da;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1a;
    --fg: #e8e6df;
    --muted: #a3a096;
    --rule: #3a3936;
    --panel: #232322;
    --accent: #d8a86a;
    --code-bg: #2c2c2a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--accent); }
.bbs-docs-header { border-bottom: 1px solid var(--rule); background: var(--panel); }
.bbs-docs-header-inner {
  max-width: 60rem; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
}
.bbs-docs-brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.bbs-docs-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.9rem; }
.bbs-docs-header nav a { text-decoration: none; color: var(--muted); }
.bbs-docs-header nav a:hover, .bbs-docs-header nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; }
.bbs-docs-cta {
  margin-left: auto; font-size: 0.9rem; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.2rem 0.8rem;
}
.bbs-docs-main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.bbs-docs-main h1 { font-size: 1.9rem; line-height: 1.3; margin: 0 0 1rem; }
.bbs-docs-main h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.bbs-docs-main h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.bbs-docs-main img { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; }
.bbs-docs-main code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
.bbs-docs-main pre {
  background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 6px;
  overflow-x: auto; border: 1px solid var(--rule);
}
.bbs-docs-main pre code { background: none; padding: 0; }
.bbs-docs-main blockquote {
  margin: 1rem 0; padding: 0.25rem 1rem; border-left: 3px solid var(--accent);
  background: var(--panel); color: var(--muted);
}
.bbs-docs-main table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.92rem; }
.bbs-docs-main th, .bbs-docs-main td { border: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.bbs-docs-main th { background: var(--panel); }
/* These docs are table-dense; let a wide table scroll instead of stretching the page. */
.bbs-docs-main table { display: block; overflow-x: auto; }
.bbs-docs-main details { border: 1px solid var(--rule); border-radius: 6px; padding: 0.5rem 0.9rem; margin: 1rem 0; background: var(--panel); }
.bbs-docs-main summary { cursor: pointer; font-weight: 600; }
.bbs-docs-index { list-style: none; padding: 0; }
.bbs-docs-index li { border-top: 1px solid var(--rule); padding: 0.9rem 0; }
.bbs-docs-index li a { font-weight: 600; text-decoration: none; }
.bbs-docs-index li p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem; }
.bbs-docs-footer {
  border-top: 1px solid var(--rule); padding: 1.5rem 1.25rem 3rem;
  max-width: 60rem; margin: 0 auto; color: var(--muted); font-size: 0.88rem;
}
.bbs-docs-footer p { margin: 0.2rem 0; }
