:root {
    color-scheme: light;
    --page: #f4f5f2;
    --paper: #ffffff;
    --ink: #17212d;
    --muted: #57616c;
    --line: #dce1dc;
    --accent: #0a7166;
    --accent-dark: #064f48;
    --accent-soft: #e4f1ed;
    --code: #eaf0ed;
    --radius: 14px;
    --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    scroll-padding-top: 96px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
button, input, select { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #008bff; outline-offset: 4px; border-radius: 3px; }
::selection { background: #bee2d8; }
.skip-link { position: fixed; top: -80px; left: 18px; z-index: 100; padding: 10px 18px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
    justify-content: space-between; min-height: 76px; padding: 12px 32px;
    gap: 20px; border-bottom: 1px solid var(--line);
    background: rgba(244, 245, 242, .97);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: white; background: var(--accent); font: 700 12px var(--mono); letter-spacing: -.05em; }
.brand small, .brand-version { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 11px var(--mono); letter-spacing: 0; }
.top-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.top-nav a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.top-nav a:hover, .top-nav a.active { color: var(--accent); }
.language-switch { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; font-size: 12px; }
.language-switch a, .language-switch span { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 7px; }
.language-switch [aria-current] { color: var(--ink); font-weight: 650; }
.menu-button { display: none; min-width: 44px; min-height: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font-size: 13px; }
.site-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1600px; margin: 0 auto; }
.sidebar { position: sticky; top: 76px; align-self: start; height: calc(100vh - 76px); overflow-y: auto; padding: 30px 18px 40px 26px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.nav-group { margin-bottom: 27px; }
.nav-group h2, .nav-group-title { margin: 0 8px 8px; color: var(--muted); font: 650 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.nav-group ul { margin: 0; padding: 0; list-style: none; }
.nav-link { display: block; margin: 2px 0; padding: 7px 9px; border-radius: 6px; color: #46515a; text-decoration: none; font-size: 13px; line-height: 1.5; }
.nav-link:hover { color: var(--accent); background: #edf0eb; }
.nav-link.active { color: var(--accent-dark); background: #dfece6; font-weight: 650; }
main { min-width: 0; padding: 42px clamp(24px, 4.2vw, 68px) 60px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 860px) minmax(140px, 190px); gap: 44px; }
.content-grid > article { min-width: 0; }
.content-grid:has(> article:only-child) { grid-template-columns: minmax(0, 920px); }
.toc { position: sticky; top: 106px; align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; padding-left: 16px; border-left: 1px solid var(--line); font-size: 12px; }
.toc h2, .toc-title { margin: 0 0 12px; font: 650 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 9px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.toc .toc-level-3 { padding-left: 12px; }
.legacy-anchor { display: block; height: 0; }
.breadcrumbs { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs span { margin: 0 7px; }
.page-header { margin-bottom: 34px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.eyebrow { display: block; margin: 0 0 12px; color: var(--accent); font: 650 11px var(--mono); text-transform: uppercase; letter-spacing: .13em; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
h1 { margin: 0 0 18px; font-size: clamp(30px, 3.5vw, 46px); font-weight: 740; }
h2 { margin: 42px 0 16px; font-size: 25px; font-weight: 700; }
h3 { margin: 28px 0 12px; font-size: 19px; }
h4 { margin: 22px 0 10px; font-size: 16px; }
p { margin: 0 0 18px; }
.page-header > p:last-child, .page-header .lede { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.prose { max-width: 100%; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 7px 0; }
.prose li > p { margin: 7px 0; }
.prose blockquote { margin: 24px 0; padding: 4px 22px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }
.prose table { display: block; width: 100%; margin: 24px 0; border-collapse: collapse; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--ink); background: #e9eee9; font-weight: 650; }
.prose td { background: #fbfcfa; }
.prose code { padding: 2px 5px; border-radius: 4px; background: var(--code); color: #1b514b; font: .85em var(--mono); overflow-wrap: anywhere; }
.prose pre, .source-panel pre { position: relative; margin: 22px 0; padding: 22px; overflow-x: auto; border: 1px solid #d9e2da; border-radius: 9px; background: #edf2ed; font: 12px/1.85 var(--mono); tab-size: 4; scrollbar-width: thin; }
.prose pre code, .source-panel pre code { padding: 0; color: #29423c; background: none; font: inherit; overflow-wrap: normal; }
pre.has-copy { padding-top: 48px; }
.copy-code { position: absolute; top: 9px; right: 10px; min-height: 29px; padding: 4px 9px; border: 1px solid #c7d4ca; border-radius: 5px; background: #fbfdfa; color: #365950; font: 10px var(--mono); }
.copy-code:hover { background: white; border-color: var(--accent); }
.copy-status { display: block; margin-top: -14px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .ow, .highlight .p { color: #0d6257; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sd, .highlight .se { color: #a14324; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp { color: #6e7e70; font-style: italic; }
.highlight .nf, .highlight .nc, .highlight .nn { color: #245d87; }
.highlight .mi, .highlight .mf, .highlight .m { color: #754595; }
.callout { margin: 24px 0; padding: 19px 22px; border: 1px solid #bfd8cc; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-dark); }
.badge { display: inline-block; padding: 4px 7px; border: 1px solid #d3e1d9; border-radius: 5px; background: #edf5ef; color: #3b675b; font: 10px/1.4 var(--mono); vertical-align: middle; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 17px; border: 1px solid var(--accent); border-radius: 7px; color: white; background: var(--accent); font-size: 13px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.button:hover { color: white; background: var(--accent-dark); }
.button.secondary, .button-secondary { border-color: var(--line); color: var(--ink); background: var(--paper); }
.button.secondary:hover, .button-secondary:hover { color: var(--accent-dark); border-color: var(--accent); }

.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: center; gap: 44px; margin: 14px 0 45px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 650px; font-size: clamp(38px, 4.7vw, 66px); line-height: 1.08; letter-spacing: -.05em; }
.hero-copy > p { max-width: 580px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.hero-visual { position: relative; min-width: 0; padding: 20px; border: 1px solid #d7dfd6; border-radius: 14px; background: #e7eee7; }
.hero-visual img { display: block; max-height: 380px; margin: 0 auto; border: 1px solid #d7dfd6; border-radius: 3px; object-fit: contain; box-shadow: 0 12px 28px rgba(23, 33, 45, .11); }
.hero-visual pre { margin: 0; overflow-x: auto; font: 11px/1.9 var(--mono); color: #27594d; }
.hero-visual figcaption, .hero-caption { margin-top: 14px; color: #587262; font: 10px/1.6 var(--mono); text-align: center; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 30px 0 44px; }
.stat { padding: 17px 19px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbf7; }
.stat strong { display: block; color: var(--accent-dark); font-size: 27px; line-height: 1.35; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 3px; color: var(--muted); font: 10px/1.5 var(--mono); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 19px; }
.section-header h2 { margin: 0; }
.section-header a { font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 22px 0 40px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #a5c3b5; box-shadow: 0 5px 16px rgba(23, 33, 45, .045); }
a.card { color: var(--ink); text-decoration: none; }
.graph-card { display: flex; flex-direction: column; gap: 9px; padding: 15px; border: 1px solid #c6d9cf; border-radius: 8px; background: white; }
.graph-card .badge { align-self: start; }
.graph-connector { margin: 8px 0; color: var(--accent); text-align: center; }
.graph-leaves, .sidebar-version { color: var(--muted); font: 11px/1.8 var(--mono); }
.object-graph { display: block; width: 100%; height: auto; margin: 24px 0; }
.card > a { color: inherit; text-decoration: none; }
.card-preview { display: grid; place-items: center; height: 200px; padding: 19px; overflow: hidden; border-bottom: 1px solid var(--line); background: #eaf0e8; }
.card-preview img { display: block; width: auto; max-height: 100%; object-fit: contain; border: 1px solid #dce1dc; box-shadow: 0 5px 12px rgba(23, 33, 45, .09); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 19px; }
.card-body h2, .card-body h3 { margin: 5px 0 10px; font-size: 19px; }
.card-body p { margin-bottom: 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.card-body .eyebrow { margin-bottom: 5px; font-size: 9px; }
.card-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; font-size: 12px; font-weight: 600; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 24px 0; }
.component-card { display: block; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; color: inherit; background: #fcfdfa; text-decoration: none; }
.component-card:hover { border-color: #90baab; color: inherit; }
.component-card h2, .component-card h3 { margin: 8px 0; font-size: 16px; }
.component-card h3 a, .component-card h2 a { text-decoration: none; }
.component-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.component-card .namespace { display: block; overflow-wrap: anywhere; color: #647369; font: 10px/1.6 var(--mono); }
.api-signature { margin: 20px 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; color: #28564b; background: #edf3ee; font: 12px/1.8 var(--mono); }
.member { margin: 20px 0; padding: 21px 0; border-top: 1px solid var(--line); scroll-margin-top: 95px; }
.member h3 { margin: 0 0 10px; font-family: var(--mono); font-size: 16px; }
.member .api-signature { margin: 12px 0; }
.member-meta { display: flex; flex-wrap: wrap; gap: 6px 15px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.member-meta code { font-size: 11px; }
.source-panel { margin: 27px 0; border: 1px solid var(--line); border-radius: 9px; background: #fafcf8; }
.panel-intro { padding: 22px 24px; }
.panel-intro > h2 { margin: 0 0 14px; }
.panel-intro > p:last-child { margin-bottom: 0; }
.source-panel summary { padding: 15px 19px; cursor: pointer; color: var(--accent-dark); font-size: 13px; font-weight: 600; }
.source-panel[open] summary { border-bottom: 1px solid var(--line); }
.source-panel pre { max-height: 600px; margin: 0; border: 0; border-radius: 0 0 9px 9px; }
.pdf-panel { margin: 30px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.pdf-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 15px 19px; border-bottom: 1px solid var(--line); background: #eef3ed; font-size: 13px; }
.pdf-actions p { margin: 0; }
.pdf-actions a { font-size: 12px; font-weight: 600; }
.pdf-viewer { display: block; width: 100%; height: min(76vh, 880px); min-height: 420px; border: 0; background: #e3e8e3; }
.pdf-fallback { padding: 18px; color: var(--muted); font-size: 13px; }
.pdf-preview { display: block; width: min(100%, 640px); height: auto; margin: 20px auto; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(23, 33, 45, .08); }
.pdf-pages { max-height: min(80vh, 980px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: #e3e8e3; scrollbar-gutter: stable; }
.pdf-page { max-width: 760px; margin: 0 auto 24px; }
.pdf-page:last-child { margin-bottom: 0; }
.pdf-page a { display: block; }
.pdf-page img { display: block; width: 100%; height: auto; background: white; box-shadow: 0 4px 18px rgba(23, 33, 45, .14); }
.pdf-page figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.pdf-native { border-top: 1px solid var(--line); }
.pdf-native summary { padding: 15px 19px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pdf-native .search-hint { padding: 0 19px; }
.search-field { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.search-field label { display: flex; flex-direction: column; flex: 1 1 230px; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.search-field label:has(select) { flex: 0 1 180px; }
.search-field input, .search-field select { min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #c8d3cb; border-radius: 7px; color: var(--ink); background: white; font-size: 14px; }
.search-field select { max-width: 100%; }
.search-hint, #search-status { margin: 8px 0 16px; color: var(--muted); font-size: 12px; }
.empty-state { margin: 24px 0; padding: 28px; border: 1px dashed #bfd0c3; border-radius: 9px; color: var(--muted); text-align: center; }
.site-footer { margin-top: 65px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0 0 7px; }
.site-footer a { color: var(--muted); }

@media (min-width: 1650px) { .site-header { padding-right: calc((100vw - 1600px) / 2 + 32px); padding-left: calc((100vw - 1600px) / 2 + 32px); } }
@media (max-width: 1200px) {
    .content-grid { grid-template-columns: minmax(0, 1fr); }
    .toc { display: none; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { gap: 25px; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .site-header { min-height: 68px; padding: 12px 20px; }
    .top-nav { gap: 15px; }
    .top-nav a { font-size: 12px; }
    .menu-button { display: block; }
    .site-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: none; position: fixed; top: 68px; bottom: 0; left: 0; z-index: 25; width: min(310px, 88vw); height: auto; padding: 25px; background: var(--page); box-shadow: 12px 0 30px rgba(23, 33, 45, .15); }
    .sidebar.is-open { display: block; }
    main { padding: 32px 27px 45px; }
    .hero { grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr); }
    .hero h1 { font-size: 45px; }
}
@media (max-width: 620px) {
    :root { font-size: 15px; scroll-padding-top: 90px; }
    .site-header { padding: 10px 16px; gap: 9px; }
    .brand { font-size: 17px; gap: 8px; }
    .brand-mark { width: 33px; height: 33px; }
    .brand small, .brand-version { display: none; }
    .top-nav { display: none; }
    .top-nav a { font-size: 11px; }
    .top-nav a:not(:last-child) { display: none; }
    .language-switch { gap: 3px; font-size: 11px; }
    .language-switch span { display: none; }
    .menu-button { padding: 7px 10px; font-size: 12px; }
    main { padding: 27px 18px 40px; }
    h1 { font-size: 31px; }
    h2 { font-size: 23px; }
    .page-header { margin-bottom: 28px; padding-bottom: 22px; }
    .page-header > p:last-child, .page-header .lede { font-size: 15px; }
    .hero { display: flex; flex-direction: column; align-items: stretch; gap: 25px; margin-top: 4px; padding-bottom: 30px; }
    .hero h1 { max-width: 450px; font-size: clamp(38px, 10vw, 54px); }
    .hero-copy > p { font-size: 15px; }
    .hero-visual { padding: 18px; }
    .hero-visual img { max-height: 290px; }
    .hero-visual pre { font-size: 10px; }
    .stats { gap: 10px; margin-bottom: 30px; }
    .stat { padding: 13px 15px; }
    .stat strong { font-size: 25px; }
    .cards, .reference-grid { grid-template-columns: minmax(0, 1fr); }
    .card-preview { height: 230px; }
    .card-body { padding: 18px; }
    .component-card { padding: 17px; }
    .prose pre, .source-panel pre { padding: 16px; font-size: 11px; }
    pre.has-copy { padding-top: 46px; }
    .prose th, .prose td { padding: 9px 11px; }
    .callout { padding: 15px 17px; }
    .panel-intro { padding: 18px 16px; }
    .pdf-actions { align-items: start; padding: 13px 15px; }
    .pdf-viewer { height: 65vh; min-height: 360px; }
    .pdf-pages { padding: 14px; max-height: 70vh; }
    .search-field { align-items: stretch; }
    .search-field label, .search-field label:has(select) { flex-basis: 100%; }
    .search-field input, .search-field select { width: 100%; }
    .search-field > select { flex: 1 1 100%; }
    .api-signature { padding: 15px; font-size: 11px; }
    .site-footer { margin-top: 45px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
    :root { font-size: 10pt; }
    body { background: white; color: black; }
    .site-header, .sidebar, .toc, .menu-button, .copy-code, .copy-status, .search-field, .search-hint, #search-status, .hero-actions, .pdf-viewer { display: none !important; }
    .site-shell, .content-grid { display: block; }
    main { padding: 0; }
    .prose, .content-grid > article { max-width: none; }
    .hero { display: block; }
    .hero-visual { max-width: 250px; }
    .prose pre, .source-panel pre, .api-signature { white-space: pre-wrap; overflow: visible; font-size: 8pt; border-color: #ccc; }
    .prose table { display: table; font-size: 8pt; }
    .cards, .reference-grid, .stats { display: block; }
    .card, .component-card, .stat { margin-bottom: 12pt; break-inside: avoid; }
    .card-preview { height: 150px; }
    .pdf-panel, .source-panel { border-color: #ccc; }
    .pdf-pages { max-height: none; overflow: visible; padding: 0; background: white; }
    .pdf-page { break-inside: avoid; }
    .pdf-native { display: none; }
    h1, h2, h3 { break-after: avoid; }
    .site-footer { margin-top: 24pt; }
    a { color: inherit; }
}
