:root {
  color-scheme: light;
  --bg: #fff; --muted-bg: #f7f8fb; --line: #e2e6ee; --text: #182233;
  --muted: #4d5b70; --accent: #284bb5; --accent-bg: #eef2ff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 system-ui, "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; z-index: 3; top: 6px; left: 8px; padding: 6px 12px; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-inner { max-width: 1440px; margin: auto; min-height: 64px; padding: 6px 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.brand { font-weight: 750; font-size: 1.08rem; color: var(--text); white-space: nowrap; text-decoration: none; }
.brand span { border-left: 1px solid var(--line); margin-left: 8px; padding-left: 12px; color: var(--muted); font-weight: 500; }
.top-links { display: flex; gap: 20px; }
.top-links a { display: inline-flex; min-height: 44px; align-items: center; font-size: .88rem; font-weight: 630; }
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1440px; min-height: calc(100vh - 65px); margin: 0 auto; }
.sidebar { padding: 26px 18px; max-height: 100vh; overflow: auto; position: sticky; top: 0; align-self: start; border-right: 1px solid var(--line); }
.sidebar a,.sidebar summary { display: block; padding: 9px 12px; min-height: 40px; border-radius: 7px; color: var(--muted); font-size: .875rem; line-height: 1.55; text-decoration: none; overflow-wrap: anywhere; }
.sidebar a:hover,.sidebar summary:hover { background: var(--muted-bg); color: var(--text); }
.sidebar a[aria-current] { background: var(--accent-bg); color: var(--accent); font-weight: 700; }
.nav-label { margin: 22px 12px 5px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.sidebar summary { display: list-item; cursor: pointer; color: var(--text); font-weight: 610; }
.sidebar details a { margin-left: 12px; }
main { padding: clamp(24px, 5vw, 64px); min-width: 0; }
article { max-width: 1020px; margin: 0 auto; overflow-wrap: anywhere; }
h1,h2,h3,h4,h5,h6 { line-height: 1.35; scroll-margin-top: 16px; }
h1 { margin: 0 0 24px; font-size: clamp(1.75rem, 3.2vw, 2.45rem); letter-spacing: -.025em; }
h2 { margin: 1.9em 0 .55em; font-size: 1.38rem; }
h3 { margin: 1.45em 0 .45em; font-size: 1.15rem; }
p { margin: .7em 0; }
ul,ol { padding-inline-start: 1.6em; }
li + li { margin-top: .35em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .86em; background: var(--muted-bg); border-radius: 4px; padding: .12em .32em; }
pre { background: var(--muted-bg); overflow: auto; padding: 14px 18px; border: 1px solid var(--line); border-radius: 9px; }
pre code { padding: 0; }
blockquote { margin: 1em 0; padding: 3px 14px; border-left: 3px solid var(--accent); background: var(--accent-bg); color: var(--muted); }
img,video { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.table-scroll { overflow: auto; margin: 1em 0; border: 1px solid var(--line); border-radius: 9px; }
table { border-collapse: collapse; width: 100%; min-width: 510px; font-size: .9rem; }
th,td { text-align: start; vertical-align: top; padding: 10px 13px; border-bottom: 1px solid var(--line); }
th { background: var(--muted-bg); }
tr:last-child td { border-bottom: 0; }
.local-reference { color: var(--muted); }
@media (max-width: 800px) {
  .top-inner { padding-inline: 18px; }
  .layout { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); position: static; max-height: 32vh; padding: 10px 14px; }
  .sidebar a,.sidebar summary { min-height: 44px; }
  .nav-label { margin-top: 8px; }
  main { padding: 26px 18px 44px; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #141820; --muted-bg: #1d2330; --line: #323b4d; --text: #e8edf7; --muted: #b4c0d3; --accent: #a6bcff; --accent-bg: #293556; }
}
