:root {
    color-scheme: dark;
    --background: #071019;
    --surface: #0d1922;
    --text: #e8edf2;
    --muted: #aebac6;
    --accent: #79cde5;
    --border: #293843;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 96px; }
body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #b6eaf8; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 30; padding: 8px 16px; background: var(--surface); }
.skip-link:focus { top: 8px; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--background); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1200px; min-height: 72px; margin: auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.brand img { flex: none; padding: 4px; border-radius: 6px; background: #f4f7fa; }
.brand-accent { color: #4db9d8; }
.back-link { flex: none; font-size: 14px; text-decoration: none; }
.docs-layout { max-width: 1200px; padding: 36px 24px 64px; margin: auto; display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-sidebar { position: sticky; top: 96px; max-height: calc(100dvh - 120px); overflow-y: auto; scrollbar-width: thin; padding: 0 14px 12px 0; }
.contents summary { cursor: pointer; font-size: 16px; font-weight: 700; padding: 0 0 12px; }
.contents summary span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 10px; }
.chapter-search { padding: 0 0 12px; }
.chapter-search label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.chapter-search input { width: 100%; min-height: 40px; font: inherit; font-size: 14px; color: var(--text); border: 1px solid var(--border); border-radius: 4px; background: var(--surface); padding: 8px 10px; }
.chapter-search input::placeholder { color: var(--muted); }
#search-status { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
#search-status:empty { display: none; }
.chapter-list { padding: 0; margin: 0; list-style: none; }
.chapter-list a { display: block; border-left: 2px solid transparent; padding: 8px 10px; font-size: 13px; line-height: 1.5; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.chapter-list a:hover, .chapter-list a[aria-current="location"] { color: var(--accent); background: var(--surface); border-color: var(--accent); }
main { min-width: 0; }
.guide-heading { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; color: var(--accent); }
h1 { font-size: 30px; line-height: 1.4; margin: 0 0 22px; overflow-wrap: anywhere; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 14px; }
.guide-actions button { font: inherit; color: var(--accent); background: transparent; padding: 0; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.guide-body { overflow-wrap: anywhere; }
.guide-body p { margin: 16px 0; }
.guide-body strong { color: #fff; }
.guide-body blockquote { margin: 0 0 32px; padding: 2px 20px; border-left: 3px solid #e5b668; background: #211f1b; color: #e4d8c5; }
.guide-body blockquote strong { color: #ffe0a6; }
.guide-section { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 40px; }
.guide-section:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
h2 { font-size: 24px; line-height: 1.45; margin: 0 0 20px; }
h3 { font-size: 19px; line-height: 1.5; margin: 28px 0 14px; }
.guide-body ul, .guide-body ol { padding-left: 24px; }
.guide-body li { margin: 8px 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.75; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: #152731; color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tr:nth-child(even) td { background: #0b161f; }
code { font-family: Consolas, "SFMono-Regular", monospace; font-size: .9em; color: #9ddfce; background: #10251f; border-radius: 3px; padding: 2px 4px; }
pre { overflow-x: auto; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; white-space: pre-wrap; }
pre code { padding: 0; background: transparent; color: var(--text); }
.checklist-item { list-style: none; }
.checklist-item input { width: 16px; height: 16px; margin-left: -22px; vertical-align: middle; }
.guide-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 48px; font-size: 14px; }
@media (max-width: 900px) {
    html { scroll-padding-top: 148px; }
    .docs-layout { display: block; padding-top: 24px; }
    .docs-sidebar { position: sticky; top: 72px; z-index: 10; max-height: none; padding: 12px 0 0; margin-bottom: 28px; border-bottom: 1px solid var(--border); overflow: visible; background: var(--background); }
    .contents-inner { max-height: 55dvh; overflow-y: auto; padding: 4px; }
    .chapter-list a { min-height: 44px; font-size: 14px; }
}
@media (max-width: 540px) {
    html { scroll-padding-top: 136px; }
    .docs-sidebar { top: 64px; }
    .header-inner { padding: 12px 16px; min-height: 64px; }
    .brand { font-size: 17px; gap: 8px; }
    .brand img { width: 32px; height: 32px; }
    .back-link { font-size: 13px; }
    .docs-layout { padding: 20px 16px 40px; }
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    .guide-actions { gap: 12px 16px; }
    .guide-body blockquote { padding: 2px 14px; }
    table { min-width: 520px; }
    th, td { padding: 10px 12px; }
}
@media print {
    :root { color-scheme: light; --text: #151515; --muted: #444; --accent: #151515; --border: #bbb; --surface: #fff; }
    body { background: #fff; color: #151515; font-size: 11pt; }
    .site-header, .docs-sidebar, .guide-actions, .guide-footer, .skip-link { display: none; }
    .docs-layout { display: block; max-width: none; padding: 0; }
    h1 { font-size: 23pt; }
    h2 { font-size: 17pt; }
    h3 { font-size: 13pt; }
    h2, h3 { break-after: avoid; }
    .guide-section { margin-top: 24px; padding-top: 16px; }
    .guide-body strong, .guide-body blockquote strong, code, pre code { color: #151515; }
    .guide-body blockquote { color: #151515; background: #fff; border-color: #555; }
    .table-scroll, pre { overflow: visible; }
    table { min-width: 0; font-size: 10pt; }
    th, tr:nth-child(even) td, code { background: #fff; }
    tr { break-inside: avoid; }
    a { color: #151515; }
}
