:root {
    color-scheme: light;
    --ink: #183448;
    --accent: #15659d;
    --muted: #4f6373;
    --line: #cddbe4;
    --paper: #f8fafb;
    --gutter: clamp(1.2rem, 4vw, 6rem);
    font: 16px/1.6 "Inter", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid #c27322; outline-offset: 3px; }
.skip { position: absolute; z-index: 3; left: -100vw; }
.skip:focus { left: 1rem; background: white; padding: .6rem; }
.mast, footer { display: flex; align-items: center; padding: .9rem var(--gutter); gap: 2rem; }
.mast { background: #fff; border-bottom: 1px solid var(--line); }
.mast a, footer .brand, .card, .directory a, aside a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 2rem; letter-spacing: -.075em; font-weight: 800; line-height: 1.25; }
.brand img { width: 1.25em; height: 1.25em; flex: none; }
.wordmark span { color: #1978bc; }
.sections, .languages { display: flex; align-items: center; }
.sections { gap: 1.5rem; margin-left: auto; }
.sections a { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.sections a:hover, .sections .selected { color: var(--accent); text-decoration: underline; }
.languages { border: 1px solid var(--line); border-radius: 2rem; padding: .15rem; }
.languages a { padding: .2rem .62rem; font-size: .82rem; font-weight: 650; }
.languages [aria-current] { background: var(--ink); color: white; border-radius: 2rem; }
h1, h2, h3 { line-height: 1.14; text-wrap: balance; }
h1 { margin: 0 0 .45em; font-size: clamp(2.4rem, 4.5vw, 5rem); letter-spacing: -.055em; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: #163c56; color: white; padding: clamp(3rem, 6vw, 7rem) var(--gutter); }
.hero-copy { position: relative; z-index: 1; max-width: 66%; }
.hero h1 { font-size: clamp(3rem, 6vw, 7rem); }
.hero p { max-width: 55ch; margin: 0; color: #dcebf4; font-size: clamp(1.03rem, 1.5vw, 1.45rem); }
.contours { position: absolute; inset: 0 0 0 59%; overflow: hidden; background: repeating-radial-gradient(ellipse at 100% 110%, transparent 0 17px, #70aadb 18px 19px, transparent 20px 33px); transform: skewX(-18deg) scale(1.3); opacity: .65; mask-image: linear-gradient(100deg, transparent, black 28%); }
.home-body { padding: clamp(1.4rem, 3vw, 3.5rem) var(--gutter) 4rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin-top: 2rem; }
.topics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.card { display: grid; grid-template-columns: 1fr auto; align-content: start; align-items: start; gap: .7rem 1rem; padding: clamp(1.2rem, 2vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: .8rem; color: var(--ink); }
.card strong { font-size: 1.15rem; line-height: 1.3; }
.topics strong { font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: -.04em; }
.arrow { color: var(--accent); line-height: 1.4; }
.card:hover { background: #eef6fc; border-color: #719ab8; }
.description { grid-column: 1/-1; color: var(--muted); max-width: 56ch; }
.directory { margin-top: clamp(2.5rem, 4vw, 5rem); }
.directory h2 { font-size: clamp(1.7rem, 3vw, 3rem); letter-spacing: -.045em; }
.directory h2 a { color: var(--ink); }
.directory-links { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); column-gap: 2rem; }
.directory-links a { display: flex; justify-content: space-between; align-items: center; gap: .7rem; border-top: 1px solid var(--line); padding: .85rem .15rem; }
.directory a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: clamp(16rem, 21vw, 21rem) minmax(0,1fr); min-height: 85vh; }
aside { background: #eef3f7; border-right: 1px solid var(--line); padding: 2rem 1.25rem 2rem clamp(1rem, 2vw, 2.5rem); }
#contents { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; scrollbar-width: thin; }
#contents > summary { cursor: pointer; font-weight: 700; padding: .65rem; }
.doc-tree { line-height: 1.35; }
.doc-tree ul { list-style: none; margin: 0; padding: 0; }
.doc-tree .branch > ul { margin: .12rem 0 .35rem .8rem; padding-left: .5rem; border-left: 1px solid #b5c7d5; }
.doc-tree a { display: block; color: var(--ink); padding: .38rem .4rem; border-radius: .3rem; overflow-wrap: anywhere; }
.doc-tree summary { display: flex; align-items: center; list-style: none; cursor: pointer; font-size: 1rem; font-weight: 670; }
.doc-tree summary::-webkit-details-marker { display: none; }
.doc-tree > ul > li > .branch > summary, .tree-home { font-size: 1.18rem; font-weight: 750; }
.doc-tree > ul > li { margin-top: .35rem; }
.twisty { flex: 0 0 1.6rem; line-height: 1.6rem; text-align: center; color: var(--accent); font-size: 1.4rem; }
.branch[open] > summary > .twisty { transform: rotate(90deg); }
.doc-tree .leaf { font-size: .93rem; }
.doc-tree a:hover, .doc-tree summary:hover, .doc-tree [aria-current] { background: #dceaf5; }
.doc-tree [aria-current] { color: var(--accent); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.package-heading { margin: 2.5rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.package-heading + .cards { margin-top: 1rem; }
.document { min-width: 0; padding: clamp(2rem, 4vw, 5rem) var(--gutter); overflow-wrap: anywhere; }
.crumb { margin-bottom: 1.4rem; font-size: .94rem; }
.prose { max-width: 82ch; }
.prose h2 { margin: 2.5rem 0 .8rem; border-top: 1px solid var(--line); padding-top: 1.4rem; letter-spacing: -.025em; }
.prose li + li { margin-top: .35rem; }
.prose code { background: #e7eff5; padding: .1em .28em; border-radius: .25em; font-size: .9em; }
.prose pre { overflow: auto; background: #1b374a; color: #f2f8fc; padding: 1.25rem; border-radius: .6rem; }
.prose pre code { background: transparent; padding: 0; }
table { display: block; overflow: auto; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: .5rem .8rem; }
img { max-width: 100%; height: auto; }
footer { flex-wrap: wrap; row-gap: .6rem; justify-content: space-between; border-top: 1px solid var(--line); background: white; font-size: .9rem; }
.footer-sites { display: flex; flex-wrap: wrap; gap: .3rem .55rem; }
.footer-sites [aria-hidden] { margin-right: .35rem; color: var(--muted); }
footer .brand { font-size: 1.35rem; }
@media (max-width: 760px) {
    .mast { flex-wrap: wrap; gap: .55rem 1rem; justify-content: space-between; }
    .sections { order: 3; width: 100%; flex-wrap: wrap; gap: .4rem 1rem; }
    .sections a { font-size: 1rem; }
    .hero-copy { max-width: 100%; }
    .contours { inset-inline-start: 72%; opacity: .2; }
    .topics, .directory-links { grid-template-columns: 1fr; }
    .layout { display: block; }
    aside { border: 0; border-bottom: 1px solid var(--line); padding: .4rem var(--gutter); }
    #contents { position: static; max-height: 50vh; }
    .document { padding-top: 1.5rem; }
}
.doc-search { display: flex; gap: .35rem; }
.doc-search input, .doc-search button { font: inherit; border: 1px solid var(--line); border-radius: .35rem; padding: .35rem .55rem; }
.doc-search input { width: 13em; min-width: 0; }
.doc-search button { background: var(--accent); color: white; cursor: pointer; }
@media (max-width: 960px) {
    .mast { flex-wrap: wrap; }
    .doc-search { order: 4; width: 100%; }
    .doc-search input { flex: 1; }
}
