
:root { color-scheme: light dark;
  --bg: #fdfbff; --surface: #f1f0f6; --surface-2: #e5e7ef; --line: #c7c9d3; --fg: #1a1b20; --muted: #4a4e5a;
  --accent: #335ca8; --accent-fg: #fff; --accent-soft: #d9e2ff; --code: #ebedf5; --warn: #7a5200;
  --display: "Readex Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
@media (prefers-color-scheme: dark) { :root {
  --bg: #121318; --surface: #1b1c22; --surface-2: #272a32; --line: #3c3f4a; --fg: #e4e2e9; --muted: #b0b3c0;
  --accent: #adc6ff; --accent-fg: #002e69; --accent-soft: #1e3a6e; --code: #1f2128; --warn: #f2c26b; } }
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body) }
a { color: var(--accent); text-underline-offset: 2px }
a:focus-visible, summary:focus-visible, .code:focus-visible, .scroll:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-fg); padding: 8px 14px; border-radius: 999px; z-index: 20 }
.skip:focus { top: 8px }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line) }
.top .brand { font: 600 17px var(--display); color: var(--fg); text-decoration: none }
.top .ver { margin-left: auto; font-size: 12px; color: var(--muted) }
.layout { display: flex; max-width: 1240px; margin: 0 auto; gap: 40px; padding: 0 16px }
.side { width: 260px; flex: none; position: sticky; top: 56px; align-self: flex-start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 20px 0 32px }
.side h2, .menu h2 { font: 600 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 20px 12px 6px; border: 0; padding: 0 }
.side ul, .menu ul { list-style: none; margin: 0; padding: 0 }
.side a, .menu a { display: block; padding: 7px 12px; border-radius: 999px; font: 500 14px/1.3 var(--body); color: var(--muted); text-decoration: none }
.side a:hover, .menu a:hover { background: var(--surface-2) }
.side a[aria-current="page"], .menu a[aria-current="page"] { background: var(--accent-soft); color: var(--fg) }
.menu { display: none; border-bottom: 1px solid var(--line); background: var(--surface) }
.menu summary { cursor: pointer; padding: 14px 16px; font: 600 15px var(--display); list-style-position: inside }
.menu nav { padding: 0 8px 16px; max-height: 70vh; overflow-y: auto }
main { flex: 1; min-width: 0; max-width: 780px; padding: 8px 0 64px }
@media (max-width: 899px) { .side { display: none } .menu { display: block } .layout { display: block; padding: 0 16px } .top .ver { display: none } }
article { min-width: 0 }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.25; text-wrap: balance }
h1 { font-size: clamp(26px, 5vw, 34px); margin: 28px 0 14px }
h2 { font-size: 23px; margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line) }
h3 { font-size: 18px; margin: 30px 0 8px }
h4 { font-size: 16px; margin: 22px 0 6px }
.anchor { color: inherit; text-decoration: none }
.anchor:hover { text-decoration: underline }
p, li { max-width: 70ch }
li { margin: 4px 0 }
strong { font-weight: 600 }
code { font: .88em/1.5 var(--mono); background: var(--code); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere }
.code { position: relative; margin: 16px 0; overflow-x: auto; background: var(--code); border-radius: 10px; border: 1px solid var(--line) }
pre { margin: 0; padding: 14px 16px }
pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.55; white-space: pre; overflow-wrap: normal }
.copy { display: block; margin: 6px 8px 0 auto; font: 500 12px var(--body); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer }
.scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch }
table { border-collapse: collapse; font-size: 14.5px; min-width: 100% }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line) }
tr:last-child td { border-bottom: 0 }
th { font-weight: 600; background: var(--surface); white-space: nowrap }
td code { overflow-wrap: normal }
blockquote { margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0 }
blockquote > :first-child { margin-top: 0 } blockquote > :last-child { margin-bottom: 0 }
figure { margin: 20px 0 }
figure img, a.pic img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line) }
td a.pic img { min-width: 120px }
figcaption { margin-top: 8px; font-size: 13px; color: var(--muted) }
video { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); margin: 16px 0 }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0 }
.offsite { border-bottom: 1px dotted var(--muted); cursor: help }
.toc { margin: 16px 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface) }
.toc summary { cursor: pointer; padding: 10px 14px; font: 500 14px var(--body); color: var(--muted) }
.toc ol { margin: 0; padding: 0 14px 12px 36px; font-size: 14.5px; columns: 2 240px }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px }
.pager a { flex: 1 1 0; min-width: 0; text-decoration: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: 500 15px var(--display); color: var(--accent) }
.pager a[rel="next"] { text-align: right }
.pager small { display: block; font: 400 12px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em }
footer.site { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted) }
.doors { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 24px 0 }
.door { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; color: var(--fg) }
.door:hover { border-color: var(--accent) }
.door b { display: block; font: 600 19px var(--display); color: var(--accent); margin-bottom: 4px }
.door span { color: var(--muted); font-size: 14.5px }
.lead { font-size: 18px; max-width: 62ch }
.five { padding-left: 22px } .five li { margin: 8px 0 }
.sections { display: grid; gap: 10px 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 10px 0 }
.sections h3 { margin: 16px 0 4px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em }
@media print {
  .top, .side, .menu, .pager, .copy, .skip, .toc { display: none !important }
  body { background: #fff; color: #000; font-size: 11pt } .layout { display: block; max-width: none; padding: 0 } main { max-width: none }
  .code, .scroll { overflow: visible; break-inside: avoid } pre code { white-space: pre-wrap }
  a { color: inherit } main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt }
  h2 { break-after: avoid } figure, img { break-inside: avoid }
}
