@font-face { font-family: 'Geist'; src: url('/docs/assets/geist-variable.5c5588027e59.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/docs/assets/geistmono-variable.cf5bf55f69e0.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Same design system as the dashboard and checkbox.site (apps/dashboard/src/styles.css, docs/DESIGN.md):
   dark-first neutrals, hairline borders, one green accent, Geist Sans + Geist Mono (the @font-face rules are
   prepended by site.ts with the hashed font URLs). light-dark() tokens; <html data-theme> pins a theme. */
:root {
  color-scheme: dark light;
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --bg: light-dark(#fafafa, #0a0a0a);
  --bg-side: light-dark(#fafafa, #0a0a0a);
  --surface: light-dark(#ffffff, #111111);
  --surface-2: light-dark(#f5f5f5, #171717);
  --surface-hover: light-dark(#f0f0f0, #1c1c1c);
  --sunken: light-dark(#f5f5f5, #0d0d0d);
  --border: light-dark(#e5e5e5, #262626);
  --border-subtle: light-dark(#eeeeee, #1d1d1d);
  --border-strong: light-dark(#d4d4d4, #383838);
  --text: light-dark(#171717, #ededed);
  --text-muted: light-dark(#5c5c5c, #a1a1a1);
  --text-faint: light-dark(#6b6b6b, #8a8a8a);
  --brand: #3ecf8e;
  --brand-hover: #5ad9a1;
  --brand-fg: #03170d;
  --accent: light-dark(#15803d, #3ecf8e);
  --accent-soft: light-dark(rgba(21, 128, 61, 0.08), rgba(62, 207, 142, 0.1));
  --focus: light-dark(#16a34a, #3ecf8e);
  --code-bg: light-dark(#f5f5f5, #0d0d0d);
  --code-head: light-dark(#ffffff, #111111);
  --code-text: light-dark(#171717, #ededed);
  --code-muted: light-dark(#5c5c5c, #a1a1a1);
  --t-key: light-dark(#0060d1, #52a8ff);
  --t-str: light-dark(#15803d, #3ecf8e);
  --t-num: light-dark(#a35200, #ffb224);
  --t-com: light-dark(#6b6b6b, #858585);
  --t-attr: light-dark(#8e3fbf, #c792ea);
  --t-add: light-dark(#15803d, #3ecf8e);
  --t-del: light-dark(#c62828, #ff6166);
  --note-bg: light-dark(#eff6ff, rgba(82, 168, 255, 0.08)); --note-border: light-dark(#c6dcfa, rgba(82, 168, 255, 0.3)); --note-fg: light-dark(#0060d1, #52a8ff);
  --tip-bg: light-dark(#effbf3, rgba(62, 207, 142, 0.08)); --tip-border: light-dark(#b9e8c9, rgba(62, 207, 142, 0.3)); --tip-fg: light-dark(#15803d, #3ecf8e);
  --warn-bg: light-dark(#fff8eb, rgba(255, 178, 36, 0.08)); --warn-border: light-dark(#f6d9a6, rgba(255, 178, 36, 0.3)); --warn-fg: light-dark(#a35200, #ffb224);
  --legal-bg: light-dark(#f5f5f5, #141414); --legal-border: light-dark(#e5e5e5, #2a2a2a); --legal-fg: light-dark(#5c5c5c, #a1a1a1);
  --shadow-lg: 0 0 0 1px var(--border), 0 16px 40px -8px light-dark(rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.7));
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 56px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: color .16s var(--ease), text-decoration-color .16s var(--ease); }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Header */
.top { position: sticky; top: 0; z-index: 20; height: var(--header-h); display: flex; align-items: center; gap: 16px;
  padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; font-size: 15px; }
.brand:hover { color: var(--text); }
.brand svg rect { fill: var(--brand); }
.brand svg path { stroke: var(--brand-fg); }
.brand .docs-word { color: var(--text-faint); font-weight: 400; display: inline-flex; align-items: center; gap: 8px; }
.brand .docs-word::before { content: '/'; color: var(--border-strong); }
.search { position: relative; flex: 1; max-width: 360px; margin-left: 16px; }
.search input { width: 100%; height: 34px; padding: 0 40px 0 34px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.search input::placeholder { color: var(--text-faint); }
.search input:hover { border-color: var(--border-strong); }
.search input:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search svg { position: absolute; left: 11px; top: 9px; color: var(--text-faint); pointer-events: none; }
.search kbd { position: absolute; right: 8px; top: 7px; font: 11px/18px var(--font-mono); color: var(--text-faint); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
.results { position: absolute; top: 42px; left: 0; right: 0; min-width: 340px; max-height: 70vh; overflow: auto; background: var(--surface);
  border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; margin: 0; list-style: none; }
.results[hidden] { display: none; }
.results a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.results a[aria-selected="true"], .results a:hover { background: var(--surface-hover); color: var(--text); }
.results .r-page { font: 11px var(--font-mono); color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.results .r-title { font-weight: 500; font-size: 14px; }
.results .r-snip { font-size: 13px; color: var(--text-muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .r-empty { padding: 10px; color: var(--text-muted); font-size: 14px; }
.top-links { display: flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.top-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 500; height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--radius-sm); }
.top-links a:hover { color: var(--text); background: var(--surface-hover); }
.top-links a.cta { background: var(--brand); color: var(--brand-fg); padding: 0 12px; height: 28px; margin-left: 8px; }
.top-links a.cta:hover { background: var(--brand-hover); color: var(--brand-fg); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-size: 13px; padding: 0 8px; }
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; border: 1px solid var(--border-strong); color: var(--text); }

/* Three columns */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr) 232px; max-width: 1440px; margin: 0 auto; }
.layout.wide { grid-template-columns: 264px minmax(0, 1fr); }
.side { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 24px 16px 48px 24px;
  border-right: 1px solid var(--border); background: var(--bg-side); scrollbar-width: thin; }
.side h2 { font: 500 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 24px 0 8px 8px; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { position: relative; display: block; padding: 5px 8px; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-size: 14px; line-height: 1.45; }
.side a:hover { background: var(--surface-hover); color: var(--text); }
.side a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.side a[aria-current="page"]::before { content: ''; position: absolute; left: -9px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--brand); }
.main { min-width: 0; padding: 40px 56px 96px; }
.main > .content { max-width: 760px; }
.layout.wide .main > .content { max-width: 1180px; }
.toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 40px 24px 40px 8px; font-size: 13px; }
.toc h2 { font: 500 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 0 0 12px; }
.toc ul { list-style: none; padding: 0 0 0 12px; margin: 0; border-left: 1px solid var(--border); }
.toc li.d3 { padding-left: 12px; }
.toc a { position: relative; display: block; padding: 4px 0; color: var(--text-muted); text-decoration: none; line-height: 1.45; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); }
.toc a.active::before { content: ''; position: absolute; left: -13px; top: 6px; bottom: 6px; width: 1px; background: var(--brand); }
.toc li.d3 a.active::before { left: -25px; }

/* Content */
.breadcrumb { font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 12px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: clamp(1.9rem, 2.4vw + 0.8rem, 2.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 12px; text-wrap: balance; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-muted); margin: 0 0 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.page-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.page-actions a, .page-actions button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; transition: color .16s var(--ease), border-color .16s var(--ease); }
.page-actions a:hover, .page-actions button:hover { border-color: var(--border-strong); color: var(--text); }
.content h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; margin: 48px 0 12px; padding-top: 4px; line-height: 1.25; }
.content h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 32px 0 8px; line-height: 1.35; }
.content h4 { font-size: 15px; font-weight: 600; margin: 24px 0 6px; }
.content h2 .anchor, .content h3 .anchor, .content h4 .anchor { float: left; margin-left: -1.1em; width: 1em; color: var(--text-faint); text-decoration: none; opacity: 0; transition: opacity .16s var(--ease); }
.content h2:hover .anchor, .content h3:hover .anchor, .content h4:hover .anchor { opacity: 1; }
.content p, .content ul, .content ol { margin: 0 0 16px; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 6px 0; }
.content li::marker { color: var(--text-faint); }
.content li > ul, .content li > ol { margin: 6px 0 0; }
.content strong { font-weight: 600; }
.content code { font: 0.86em var(--font-mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.content blockquote { margin: 0 0 16px; padding: 2px 16px; border-left: 2px solid var(--border-strong); color: var(--text-muted); }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.content img { max-width: 100%; }
.content details { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; background: var(--surface); }
.content summary { cursor: pointer; font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.content table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
.content th, .content td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.content th { background: var(--surface-2); font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); white-space: nowrap; }
.content tr:last-child td { border-bottom: 0; }
.content td code { white-space: nowrap; }
.callout { position: relative; margin: 0 0 20px; padding: 12px 16px 12px 16px; border-radius: var(--radius); border: 1px solid var(--note-border); background: var(--note-bg); font-size: 14px; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font: 500 11px/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px !important; color: var(--note-fg); }
.callout-tip { background: var(--tip-bg); border-color: var(--tip-border); }
.callout-tip .callout-title { color: var(--tip-fg); }
.callout-warning { background: var(--warn-bg); border-color: var(--warn-border); }
.callout-warning .callout-title { color: var(--warn-fg); }
.callout-legal { background: var(--legal-bg); border-color: var(--legal-border); }
.callout-legal .callout-title { color: var(--legal-fg); }
.callout-agent { background: var(--accent-soft); border-color: var(--tip-border); }
.callout-agent .callout-title { color: var(--tip-fg); }

/* Code */
.code, .tabs { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; background: var(--code-bg); border: 1px solid var(--border); }
.tabs .code { margin: 0; border: 0; border-radius: 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 4px 0 14px;
  background: var(--code-head); border-bottom: 1px solid var(--border); color: var(--code-muted); font: 12px var(--font-mono); }
.tabs > .code-head { padding-left: 6px; }
.code-label { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-head [role="tablist"] { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.code-head [role="tab"] { position: relative; background: none; border: 0; color: var(--code-muted); font: inherit; padding: 9px 10px; cursor: pointer; transition: color .16s var(--ease); }
.code-head [role="tab"]:hover { color: var(--code-text); }
.code-head [role="tab"][aria-selected="true"] { color: var(--code-text); }
.code-head [role="tab"][aria-selected="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 1px; background: var(--brand); }
.copy { flex: none; display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--code-muted); border: 0; border-radius: var(--radius-sm); font: 500 12px var(--font-sans); height: 28px; padding: 0 10px; cursor: pointer; transition: color .16s var(--ease), background-color .16s var(--ease); }
.copy::before { content: ''; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='14' height='14' rx='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='14' height='14' rx='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.copy:hover { color: var(--code-text); background: var(--surface-hover); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-text); font: 13px/1.65 var(--font-mono); tab-size: 2; }
.code pre code { background: none; border: 0; padding: 0; font: inherit; color: inherit; white-space: pre; }
.code[data-lang="text"] pre code, .code[data-lang="markdown"] pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-key { color: var(--t-key); } .t-str { color: var(--t-str); } .t-num { color: var(--t-num); } .t-com { color: var(--t-com); }
.t-attr { color: var(--t-attr); } .t-add { color: var(--t-add); } .t-del { color: var(--t-del); }

/* API reference rows: text left, code right */
.op { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.op-code { position: sticky; top: calc(var(--header-h) + 16px); }
.op-code .code pre { max-height: 460px; }
.op-text > p:first-child code { font-size: 0.92em; font-weight: 500; }
.op .table-wrap { font-size: 13px; }
.op td:last-child, .op th:last-child { width: 55%; }

/* Footer of a page */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 500; background: var(--surface); transition: border-color .16s var(--ease); }
.pager a:hover { border-color: var(--border-strong); color: var(--text); }
.pager .next { text-align: right; }
.pager small { display: block; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 2px; }
.page-foot { margin-top: 32px; font-size: 12px; line-height: 1.6; color: var(--text-faint); }
.page-foot a { color: var(--text-muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); padding: 8px 14px; border-radius: var(--radius); font-size: 13px; z-index: 50; }
.toast[hidden] { display: none; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 248px minmax(0, 1fr); }
  .toc { display: none; }
  .op { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .op-code { position: static; }
}
@media (max-width: 860px) {
  .top { padding: 0 16px; gap: 8px; }
  .menu-btn { display: inline-flex; order: 10; }
  .top-links .hide-sm, .search kbd { display: none; }
  .brand .docs-word { display: none; }
  .search { margin-left: 0; }
  .search input { padding-right: 12px; }
  .page-head { gap: 0; }
  .page-actions { margin-bottom: 20px; }
  .lead { font-size: 16px; }
  .layout, .layout.wide { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; height: auto; z-index: 15; border-right: 0; padding: 16px; }
  .side.open { display: block; }
  .main { padding: 28px 16px 64px; }
  .content h2 .anchor, .content h3 .anchor, .content h4 .anchor { display: none; }
  .results { min-width: 0; position: fixed; top: calc(var(--header-h) - 4px); left: 12px; right: 12px; }
}
@media (max-width: 520px) {
  .top-links .cta { display: none; }
  .search { max-width: none; }
  .pager { grid-template-columns: 1fr; }
}
@media print {
  :root { color-scheme: light; }
  .top, .side, .toc, .page-actions, .pager, .copy { display: none !important; }
  .layout { display: block; }
}
