:root {
  color-scheme: light;
  --page: #f5f7f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --ink: #17211f;
  --ink-strong: #0b1412;
  --muted: #65716e;
  --line: #dce3e1;
  --line-strong: #c8d2cf;
  --brand: #126b59;
  --brand-strong: #0b5143;
  --brand-soft: #e7f3ef;
  --blue: #275fba;
  --amber: #9a6414;
  --danger: #b34436;
  --code-bg: #101817;
  --code-ink: #e7f1ee;
  --header: #0d1715;
  --header-muted: #aebbb7;
  --shadow: 0 14px 34px rgba(22, 40, 35, 0.08);
  --header-height: 64px;
  --sidebar-width: 252px;
  --toc-width: 224px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111315;
  --surface: #181b1f;
  --surface-subtle: #20242a;
  --ink: #e1e5e9;
  --ink-strong: #f7f8f9;
  --muted: #9ca3ad;
  --line: #2d3239;
  --line-strong: #414852;
  --brand: #42c7a1;
  --brand-strong: #7be0c2;
  --brand-soft: #17372f;
  --blue: #75aaff;
  --amber: #efbd61;
  --danger: #f08b84;
  --code-bg: #0a0c0e;
  --code-ink: #edf1f3;
  --header: #0b0d0f;
  --header-muted: #a2a8af;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.72 "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; letter-spacing: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
a { color: var(--brand); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  width: min(1440px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(280px, 560px) 1fr;
  align-items: center;
  gap: 28px;
}
.brand-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f4faf8;
  text-decoration: none;
}
.brand-mark {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #d8f04b;
  color: #102019;
  font: 800 14px/1 "Avenir Next", sans-serif;
}
.brand-name { min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand-section { color: var(--header-muted); font-weight: 500; }
.search-wrap { position: relative; width: 100%; }
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 42px 0 38px;
  border: 1px solid #31403c;
  border-radius: 6px;
  outline: none;
  background: #17231f;
  color: #f2f8f6;
}
.search-input::placeholder { color: #91a19c; }
.search-input:focus { border-color: #83c9b7; box-shadow: 0 0 0 3px rgba(131, 201, 183, 0.15); }
.search-glyph { position: absolute; left: 13px; top: 9px; color: #91a19c; font-size: 15px; pointer-events: none; }
.search-results {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  display: none;
  max-height: min(460px, calc(100vh - 90px));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search-results.is-open { display: block; }
.search-result {
  display: block;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--surface-subtle); }
.search-result strong { display: block; color: var(--ink-strong); }
.search-result span { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.runtime-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d8e5e1;
  font-size: 13px;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #70d4a8; box-shadow: 0 0 0 3px rgba(112, 212, 168, 0.12); }
.version-chip { color: var(--header-muted); font-size: 12px; white-space: nowrap; }
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #31403c;
  border-radius: 6px;
  background: #17231f;
  color: #dfe9e6;
  cursor: pointer;
}
.icon-button:hover { border-color: #6b807a; }
.menu-button { display: none; }

.docs-layout {
  width: min(1440px, 100%);
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  gap: 36px;
  padding: 0 28px;
}
.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 28px 22px 40px 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}
.nav-section { margin: 0 0 12px; }
.nav-section-title {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 7px 10px 7px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.nav-section-title::-webkit-details-marker { display: none; }
.nav-section-title::after { content: '›'; color: var(--line-strong); font-size: 18px; line-height: 1; transform: rotate(0deg); transition: transform 140ms ease; }
.nav-section[open] > .nav-section-title::after { transform: rotate(90deg); }
.nav-tree { padding: 1px 0 4px; }
.nav-children {
  margin: -1px 0 5px 18px;
  padding: 0 0 2px 8px;
  border-left: 1px solid var(--line);
}
.nav-link.nav-link-child {
  min-height: 30px;
  padding: 5px 8px;
  margin: 0;
  border-left: 0;
  font-size: 12px;
}
.nav-link {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  margin: 2px 0;
  border-left: 2px solid transparent;
  border-radius: 0 5px 5px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.nav-link.nav-link-parent { color: var(--ink); font-weight: 650; }
.nav-link:hover { color: var(--ink-strong); background: var(--surface-subtle); }
.nav-link.active { color: var(--brand-strong); background: var(--brand-soft); border-left-color: var(--brand); font-weight: 700; }
.nav-code { font: 600 12px/1.4 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; color: var(--blue); }
.main-content { min-width: 0; padding: 42px 0 80px; }
.content-frame { width: min(830px, 100%); margin: 0 auto; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumb-separator { color: var(--line-strong); }
.page-kicker { margin: 0 0 12px; color: var(--brand); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.page-title { margin: 0; color: var(--ink-strong); font-size: 38px; line-height: 1.18; font-weight: 750; }
.page-lead { max-width: 720px; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.page-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.page-meta strong { color: var(--ink); }

.home-section { margin-top: 48px; }
.section-heading { margin: 0 0 18px; color: var(--ink-strong); font-size: 20px; line-height: 1.35; }
.quickstart-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr); gap: 18px; align-items: stretch; }
.code-window { overflow: hidden; border: 1px solid #24332f; border-radius: 7px; background: var(--code-bg); box-shadow: var(--shadow); }
.code-window-bar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 15px; border-bottom: 1px solid #26342f; color: #91a49e; font-size: 12px; }
.code-window pre { margin: 0; padding: 20px; overflow-x: auto; }
.code-window code { color: var(--code-ink); font: 13px/1.75 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; }
.copy-button { width: 30px; height: 28px; display: grid; place-items: center; border: 1px solid #33443f; border-radius: 5px; background: #17231f; color: #b8c8c3; cursor: pointer; }
.copy-button:hover { color: #ffffff; border-color: #61756f; }
.start-steps { padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.step { display: grid; grid-template-columns: 25px 1fr; gap: 10px; padding: 0 0 18px; }
.step:last-child { padding-bottom: 0; }
.step-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; font-weight: 800; }
.step strong { display: block; margin: 1px 0 3px; color: var(--ink-strong); font-size: 13px; }
.step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.guide-list { border-top: 1px solid var(--line); }
.guide-row { display: grid; grid-template-columns: 154px minmax(0, 1fr) auto; gap: 18px; align-items: center; min-height: 84px; padding: 15px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.guide-row:hover .guide-title { color: var(--brand); }
.guide-type { color: var(--brand); font-size: 12px; font-weight: 800; }
.guide-title { margin: 0 0 3px; color: var(--ink-strong); font-size: 15px; font-weight: 750; }
.guide-description { margin: 0; color: var(--muted); font-size: 13px; }
.guide-arrow { color: var(--line-strong); font-size: 20px; }
.endpoint-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.endpoint-table th, .endpoint-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.endpoint-table tr:last-child td { border-bottom: 0; }
.endpoint-table th { color: var(--muted); background: var(--surface-subtle); font-size: 11px; text-transform: uppercase; }
.method { display: inline-flex; width: 48px; justify-content: center; padding: 3px 5px; border-radius: 4px; font: 800 10px/1.4 "SFMono-Regular", monospace; }
.method-post { color: #075843; background: #dff3eb; }
.method-get { color: #1d4e8f; background: #e5effc; }
:root[data-theme="dark"] .method-post { color: #90e0c5; background: #173c31; }
:root[data-theme="dark"] .method-get { color: #a9c9ff; background: #1d3451; }
.endpoint-path { color: var(--ink-strong); font: 600 12px/1.5 "SFMono-Regular", "JetBrains Mono", monospace; word-break: break-word; }

.model-catalog-lead { max-width: 760px; color: var(--muted); font-size: 17px; }
.catalog-updated { color: var(--muted); font-size: 12px; }
.model-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 26px 0 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.model-summary-item {
  --modality-accent: var(--brand);
  position: relative;
  min-width: 0;
  min-height: 88px;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.model-summary-item:last-child { border-right: 0; }
.model-summary-item:hover { background: var(--surface); }
.model-summary-item.is-active { background: var(--surface); box-shadow: inset 0 -3px 0 var(--modality-accent); }
.model-summary-item[data-model-modality-shortcut="text"] { --modality-accent: #20a978; }
.model-summary-item[data-model-modality-shortcut="image"] { --modality-accent: #4f8ff7; }
.model-summary-item[data-model-modality-shortcut="video"] { --modality-accent: #e87952; }
.model-summary-item[data-model-modality-shortcut="audio"] { --modality-accent: #d3a12f; }
.model-summary-item[data-model-modality-shortcut="vector"] { --modality-accent: #8b95a5; }
.model-summary-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.model-summary-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--modality-accent); }
.model-summary-item strong { display: block; margin-top: 7px; color: var(--ink-strong); font-size: 17px; line-height: 1.25; }
.model-filters {
  padding: 17px 0 15px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.model-search-row { display: flex; align-items: center; gap: 10px; }
.model-search { min-width: 0; flex: 1; }
.model-search-control { position: relative; display: block; }
.model-search-icon { position: absolute; top: 50%; left: 14px; color: var(--muted); font-size: 17px; line-height: 1; transform: translateY(-50%); pointer-events: none; }
.model-filters input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  background: var(--surface);
  color: var(--ink-strong);
}
.model-filters input::placeholder { color: var(--muted); }
.model-filters input:focus, .model-filters select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.model-clear, .model-reset {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}
.model-clear { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; border-color: transparent; border-radius: 5px; background: transparent; font-size: 19px; }
.model-reset { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 6px; background: var(--surface); font-size: 18px; }
.model-clear:hover, .model-reset:hover { border-color: var(--line-strong); background: var(--surface-subtle); color: var(--ink-strong); }
.model-filter-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 13px; }
.model-filter-block { min-width: 420px; flex: 1; }
.model-filter-label, .model-filter-select > span { display: block; margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.model-filter-select { width: 158px; flex: 0 0 158px; }
.model-filter-select select { width: 100%; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: var(--surface); color: var(--ink); }
.model-segments { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.model-segments button {
  height: 30px;
  padding: 0 8px;
  white-space: nowrap;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.model-segments button:hover { color: var(--ink-strong); }
.model-segments button.is-active { background: var(--surface); color: var(--brand-strong); box-shadow: 0 1px 3px rgba(10, 18, 16, 0.12); }
.model-result-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0 9px; color: var(--muted); font-size: 12px; }
.model-result-meta strong { color: var(--ink-strong); }
.model-result-hint { text-align: right; }
.model-table-wrap { max-width: calc(100vw - var(--sidebar-width) - var(--toc-width) - 92px); }
.model-table { min-width: 1580px !important; }
.model-table th { position: sticky; top: 0; z-index: 1; }
.model-table th:nth-child(1) { width: 190px; }
.model-table th:nth-child(4) { width: 220px; }
.model-table th:nth-child(5) { width: 260px; }
.model-table th:nth-child(6) { width: 300px; }
.model-id-cell { display: flex; align-items: center; gap: 6px; }
.model-id-cell code { min-width: 0; word-break: break-all; }
.model-copy {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--muted);
  cursor: pointer;
}
.model-copy:hover { border-color: var(--brand); color: var(--brand); }
.model-note { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.model-endpoints code { display: inline-block; margin: 2px 0; }
.model-price-official { color: var(--muted); font-weight: 600; line-height: 1.55; }
.model-price { color: var(--ink-strong); font-weight: 650; line-height: 1.55; }
.model-source { display: block; margin-top: 5px; font-size: 11px; font-weight: 700; }
.model-source a { color: var(--brand); text-decoration: none; }
.model-source a:hover { text-decoration: underline; }
.model-status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.model-status-verified { color: #075843; background: #dff3eb; }
.model-status-visible { color: #1d4e8f; background: #e5effc; }
.model-status-degraded { color: #7a4c08; background: #fff0d1; }
:root[data-theme="dark"] .model-status-verified { color: #90e0c5; background: #173c31; }
:root[data-theme="dark"] .model-status-visible { color: #a9c9ff; background: #1d3451; }
:root[data-theme="dark"] .model-status-degraded { color: #f0c775; background: #443317; }
.model-empty { margin: 20px 0; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-subtle); }
.model-empty strong { color: var(--ink-strong); }
.model-empty p { margin: 4px 0 0; color: var(--muted); }
.status-definitions { border-top: 1px solid var(--line); }
.status-definitions > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.status-definitions p { margin: 0; color: var(--muted); font-size: 13px; }

.article { color: var(--ink); }
.article > h1:first-child { margin: 0 0 14px; color: var(--ink-strong); font-size: 36px; line-height: 1.22; }
.article h2 { margin: 52px 0 16px; padding-top: 4px; color: var(--ink-strong); font-size: 23px; line-height: 1.35; }
.article h3 { margin: 34px 0 12px; color: var(--ink-strong); font-size: 18px; line-height: 1.4; }
.article p { margin: 0 0 18px; }
.article > p:nth-child(2), .article > p:nth-child(3) { color: var(--muted); }
.article ul, .article ol { margin: 0 0 20px; padding-left: 24px; }
.article li { margin: 7px 0; }
.article strong { color: var(--ink-strong); }
.article a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article code:not(pre code) { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); color: var(--brand-strong); font: 600 0.88em/1.5 "SFMono-Regular", "JetBrains Mono", monospace; word-break: break-word; }
.code-block { position: relative; margin: 22px 0 26px; overflow: hidden; border: 1px solid #24332f; border-radius: 7px; background: var(--code-bg); box-shadow: 0 10px 24px rgba(10, 23, 19, 0.1); }
.code-block-header { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; border-bottom: 1px solid #26342f; color: #91a49e; font-size: 11px; text-transform: uppercase; }
.code-block pre { margin: 0; padding: 19px; overflow-x: auto; }
.code-block code { color: var(--code-ink); font: 12.5px/1.75 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; }
.table-wrap { margin: 22px 0 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.article table { width: 100%; border-collapse: collapse; min-width: 620px; }
.article th, .article td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article tr:last-child td { border-bottom: 0; }
.article th { color: var(--muted); background: var(--surface-subtle); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.article td { font-size: 13px; }
.article blockquote { margin: 22px 0; padding: 14px 18px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--ink); }
.article blockquote p:last-child { margin-bottom: 0; }
.video-doc-page .video-doc-layout {
  width: min(1660px, 100%);
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
.video-doc-page .toc { display: none; }
.video-doc-page .content-frame { width: min(1280px, calc(100% - 80px)); }
.video-doc-page .video-api-article,
.video-doc-page .doc-footer { width: min(980px, 100%); margin-left: auto; margin-right: auto; }
.video-showcase { margin: 14px 0 70px; color: var(--ink); }
.video-showcase-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 0 0 18px; }
.video-showcase-heading > div:first-child { max-width: 600px; }
.video-showcase-kicker { display: block; margin-bottom: 8px; color: #d56e48; font-size: 10px; font-weight: 900; letter-spacing: 0; }
.video-showcase-heading h1 { margin: 0; color: var(--ink-strong); font-size: 34px; line-height: 1.2; }
.video-showcase-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.video-showcase-tabs { min-width: 560px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.video-showcase-tabs button { min-width: 0; height: 52px; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.video-showcase-tabs button:hover { color: var(--ink-strong); }
.video-showcase-tabs button.is-active { background: var(--surface); color: var(--ink-strong); box-shadow: 0 1px 4px rgba(10, 18, 16, 0.14), inset 0 -3px 0 #e87952; }
.video-showcase-tabs button span { display: block; overflow: hidden; font: 700 11px/1.4 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.video-showcase-tabs button small { display: block; margin-top: 3px; color: inherit; font-size: 10px; }
.video-showcase-stage { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; border: 1px solid #29302f; border-radius: 7px; background: #050706; box-shadow: 0 24px 54px rgba(7, 14, 12, 0.2); }
.video-showcase-stage video { display: block; width: 100%; height: 100%; background: #050706; object-fit: contain; }
.video-showcase-overlay { position: absolute; left: 34px; bottom: 54px; max-width: min(620px, calc(100% - 68px)); color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9); pointer-events: none; }
.video-showcase-overlay span { display: block; margin-bottom: 7px; color: #dce8e5; font-size: 11px; font-weight: 800; }
.video-showcase-overlay strong { display: block; font: 800 30px/1.15 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; }
.video-showcase-overlay small { display: block; margin-top: 8px; color: #edf4f2; font-size: 13px; }
.video-showcase-facts { display: grid; grid-template-columns: 1fr 1.7fr 0.8fr 0.7fr; border-bottom: 1px solid var(--line); background: var(--surface); }
.video-showcase-facts > div { min-width: 0; padding: 15px 16px; border-right: 1px solid var(--line); }
.video-showcase-facts > div:last-child { border-right: 0; }
.video-showcase-facts span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.video-showcase-facts strong, .video-showcase-facts a { display: block; overflow-wrap: anywhere; color: var(--ink-strong); font-size: 12px; line-height: 1.45; }
.video-showcase-facts a { color: var(--brand); font-weight: 750; text-decoration: none; }
.video-showcase-evidence { display: grid; grid-template-columns: 1.15fr 0.85fr; border-bottom: 1px solid var(--line); }
.video-showcase-evidence > section { min-width: 0; padding: 20px 20px 22px; }
.video-showcase-evidence > section + section { border-left: 1px solid var(--line); }
.video-showcase-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.video-showcase-section-title span { display: block; margin-bottom: 3px; color: #d56e48; font-size: 9px; font-weight: 900; }
.video-showcase-section-title strong { display: block; color: var(--ink-strong); font-size: 13px; }
.video-showcase-section-title button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); color: var(--muted); cursor: pointer; }
.video-showcase-section-title button:hover { border-color: var(--brand); color: var(--brand); }
.video-showcase-evidence pre { min-height: 174px; max-height: 230px; margin: 0; padding: 15px; overflow: auto; border: 1px solid #26342f; border-radius: 6px; background: var(--code-bg); white-space: pre-wrap; }
.video-showcase-evidence code { color: var(--code-ink); font: 11px/1.65 "SFMono-Regular", "JetBrains Mono", Consolas, monospace; overflow-wrap: anywhere; }
.video-showcase-evidence section > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.video-demo { margin: 24px 0 30px; }
.video-demo video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line-strong); border-radius: 7px; background: #050706; object-fit: contain; }
.video-demo figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 11px 2px 0; color: var(--muted); font-size: 12px; }
.video-demo figcaption span { min-width: 0; }
.video-demo figcaption strong { display: block; margin-bottom: 2px; color: var(--ink-strong); font-size: 13px; }
.video-demo figcaption small { display: block; font-size: 12px; line-height: 1.5; }
.video-demo figcaption a { flex: 0 0 auto; font-weight: 700; }

.toc { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); padding: 42px 0 40px; overflow-y: auto; }
.toc-title { margin: 0 0 12px; color: var(--ink-strong); font-size: 12px; font-weight: 800; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.5; }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
.toc a.depth-3 { padding-left: 22px; }
.doc-footer { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sidebar-overlay { display: none; }

@media (max-width: 1120px) {
  :root { --toc-width: 0px; }
  .docs-layout { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .toc { display: none; }
  .model-filter-row { flex-wrap: wrap; }
  .model-filter-block { min-width: 100%; flex-basis: 100%; }
  .model-table-wrap { max-width: calc(100vw - var(--sidebar-width) - 72px); }
  .video-showcase-heading { display: block; }
  .video-showcase-tabs { min-width: 0; margin-top: 16px; }
}

@media (max-width: 820px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 16px; gap: 12px; }
  .brand-section, .runtime-status, .version-chip { display: none; }
  .search-input { height: 36px; }
  .menu-button { display: inline-grid; }
  .docs-layout { display: block; padding: 0 18px; }
  .sidebar { position: fixed; z-index: 70; top: var(--header-height); left: 0; width: min(310px, calc(100vw - 48px)); height: calc(100vh - var(--header-height)); padding: 24px 18px 40px; border-right: 1px solid var(--line); background: var(--surface); transform: translateX(-105%); transition: transform 180ms ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 60; inset: var(--header-height) 0 0; background: rgba(7, 14, 12, 0.45); }
  .sidebar-overlay.is-open { display: block; }
  .main-content { padding: 32px 0 64px; }
  .page-title, .article > h1:first-child { font-size: 31px; }
  .quickstart-grid { grid-template-columns: 1fr; }
  .guide-row { grid-template-columns: 100px minmax(0, 1fr) auto; }
  .model-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-summary-item { min-height: 80px; border-bottom: 1px solid var(--line); }
  .model-summary-item:nth-child(2n) { border-right: 0; }
  .model-summary-item:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .model-filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .model-filter-block { grid-column: 1 / -1; min-width: 0; }
  .model-filter-select { width: auto; min-width: 0; }
  .model-table-wrap { max-width: calc(100vw - 36px); }
  .video-doc-page .video-doc-layout { display: block; padding: 0 18px; }
  .video-doc-page .content-frame { width: 100%; }
  .video-showcase { margin-top: 8px; margin-bottom: 52px; }
  .video-showcase-heading h1 { font-size: 29px; }
  .video-showcase-stage { aspect-ratio: 16 / 9; }
  .video-showcase-overlay { left: 20px; bottom: 46px; max-width: calc(100% - 40px); }
  .video-showcase-overlay strong { font-size: 23px; }
  .video-showcase-facts { grid-template-columns: 1fr 1fr; }
  .video-showcase-facts > div:nth-child(2) { border-right: 0; }
  .video-showcase-facts > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .video-showcase-evidence { grid-template-columns: 1fr; }
  .video-showcase-evidence > section + section { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 560px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; }
  .brand-name { font-size: 0; }
  .brand-name::after { content: "API Docs"; font-size: 15px; }
  .search-wrap { display: none; }
  .topbar-actions { grid-column: 3; }
  .page-title, .article > h1:first-child { font-size: 28px; }
  .page-lead { font-size: 15px; }
  .guide-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .guide-type { grid-column: 1; }
  .guide-description { grid-column: 1; }
  .guide-arrow { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .endpoint-table th:nth-child(3), .endpoint-table td:nth-child(3) { display: none; }
  .model-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-summary-item, .model-summary-item:nth-child(2n) { min-height: 76px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .model-summary-item:nth-child(2n) { border-right: 0; }
  .model-summary-item:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .model-segments { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .model-segments button { min-width: 0; }
  .model-result-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .model-result-hint { text-align: left; }
  .video-demo figcaption { flex-direction: column; gap: 7px; }
  .video-showcase-heading p { font-size: 13px; }
  .video-showcase-tabs { grid-template-columns: 1fr; }
  .video-showcase-tabs button { height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .video-showcase-tabs button small { margin-top: 0; }
  .video-showcase-overlay span, .video-showcase-overlay small { display: none; }
  .video-showcase-overlay strong { font-size: 18px; }
  .video-showcase-facts { grid-template-columns: 1fr; }
  .video-showcase-facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .video-showcase-facts > div:last-child { border-bottom: 0; }
  .video-showcase-evidence > section { padding: 17px 0 20px; }
  .video-showcase-evidence pre { min-height: 0; max-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
  .video-showcase-tabs button { transition: none; }
}
