:root {
  color-scheme: light;
  --ink: #242c30;
  --muted: #626e73;
  --line: #e1e7e5;
  --brand: #087766;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 15px/1.85 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--brand); text-underline-offset: 4px; }
a:hover { color: #064f43; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid #39ab99;
  outline-offset: 3px;
}
.skip { position: fixed; left: 16px; top: -60px; background: #fff; padding: 8px 16px; z-index: 10; }
.skip:focus { top: 8px; }
.header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 3;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { display: block; object-fit: contain; }
.brand strong { font-size: 23px; }
.brand span { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }
.header nav { display: flex; align-items: center; gap: 24px; font-size: 13px; white-space: nowrap; }
.header nav a { text-decoration: none; }
.primary { border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; }
.layout { max-width: 1240px; margin: auto; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 52px; padding: 32px 24px; }
aside { position: sticky; top: 108px; height: calc(100vh - 130px); overflow: auto; padding-right: 20px; border-right: 1px solid var(--line); font-size: 13px; }
summary { font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 16px; }
.search-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type="search"] { width: 100%; height: 38px; border: 1px solid #cfd8d4; border-radius: 6px; padding: 8px 10px; background: #fff; color: var(--ink); font: inherit; }
.search-status { font-size: 12px; color: var(--muted); margin: 6px 0; }
.toc-group { padding-top: 12px; }
.toc-group > p { color: var(--muted); font-size: 12px; font-weight: 600; margin: 8px 0; }
aside nav a { display: block; padding: 6px 10px; border-radius: 5px; color: #475451; text-decoration: none; line-height: 1.6; overflow-wrap: anywhere; }
aside nav a:hover, aside nav a.active { background: #e8f3ef; color: var(--brand); }
.aside-note { color: var(--muted); font-size: 12px; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 24px; }
main { min-width: 0; padding: 0 0 40px; }
h1 { font-size: 32px; line-height: 1.4; margin: 0 0 18px; }
h2 { font-size: 23px; line-height: 1.5; margin: 44px 0 18px; padding-top: 28px; border-top: 1px solid var(--line); }
h3 { font-size: 17px; line-height: 1.6; margin: 28px 0 12px; }
.anchor-alias { display: block; height: 0; position: relative; top: 28px; }
p { margin: 14px 0; overflow-wrap: anywhere; }
h1 + p { font-size: 17px; color: var(--muted); }
li { padding-left: 3px; margin: 8px 0; overflow-wrap: anywhere; }
ol, ul { padding-left: 24px; }
blockquote { margin: 22px 0; padding: 8px 18px; border-left: 3px solid #449d88; background: #f1f8f4; color: #42655d; font-size: 14px; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; background: #eff3f2; padding: 3px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { position: relative; max-width: 100%; background: #24292c; color: #edf2f1; border-radius: 6px; padding: 46px 18px 18px; overflow: auto; line-height: 1.8; font-size: 13px; margin: 18px 0 24px; }
pre code { padding: 0; background: none; border-radius: 0; color: inherit; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.copy { position: absolute; top: 9px; right: 12px; min-width: 45px; height: 28px; border: 1px solid #65706d; border-radius: 4px; padding: 2px 8px; background: #343f3c; color: #fff; cursor: pointer; font: inherit; font-size: 12px; }
.copy:hover { background: #4a5953; }
.table-wrap { max-width: 100%; overflow: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; background: #f3f6f5; font-weight: 600; }
td, th { padding: 11px 12px; border: 1px solid var(--line); vertical-align: top; }
td:first-child { min-width: 140px; }
td code { white-space: normal; }
footer { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 44px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: #244637; color: #fff; border-radius: 6px; padding: 10px 16px; box-shadow: 0 4px 20px #0002; opacity: 0; pointer-events: none; transition: opacity .15s; font-size: 13px; z-index: 5; }
.toast.visible { opacity: 1; }
@media (max-width: 900px) {
  .layout { display: block; padding: 24px; }
  aside { position: static; height: auto; overflow: visible; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
  summary { margin-bottom: 0; }
  details[open] summary { margin-bottom: 14px; }
  .toc-group { break-inside: avoid; }
  aside nav { columns: 2; gap: 24px; }
  .aside-note { border: 0; padding: 0; margin: 10px 0 0; }
}
@media (max-width: 680px) {
  .header { min-height: 64px; padding: 10px 16px; gap: 10px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 20px; }
  .brand span { padding-left: 8px; font-size: 12px; }
  .header nav { gap: 12px; font-size: 12px; }
  .header nav a:nth-child(2) { display: none; }
  .primary { padding: 6px 8px; }
  .layout { padding: 20px 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  pre { font-size: 12px; }
  aside nav { columns: 1; }
  td, th { padding: 10px; }
}
@media (max-width: 360px) { .brand span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .toast { transition: none; }
}
@media print {
  .header, aside, .copy, .toast, .skip { display: none; }
  .layout { display: block; padding: 0; }
  main { padding: 0; }
  pre { white-space: pre-wrap; background: #f5f5f5; color: #111; }
  pre code { white-space: pre-wrap; }
  h2 { break-after: avoid; }
  a { color: inherit; }
}
