/* Knowledge Base website (platform template kb_docs). The docs layout of datavisions.ai/docs, coloured by the
   workspace's theme: /_look/theme.css sets the theme's variables (light and dark, checked for contrast by the
   platform), and the names below map them onto this layout. The values here are only the fallback for a
   workspace with no theme at all. */

:root {
  --bg-page: #f5f5f3; --bg-surface: #ffffff; --bg-panel-header: #f0f0ee; --border: #d9d9d8;
  --text-primary: #16161a; --text-secondary: #55555c; --text-muted: #85858b;
  --accent: #3a5bc7; --accent-hover: #2f4ba6; --accent-contrast: #ffffff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-sans);
  --radius-card: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg-page: #121214; --bg-surface: #1c1c1f; --bg-panel-header: #232327; --border: #3a3a40;
  --text-primary: #f1f1f3; --text-secondary: #b4b4ba; --text-muted: #8a8a90;
  --accent: #8ea6ff; --accent-hover: #a3b6ff; --accent-contrast: #111111;
} }
:root[data-theme="dark"] {
  --bg-page: #121214; --bg-surface: #1c1c1f; --bg-panel-header: #232327; --border: #3a3a40;
  --text-primary: #f1f1f3; --text-secondary: #b4b4ba; --text-muted: #8a8a90;
  --accent: #8ea6ff; --accent-hover: #a3b6ff; --accent-contrast: #111111;
}

/* The layout's names, from the theme's */
:root {
  --paper: color-mix(in srgb, var(--bg-surface) 60%, var(--bg-page));
  --paper-2: var(--bg-page);
  --card: var(--bg-surface);
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --ink-3: var(--text-muted);
  --line: var(--border);
  --line-2: color-mix(in srgb, var(--border) 55%, var(--bg-surface));
  --tan: var(--accent);
  --tan-ink: var(--accent);
  --tan-soft: color-mix(in srgb, var(--accent) 13%, var(--bg-surface));
  --teal: var(--accent-secondary, var(--accent));
  --teal-soft: color-mix(in srgb, var(--teal) 9%, var(--bg-surface));
  --black: var(--text-primary);
  --black-2: color-mix(in srgb, var(--text-primary) 88%, var(--bg-surface));
  --on-black: var(--bg-surface);
  --on-black-2: color-mix(in srgb, var(--bg-surface) 68%, var(--text-primary));
  --btn-fg: var(--accent-contrast);
  --ok: #2f8a5d;
  --warn: #9a6a14;
  --sans: var(--font-sans);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  --r: var(--radius-card, 8px);
}
:root[data-theme="dark"] { color-scheme: dark; --black: var(--bg-panel-header); --black-2: color-mix(in srgb, var(--bg-panel-header) 80%, var(--text-primary)); --on-black: var(--text-primary); --on-black-2: var(--text-secondary); --teal: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; --black: var(--bg-panel-header); --black-2: color-mix(in srgb, var(--bg-panel-header) 80%, var(--text-primary)); --on-black: var(--text-primary); --on-black-2: var(--text-secondary); --teal: var(--accent); } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-heading, var(--sans)); margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font: 600 14.5px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn-black { background: var(--black); color: var(--on-black); border-color: var(--black); }
.btn-black:hover { background: var(--black-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--accent); color: var(--btn-fg); border-color: var(--accent); }
.btn-light:hover { background: var(--accent-hover); }

/* ---------- From the docs layout ---------- */
.docs { --dh: 60px; --dnav-w: 264px; --dtoc-w: 220px; --dmain-w: 720px; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
body.dnav-locked, body.ds-locked { overflow: hidden; }

/* ---------- Header ---------- */
.dh { position: sticky; top: 0; z-index: 60; height: var(--dh); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-2); }
.dh-in { height: 100%; display: flex; align-items: center; gap: 14px; padding: 0 20px; }
.dh-brand { display: flex; flex: none; }
.dh-brand img { height: 30px; width: auto; }
.dh-docs { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line); line-height: 22px; }
.dh-tabs { display: flex; gap: 2px; margin: 0 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dh-tabs a { white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-3); padding: 6px 11px; border-radius: 6px; }
.dh-tabs a:hover { color: var(--ink); background: var(--paper-2); }
.dh-tabs a.on { color: var(--ink); background: var(--paper-2); box-shadow: inset 0 -2px 0 var(--tan); border-radius: 6px 6px 0 0; }
.dh-right { display: flex; align-items: center; gap: 12px; flex: none; }
.dh-search { display: flex; align-items: center; gap: 8px; width: 210px; height: 34px; padding: 0 8px 0 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink-3); border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.dh-search:hover { border-color: var(--ink-3); }
.dh-search span { flex: 1; text-align: left; }
kbd { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--paper); }
.dh-signin { font-size: 14px; font-weight: 500; text-decoration: none; }
.dh-burger { display: none; width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; border-radius: 8px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.dh-burger span { width: 14px; height: 2px; background: var(--ink); }

/* ---------- Body columns ---------- */
.dbody { flex: 1; display: grid; grid-template-columns: var(--dnav-w) minmax(0, 1fr) var(--dtoc-w); gap: 0 48px; max-width: 1480px; width: 100%; margin: 0 auto; padding: 0 24px 0 0; }
.dbody--wide { grid-template-columns: var(--dnav-w) minmax(0, 1fr); }
.dbody--wide .dmain { max-width: 1080px; margin: 0 auto; padding-left: 8px; padding-right: 8px; }

/* Left: pages */
.dnav { position: sticky; top: var(--dh); height: calc(100vh - var(--dh)); overflow-y: auto; border-right: 1px solid var(--line-2); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dnav-in { padding: 22px 16px 48px 20px; }
.dnav-tabs { display: none; }
.dnav-group { margin-bottom: 20px; }
.dnav-group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.dnav-group summary::-webkit-details-marker { display: none; }
.dnav-caret { width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); margin-right: 6px; transition: transform .15s; }
details[open] > summary .dnav-caret { transform: rotate(45deg); }
.dnav-head { display: block; font-size: 13px; font-weight: 650; color: var(--ink); text-decoration: none; padding: 4px 8px; margin: 0 0 4px; }
.dnav-head.on { color: var(--tan-ink); }
.dnav ul { list-style: none; margin: 0; padding: 0; }
.dnav li a { display: block; font-size: 13.5px; line-height: 1.35; color: var(--ink-3); text-decoration: none; padding: 5px 8px; border-radius: 6px; }
.dnav li a:hover { color: var(--ink); background: var(--paper-2); }
.dnav li a.on { color: var(--ink); background: var(--tan-soft); font-weight: 550; }
.dnav-more { color: var(--teal) !important; }

/* Middle: the page */
.dmain { min-width: 0; max-width: var(--dmain-w); width: 100%; padding: 30px 0 64px; scroll-margin-top: var(--dh); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.dtitle { font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.dlede { margin-top: 12px; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.dtools { display: flex; align-items: center; gap: 14px; margin: 18px 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.tbtn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.tbtn:hover { border-color: var(--ink-3); color: var(--ink); }
.dtools-date { font-size: 12.5px; color: var(--ink-3); margin-left: auto; }
.pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--tan-ink); background: var(--tan-soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

/* Walkthrough video */
.dvideo { margin: 0 0 30px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.dvideo video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0d0c0a; }
.dvideo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 550; }
.dvideo-list { margin: 0; padding: 4px 8px 10px 34px; columns: 2; column-gap: 24px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); }
.dvideo-list li { break-inside: avoid; padding: 2px 0; }
.dvideo-list button { border: 0; background: none; padding: 3px 4px; font: inherit; color: var(--ink-2); text-align: left; cursor: pointer; border-radius: 4px; }
.dvideo-list button:hover { color: var(--ink); background: var(--paper-2); }
.dvideo-list button.on { color: var(--tan-ink); font-weight: 600; }

/* Article text */
.prose { font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 14px; }
.prose h2, .prose h3, .prose h4 { position: relative; scroll-margin-top: calc(var(--dh) + 16px); letter-spacing: -0.015em; }
.prose h2 { font-size: 24px; font-weight: 600; line-height: 1.25; margin-top: 44px; padding-top: 4px; }
.prose h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin-top: 30px; }
.prose h4 { font-size: 15.5px; font-weight: 650; margin-top: 22px; }
.prose .anchor { position: absolute; left: -22px; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: .7; }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--teal); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose ol > li::marker { font-weight: 650; color: var(--ink-3); }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 32px 0; }

.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prose a.doc-action { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--r); background: var(--black); color: var(--on-black); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.prose a.doc-action:hover { background: var(--black-2); }
.prose a.doc-action--show { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.prose a.doc-action--show:hover { border-color: var(--ink-3); background: var(--card); }
.doc-action small { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.doc-action span { opacity: .7; }

.doc-clip, .doc-shot { margin: 12px 0 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0d0c0a; cursor: zoom-in; }
.doc-clip video, .doc-shot img { display: block; width: 100%; height: auto; }
.doc-clip video { aspect-ratio: 16 / 9; object-fit: contain; }
.doc-shot { background: var(--card); }
.doc-clip figcaption, .doc-shot figcaption { font-size: 12px; color: var(--ink-3); background: var(--card); padding: 7px 12px; border-top: 1px solid var(--line-2); }
figure.big { position: fixed; inset: 4vh 4vw; z-index: 80; margin: 0; display: flex; flex-direction: column; justify-content: center; cursor: zoom-out; box-shadow: 0 0 0 100vmax rgba(18,17,14,.72); }
figure.big video, figure.big img { flex: 1; min-height: 0; object-fit: contain; aspect-ratio: auto; }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--teal); background: var(--teal-soft); border-radius: 8px; padding: 12px 16px; font-size: 14.5px; }
.callout > * + * { margin-top: 8px; }
.callout--tip { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.callout--warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--card)); }

.doc-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.doc-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-2); background: var(--paper-2); }
.doc-table th, .doc-table td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }

.doc-code { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #15140f; }
.doc-code-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; font-family: var(--mono); font-size: 11.5px; color: #b4ad9d; border-bottom: 1px solid #2a2820; }
.doc-code-bar button { border: 0; background: none; color: #b4ad9d; font: inherit; cursor: pointer; }
.doc-code-bar button:hover { color: #fff; }
.doc-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.prose .doc-code code { background: none; border: 0; padding: 0; color: #f3efe6; font-size: 13px; line-height: 1.6; }

/* Section pages */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 28px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.card-t { font-weight: 600; font-size: 15.5px; line-height: 1.3; letter-spacing: -0.01em; }
.card-s { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); flex: 1; }
.card-go { font-size: 12.5px; font-weight: 600; color: var(--tan-ink); margin-top: 6px; }
.subsec { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.subsec-h { display: flex; align-items: center; gap: 12px; }
.subsec h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; scroll-margin-top: calc(var(--dh) + 16px); }
.subsec h2 a { text-decoration: none; }
.subsec h2 a:hover { color: var(--tan-ink); }
.subsec-s { color: var(--ink-3); font-size: 14.5px; margin-top: 6px; max-width: 70ch; }
.linklist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.linklist a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; font-size: 14.5px; font-weight: 550; }
.linklist a:hover span { color: var(--tan-ink); }
.linklist small { font-size: 13px; font-weight: 400; color: var(--ink-3); line-height: 1.45; }

.related { margin-top: 44px; }
.related h2 { font-size: 18px; font-weight: 600; }

/* Previous / next */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pn a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--card); }
.pn a:hover { border-color: var(--ink-3); }
.pn small { font-size: 12px; color: var(--ink-3); }
.pn span { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.pn-next { text-align: right; }
.dhelp { margin-top: 22px; font-size: 13.5px; color: var(--ink-3); }
.dhelp a { color: var(--teal); }

/* Right: on this page */
.dtoc { position: sticky; top: var(--dh); height: calc(100vh - var(--dh)); overflow-y: auto; }
.dtoc-in { padding: 34px 0 32px; }
.dtoc-title { font-size: 12.5px; font-weight: 650; color: var(--ink); margin-bottom: 8px; }
.dtoc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.dtoc li a { display: block; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); text-decoration: none; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; }
.dtoc li.d3 a { padding-left: 24px; }
.dtoc li a:hover { color: var(--ink); }
.dtoc li a.on { color: var(--ink); border-left-color: var(--tan); font-weight: 550; }
.dtoc-foot { display: grid; gap: 6px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.dtoc-foot a { font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.dtoc-foot a:hover { color: var(--ink); }

/* Footer */
.dfoot { border-top: 1px solid var(--line-2); }
.dfoot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 18px 24px; font-size: 13px; color: var(--ink-3); max-width: 1480px; margin: 0 auto; }
.dfoot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.dfoot a { color: var(--ink-3); text-decoration: none; }
.dfoot a:hover { color: var(--ink); }

/* ---------- Overview ---------- */
.ohero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 40px 32px 40px 36px; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tan-ink); margin-bottom: 12px; }
.ohero h1 { font-size: clamp(34px, 4vw, 50px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.ohero h1 .hl { color: var(--ink-3); }
.ohero-lede { margin-top: 16px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.ohero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ohero-btns .btn, .btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.ohero-panel { background: var(--black); color: var(--on-black); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(0,0,0,.45); }
.ohero-panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; font-family: var(--mono); font-size: 11.5px; color: var(--on-black-2); border-bottom: 1px solid color-mix(in srgb, var(--on-black) 14%, transparent); }
.ohero-dots { display: flex; gap: 5px; }
.ohero-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--on-black) 22%, transparent); }
.ohero-panel ol { list-style: none; margin: 0; padding: 6px 0; }
.ohero-panel a { display: grid; grid-template-columns: 30px 1fr 16px; gap: 8px; align-items: baseline; padding: 11px 16px; text-decoration: none; font-size: 14px; line-height: 1.4; color: var(--on-black); }
.ohero-panel a:hover { background: var(--black-2); }
.ohero-panel .num { font-family: var(--mono); font-size: 11.5px; color: color-mix(in srgb, var(--accent) 55%, var(--on-black)); }
.ohero-panel .go { color: var(--on-black-2); }

.osec { margin-top: 56px; }
.osec-h { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.osec-s { margin-top: 6px; font-size: 14.5px; color: var(--ink-3); max-width: 64ch; }
.osec-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.osec-more { font-size: 14px; font-weight: 600; color: var(--tan-ink); text-decoration: none; white-space: nowrap; }
.osec-more:hover { text-decoration: underline; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tile { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper-2); }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tile-t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
a.tile-t:hover { color: var(--tan-ink); }
.tile-i { color: var(--ink-3); display: flex; }
.tile-s { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); min-height: 60px; }
.tile-rows { margin: 16px 0 18px; flex: 1; }
.tile-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tile-rows dt a { color: var(--ink-2); text-decoration: none; }
.tile-rows dt a:hover { color: var(--ink); text-decoration: underline; }
.tile-rows dd { margin: 0; color: var(--ink-3); white-space: nowrap; }
.tile-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tile-n { font-size: 12.5px; color: var(--ink-3); }
.tile--dark { background: var(--black); border-color: var(--black); color: var(--on-black); }
.tile--dark .tile-i, .tile--dark .tile-s { color: var(--on-black-2); }
.tile--dark .tile-s { flex: 1; }

.gl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.gl-i { display: flex; flex-direction: column; gap: 3px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; transition: border-color .15s; }
.gl-i:hover { border-color: var(--ink-3); }
.gl-t { font-size: 14px; font-weight: 600; }
.gl-s { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.osplit { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 20px; }
.osplit .linklist { grid-template-columns: 1fr; }

/* ---------- Search ---------- */
.ds { position: fixed; inset: 0; z-index: 90; background: rgba(18,17,14,.45); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.ds-panel { width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(18,17,14,.55); overflow: hidden; }
.ds-bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); }
.ds-bar input { flex: 1; height: 54px; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.ds-bar input::-webkit-search-cancel-button { display: none; }
.ds-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.ds-results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.ds-results li[aria-selected="true"] a, .ds-results a:hover { background: var(--paper-2); }
.ds-g { font-size: 11.5px; color: var(--tan-ink); font-weight: 600; }
.ds-t { font-size: 14.5px; font-weight: 600; }
.ds-s { font-size: 13px; color: var(--ink-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds mark { background: var(--tan-soft); color: inherit; border-radius: 2px; padding: 0 1px; }
.ds-empty { padding: 22px 14px; font-size: 14px; color: var(--ink-3); }
.ds-foot { display: flex; gap: 18px; padding: 9px 14px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); }
.ds-foot kbd { margin-right: 3px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1280px) {
  .dbody { grid-template-columns: var(--dnav-w) minmax(0, 1fr); }
  .dtoc { display: none; }
  .dh-tabs a { padding: 6px 8px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dh-tabs, .dh-signin { display: none; }
  .dh-right { margin-left: auto; }
  .dnav-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
  .dnav-tabs a { font-size: 13px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
  .dnav-tabs a.on { background: var(--black); border-color: var(--black); color: var(--on-black); }
}
@media (max-width: 860px) {
  .dh-burger { display: flex; }
  .dh-docs { display: none; }
  .dh-search { width: 36px; padding: 0; justify-content: center; }
  .dh-search span, .dh-search kbd { display: none; }
  .dbody, .dbody--wide { grid-template-columns: minmax(0, 1fr); padding: 0 18px; }
  .dnav { display: none; position: fixed; inset: var(--dh) 0 0 0; z-index: 55; height: auto; background: var(--paper); border-right: 0; }
  .dnav.open { display: block; }
  .ohero, .osplit { grid-template-columns: 1fr; }
  .ohero { padding: 28px 22px; }
  .tiles { grid-template-columns: 1fr; }
  .gl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dvideo-list { columns: 1; }
  .pn { grid-template-columns: 1fr; }
  .prose .anchor { display: none; }
}
@media (max-width: 520px) {
  .gl { grid-template-columns: 1fr; }
}

/* ---------- Template additions ---------- */
.dh-brand img { height: 30px; width: auto; max-width: 220px; object-fit: contain; }
.dh-brand--text { font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
.dh-mode { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink-3); cursor: pointer; }
.dh-mode:hover { color: var(--ink); border-color: var(--ink-3); }
.dh-mode .i-sun { display: none; }
:root[data-theme="dark"] .dh-mode .i-sun { display: block; }
:root[data-theme="dark"] .dh-mode .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dh-mode .i-sun { display: block; } :root:not([data-theme="light"]) .dh-mode .i-moon { display: none; } }
.dh-signin { color: var(--ink); }
a.tbtn { text-decoration: none; }
.ohero h1 { overflow-wrap: anywhere; }
.dmain--msg { margin: 0 auto; padding: 60px 24px; }
.dmsg { max-width: 560px; margin: 40px auto; }
.dcode { margin-top: 24px; display: grid; gap: 8px; }
.dcode label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dcode div { display: flex; gap: 10px; }
.dcode input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; }
.dcode input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dcode-err { color: #c0392b; font-size: 13.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
