:root {
    color-scheme: light dark;
    font-family: system-ui, sans-serif;
    --link: #0759b8;
    --muted: #edf2f7;
    --border: #b7c4d2;
}
body { margin: 0; padding: 2rem 1rem; line-height: 1.6; }
main { max-width: 900px; margin: auto; }
h1 { line-height: 1.2; }
h2 { margin-top: 2.75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
h3 { margin-top: 2rem; }
h4 { margin-top: 1.5rem; }
[id] { scroll-margin-top: 1rem; }
p, li, td { overflow-wrap: anywhere; }
li { margin-block: .35rem; }
a { color: var(--link); text-underline-offset: .15em; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
:not(pre) > code { padding: .1em .3em; border-radius: .25rem; background: var(--muted); }
pre { overflow-x: auto; padding: 1rem; border-radius: .5rem; background: #1f2937; color: #f9fafb; }
img { display: block; max-width: 100%; height: auto; }
.contents { columns: 2; padding-left: 1.25rem; }
.contents li { break-inside: avoid; }
.function-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .4rem 1rem; padding: 0; list-style: none; }
.table-scroll { overflow-x: auto; margin-block: 1rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .95rem; }
th, td { padding: .65rem .75rem; border: 1px solid var(--border); vertical-align: top; }
th { background: var(--muted); }
.code-example { margin-block: 1rem; }
.code-example pre { margin-block: .25rem; }
.copy-button { font: inherit; font-size: .85rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: .35rem; background: var(--muted); color: inherit; cursor: pointer; }
li > .copy-button { margin-left: .5rem; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
@media (max-width: 540px) {
    body { padding: 1rem; }
    .contents { columns: 1; }
    th, td { padding: .5rem; }
}
@media (prefers-color-scheme: dark) {
    :root { --link: #8bc3ff; --muted: #243041; --border: #54647a; }
}
@media print {
    .copy-button { display: none; }
    body { padding: 0; }
    pre { white-space: pre-wrap; background: #f3f4f6; color: #111; }
    a { color: inherit; }
    h2, h3, h4 { break-after: avoid; }
}
