/* The documentation site's theme (tools/docsite.mjs): kwker.io's look (website/assets/site.css) - green accent, white
   reading surface, dark code boxes in both themes. Tokens on :root; dark by prefers-color-scheme or data-theme. */
/* Inter (SIL Open Font License 1.1, userdocs/assets/fonts/OFL.txt), the latin subset; system fonts until it loads */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #ffffff; --bg-side: #f6f8f7; --surface: #ffffff; --surface-2: #eef2f0; --ink: #0f1513; --muted: #55615b;
  --line: #dce3df; --accent: #0a7650; --accent-ink: #ffffff; --accent-soft: #dff3e9; --code-bg: #eef2f0; --code-ink: #0f1513;
  --block-bg: #0f1513; --block-ink: #e6eee9; --block-dim: #8fa198; --block-line: #22302a; --block-tab: #1a2621;
  --table-head: #f6f8f7; --quote: #f3f8f5; --shadow: 0 1px 2px rgba(15, 21, 19, .06), 0 8px 24px rgba(15, 21, 19, .06);
  --tip: #1a7f37; --important: #8250df; --warning: #9a6700; --caution: #cf222e;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c100e; --bg-side: #101613; --surface: #131a17; --surface-2: #18211d; --ink: #e8efeb; --muted: #9aa8a1;
    --line: #25302b; --accent: #3ddc97; --accent-ink: #06130d; --accent-soft: #10271c; --code-bg: #18211d; --code-ink: #e8efeb;
    --block-bg: #0a0e0c; --block-ink: #e6eee9; --block-dim: #8fa198; --block-line: #22302a; --block-tab: #18241f;
    --table-head: #131a17; --quote: #111815; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --tip: #3fb950; --important: #a371f7; --warning: #d29922; --caution: #f85149;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c100e; --bg-side: #101613; --surface: #131a17; --surface-2: #18211d; --ink: #e8efeb; --muted: #9aa8a1;
  --line: #25302b; --accent: #3ddc97; --accent-ink: #06130d; --accent-soft: #10271c; --code-bg: #18211d; --code-ink: #e8efeb;
  --block-bg: #0a0e0c; --block-ink: #e6eee9; --block-dim: #8fa198; --block-line: #22302a; --block-tab: #18241f;
  --table-head: #131a17; --quote: #111815; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --tip: #3fb950; --important: #a371f7; --warning: #d29922; --caution: #f85149;
  color-scheme: dark;
}
/* High contrast (the operating system's "increase contrast": prefers-contrast: more) - full-strength text, darker muted
   greys and borders (lighter in dark mode), every content link underlined. Forced colours (Windows High Contrast): the
   system's colours apply; only borders, the selected result and focus rings need saying. */
@media (prefers-contrast: more) {
  :root {
    --ink: #000000; --muted: #2c3631; --line: #5d6b64; --accent: #00573a; --accent-soft: #c9ecdb; --code-ink: #000000;
    --block-ink: #ffffff; --block-dim: #c0cdc6; --block-line: #53645c; --table-head: #eef2f0;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #060908; --ink: #ffffff; --muted: #cfd9d4; --line: #7d8b84; --accent: #6af2b4;
    --accent-soft: #123a28; --code-ink: #ffffff; --block-dim: #c0cdc6; --block-line: #53645c;
  }
}
@media (prefers-contrast: more) {
  :root[data-theme="dark"] {
    --bg: #000000; --surface: #060908; --ink: #ffffff; --muted: #cfd9d4; --line: #7d8b84; --accent: #6af2b4;
    --accent-soft: #123a28; --code-ink: #ffffff; --block-dim: #c0cdc6; --block-line: #53645c;
  }
  .content a { text-decoration: underline; }
  :focus-visible { outline-width: 3px !important; }
}
@media (forced-colors: active) {
  .search .results, .api-card, .callout, pre, table { border: 1px solid CanvasText; }
  .search .results a[aria-selected] { outline: 2px solid Highlight; outline-offset: -2px; }
  .content a.api code { border-bottom-color: LinkText; }
  :focus-visible { outline: 2px solid Highlight !important; }
  /* (the dark code boxes and their tab bars: the system's own pairs, so no box keeps a dark ground under system text) */
  .tabs, .repl, .tabs *, .repl * { background-color: Canvas !important; color: CanvasText !important; }
  .tab-bar [role="tab"], .repl-btn { background: ButtonFace !important; color: ButtonText !important; border: 1px solid ButtonText !important; }
  .tab-bar [role="tab"][aria-selected="true"] { background: Highlight !important; color: HighlightText !important; }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* (links inside running text are underlined: colour alone does not mark them - WCAG 1.4.1) */
.content :is(p, li, td, th, dd, blockquote, caption, .callout) a:not(.sym-link) {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
.content :is(p, li, td, th, dd, blockquote, caption, .callout) a:not(.sym-link):hover { text-decoration-color: currentColor; }
.content .cards li > a:not(.sym-link) { text-decoration: none; }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 22px; flex: none; }
.brand .ver { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-weight: 400; margin-left: 4px; }
header.top > .ver { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
/* (kwker.io's documentation versions - site/app.mjs versions(): the picker in the sidebar, the older-release note) */
.ver-note { padding: 10px 24px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink); }
.ver-note a { font-weight: 600; white-space: nowrap; }
.top-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; }
.top-links a { color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .top-links { gap: 16px; } .search { flex-basis: 220px; } }
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
/* (the same 34 px button as the product pages' header: text 1.5 px above the middle) */
.top-links a.btn-try {
  display: inline-flex; align-items: center; height: 34px; color: var(--accent-ink); background: var(--accent); padding: 0 15px 3px; border-radius: 8px;
  font-weight: 600; font-size: 14.4px; line-height: 1.2;
}
.top-links a.btn-try:hover { color: var(--accent-ink); filter: brightness(1.08); }
/* the account link (kwker.io): a person icon in the bar; the phone Menu button is an icon */
a.nav-acct { display: inline-flex; align-items: center; gap: 7px; }
.top-links .top-act { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }
.top-links a.nav-acct { flex: none; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
.top-links a.nav-acct:hover { border-color: var(--muted); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu .ico { width: 20px; height: 20px; display: block; }
/* (phones: the site's links at the top of the Menu, as in the site's own menu) */
.side-site { display: none; flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg-side); font-size: 14.5px; }
.side .side-site a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 500; }
.side .side-site a:hover { border-color: var(--accent); background: var(--bg); }
.side .side-site a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
.side .side-site a.btn-try { justify-content: center; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.side .side-site a.btn-try:hover { filter: brightness(1.08); }
.search { position: relative; flex: 0 1 300px; }
.search input {
  width: 100%; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-side); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--bg); }
.search .results {
  position: absolute; top: calc(100% + 6px); left: 0; width: min(520px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); z-index: 20;
}
.search .results a { display: block; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.search .results a:last-child { border-bottom: 0; }
.search .results a[aria-selected], .search .results a:hover { background: var(--accent-soft); }
.search .r-h { font-weight: 600; font-size: 14.5px; margin-right: 8px; }
.search .r-p { font-size: 12.5px; color: var(--muted); }
.search .r-x { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.search .r-x mark { background: none; color: var(--accent); font-weight: 600; }
.search .r-none { padding: 12px 14px; font-size: 14px; color: var(--muted); }
.search .r-filters { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px;
  background: var(--bg-side); border-bottom: 1px solid var(--line); z-index: 1; }
.search .r-filters:empty { display: none; }
.search .r-f select { font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); max-width: 100%; }
.search .r-f select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.menu { flex: none; display: none; font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; width: 34px; height: 34px; padding: 0; place-items: center; cursor: pointer; }
/* (full width: the sidebar at the left edge, the page list at the right, the content centred between them and widening
   with the window - a 1440px-capped grid drifted to the middle when zooming out) */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr) 220px; }
.side {
  position: sticky; top: 60px; height: calc(100vh - 60px); display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--line); background: var(--bg-side); font-size: 14.5px;
}
/* (the filter box stays on top and the tree scrolls in its own box below it - nothing is ever half covered) */
.nav-filter { flex: none; padding: 16px 12px 10px 20px; background: var(--bg-side); border-bottom: 1px solid var(--line); }
.nav-tree { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px 40px 20px; }
.nav-filter input {
  width: 100%; font: inherit; font-size: 13.5px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink);
}
.nav-filter input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.nav-setting { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.nav-setting select {
  font: inherit; font-size: 13.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink);
}
.nav-setting select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.content h3 .sym-link { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); text-decoration: none; opacity: 0; }
.content h3:hover .sym-link, .content h3 .sym-link:focus { opacity: 1; }
.side [hidden] { display: none !important; }
.side summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; user-select: none;
}
.side summary::-webkit-details-marker { display: none; }
.side summary::before {
  content: ""; flex: none; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.15s;
}
.side details[open] > summary::before { transform: rotate(45deg); }
.side summary:hover { background: var(--accent-soft); }
.nav-area > summary { font-weight: 600; margin-top: 2px; }
.nav-area > a, .nav-area > details, .nav-group > a { margin-left: 13px; }
.nav-none { padding: 4px 8px; color: var(--muted); font-size: 13.5px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.page-foot {
  display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.page-foot .pf-k { font-weight: 600; color: var(--ink); margin-right: 4px; }
.page-foot .pf-report { margin-left: auto; }
.pf-help { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pf-help button {
  font: inherit; font-size: 13px; padding: 1px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); cursor: pointer;
}
.pf-help button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pf-help button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pf-help button:disabled:not([aria-pressed="true"]) { opacity: 0.55; cursor: default; }
.pf-table { flex-basis: 100%; margin: 8px 0 0; font-size: 13px; }
.pf-table caption { text-align: left; padding-bottom: 6px; color: var(--muted); }
.pf-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.side a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink); }
.side a:hover { background: var(--accent-soft); text-decoration: none; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.content { padding: 36px 56px 80px; min-width: 0; width: 100%; max-width: max(900px, 64vw); margin-inline: auto; }
.toc { position: sticky; top: 60px; align-self: start; padding: 36px 16px; font-size: 13.5px; max-height: calc(100vh - 60px); overflow-y: auto; }
.toc-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.toc a { display: block; padding: 3px 0; color: var(--muted); }
.toc a.h3 { padding-left: 12px; }
.toc a:hover { color: var(--ink); }
.content h1 { font-size: 38px; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 14px; text-wrap: balance; }
.content h1 + p { font-size: 18px; line-height: 1.6; color: var(--muted); }
.content h2 { font-size: 25px; line-height: 1.3; letter-spacing: -0.015em; margin: 48px 0 12px; text-wrap: balance; }
.content h3 { font-size: 18.5px; letter-spacing: -0.005em; margin: 30px 0 8px; }
.content p, .content li { max-width: max(72ch, 82%); }
.content code {
  font: 0.88em/1.5 var(--mono); background: var(--code-bg); color: var(--code-ink); padding: 0.12em 0.38em; border-radius: 5px;
}
.content pre {
  background: var(--block-bg); color: var(--block-ink); padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line);
  overflow-x: auto; line-height: 1.6;
}
.content pre code { background: none; color: inherit; padding: 0; font-size: 13.5px; }
.content blockquote { margin: 16px 0; padding: 10px 16px; background: var(--quote); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; color: var(--ink); }
.content blockquote p { margin: 4px 0; }
.content table { border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow-x: auto; margin: 16px 0; font-size: 14.5px; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 9px 14px; text-align: left; vertical-align: top; }
.content th { background: var(--table-head); font-weight: 600; font-size: 13.5px; color: var(--ink); border-top: 1px solid var(--line); }
.content table { border: 1px solid var(--line); border-radius: 10px; }
/* (phones: tables of words and calls fit the screen - tighter cells, long call names may break) */
@media (max-width: 600px) {
  .content th, .content td { padding: 8px 9px; }
  .content td code { overflow-wrap: break-word; }   /* (render.mjs puts <wbr> after a call name's underscores) */
}
.content img { max-width: 100%; }
@media (max-width: 1200px) { .layout { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; height: auto; z-index: 9; border-right: 0; }
  body.nav-open .side { display: flex; animation: side-in .22s cubic-bezier(.2, .7, .2, 1); }
  @keyframes side-in { from { opacity: 0; transform: translateY(-8px); } }
  .menu { display: inline-grid; }
  .top-links { gap: 0; margin-left: 0; }
  .top-links a:not(.nav-acct) { display: none; }
  .top { gap: 12px; padding: 0 16px; }
  .ver-note { padding: 10px 16px; }
  .side-site { display: grid; }
  .search { flex: 1 1 auto; }
  .content { padding: 24px 16px 60px; }
  .content h1 { font-size: 30px; }
  .content h1 + p { font-size: 17px; }
}
.cards ul { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.content .cards li {
  position: relative; max-width: none; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.content .cards li:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.cards .card-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.cards a { font-weight: 650; font-size: 16.5px; color: var(--ink); }
.cards li:hover a { color: var(--accent); }
.cards a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.cards p { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.groups > ul { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px 28px; }
.content .groups li { max-width: none; }
.groups > ul > li > strong { display: block; font-size: 15px; margin-bottom: 6px; }
.groups ul ul { list-style: none; padding: 0; margin: 0; }
.groups ul ul li { padding: 3px 0; font-size: 14.5px; }
.content blockquote.callout { --c: var(--accent); border-left-color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--bg)); }
.callout-tip { --c: var(--tip) !important; }
.callout-important { --c: var(--important) !important; }
.callout-warning { --c: var(--warning) !important; }
.callout-caution { --c: var(--caution) !important; }
.content .callout-t { font-weight: 650; color: var(--c); margin: 2px 0 2px; font-size: 14.5px; }
.tabs { margin: 1.4em 0; background: var(--block-bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--block-line); }
.tab-bar [role="tab"] {
  font: 600 13.5px/1.3 var(--sans); padding: 8px 12px; border: 0; border-radius: 6px 6px 0 0;
  background: none; color: var(--block-dim); cursor: pointer; white-space: nowrap;
}
.tab-bar [role="tab"]:hover { color: var(--block-ink); }
.tab-bar [role="tab"][aria-selected="true"] { color: var(--block-ink); background: var(--block-tab); box-shadow: inset 0 -2px 0 #3ddc97; }
.tab-bar [role="tab"]:focus-visible { outline: 2px solid #3ddc97; outline-offset: -2px; }
@media (max-width: 600px) { .tab-bar [role="tab"] { padding: 7px 9px; font-size: 13px; } }
/* (steps: <!-- steps --> ordered list - numbered cards side by side, one column on phones) */
.steps ol { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 24px 0 8px; }
.content .steps li {
  counter-increment: step; max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; font-size: 15px; line-height: 1.6; color: var(--muted);
}
.steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 10px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--sans);
}
.steps li strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
@media (max-width: 900px) { .steps ol { grid-template-columns: minmax(0, 1fr); } }
.tabs .tab-panel > .repl { margin: 0; border: 0; border-radius: 0; }
.content .repl-static pre.repl-code {
  margin: 0; padding: 14px 18px; border: 0; border-radius: 0; overflow-x: auto; background: var(--repl-bg); color: var(--repl-ink);
  font: 13.5px/1.6 var(--mono); tab-size: 4;
}
.content .repl-static pre.repl-code code { font: inherit; background: none; padding: 0; }
.content .repl-static pre.repl-text { background: none; border: 0; border-radius: 0; color: inherit; }
/* (code inside a REPL box: the box draws the frame - no nested borders or backgrounds from .content pre) */
.content .repl pre { border: 0; border-radius: 0; }
.content .repl pre.repl-text { background: none; color: inherit; padding: 8px 18px 14px; margin: 0; }
.content .repl .repl-editor pre { background: none; padding: 14px 18px; }
.content .repl .repl-editor textarea { padding: 14px 18px; }
/* in-page navigation: the current page stays until the next one is rendered; a thin bar only when that takes > 0.3 s */
html.navigating .top::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent);
  transform-origin: left; animation: kwk-nav 1.1s ease-in-out infinite;
}
@keyframes kwk-nav { 0% { transform: scaleX(0); opacity: 1; } 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html.navigating .top::after { animation: none; opacity: .6; } }
main.content:focus { outline: none; }
.brand { white-space: nowrap; }
/* API mentions: links to their reference entry, with a preview card on hover / focus (assets/api.js) */
.content a.api { text-decoration: none; }
.content a.api code { color: var(--accent); border-bottom: 1px dotted currentColor; }
.content a.api:hover code, .content a.api:focus-visible code { background: var(--accent-soft); }
.api-card { position: absolute; z-index: 60; box-sizing: border-box; max-height: 60vh; overflow: auto; background: var(--surface);
  color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px 12px;
  font: 13.5px/1.45 var(--sans); }
.api-card .api-head { font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.api-card .api-sig { margin: 0 0 8px; padding: 6px 8px; background: var(--code-bg); color: var(--code-ink); border-radius: 6px;
  white-space: pre-wrap; word-break: break-word; font: 12.5px/1.4 var(--mono); }
.api-card .api-sig code { font: inherit; background: none; padding: 0; }
.api-card .api-desc { margin: 0 0 8px; }
.api-card .api-h { margin: 0 0 4px; font-weight: 600; font-size: 12.5px; }
.api-card .api-args { margin: 0 0 6px; padding-left: 16px; }
.api-card .api-args li { margin: 3px 0; }
.api-card .api-args code { font: 600 12.5px var(--mono); }
.api-card .api-def { color: var(--muted); font: 12px var(--mono); }
.api-card :is(.api-ret, .api-meths) { margin: 0 0 8px; }
.api-card :is(.api-ret, .api-meths) code { font: 12.5px var(--mono); }
.api-card .api-meths code { margin-right: 6px; }
.api-card .api-list { margin: 0 0 8px; padding-left: 16px; }
.api-card .api-list li { margin: 3px 0; }
.api-card :is(.api-ex, .api-out) { margin: 0 0 8px; padding: 6px 8px; background: var(--code-bg); color: var(--code-ink); border-radius: 6px;
  white-space: pre; overflow-x: auto; font: 12px/1.4 var(--mono); }
.api-card .api-out { margin-top: -4px; color: var(--muted); }
.api-card :is(.api-ex, .api-out) code { font: inherit; background: none; padding: 0; }
.api-card .api-more { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
/* touch screens: press and hold a function or term link to see its card (assets/api.js) - no callout menu, no text selection */
@media (hover: none) { .content a.api, .content a.term { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
/* glossary terms: a page's first use of a term links to its definition (assets/api.js shows it on hover) - a quiet dotted
   underline in the text's own colour, so a paragraph with several terms stays readable */
.content :is(p, li, td, th, dd, blockquote, caption, .callout) a.term {
  color: inherit; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
}
.content :is(p, li, td, th, dd, blockquote, caption, .callout) a.term:hover { color: var(--accent); text-decoration-color: currentColor; }
.api-card .api-term { margin: 0 0 4px; font-weight: 650; font-size: 14px; }
/* One documentation area as one page (?area=<slug>, site/app.mjs printView): a cover block, then every page of the area in
   nav order. On paper: no site chrome, the light palette (dark code boxes would print as light text on white - browsers
   drop backgrounds), each page from a new sheet, the chosen language's tab only. */
.pf-print { flex-basis: 100%; }
.print-view .layout { grid-template-columns: 264px minmax(0, 1fr); }
.print-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.content .print-k { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.content h1.print-title { font-size: 44px; margin-bottom: 8px; }
.content .print-meta { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.content .print-do { margin: 0; font-size: 14px; color: var(--muted); }
.print-btn {
  font: inherit; font-size: 14.5px; font-weight: 600; padding: 7px 14px; margin-right: 8px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.print-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.print-page { margin-top: 56px; padding-top: 8px; border-top: 2px solid var(--line); }
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --bg: #ffffff; --bg-side: #ffffff; --surface: #ffffff; --surface-2: #f2f4f3; --ink: #000000; --muted: #3d4742;
    --line: #c9d2cd; --accent: #0a5c3f; --accent-ink: #ffffff; --accent-soft: #e8f5ee; --code-bg: #f2f4f3; --code-ink: #000000;
    --block-bg: #f6f8f7; --block-ink: #0f1513; --block-dim: #3d4742; --block-line: #c9d2cd; --block-tab: #e9eeeb;
    --table-head: #f2f4f3; --quote: #f6f8f7; --shadow: none; color-scheme: light;
  }
  :root .repl, :root:not([data-theme="light"]) .repl, :root[data-theme="dark"] .repl {
    --repl-bg: #f6f8f7; --repl-panel: #f6f8f7; --repl-ink: #0f1513; --repl-muted: #3d4742; --repl-line: #c9d2cd;
    --repl-out-bg: #ffffff; --repl-out-ink: #0f1513; --repl-ok: #1a7f37; --repl-err: #b3261e; --repl-kw: #6f42c1;
    --repl-str: #0a6640; --repl-num: #9a4d00; --repl-com: #4f5b55; --repl-api: #0b4fa8;
  }
  body { font-size: 11pt; background: #ffffff; }
  header.top, .side, .toc, .crumbs, .page-foot, .print-do, .repl-bar, .sym-link, .api-card, .menu { display: none !important; }
  .layout, .print-view .layout { display: block; max-width: none; }
  .content { padding: 0; max-width: none; }
  .content p, .content li { max-width: none; }
  .print-head { border-bottom: 0; }
  .print-page { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
  .content h1, .content h2, .content h3 { break-after: avoid; }
  .content pre, .repl-editor pre, .repl-text { white-space: pre-wrap; overflow: visible; max-height: none; word-break: break-word; }
  .repl-editor pre { position: static; }
  .repl-editor textarea { display: none; }
  .content table { display: table; overflow: visible; }
  .content tr, .content blockquote, .cards li, .steps li { break-inside: avoid; }
  .tab-bar [role="tab"][aria-selected="false"] { display: none; }
  .tab-bar [role="tab"][aria-selected="true"] { box-shadow: none; padding: 4px 10px; }
  .cards a::after { display: none; }
}

.content td .nw { white-space: nowrap; }
