/* docs.oncorbel.com — the Corbel guide reader (handoff design 2026-11-26) on the product's own tokens (tokens.css = corbel_ui
   src/styles/tokens.css, light and dark). Every colour below is a token, so both themes follow; no hex values here. */

@font-face { font-family: 'Pretendard Variable'; src: url('fonts/PretendardVariable.woff2') format('woff2-variations'); font-weight: 45 920; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --docs-sidebar: var(--cb-lnb-width); --docs-header: var(--cb-sp-16);
  --docs-reading-width: 820px; --docs-visual-width: 1120px; --docs-toc-width: 176px;
  --docs-logo-width: 160px; --docs-wordmark-width: 96px; --docs-search-width: 256px;
  --docs-dialog-width: 720px; --docs-dialog-height: 760px; --docs-menu-width: 320px;
  --docs-hairline: 1px; --docs-selection-line: 2px; --docs-tracking: -.025em;
  --cb-r-sm: 0; --cb-r-md: 0; --cb-r-lg: 0;  /* square corners (data-corners="square") */
}
/* Pretendard first; the earlier docs font (Noto Sans KR, Google Fonts) second — it shows while the Pretendard file loads and
   for any letter Pretendard lacks */
:root { --cb-font-sans: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', sans-serif; }
html:lang(ja) { --cb-font-sans: 'Noto Sans JP', 'Hiragino Sans', sans-serif; }

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--docs-header) + var(--cb-sp-6)); }
body { margin: 0; background: var(--cb-surface); color: var(--cb-text); font-family: var(--cb-font-sans); font-size: var(--cb-fs-h6); line-height: var(--cb-lh-h6); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
html:lang(ja) body { word-break: normal; line-break: strict; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--cb-ink); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: var(--docs-hairline); text-decoration-color: var(--cb-border-strong); }
a:hover { color: var(--cb-link-hover); text-decoration-color: currentColor; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: var(--docs-hairline) solid var(--cb-focus); outline-offset: calc(-1 * var(--docs-hairline)); }
select:focus-visible { outline: 2px solid var(--cb-focus); outline-offset: 2px; }
input:focus { outline: 0; border-color: var(--cb-focus) !important; }
[tabindex="-1"]:focus { outline: 0 !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: var(--docs-hairline); height: var(--docs-hairline); overflow: hidden; clip-path: inset(50%); }
.skip { position: fixed; left: var(--cb-sp-4); top: calc(-1 * var(--cb-sp-24)); z-index: 60; padding: var(--cb-sp-2) var(--cb-sp-4); background: var(--cb-surface); }
.skip:focus { top: var(--cb-sp-2); }
.ui-icon { display: block; flex-shrink: 0; width: var(--cb-sp-4); height: var(--cb-sp-4); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* the logo files are black: the dark theme turns them white */
html[data-theme="dark"] .brand img { filter: invert(1); }
@media (prefers-color-scheme: dark) { html:not([data-theme]) .brand img { filter: invert(1); } }

/* ------------------------------------------------------------------ header */
.site-header { position: fixed; inset: 0 0 auto; height: var(--docs-header); z-index: 20; display: flex; align-items: center; gap: var(--cb-sp-4); padding: 0 var(--cb-sp-8); background: var(--cb-surface); border-bottom: var(--docs-hairline) solid var(--cb-border); }
.brand { display: flex; align-items: center; color: var(--cb-ink); text-decoration: none !important; flex-shrink: 0; margin-right: var(--cb-sp-2); }
.brand img { display: block; width: var(--docs-logo-width); height: auto; }
.brand .logo-wordmark { display: none; }
.sections { display: flex; align-items: stretch; align-self: stretch; gap: var(--cb-sp-5); padding-left: var(--cb-sp-6); border-left: var(--docs-hairline) solid var(--cb-border); margin: var(--cb-sp-4) 0; }
.sections a { display: flex; align-items: center; font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); font-weight: 500; color: var(--cb-sub-strong); text-decoration: none; border-bottom: var(--docs-selection-line) solid transparent; padding-top: var(--docs-selection-line); white-space: nowrap; }
.sections a:hover { color: var(--cb-ink); }
.sections a[aria-current] { color: var(--cb-ink); font-weight: 600; border-bottom-color: var(--cb-ink); }
.sections-mobile { display: none; }
.header-spacer { flex: 1; }
.version { font-family: var(--cb-font-mono); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); white-space: nowrap; }
.plain-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--cb-sp-2); min-height: var(--cb-input-height); padding: var(--cb-sp-2) var(--cb-sp-3); background: var(--cb-surface); border: var(--docs-hairline) solid var(--cb-border); border-radius: var(--cb-r-md); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-ink); }
.plain-button:hover { background: var(--cb-hover); }
.icon-button { width: var(--cb-input-height); padding: 0; }
.header-search { width: var(--docs-search-width); justify-content: flex-start; color: var(--cb-sub); }
.header-search kbd { margin-left: auto; }
kbd { font-family: var(--cb-font-mono); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); font-weight: 400; font-synthesis: none; border: var(--docs-hairline) solid var(--cb-border); padding: 0 var(--cb-sp-1); color: var(--cb-sub); background: var(--cb-bg); }
#print-button { border-color: transparent; }
#menu-toggle { display: none; }
#language { font-size: var(--cb-fs-label); cursor: pointer; max-width: 112px; }
#language option { background: var(--cb-surface); color: var(--cb-ink); }

/* page width: centered (the reading column) or wide (the whole window — long tables and lists) */
.views { display: inline-flex; border: var(--docs-hairline) solid var(--cb-border); }
.views button { display: grid; place-items: center; width: var(--cb-input-height); height: calc(var(--cb-input-height) - 2px); padding: 0; border: 0; background: var(--cb-surface); color: var(--cb-sub); }
.views button + button { border-left: var(--docs-hairline) solid var(--cb-border); }
.views button:hover { background: var(--cb-hover); color: var(--cb-ink); }
.views button[aria-pressed="true"] { background: var(--cb-ink); color: var(--cb-on-ink); }
.views .ui-icon { stroke-width: 1.2; }
body[data-section="api"] .views, body[data-section="state"] .views { display: none; }

/* theme: the moon asks for dark, the sun for light */
.theme-sun { display: none; }
html[data-theme="dark"] .theme-sun { display: block; }
html[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-sun { display: block; }
  html:not([data-theme]) .theme-moon { display: none; }
}

/* ------------------------------------------------------------------ sidebar */
.sidebar { position: fixed; top: var(--docs-header); left: 0; bottom: 0; width: var(--docs-sidebar); background: var(--cb-bg); border-right: var(--docs-hairline) solid var(--cb-border); z-index: 15; display: flex; flex-direction: column; }
.sidebar-top { padding: var(--cb-sp-6) var(--cb-sp-5) var(--cb-sp-4); flex-shrink: 0; }
.sidebar-top p { display: flex; align-items: center; justify-content: space-between; margin: 0 0 var(--cb-sp-3); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); }
.current-document { border: 0; background: none; padding: var(--cb-sp-1); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); text-decoration: underline; text-underline-offset: .22em; }
.current-document:hover { color: var(--cb-ink); }
.sidebar-search { display: flex; align-items: center; gap: var(--cb-sp-2); width: 100%; min-height: var(--cb-input-height); padding: var(--cb-sp-2); background: var(--cb-surface); border: var(--docs-hairline) solid var(--cb-border); border-radius: var(--cb-r-md); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); text-align: left; }
.sidebar-search kbd { margin-left: auto; }
.sidebar-search:hover { border-color: var(--cb-border-strong); }
.nav-scroll { overflow: auto; overscroll-behavior: contain; flex: 1; min-height: 0; padding: 0 var(--cb-sp-3) var(--cb-sp-8); scrollbar-width: thin; scrollbar-color: var(--cb-scrollbar) transparent; }
#document-nav { margin-top: var(--cb-sp-2); }
.nav-section { margin-bottom: var(--cb-sp-5); }
.nav-section > h2 { position: sticky; top: 0; z-index: 2; margin: 0; padding: var(--cb-sp-3); border: 0; background: var(--cb-bg); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); font-weight: 600; letter-spacing: 0; color: var(--cb-sub-strong); }
.nav-section.current-section > h2 { color: var(--cb-ink); }
.nav-single > h2 { padding: 0; }
.nav-subgroup { margin: var(--cb-sp-4) 0 0; }
.nav-subgroup h3 { position: sticky; top: calc(var(--cb-lh-body) + 2 * var(--cb-sp-3)); z-index: 1; margin: 0; padding: var(--cb-sp-2) var(--cb-sp-3); background: var(--cb-bg); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); font-weight: 500; letter-spacing: 0; color: var(--cb-sub); }
#document-nav ul { list-style: none; padding: 0; margin: 0; }
#document-nav li { margin: 0; padding: 0; }
#document-nav a { display: flex; align-items: center; min-height: var(--cb-input-height); padding: var(--cb-sp-2) var(--cb-sp-3); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); color: var(--cb-sub-strong); text-decoration: none; border-left: var(--docs-selection-line) solid transparent; border-radius: var(--cb-r-sm); }
#document-nav .nav-subgroup a { padding-left: var(--cb-sp-5); }
#document-nav a:hover { background: var(--cb-hover); color: var(--cb-ink); }
#document-nav a[aria-current] { background: var(--cb-selected-bg); border-left-color: var(--cb-ink); color: var(--cb-ink); font-weight: 600; }
#document-nav .nav-version { justify-content: space-between; gap: var(--cb-sp-3); }
#document-nav .nav-version small { font-family: var(--cb-font-mono); font-size: var(--cb-fs-label); color: var(--cb-sub); font-weight: 400; }
.mobile-shade { display: none; }

/* ------------------------------------------------------------------ page */
.layout { --docs-top-space: var(--cb-sp-12); margin-left: var(--docs-sidebar); padding: calc(var(--docs-header) + var(--docs-top-space)) var(--cb-sp-12) var(--cb-sp-16); display: grid; grid-template-columns: minmax(0, var(--docs-reading-width)) var(--docs-toc-width); justify-content: center; gap: var(--cb-sp-12); }
:root[data-width="wide"] .layout { grid-template-columns: minmax(0, 1fr) var(--docs-toc-width); justify-content: stretch; }
main { min-width: 0; }
.doc { scroll-margin-block-start: calc(var(--docs-top-space) - var(--cb-sp-6)); container-name: guide; container-type: inline-size; min-height: 72vh; padding: 0 0 var(--cb-sp-6); }
.breadcrumbs { margin: 0 0 var(--cb-sp-6); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); }
.breadcrumbs ol, .doc .breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--cb-sp-2) 0; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li, .doc .breadcrumbs li { display: flex; align-items: baseline; gap: var(--cb-sp-2); padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--cb-faint); padding-left: var(--cb-sp-2); }
.breadcrumbs a { color: var(--cb-sub); text-underline-offset: .22em; }
.breadcrumbs [aria-current] { color: var(--cb-sub-strong); }
.doc h1, .doc h2, .doc h3, .state h1 { color: var(--cb-ink); letter-spacing: var(--docs-tracking); }
.doc h1 { font-size: var(--cb-fs-h1); line-height: var(--cb-lh-h1); font-weight: 600; margin: 0 0 var(--cb-sp-6); }
.doc h2 { font-size: var(--cb-fs-h3); line-height: var(--cb-lh-h3); font-weight: 600; margin: var(--cb-sp-12) 0 var(--cb-sp-5); padding-top: var(--cb-sp-6); border-top: var(--docs-hairline) solid var(--cb-border); }
.doc h3 { font-size: var(--cb-fs-h4); line-height: var(--cb-lh-h4); font-weight: 600; margin: var(--cb-sp-8) 0 var(--cb-sp-3); }
.doc p { margin: var(--cb-sp-4) 0; }
.doc h1 + p { font-size: var(--cb-fs-h5); line-height: var(--cb-lh-h3); color: var(--cb-sub-strong); }
.doc strong { font-weight: 600; color: var(--cb-ink); }
.doc ul, .doc ol { padding-left: var(--cb-sp-6); margin: var(--cb-sp-5) 0; }
.doc li { padding-left: var(--cb-sp-1); margin: var(--cb-sp-2) 0; }
.doc li::marker { color: var(--cb-sub); }
.doc hr { margin: var(--cb-sp-6) 0 var(--cb-sp-8); border: 0; border-top: var(--docs-hairline) solid var(--cb-border); }
.doc hr + h2 { margin-top: var(--cb-sp-6); padding-top: 0; border-top: 0; }
blockquote { border-left: var(--docs-selection-line) solid var(--cb-ink); background: var(--cb-bg); padding: var(--cb-sp-4) var(--cb-sp-5); margin: var(--cb-sp-6) 0; font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); }
blockquote p { margin: var(--cb-sp-1) 0; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin: var(--cb-sp-6) 0; border-top: var(--docs-hairline) solid var(--cb-ink); border-bottom: var(--docs-hairline) solid var(--cb-border); background: var(--cb-surface); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); }
th, td { padding: var(--cb-sp-4); vertical-align: top; min-width: calc(var(--cb-sp-16) * 2); border-bottom: var(--docs-hairline) solid var(--cb-border); }
th { font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub-strong); background: var(--cb-bg); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--cb-ink); font-weight: 500; }
.cell-label { display: none; }
code { font-family: var(--cb-font-mono); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); font-weight: 400; background: var(--cb-hover); padding: var(--cb-sp-1); word-break: break-word; }
pre { background: var(--cb-bg); border: var(--docs-hairline) solid var(--cb-border); padding: var(--cb-sp-5); overflow: auto; }
pre code { padding: 0; background: none; }

/* photos and figures — never wider than the column, and in the wide view never wider than 1120px or 75% of the window's height */
figure { margin: var(--cb-sp-8) 0; max-width: var(--docs-visual-width); }
figure .shot { display: block; max-width: 100%; border: var(--docs-hairline) solid var(--cb-border); padding: 0; overflow: hidden; cursor: zoom-in; background: var(--cb-surface); }
figure .shot:hover { border-color: var(--cb-border-strong); }
figure img { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; }
figure .clip { display: block; width: fit-content; max-width: 100%; border: var(--docs-hairline) solid var(--cb-border); background: var(--cb-surface); }
figure video { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; }
figcaption { display: flex; justify-content: space-between; gap: var(--cb-sp-4); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); color: var(--cb-sub); margin-top: var(--cb-sp-4); text-align: left; }
.gap-box { display: grid; place-items: center; min-height: 160px; padding: var(--cb-sp-6); border: var(--docs-hairline) dashed var(--cb-border-strong); background: var(--cb-bg); color: var(--cb-sub); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); text-align: center; }

.page-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cb-sp-6); border-top: var(--docs-hairline) solid var(--cb-border); padding-top: var(--cb-sp-6); margin-top: var(--cb-sp-12); }
.page-pager a { min-width: 0; padding: var(--cb-sp-4); border: var(--docs-hairline) solid var(--cb-border); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); text-decoration: none; display: flex; flex-direction: column; gap: var(--cb-sp-2); }
.page-pager .pager-next { grid-column: 2; text-align: right; }
.page-pager a:hover { background: var(--cb-hover); border-color: var(--cb-border-strong); }
.pager-direction, .pager-group { font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); }
.pager-title { font-weight: 500; color: var(--cb-ink); }

.toc { position: sticky; top: calc(var(--docs-header) + var(--cb-sp-12)); align-self: start; max-height: calc(100vh - var(--docs-header) - var(--cb-sp-16)); overflow: auto; }
.toc p { font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); font-weight: 600; color: var(--cb-ink); margin: 0 0 var(--cb-sp-4); }
.toc a { display: block; padding: var(--cb-sp-2) 0 var(--cb-sp-2) var(--cb-sp-4); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); border-left: var(--docs-hairline) solid var(--cb-border); color: var(--cb-sub); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { color: var(--cb-ink); border-color: var(--cb-ink); }
.toc a[aria-current] { font-weight: 600; }
.toc:not(:has(a)) { visibility: hidden; }
.loading { color: var(--cb-sub); font-size: var(--cb-fs-body); }

/* ------------------------------------------------------------------ release notes */
.note { margin-top: var(--cb-sp-12); }
.doc .note > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cb-sp-4); margin-top: 0; }
.note-date { font-family: var(--cb-font-mono); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); font-weight: 400; color: var(--cb-sub); letter-spacing: 0; }
.doc .note-items { list-style: none; padding: 0; margin: 0; }
.doc .note-items > li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--cb-sp-4); padding: var(--cb-sp-4) 0; margin: 0; border-bottom: var(--docs-hairline) solid var(--cb-border-soft); }
.doc .note-items > li:last-child { border-bottom: 0; }
.note-items p { margin: 0; }
.kind { align-self: start; justify-self: start; padding: 0 var(--cb-sp-2); border: var(--docs-hairline) solid var(--cb-border); background: var(--cb-bg); font-size: var(--cb-fs-label); line-height: calc(var(--cb-lh-label) + 4px); font-weight: 600; color: var(--cb-sub-strong); white-space: nowrap; }
.kind-new { color: var(--cb-ok); border-color: var(--cb-ok-border); background: var(--cb-ok-bg); }
.kind-fixed { color: var(--cb-ink); }
.doc .note-meta { margin-top: var(--cb-sp-2); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); color: var(--cb-sub); }
.empty { color: var(--cb-sub); }

/* ------------------------------------------------------------------ API docs (Scalar draws under the header, full width) */
.api-wrap { display: none; padding-top: var(--docs-header); min-height: 100vh; }
body[data-section="api"] .api-wrap { display: block; }
body[data-section="api"] .sidebar, body[data-section="api"] .layout, body[data-section="api"] #menu-toggle, body[data-section="api"] .header-search, body[data-section="api"] #print-button { display: none !important; }
.api-none { margin: 0; padding: var(--cb-sp-12) var(--cb-sp-8); color: var(--cb-sub); font-size: var(--cb-fs-body); }

/* ------------------------------------------------------------------ whole-screen state (sign in · a step in the app · nothing yet · error) */
body[data-section="state"] .sidebar, body[data-section="state"] .layout, body[data-section="state"] .header-search, body[data-section="state"] #print-button, body[data-section="state"] #menu-toggle, body[data-section="state"] .sections, body[data-section="state"] .version { display: none !important; }
.state { max-width: 560px; margin: 0 auto; padding: calc(var(--docs-header) + var(--cb-sp-24)) var(--cb-sp-5) var(--cb-sp-16); text-align: center; }
.state h1 { font-size: var(--cb-fs-h3); line-height: var(--cb-lh-h3); font-weight: 600; margin: 0 0 var(--cb-sp-4); }
.state p { margin: 0 0 var(--cb-sp-8); color: var(--cb-sub-strong); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); }
.state a, .state button { display: inline-flex; align-items: center; min-height: var(--cb-touch-target); padding: var(--cb-sp-2) var(--cb-sp-6); border: var(--docs-hairline) solid var(--cb-ink); background: var(--cb-ink); color: var(--cb-on-ink); font-size: var(--cb-fs-body); text-decoration: none; }
.state a:hover, .state button:hover { background: var(--cb-ink-hover); color: var(--cb-on-ink); }
.doc .state { padding-top: var(--cb-sp-12); }

/* ------------------------------------------------------------------ dialogs: search · photo zoom */
dialog { color: var(--cb-text); background: var(--cb-surface); border: var(--docs-hairline) solid var(--cb-border-strong); border-radius: var(--cb-r-lg); box-shadow: var(--cb-shadow-popover); }
dialog::backdrop { background: var(--cb-nav-backdrop); backdrop-filter: var(--cb-backdrop-blur); }
#search-dialog { padding: 0; width: min(var(--docs-dialog-width), calc(100vw - var(--cb-sp-8))); max-height: min(var(--docs-dialog-height), calc(100dvh - var(--cb-sp-16))); margin: 9vh auto auto; overflow: hidden; }
#search-dialog[open] { display: flex; flex-direction: column; }
.search-head { display: flex; gap: var(--cb-sp-4); padding: var(--cb-sp-6) var(--cb-sp-6) var(--cb-sp-4); align-items: center; justify-content: space-between; flex-shrink: 0; }
.search-head h2 { font-size: var(--cb-fs-section); line-height: var(--cb-lh-section); margin: 0; padding: 0; border: 0; color: var(--cb-ink); }
.search-input-wrap { padding: 0 var(--cb-sp-6) var(--cb-sp-4); border-bottom: var(--docs-hairline) solid var(--cb-border); flex-shrink: 0; }
#search { width: 100%; border: var(--docs-hairline) solid var(--cb-border-strong); border-radius: var(--cb-r-md); font-size: var(--cb-fs-section); line-height: var(--cb-lh-section); padding: var(--cb-sp-3) var(--cb-sp-4); background: var(--cb-surface); color: var(--cb-ink); }
#search::placeholder { color: var(--cb-faint); }
.search-status { margin: var(--cb-sp-3) 0 0; font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); color: var(--cb-sub); min-height: var(--cb-lh-body); }
.search-content { padding: var(--cb-sp-2) var(--cb-sp-3) var(--cb-sp-4); overflow: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.search-result { display: block; padding: var(--cb-sp-4) var(--cb-sp-3); color: var(--cb-text); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); text-decoration: none; border-bottom: var(--docs-hairline) solid var(--cb-border-soft); }
.search-result:hover, .search-result:focus-visible, .search-result[aria-selected="true"] { background: var(--cb-hover); text-decoration: none; }
.result-group { display: block; font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); margin-bottom: var(--cb-sp-2); }
.search-result strong { display: block; font-weight: 600; color: var(--cb-ink); }
.search-result small { display: block; color: var(--cb-sub-strong); font-size: var(--cb-fs-label); line-height: var(--cb-lh-body); margin-top: var(--cb-sp-2); }
mark { background: var(--cb-selected-bg); color: var(--cb-ink); text-decoration: underline; text-underline-offset: .2em; }
.search-empty { padding: var(--cb-sp-6) var(--cb-sp-3); color: var(--cb-sub); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); }
.search-empty p { margin: 0 0 var(--cb-sp-3); }
.suggestion { font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); padding: var(--cb-sp-2) var(--cb-sp-3); border: var(--docs-hairline) solid var(--cb-border); background: var(--cb-bg); color: var(--cb-text); margin: var(--cb-sp-1); }
.suggestion:hover { border-color: var(--cb-border-strong); color: var(--cb-ink); }
.search-help { margin: 0; padding: var(--cb-sp-3) var(--cb-sp-6); background: var(--cb-bg); border-top: var(--docs-hairline) solid var(--cb-border); color: var(--cb-sub); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); flex-shrink: 0; }
#zoom { padding: var(--cb-sp-5); max-width: 96vw; max-height: 96dvh; }
.zoom-head { display: flex; gap: var(--cb-sp-6); align-items: center; justify-content: space-between; font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); margin-bottom: var(--cb-sp-4); }
.zoom-head p { margin: 0; }
.zoom-actions { display: flex; gap: var(--cb-sp-2); flex-shrink: 0; }
.zoom-body { overflow: auto; max-height: calc(94dvh - var(--cb-sp-24)); }
.zoom-body img { display: block; width: 90vw; height: auto; }
.zoom-body img.actual-size { width: auto; max-width: none; }

/* ------------------------------------------------------------------ narrower windows */
@media (max-width: 1250px) {
  .layout, :root[data-width="wide"] .layout { grid-template-columns: minmax(0, var(--docs-reading-width)); padding-left: var(--cb-sp-8); padding-right: var(--cb-sp-8); }
  :root[data-width="wide"] .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1100px) {
  .version { display: none; }
  .header-search { width: auto; min-width: var(--cb-sp-24); }
  #print-button span { display: none; }
}
@media (max-width: 900px) {
  .site-header { gap: var(--cb-sp-3); padding: 0 var(--cb-sp-5); }
  .sections { gap: var(--cb-sp-4); padding-left: var(--cb-sp-4); }
  .header-search span { display: none; }
}
@media (max-width: 800px) {
  .site-header { padding: 0 var(--cb-sp-4); gap: var(--cb-sp-3); }
  .brand img.logo-full { display: none; }
  .brand img.logo-wordmark { display: block; width: var(--docs-wordmark-width); }
  .site-header > .sections, .views, #print-button, .header-search kbd { display: none; }
  .sections-mobile { display: flex; margin: 0 0 var(--cb-sp-5); padding: 0 0 var(--cb-sp-1); border-left: 0; border-bottom: var(--docs-hairline) solid var(--cb-border); gap: var(--cb-sp-5); }
  .sections-mobile a { min-height: var(--cb-touch-target); }
  .header-search { min-width: 0; width: auto; min-height: var(--cb-touch-target); padding: var(--cb-sp-2); }
  #menu-toggle { display: inline-flex; min-height: var(--cb-touch-target); width: var(--cb-touch-target); padding: var(--cb-sp-2); border: 0; }
  .icon-button { min-height: var(--cb-touch-target); width: var(--cb-touch-target); }
  .sidebar { width: min(var(--docs-menu-width), 86vw); visibility: hidden; transform: translateX(-100%); }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { visibility: visible; transform: none; }
  body.menu-open .mobile-shade { display: block; position: fixed; inset: var(--docs-header) 0 0; background: var(--cb-nav-backdrop); backdrop-filter: var(--cb-backdrop-blur); z-index: 14; }
  #document-nav a, .current-document { min-height: var(--cb-touch-target); }
  .layout, :root[data-width="wide"] .layout { --docs-top-space: var(--cb-sp-8); margin-left: 0; padding: calc(var(--docs-header) + var(--docs-top-space)) var(--cb-sp-4) var(--cb-sp-8); display: block; }
  .doc { min-height: 75vh; }
  .doc h1 { font-size: var(--cb-fs-h2); line-height: var(--cb-lh-h2); }
  .doc h1 + p { font-size: var(--cb-fs-section); line-height: var(--cb-lh-section); }
  .doc h2 { font-size: var(--cb-fs-h4); line-height: var(--cb-lh-h4); margin-top: var(--cb-sp-8); }
  .doc h3 { font-size: var(--cb-fs-h5); line-height: var(--cb-lh-h5); }
  .page-pager { gap: var(--cb-sp-3); }
  .page-pager a { padding: var(--cb-sp-3); }
  th, td { padding: var(--cb-sp-3); }
  .zoom-head { flex-wrap: wrap; gap: var(--cb-sp-3); }
  .zoom-actions { margin-left: auto; }
  #search-dialog { margin: var(--cb-sp-4) auto auto; max-height: calc(100dvh - var(--cb-sp-8)); }
  .search-head { padding: var(--cb-sp-4); }
  .search-input-wrap { padding: 0 var(--cb-sp-4) var(--cb-sp-4); }
  .search-help { padding: var(--cb-sp-3) var(--cb-sp-4); }
  figcaption { flex-direction: column; gap: var(--cb-sp-1); }
  .doc .note-items > li { grid-template-columns: minmax(0, 1fr); gap: var(--cb-sp-2); }
  .api-none { padding: var(--cb-sp-8) var(--cb-sp-4); }
  /* on a phone the API docs keep the menu, holding only the section tabs, so the guide and the notes stay one tap away */
  body[data-section="api"] #menu-toggle { display: inline-flex !important; }
  body[data-section="api"] .sidebar { display: block !important; bottom: auto; }
  body[data-section="api"] .sidebar-top > :not(.sections-mobile), body[data-section="api"] .nav-scroll { display: none; }
}
@media (max-width: 420px) {
  #language { max-width: 84px; }
}
/* a table in a narrow column turns into one card per row, each cell with its column name */
@container guide (max-width: 600px) {
  .entry-table-wrap { overflow: visible; border-bottom: 0; }
  .entry-table, .entry-table tbody { display: block; }
  .entry-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .entry-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--cb-sp-3); padding: var(--cb-sp-5) 0; border-bottom: var(--docs-hairline) solid var(--cb-border); }
  .entry-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .entry-table td:first-child { font-size: var(--cb-fs-section); line-height: var(--cb-lh-section); font-weight: 600; }
  .entry-table .cell-label { display: inline-block; margin-right: var(--cb-sp-3); font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); color: var(--cb-sub); font-weight: 400; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ print (A4) */
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: var(--cb-surface); color: var(--cb-ink); font-size: var(--cb-fs-body); line-height: var(--cb-lh-body); }  /* docs.js prints in the light theme */
  .site-header, .sidebar, .toc, .page-pager, dialog, .mobile-shade, .skip, .api-wrap, .breadcrumbs { display: none !important; }
  .layout { display: block; margin: 0; padding: 0; }
  .doc { padding: 0; min-height: 0; container-type: normal; }
  .doc h1 { font-size: var(--cb-fs-h1); line-height: var(--cb-lh-h1); }
  .doc h2 { font-size: var(--cb-fs-h4); line-height: var(--cb-lh-h4); break-after: avoid; margin-top: var(--cb-sp-8); }
  p, li { orphans: 3; widows: 3; }
  .table-scroll { overflow: visible; }
  table { font-size: var(--cb-fs-label); line-height: var(--cb-lh-label); }
  th, td { min-width: 0; padding: var(--cb-sp-2); }
  tr, figure { break-inside: avoid; }
  figure img { max-height: 120mm; object-fit: contain; }
  a { color: inherit; text-decoration: none; }
}
