/*
 * Documentation centre (Go SSR). Visual language follows the model
 * marketplace in the React app: the same surfaces, borders, primary colour and
 * tab bar. Light values live on :root, dark values on [data-theme='dark'];
 * the inline boot script in page.html sets data-theme from the app's
 * localStorage "theme-mode" before the first paint.
 */
:root {
  color-scheme: light;
  --dc-canvas: #f5f6f8;
  --dc-surface: #ffffff;
  --dc-surface-chrome: rgba(255, 255, 255, 0.86);
  --dc-surface-sunken: #f8f9fa;
  --dc-surface-raised: #ffffff;
  --dc-surface-hover: rgba(46, 50, 56, 0.05);
  --dc-surface-active: rgba(46, 50, 56, 0.09);
  --dc-surface-control: #ffffff;
  --dc-border-subtle: #e6e9ee;
  --dc-border: rgba(28, 31, 35, 0.08);
  --dc-border-strong: #c9cfd8;
  --dc-fg: #1c1f23;
  --dc-fg-muted: rgba(28, 31, 35, 0.8);
  --dc-fg-subtle: rgba(28, 31, 35, 0.62);
  --dc-prose-fg: #2c323d;
  --dc-primary: #0064fa;
  --dc-primary-hover: #0062d6;
  --dc-primary-soft: #eaf5ff;
  --dc-primary-line: color-mix(in srgb, #0064fa 28%, transparent);
  --dc-on-primary: #ffffff;
  --dc-success: #3bb346;
  --dc-success-soft: color-mix(in srgb, #3bb346 10%, transparent);
  --dc-success-line: color-mix(in srgb, #3bb346 30%, transparent);
  --dc-warning: #fc8800;
  --dc-warning-fg: #9a4b00;
  --dc-warning-soft: #fff6e5;
  --dc-warning-line: #f5b54a;
  --dc-danger: #f93920;
  --dc-danger-soft: color-mix(in srgb, #f93920 9%, transparent);
  --dc-violet: #7656b5;
  --dc-code-bg: #181c23;
  --dc-code-fg: #e6e9ee;
  --dc-code-muted: #9aa4b2;
  --dc-code-line: rgba(255, 255, 255, 0.08);
  --dc-code-hover: rgba(255, 255, 255, 0.08);
  /* Diagrams and the QR code are drawn on white in both themes. */
  --dc-paper: #ffffff;
  --dc-scroll-thumb: #c9cfd8;
  --dc-shadow-card: 0 1px 2px #1018280a, 0 2px 6px -2px #1018280d;
  --dc-shadow-raised: 0 2px 4px -2px #1018280f, 0 8px 16px -4px #10182814;
  --dc-shadow-overlay: 0 12px 24px -8px #1018281a, 0 32px 64px -16px #10182829;
  --dc-focus-ring: 0 0 0 3px color-mix(in srgb, #0064fa 18%, transparent);
  --dc-radius: 12px;
  --dc-radius-sm: 8px;
  --dc-font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --dc-font-mono:
    ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --site-header-height: 64px;
  --hub-nav-height: 58px;
  --sticky-offset: calc(var(--site-header-height) + var(--hub-nav-height));
}

[data-theme='dark'] {
  color-scheme: dark;
  --dc-canvas: #16161a;
  --dc-surface: #232429;
  --dc-surface-chrome: rgba(35, 36, 41, 0.86);
  --dc-surface-sunken: rgba(255, 255, 255, 0.03);
  --dc-surface-raised: #35363c;
  --dc-surface-hover: rgba(255, 255, 255, 0.07);
  --dc-surface-active: rgba(255, 255, 255, 0.12);
  --dc-surface-control: rgba(255, 255, 255, 0.04);
  --dc-border-subtle: rgba(255, 255, 255, 0.07);
  --dc-border: rgba(255, 255, 255, 0.08);
  --dc-border-strong: rgba(255, 255, 255, 0.16);
  --dc-fg: #f9f9f9;
  --dc-fg-muted: rgba(249, 249, 249, 0.8);
  --dc-fg-subtle: rgba(249, 249, 249, 0.6);
  --dc-prose-fg: rgba(249, 249, 249, 0.86);
  --dc-primary: #54a9ff;
  --dc-primary-hover: #7fc1ff;
  --dc-primary-soft: rgba(84, 169, 255, 0.14);
  --dc-primary-line: color-mix(in srgb, #54a9ff 42%, transparent);
  --dc-on-primary: #0b1220;
  --dc-success: #5dc264;
  --dc-success-soft: color-mix(in srgb, #5dc264 14%, transparent);
  --dc-success-line: color-mix(in srgb, #5dc264 36%, transparent);
  --dc-warning: #ffae43;
  --dc-warning-fg: #ffd37a;
  --dc-warning-soft: rgba(255, 174, 67, 0.12);
  --dc-warning-line: rgba(255, 174, 67, 0.55);
  --dc-danger: #fc725a;
  --dc-danger-soft: color-mix(in srgb, #fc725a 14%, transparent);
  --dc-violet: #a990e0;
  --dc-code-bg: #05070a;
  --dc-scroll-thumb: rgba(255, 255, 255, 0.16);
  --dc-shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 30px -18px rgba(0, 0, 0, 0.9);
  --dc-shadow-raised: 0 12px 28px -12px rgba(0, 0, 0, 0.8);
  --dc-shadow-overlay: 0 24px 48px -12px rgba(0, 0, 0, 0.75);
  --dc-focus-ring: 0 0 0 3px color-mix(in srgb, #54a9ff 26%, transparent);
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--dc-fg);
  background-color: var(--dc-canvas);
  font-family: var(--dc-font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--dc-primary);
}

button,
input {
  font: inherit;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

:focus-visible {
  outline: 0;
  box-shadow: var(--dc-focus-ring);
}

::selection {
  background: var(--dc-primary-line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--dc-radius-sm);
  color: var(--dc-on-primary);
  background: var(--dc-primary);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- site header (matches the React header bar) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--site-header-height);
  border-bottom: 1px solid var(--dc-border);
  background: var(--dc-surface-chrome);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.site-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 8px;
}

.site-brand {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  color: var(--dc-fg);
}

.site-brand:hover {
  color: var(--dc-fg);
}

.site-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.site-brand:hover img {
  transform: scale(1.08);
}

.site-brand strong {
  max-width: 180px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  gap: 8px;
  align-items: center;
  margin: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.site-nav-link {
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 6px;
  color: var(--dc-fg);
  font-size: 15px;
  font-weight: 600;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.site-nav-link:hover {
  color: var(--dc-primary);
  background: var(--dc-surface-hover);
}

.site-nav-link.is-active {
  color: var(--dc-primary);
}

.site-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.mobile-site-menu > summary {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-hover);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-site-menu > summary:hover {
  color: var(--dc-primary);
  background: var(--dc-surface-active);
}

/* ---------- header menus: announcements, theme, language ---------- */
.header-menu {
  position: relative;
}

.header-icon-button {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-hover);
  list-style: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.header-icon-button::-webkit-details-marker {
  display: none;
}

.header-icon-button:hover,
.header-menu[open] > .header-icon-button {
  color: var(--dc-fg);
  background: var(--dc-surface-active);
}

.header-icon-button:focus-visible {
  outline: 0;
  box-shadow: var(--dc-focus-ring);
}

.header-icon-button svg,
.header-menu-panel svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* ---------- header account area ----------
   Mirrors the app header (currency switcher, then sign in / sign up or the
   user button) with the same sizes and font, so the icons stay in place when
   moving between the marketplace and the docs. */
.header-currency-slot {
  width: 72px;
  height: 32px;
  flex: 0 0 auto;
}

.header-auth {
  display: flex;
  align-items: center;
}

.header-auth[data-docs-auth-pending] {
  visibility: hidden;
}

.header-auth[hidden],
.header-user[hidden],
.header-auth-register[hidden] {
  display: none;
}

.header-auth a,
.header-user {
  display: inline-flex;
  height: 32px;
  align-items: center;
  font-family:
    Lato, "Helvetica Neue", Arial, Helvetica, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease;
}

.header-auth a {
  padding: 0 12px;
}

.header-auth-login {
  border-radius: 9999px 0 0 9999px;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-hover);
}

.header-auth-login:hover {
  background: var(--dc-surface-active);
}

.header-auth-register {
  margin-left: -1px;
  border-radius: 0 9999px 9999px 0;
  color: var(--dc-on-primary);
  background: var(--dc-primary);
}

.header-auth-register:hover {
  background: var(--dc-primary-hover);
}

.header-auth-login:only-child,
.header-auth:has(.header-auth-register[hidden]) .header-auth-login {
  border-radius: 9999px;
}

.header-user {
  padding: 4px;
  gap: 6px;
  border-radius: 9999px;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-hover);
  font-weight: 500;
}

.header-user:hover {
  background: var(--dc-surface-active);
}

.header-auth a:focus-visible,
.header-user:focus-visible {
  outline: 0;
  box-shadow: var(--dc-focus-ring);
}

.header-user-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgb(var(--avatar-rgb, 167, 171, 176));
  font-size: 12px;
  font-weight: 600;
}

.header-user-name {
  margin-right: 4px;
}

.header-user svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--dc-fg-subtle);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-toggle svg {
  display: none;
}

:root[data-theme-mode="light"] .theme-icon-light,
:root[data-theme-mode="dark"] .theme-icon-dark,
:root:not([data-theme-mode="light"]):not([data-theme-mode="dark"])
  .theme-icon-auto {
  display: block;
}

.header-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  color: var(--dc-on-primary);
  background: var(--dc-danger);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.header-badge[hidden] {
  display: none;
}

.header-menu-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 168px;
  padding: 4px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius-sm);
  background: var(--dc-surface-raised);
  box-shadow: var(--dc-shadow-overlay);
}

.header-menu-panel > a,
.header-menu-panel > button {
  display: flex;
  width: 100%;
  padding: 7px 12px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  color: var(--dc-fg);
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.header-menu-panel > a:hover,
.header-menu-panel > button:hover {
  background: var(--dc-surface-hover);
}

.header-menu-panel > [aria-checked="true"] {
  background: var(--dc-primary-soft);
  font-weight: 600;
}

.header-menu-panel > button > span {
  display: grid;
}

.header-menu-panel small {
  color: var(--dc-fg-subtle);
  font-size: 12px;
  font-weight: 400;
}

.notice-panel {
  width: min(420px, calc(100vw - 24px));
  padding: 0;
}

.notice-tabs {
  display: flex;
  padding: 8px 8px 0;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--dc-border-subtle);
  scrollbar-width: none;
}

.notice-tabs::-webkit-scrollbar {
  display: none;
}

.notice-tabs button {
  display: inline-flex;
  height: 34px;
  margin-bottom: -1px;
  padding: 0 10px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--dc-fg-muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.notice-tabs button svg {
  width: 14px;
  height: 14px;
}

.notice-tabs button:hover {
  color: var(--dc-fg);
}

.notice-tabs button[aria-selected="true"] {
  border-bottom-color: var(--dc-primary);
  color: var(--dc-primary);
  font-weight: 600;
}

.notice-pane[hidden],
.notice-pane [hidden] {
  display: none;
}

.notice-state {
  display: grid;
  padding: 28px 16px;
  justify-items: center;
  gap: 12px;
  color: var(--dc-fg-muted);
  font-size: 13px;
  text-align: center;
}

.notice-state p {
  margin: 0;
}

.notice-action {
  display: inline-flex;
  height: 30px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--dc-border);
  border-radius: 6px;
  color: var(--dc-fg);
  background: var(--dc-surface-control);
  font-size: 13px;
  font-weight: 500;
}

.notice-action:hover {
  border-color: var(--dc-border-strong);
}

.notice-more {
  display: block;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--dc-border-subtle);
  color: var(--dc-primary);
  font-size: 13px;
  text-align: right;
}

.message-item a {
  display: grid;
  gap: 2px;
  color: inherit;
}

.message-item strong {
  color: var(--dc-fg);
  font-weight: 500;
}

.message-item.is-unread strong {
  font-weight: 650;
}

.message-item span {
  color: var(--dc-fg-subtle);
  font-size: 12px;
}

.message-item time {
  margin: 2px 0 0;
}

.career-item {
  display: grid;
  margin: 8px 12px;
  padding: 12px 14px;
  gap: 6px;
  border: 1px solid var(--dc-border);
  border-left: 3px solid var(--dc-primary);
  border-radius: var(--dc-radius-sm);
  font-size: 13px;
  line-height: 20px;
}

.career-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.career-tag {
  padding: 0 8px;
  border-radius: 4px;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-hover);
  font-size: 12px;
  line-height: 20px;
}

.career-tag.is-primary {
  color: var(--dc-primary);
  background: var(--dc-primary-soft);
}

.career-title {
  color: var(--dc-fg);
  font-size: 15px;
  line-height: 22px;
}

.career-description,
.career-meta {
  margin: 0;
  color: var(--dc-fg-subtle);
}

.career-actions:empty {
  display: none;
}

.career-details > summary {
  color: var(--dc-primary);
  cursor: pointer;
}

.career-details .notice-content {
  margin-top: 8px;
  color: var(--dc-prose-fg);
}

.notice-list {
  max-height: min(60vh, 480px);
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
}

.notice-list[hidden],
.notice-empty[hidden] {
  display: none;
}

.notice-item {
  position: relative;
  padding: 10px 16px 10px 30px;
  color: var(--dc-prose-fg);
  font-size: 13px;
  line-height: 20px;
}

.notice-item + .notice-item {
  border-top: 1px solid var(--dc-border-subtle);
}

.notice-item::before {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dc-border-strong);
  content: "";
}

.notice-item.is-unread::before,
.notice-type-ongoing::before {
  background: var(--dc-primary);
}

.notice-type-success::before {
  background: var(--dc-success);
}

.notice-type-warning::before {
  background: var(--dc-warning);
}

.notice-type-error::before {
  background: var(--dc-danger);
}

.notice-item time {
  display: block;
  margin-bottom: 4px;
  color: var(--dc-fg-subtle);
  font-size: 12px;
}

.notice-content p,
.notice-extra p {
  margin: 0;
}

.notice-content p + p,
.notice-content ul {
  margin-top: 6px;
}

.notice-content ul {
  margin-bottom: 0;
  padding-left: 18px;
}

.notice-content a,
.notice-extra a {
  color: var(--dc-primary);
}

.notice-content code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--dc-surface-hover);
  font-family: var(--dc-font-mono);
  font-size: 12px;
}

.notice-extra {
  margin-top: 4px;
  color: var(--dc-fg-subtle);
  font-size: 12px;
}

.notice-empty {
  margin: 0;
  padding: 24px 16px;
  color: var(--dc-fg-subtle);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 820px) {
  .header-menu-panel {
    position: fixed;
    top: calc(var(--site-header-height) + 4px);
    right: 8px;
  }

  .notice-panel {
    width: calc(100vw - 16px);
  }
}

/* Hidden until docs.js swaps in the interface language (boot.js). */
.docs-i18n-pending body {
  visibility: hidden;
}

.mobile-site-menu {
  position: relative;
  display: none;
}

.mobile-site-menu > summary svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.mobile-site-menu > nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface-raised);
  box-shadow: var(--dc-shadow-overlay);
}

.mobile-site-menu nav > a {
  padding: 9px 11px;
  border-radius: 6px;
  font-weight: 600;
}

.mobile-site-menu nav > a:hover,
.mobile-site-menu nav > a.is-active {
  color: var(--dc-primary);
  background: var(--dc-surface-hover);
}

/* ---------- section tabs (matches MarketplaceSectionNav) ---------- */
.hub-nav-shell {
  position: sticky;
  top: var(--site-header-height);
  z-index: 35;
  height: var(--hub-nav-height);
  border-bottom: 1px solid var(--dc-border);
  background: var(--dc-canvas);
}

.hub-nav-inner {
  display: flex;
  width: min(1440px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hub-nav {
  display: flex;
  width: auto;
  height: 100%;
  gap: 4px;
  align-items: flex-end;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.hub-nav::-webkit-scrollbar {
  display: none;
}

.hub-nav a {
  position: relative;
  display: inline-flex;
  height: 40px;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  padding: 0 12px;
  color: var(--dc-fg-muted);
  font-size: 14px;
  transition: color 160ms ease;
}

.hub-nav a > svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.72;
}

.hub-nav a:hover {
  color: var(--dc-fg);
}

.hub-nav a.is-active {
  color: var(--dc-fg);
  font-weight: 600;
}

.hub-nav a.is-active > svg {
  color: var(--dc-primary);
  opacity: 1;
}

.hub-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--dc-primary);
  content: "";
}

.hub-nav-tools {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.search-bar {
  position: relative;
  z-index: 1;
  min-width: 220px;
  width: clamp(240px, 28vw, 420px);
  max-width: 420px;
  flex: 0 1 420px;
  margin: 0;
}

.search-form {
  position: relative;
  display: flex;
  width: 100%;
  height: 36px;
  max-width: 420px;
  margin: 0 auto;
  align-items: center;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius-sm);
  background: var(--dc-surface-control);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.search-form:hover {
  border-color: var(--dc-border-strong);
}

.search-form:focus-within {
  border-color: var(--dc-primary);
  box-shadow: var(--dc-focus-ring);
}

.search-form > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-left: 10px;
  fill: none;
  stroke: var(--dc-fg-subtle);
  stroke-width: 2;
}

.search-form input {
  width: 0;
  height: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 8px;
  color: var(--dc-fg);
  background: transparent;
  font-size: 13px;
}

.search-form input::placeholder {
  color: var(--dc-fg-subtle);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: var(--dc-surface-raised);
  box-shadow: var(--dc-shadow-overlay);
}

.search-suggestions a {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--dc-border-subtle);
  font-size: 13px;
}

.search-suggestions a:last-child {
  border-bottom: 0;
}

.search-suggestions a.is-active,
.search-suggestions a:hover {
  color: var(--dc-fg);
  background: var(--dc-surface-hover);
}

.search-suggestions a span {
  overflow: hidden;
  color: var(--dc-fg-subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- page shell ---------- */
.page-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100% - 48px));
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 20px 0 64px;
}

/* ---------- left directory ---------- */
.docs-sidebar {
  position: sticky;
  top: calc(var(--sticky-offset) + 20px);
  align-self: start;
  min-width: 0;
}

.directory-toggle {
  display: none;
}

.directory-panel {
  max-height: calc(100vh - var(--sticky-offset) - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow-card);
  scrollbar-color: var(--dc-scroll-thumb) transparent;
  scrollbar-width: thin;
}

.docs-directory:not([open]) > .directory-panel {
  display: block;
}

.docs-tree {
  min-width: 0;
}

.tree-section + .tree-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--dc-border-subtle);
}

.tree-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 14px;
  gap: 10px;
  align-items: center;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--dc-radius-sm);
  color: var(--dc-fg);
  cursor: pointer;
  user-select: none;
}

.tree-heading:hover {
  background: var(--dc-surface-hover);
}

.tree-index {
  color: var(--dc-primary);
  font: 600 12px/1 var(--dc-font-mono);
}

.tree-heading strong {
  font-size: 14px;
  font-weight: 600;
}

.tree-count {
  height: 20px;
  min-width: 24px;
  padding: 0 7px;
  border: 1px solid var(--dc-border-subtle);
  border-radius: 10px;
  color: var(--dc-fg-subtle);
  background: var(--dc-surface-sunken);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.tree-heading svg,
.directory-toggle svg {
  width: 14px;
  fill: none;
  stroke: var(--dc-fg-subtle);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.tree-section:not([open]) .tree-heading svg,
.docs-directory:not([open]) .directory-toggle svg {
  transform: rotate(-90deg);
}

.tree-children {
  margin: 2px 0 6px 21px;
  padding: 0 0 0 10px;
  border-left: 1px solid var(--dc-border);
  list-style: none;
}

.tree-link {
  position: relative;
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--dc-fg-muted);
  font-size: 13px;
  line-height: 19px;
}

.tree-link > span {
  position: absolute;
  top: 13px;
  left: -14px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 50%;
  background: var(--dc-surface);
}

.tree-link:hover {
  color: var(--dc-fg);
  background: var(--dc-surface-hover);
}

.tree-link.is-active {
  color: var(--dc-primary);
  background: var(--dc-primary-soft);
  font-weight: 500;
}

.tree-link.is-active > span {
  border-color: var(--dc-primary);
  background: var(--dc-primary);
  box-shadow: 0 0 0 3px var(--dc-primary-soft);
}

.tree-model-children {
  margin: 1px 0 6px 14px;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--dc-border-subtle);
  list-style: none;
}

.tree-subgroup-label {
  margin: 8px 8px 2px 22px;
  color: var(--dc-fg-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tree-model-link {
  position: relative;
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--dc-fg-subtle);
  font-size: 12.5px;
  line-height: 18px;
}

.tree-model-link::before {
  position: absolute;
  top: 50%;
  left: -12px;
  width: 8px;
  border-top: 1px solid var(--dc-border-subtle);
  content: "";
}

.tree-model-link:hover {
  color: var(--dc-fg);
  background: var(--dc-surface-hover);
}

.tree-model-link.is-active {
  color: var(--dc-primary);
  background: var(--dc-primary-soft);
  font-weight: 500;
}

/* ---------- reading column ---------- */
.reading-column {
  min-width: 0;
}

.context-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 28px;
  margin-bottom: 10px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--dc-fg-subtle);
  font-size: 13px;
  line-height: 28px;
  list-style: none;
}

.breadcrumbs a {
  color: var(--dc-fg-muted);
}

.breadcrumbs a:hover {
  color: var(--dc-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 6px;
  color: var(--dc-fg-subtle);
  content: "›";
}

.breadcrumbs li:last-child a {
  color: var(--dc-fg);
}

.document {
  min-width: 0;
  padding: 40px 48px 44px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow-card);
  scroll-margin-top: calc(var(--sticky-offset) + 20px);
}

.document.has-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  gap: 32px;
  align-items: start;
}

.document-main {
  min-width: 0;
}

.document-header {
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--dc-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--dc-fg);
  font-family: var(--dc-font-sans);
  letter-spacing: -0.01em;
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 44px;
}

.direct-answer {
  margin: 20px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--dc-primary-line);
  border-left-width: 3px;
  border-radius: 10px;
  color: var(--dc-fg);
  background: var(--dc-primary-soft);
  font-size: 15px;
  line-height: 25px;
}

.direct-answer span {
  display: block;
  margin-bottom: 4px;
  color: var(--dc-primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.document-dates {
  margin: 14px 0 0;
  color: var(--dc-fg-subtle);
  font-size: 12.5px;
}

/* ---------- prose ---------- */
.prose {
  min-width: 0;
  color: var(--dc-prose-fg);
  font-size: 15px;
  line-height: 27px;
  overflow-wrap: anywhere;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 40px 0 12px;
  padding-top: 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 32px;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 26px;
}

.prose h4 {
  margin: 22px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.prose h2,
.prose h3 {
  scroll-margin-top: calc(var(--sticky-offset) + 22px);
}

.prose p {
  margin: 12px 0;
}

.prose strong {
  color: var(--dc-fg);
  font-weight: 600;
}

.prose a {
  color: var(--dc-primary);
  text-decoration: underline;
  text-decoration-color: var(--dc-primary-line);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--dc-primary);
}

.prose ul,
.prose ol {
  margin: 12px 0;
  padding-left: 22px;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--dc-fg-subtle);
}

.prose hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--dc-border-subtle);
}

.prose blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--dc-border-strong);
  border-radius: 0 8px 8px 0;
  color: var(--dc-fg-muted);
  background: var(--dc-surface-sunken);
}

.prose blockquote p {
  margin: 4px 0;
}

/* "New feature" highlights authored in the content YAML. */
.prose .new-feature-heading {
  margin-top: 32px;
  padding: 12px 16px;
  border: 1px solid var(--dc-warning-line);
  border-left-width: 4px;
  border-radius: 10px;
  color: var(--dc-warning-fg);
  background: var(--dc-warning-soft);
}

.prose blockquote.new-feature-callout {
  margin: 14px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--dc-warning-line);
  border-left-width: 4px;
  border-radius: 10px;
  color: var(--dc-fg);
  background: var(--dc-warning-soft);
}

.prose blockquote.new-feature-callout p {
  margin: 0;
}

.prose .new-feature-section {
  margin: 28px -16px;
  padding: 1px 16px 22px;
  border-left: 4px solid var(--dc-warning-line);
  border-radius: 0 10px 10px 0;
  background: var(--dc-warning-soft);
}

.prose .new-feature-section .new-feature-heading {
  margin-top: 18px;
}

.prose .new-feature-line {
  padding: 10px 14px;
  border-left: 4px solid var(--dc-warning-line);
  border-radius: 0 8px 8px 0;
  color: var(--dc-fg);
  background: var(--dc-warning-soft);
}

.prose tr.new-feature-row td {
  border-top: 1px solid var(--dc-warning-line);
  border-bottom: 1px solid var(--dc-warning-line);
  background: var(--dc-warning-soft);
}

code {
  padding: 1px 6px;
  border: 1px solid var(--dc-border-subtle);
  border-radius: 5px;
  overflow-wrap: anywhere;
  color: var(--dc-fg);
  background: var(--dc-surface-sunken);
  font-family: var(--dc-font-mono);
  font-size: 0.87em;
}

/* Code blocks. docs.js wraps each block in .code-frame with a language label
   and moves the copy button into that header; without JS the button floats. */
.code-block {
  position: relative;
  overflow: auto;
  margin: 16px 0;
  padding: 46px 16px 14px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  color: var(--dc-code-fg);
  background: var(--dc-code-bg);
  font: 12.5px/20px var(--dc-font-mono);
  scrollbar-color: var(--dc-code-muted) transparent;
  scrollbar-width: thin;
}

.code-block code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  overflow-wrap: normal;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--dc-code-muted);
  background: transparent;
  font: 12px var(--dc-font-sans);
  cursor: pointer;
}

.copy-code:hover {
  color: var(--dc-code-fg);
  background: var(--dc-code-hover);
}

.code-frame {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: var(--dc-code-bg);
}

.code-frame-head {
  display: flex;
  height: 34px;
  padding: 0 8px 0 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--dc-code-line);
  color: var(--dc-code-muted);
  font: 11.5px var(--dc-font-mono);
}

.code-frame .code-block {
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
}

.code-frame .copy-code {
  position: static;
}

/* Tables */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  scrollbar-color: var(--dc-scroll-thumb) transparent;
  scrollbar-width: thin;
}

.prose table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--dc-surface);
  font-size: 13.5px;
  line-height: 21px;
}

.prose th,
.prose td {
  min-width: 9rem;
  padding: 9px 14px;
  border-bottom: 1px solid var(--dc-border-subtle);
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom-color: var(--dc-border);
  color: var(--dc-fg);
  background: var(--dc-surface-sunken);
  font-weight: 600;
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose .align-center {
  text-align: center;
}

.prose .align-right {
  text-align: right;
}

/* Diagrams */
.docs-diagram {
  max-width: 100%;
  margin: 20px 0;
}

.diagram-scroll {
  overflow-x: auto;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: var(--dc-paper);
  scrollbar-width: thin;
}

.diagram-scroll img {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

/* ---------- after the body ---------- */
.topic-grid,
.section-block {
  margin-top: 40px;
}

.section-block > h2,
.provider-model-catalog-heading h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  scroll-margin-top: calc(var(--sticky-offset) + 22px);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.facts-grid > div {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface-sunken);
}

.facts-grid h2 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 20px;
}

.facts-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts-grid li {
  position: relative;
  padding-left: 20px;
  color: var(--dc-fg-muted);
  font-size: 13.5px;
  line-height: 20px;
}

.facts-grid li::before {
  position: absolute;
  top: 5px;
  left: 2px;
  width: 8px;
  height: 4px;
  border-bottom: 1.6px solid var(--dc-success);
  border-left: 1.6px solid var(--dc-success);
  content: "";
  transform: rotate(-45deg);
}

.faq details {
  border: 1px solid var(--dc-border);
  border-top-width: 0;
}

.faq h2 + details {
  border-top-width: 1px;
  border-radius: var(--dc-radius) var(--dc-radius) 0 0;
}

.faq details:last-child {
  border-radius: 0 0 var(--dc-radius) var(--dc-radius);
}

.faq h2 + details:last-child {
  border-radius: var(--dc-radius);
}

.faq summary {
  position: relative;
  padding: 14px 44px 14px 18px;
  color: var(--dc-fg);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 22px;
  cursor: pointer;
}

.faq summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-top: 1.6px solid var(--dc-fg-subtle);
  border-right: 1.6px solid var(--dc-fg-subtle);
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(135deg);
}

.faq summary:hover {
  background: var(--dc-surface-hover);
}

.faq details > p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--dc-fg-muted);
  font-size: 14px;
  line-height: 24px;
}

.faq details.new-feature-faq {
  border-left: 4px solid var(--dc-warning-line);
  background: var(--dc-warning-soft);
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-links li {
  position: relative;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.related-links li:hover {
  border-color: var(--dc-primary-line);
  box-shadow: var(--dc-shadow-raised);
  transform: translateY(-1px);
}

.related-links a {
  color: var(--dc-fg);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 22px;
}

/* The whole card is the link target. */
.related-links a::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}

.related-links span {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--dc-fg-muted);
  font-size: 13px;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sources ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
}

.sources li::marker {
  color: var(--dc-fg-subtle);
  font-variant-numeric: tabular-nums;
}

.sources a {
  color: var(--dc-fg);
}

.sources a:hover {
  color: var(--dc-primary);
}

.sources li span {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid var(--dc-success-line);
  border-radius: 4px;
  color: var(--dc-success);
  background: var(--dc-success-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  vertical-align: 1px;
}

/* ---------- right-hand outline ---------- */
.page-toc {
  position: sticky;
  top: 0;
  display: flex;
  min-width: 0;
  flex-direction: column;
  font-size: 13px;
}

.page-toc[hidden] {
  display: none;
}

.page-toc-title {
  display: flex;
  margin: 0 0 8px;
  align-items: center;
  gap: 6px;
  color: var(--dc-fg-muted);
  font-size: 12px;
  font-weight: 600;
}

.page-toc-title svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.page-toc-links {
  display: flex;
  max-height: calc(100vh - var(--sticky-offset) - 120px);
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}

.page-toc-links a {
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--dc-border-subtle);
  color: var(--dc-fg-muted);
  line-height: 19px;
}

.page-toc-links a:hover {
  color: var(--dc-fg);
}

.page-toc-links a[aria-current] {
  border-left-color: var(--dc-primary);
  color: var(--dc-primary);
  font-weight: 500;
}

/* ---------- index and home cards ---------- */
.hub-index {
  margin-top: 8px;
}

.topic-section {
  scroll-margin-top: calc(var(--sticky-offset) + 24px);
}

.topic-section + .topic-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--dc-border-subtle);
}

.topic-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
}

.topic-heading > span {
  padding-top: 4px;
  color: var(--dc-primary);
  font: 600 12px/1 var(--dc-font-mono);
}

.topic-heading p {
  margin: 0 0 2px;
  color: var(--dc-fg-subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.topic-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.learning-path-grid,
.provider-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-grid a {
  position: relative;
  display: flex;
  min-height: 124px;
  padding: 18px 20px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  color: var(--dc-fg);
  background: var(--dc-surface);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.link-grid a:hover {
  border-color: var(--dc-primary-line);
  color: var(--dc-fg);
  box-shadow: var(--dc-shadow-raised);
  transform: translateY(-1px);
}

.link-grid strong {
  padding-right: 22px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 23px;
}

.link-grid a > span:not(.card-arrow) {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--dc-fg-muted);
  font-size: 13px;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--dc-fg-subtle);
  font-size: 14px;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.link-grid a:hover .card-arrow {
  color: var(--dc-primary);
  transform: translate(2px, -2px);
}

.learning-path-grid a {
  background: var(--dc-surface-sunken);
}

.learning-path-grid .card-arrow,
.learning-path-grid a:hover .card-arrow {
  position: static;
  margin-bottom: 8px;
  color: var(--dc-primary);
  font: 600 12px/1 var(--dc-font-mono);
  transform: none;
}

.marketplace-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--dc-primary-line);
  border-radius: var(--dc-radius);
  background: var(--dc-primary-soft);
}

.marketplace-callout span {
  color: var(--dc-fg-muted);
  font-size: 13px;
}

.marketplace-callout span:last-child {
  color: var(--dc-primary);
  font-size: 16px;
}

/* ---------- provider catalog ---------- */
.provider-model-catalog-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dc-border-subtle);
}

.provider-model-catalog-heading p {
  margin: 0 0 4px;
  color: var(--dc-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.provider-model-catalog-heading h2 {
  margin: 0;
}

.provider-model-catalog-heading > time,
.provider-model-catalog-note,
.provider-model-meta {
  color: var(--dc-fg-subtle);
  font-size: 12.5px;
}

.provider-model-catalog-heading > time {
  flex: 0 0 auto;
  padding-bottom: 4px;
}

.provider-model-catalog-note {
  margin: 12px 0 16px;
  line-height: 1.65;
}

.provider-model-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.provider-model-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
}

.provider-model-group h3 {
  margin: 0;
  border-bottom: 1px solid var(--dc-border-subtle);
  background: var(--dc-surface-sunken);
}

.provider-model-group h3 a {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px 16px;
  color: var(--dc-fg);
  font-size: 14px;
}

.provider-model-group h3 a:hover {
  color: var(--dc-primary);
}

.provider-model-group h3 a span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--dc-primary);
}

.provider-model-group[data-model-type="image"] h3 a span,
.provider-model-group[data-model-type="video"] h3 a span {
  background: var(--dc-success);
}

.provider-model-group[data-model-type="audio"] h3 a span {
  background: var(--dc-warning);
}

.provider-model-group[data-model-type="retrieval"] h3 a span {
  background: var(--dc-violet);
}

.provider-model-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.provider-model-group li {
  min-width: 0;
  padding: 14px 16px;
}

.provider-model-group li + li {
  border-top: 1px solid var(--dc-border-subtle);
}

.provider-model-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  justify-content: space-between;
}

.provider-model-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  font-weight: 600;
}

.provider-model-status {
  flex: 0 0 auto;
  padding: 0 7px;
  border: 1px solid var(--dc-success-line);
  border-radius: 999px;
  color: var(--dc-success);
  background: var(--dc-success-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}

.provider-model-status.is-preview {
  border-color: var(--dc-primary-line);
  color: var(--dc-primary);
  background: var(--dc-primary-soft);
}

.provider-model-status.is-legacy {
  border-color: color-mix(in srgb, var(--dc-danger) 30%, transparent);
  color: var(--dc-danger);
  background: var(--dc-danger-soft);
}

.provider-model-group li > p {
  margin: 8px 0 10px;
  color: var(--dc-fg-muted);
  font-size: 13px;
  line-height: 1.6;
}

.provider-model-meta {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.provider-model-facts,
.provider-model-actions {
  display: flex;
  gap: 5px 12px;
  flex-wrap: wrap;
  align-items: center;
}

.provider-model-actions {
  margin-left: auto;
}

.provider-model-actions a {
  color: var(--dc-primary);
}

.provider-model-marketplace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--dc-primary-line);
  border-radius: 10px;
  color: var(--dc-primary);
  background: var(--dc-primary-soft);
  font-size: 13px;
}

/* ---------- search and misc ---------- */
.primary-link {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius-sm);
  color: var(--dc-primary);
  background: var(--dc-surface-control);
  font-weight: 500;
}

.primary-link:hover {
  border-color: var(--dc-primary-line);
}

.search-summary {
  margin-top: 0;
  color: var(--dc-fg-muted);
}

.search-results {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.search-results a {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 3px 18px;
  padding: 16px 18px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
}

.search-results a:hover {
  border-color: var(--dc-primary-line);
  color: var(--dc-fg);
  box-shadow: var(--dc-shadow-raised);
}

.search-results a span {
  grid-row: 1 / span 2;
  color: var(--dc-primary);
  font-size: 12px;
  font-weight: 600;
}

.search-results p {
  margin: 0;
  color: var(--dc-fg-muted);
}

.search-marketplace-fallback {
  margin-top: 20px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--dc-border-strong);
  border-radius: var(--dc-radius);
  color: var(--dc-fg-subtle);
  text-align: center;
}

/* ---------- footer ---------- */
.site-footer {
  padding: 40px 24px;
  color: var(--dc-fg-subtle);
  font-size: 13px;
  text-align: center;
}

.site-footer-balanced-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto) minmax(120px, 1fr);
  align-items: center;
  width: min(1110px, 100%);
  margin: 0 auto;
  column-gap: 12px;
}

.site-footer-balance-spacer {
  min-width: 0;
}

.site-footer-center-content {
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.site-footer-center-content p,
.custom-footer {
  margin: 0;
}

.site-footer-copyright {
  color: var(--dc-fg-subtle);
  line-height: 1.6;
}

.site-footer-social {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.site-footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--dc-radius-sm);
  color: var(--dc-fg-subtle);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.site-footer-icon-link:hover,
.site-footer-icon-link:focus-visible {
  color: var(--dc-fg);
  background: var(--dc-surface-hover);
}

.site-footer-icon-link svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer-disclosure {
  position: relative;
}

.site-footer-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  border: 1px solid var(--dc-border);
  color: var(--dc-fg);
  background: var(--dc-surface-raised);
  box-shadow: var(--dc-shadow-overlay);
}

.site-footer-x-menu {
  min-width: 160px;
  padding: 6px;
  border-radius: 10px;
}

.site-footer-x-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--dc-radius-sm);
  color: var(--dc-fg);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
}

.site-footer-x-menu a:hover,
.site-footer-x-menu a:focus-visible {
  background: var(--dc-surface-hover);
}

.site-footer-x-menu img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.site-footer-avatar-crop {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
}

/* Display only the avatar circle within the supplied profile screenshot. */
.site-footer-avatar-crop img {
  width: 112.3%;
  height: 118%;
  max-width: none;
  border-radius: 0;
  transform: translate(-5.1%, -10.9%);
}

.site-footer-telegram-menu {
  width: 176px;
  padding: 10px;
  border-radius: var(--dc-radius);
}

.site-footer-telegram-menu img {
  display: block;
  width: 152px;
  height: 152px;
  border-radius: var(--dc-radius-sm);
  object-fit: cover;
  background: var(--dc-paper);
}

.site-footer-telegram-menu span {
  display: block;
  margin-top: 8px;
  color: var(--dc-fg-muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

/* ---------- desktop: header and tabs fixed, two independent scroll areas ---------- */
@media (min-width: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    display: grid;
    grid-template-rows: var(--site-header-height) var(--hub-nav-height) minmax(
        0,
        1fr
      );
  }

  .site-header {
    position: relative;
    top: auto;
  }

  .hub-nav-shell {
    position: relative;
    top: auto;
  }

  .page-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 20px 0;
  }

  .docs-sidebar {
    position: static;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
  }

  .docs-directory {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .directory-panel {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .reading-column {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-color: var(--dc-scroll-thumb) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .document,
  .prose h2,
  .prose h3,
  .section-block > h2,
  .provider-model-catalog-heading h2,
  .topic-section {
    scroll-margin-top: 24px;
  }

  /* The reading column is the scroll container, so the outline sticks to it. */
  .page-toc {
    top: 24px;
  }

  .page-toc-links {
    max-height: calc(100vh - var(--sticky-offset) - 260px);
  }
}

@media (max-width: 1180px) {
  .search-bar {
    width: clamp(220px, 30vw, 330px);
    max-width: 330px;
    flex-basis: 330px;
  }

  .page-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .document.has-toc {
    display: block;
  }

  .page-toc {
    display: none;
  }

  .provider-grid,
  .learning-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --hub-nav-height: 98px;
    --sticky-offset: calc(var(--site-header-height) + var(--hub-nav-height));
  }

  .site-header-inner {
    padding: 0 8px;
  }

  .site-brand {
    height: 100%;
    margin-left: 0;
  }

  .primary-nav {
    display: none;
  }

  .site-header-actions {
    height: 100%;
    margin-left: auto;
    margin-right: 0;
  }

  .mobile-site-menu {
    display: block;
  }

  .header-currency-slot {
    display: none;
  }

  .hub-nav-shell {
    top: var(--site-header-height);
  }

  .hub-nav-inner {
    width: 100%;
    padding: 6px 12px 0;
    align-items: stretch;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 4px;
  }

  .hub-nav {
    width: 100%;
    height: 42px;
    padding: 0;
    gap: 2px;
  }

  /* Same as the marketplace tabs on phones: no icons, tighter padding, so all
     five tabs fit without scrolling. */
  .hub-nav a {
    height: 40px;
    padding: 0 7px;
  }

  .hub-nav a > svg {
    display: none;
  }

  .hub-nav-tools {
    width: 100%;
    height: 44px;
    gap: 8px;
  }

  .search-bar {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 1;
    margin: 0;
  }

  .search-form {
    height: 38px;
    max-width: none;
  }

  .page-shell {
    display: block;
    width: min(calc(100% - 24px), 930px);
    padding-top: 14px;
  }

  .docs-sidebar {
    position: static;
    margin-bottom: 14px;
  }

  .docs-directory {
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    background: var(--dc-surface);
    box-shadow: var(--dc-shadow-card);
  }

  .docs-directory:not([open]) > .directory-panel {
    display: none;
  }

  .directory-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  .directory-panel {
    max-height: min(68vh, 620px);
    padding: 6px 10px 14px;
    border: 0;
    border-top: 1px solid var(--dc-border-subtle);
    border-radius: 0;
    box-shadow: none;
  }

  .document {
    padding: 28px clamp(18px, 5vw, 32px) 36px;
  }

  h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .link-grid,
  .learning-path-grid,
  .provider-grid,
  .related-links,
  .facts-grid,
  .provider-model-groups {
    grid-template-columns: 1fr;
  }

  .provider-model-catalog-heading {
    display: block;
  }

  .provider-model-catalog-heading > time {
    display: block;
    margin-top: 8px;
  }

  .provider-model-actions {
    width: 100%;
    margin-left: 0;
  }

  .marketplace-callout {
    grid-template-columns: 1fr auto;
  }

  .marketplace-callout > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .marketplace-callout > span:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  .site-footer {
    padding: 32px 16px;
  }

  .site-footer-balanced-row {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .site-footer-balance-spacer {
    display: none;
  }

  .site-footer-center-content {
    grid-row: 1;
  }

  .site-footer-social {
    grid-row: 2;
    justify-self: center;
  }

  .site-footer-popover {
    right: 50%;
    transform: translateX(50%);
  }
}

/* Same breakpoint as the app's md: sign in only, avatar without the name. */
@media (max-width: 767px) {
  .header-auth .header-auth-register,
  .header-user .header-user-name {
    display: none;
  }

  .header-auth .header-auth-login {
    border-radius: 9999px;
  }
}

@media (max-width: 520px) {
  .site-brand strong {
    display: none;
  }

  .search-form input {
    padding-right: 10px;
    font-size: 15px;
  }

  .context-row {
    align-items: flex-start;
  }

  .link-grid a {
    min-height: 0;
  }

  .search-results a {
    grid-template-columns: 1fr;
  }

  .search-results a span {
    grid-row: auto;
  }
}

@media print {
  body {
    background: var(--dc-paper);
  }

  .site-header,
  .hub-nav-shell,
  .search-bar,
  .docs-sidebar,
  .page-toc,
  .site-footer {
    display: none;
  }

  .page-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .document,
  .document.has-toc {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* API reference: shared schema, endpoint navigation and copy-toAI. */
.api-directory-search {
  display: grid;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--dc-text-secondary);
}
.api-directory-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  background: var(--dc-surface);
  color: inherit;
}
.api-reference-group .tree-link {
  gap: 8px;
  align-items: center;
}
.api-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px 5px;
  min-width: 34px;
  border-radius: 4px;
  font: 10px/1.5 var(--dc-font-mono);
  background: #e8f2ff;
  color: #0064fa;
}
.api-method.is-GET {
  background: #e0f8eb;
  color: #087f46;
}
.api-method.is-DELETE {
  background: #ffebe9;
  color: #c32b21;
}
.api-reference-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 32%);
  gap: 24px;
  padding: 28px;
}
.api-reference-document .document-header h1 {
  font-size: 28px;
}
.api-reference-document .direct-answer {
  margin-top: 18px;
}
.api-reference-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.api-reference-toolbar code {
  overflow-wrap: anywhere;
  font: 12px/1.8 var(--dc-font-mono);
}
.api-toai-button {
  border: 0;
  border-radius: 8px;
  background: #0064fa;
  color: white;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.api-toai-preview {
  margin-top: 12px;
  font-size: 13px;
}
.api-toai-preview summary {
  cursor: pointer;
  color: #0064fa;
}
.guide-preview-content textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  background: var(--dc-surface-sunken);
  color: inherit;
  font: 12px/1.6 var(--dc-font-mono);
}
.api-copy-status {
  font-size: 12px;
  color: #0064fa;
}
.api-samples {
  position: sticky;
  top: calc(var(--sticky-offset) + 20px);
  align-self: start;
  min-width: 0;
}
.api-samples h2 {
  font-size: 16px;
  margin-bottom: 12px;
}
.api-sample-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.api-sample-tabs button {
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
}
.api-sample-tabs button[aria-selected="true"] {
  color: #0064fa;
  border-bottom-color: #0064fa;
}
.api-samples .code-block {
  position: relative;
  background: #172234;
  color: #e5efff;
  border-radius: 10px;
  padding: 40px 14px 18px;
  overflow: auto;
  max-height: 70vh;
  font: 12px/1.7 var(--dc-font-mono);
}
.api-samples .copy-code {
  position: absolute;
  top: 8px;
  right: 10px;
}
.api-reference-document .prose table {
  font-size: 12px;
}
.api-reference-document .prose td {
  overflow-wrap: anywhere;
}
.api-reference-group[hidden],
[data-reference-item][hidden],
[data-sample-panel][hidden] {
  display: none !important;
}
@media (max-width: 1200px) {
  .api-reference-document {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-samples {
    position: static;
  }
}
@media (max-width: 680px) {
  .api-reference-document {
    padding: 18px;
  }
  .api-reference-toolbar {
    align-items: stretch;
  }
  .api-sample-tabs {
    overflow-x: auto;
  }
}
.api-reference-group .tree-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.api-reference-group .tree-count {
  flex: 0 0 auto;
  min-width: 24px;
}
.api-reference-group .tree-link {
  display: flex;
}
.api-reference-group .tree-link > .api-method {
  position: static;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  background: #e8f2ff;
  color: #0064fa;
}
.api-reference-group .tree-link > .api-method.is-GET {
  background: #e0f8eb;
  color: #087f46;
}
.api-reference-group .tree-link > .api-method.is-DELETE {
  background: #ffebe9;
  color: #c32b21;
}
.api-nav-label {
  margin: 16px 8px 5px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dc-fg-subtle);
}
.api-reference-document .api-description {
  margin: 16px 0;
  color: var(--dc-fg-muted);
  font-size: 14px;
}

/* Endpoint reference: task-oriented navigation and progressive reading. */
.reference-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}
.reference-shell .directory-panel {
  padding: 14px 10px;
  box-shadow: none;
}
.reference-shell .api-directory-search {
  margin-bottom: 12px;
  font-size: 14px;
}
.reference-shell .api-directory-search input {
  padding: 8px 10px;
  font-size: 14px;
}
.reference-shell .api-nav-label {
  margin: 20px 8px 7px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.reference-shell .api-reference-group + .api-reference-group {
  margin: 0;
  padding: 0;
  border: 0;
}
.reference-shell .api-reference-group .tree-heading {
  height: auto;
  min-height: 38px;
  padding: 6px 8px;
}
.reference-shell .api-reference-group .tree-heading strong {
  font-size: 14px;
  font-weight: 500;
}
.reference-shell .api-reference-group .tree-count {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.reference-shell .api-reference-group .tree-children {
  padding: 3px 0 5px 8px;
}
.reference-shell .api-reference-group .tree-link {
  padding: 7px 8px;
  font-size: 14px;
  line-height: 1.5;
}
.reference-shell .tree-link .api-method {
  display: none;
}
.reference-shell .tree-link.is-active {
  background: var(--dc-primary-soft);
  color: var(--dc-primary);
}
.reference-related-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 8px 8px;
  margin-top: 15px;
  border-top: 1px solid var(--dc-border);
  font-size: 12px;
  color: var(--dc-fg-subtle);
}
.api-search-empty {
  padding: 12px 8px;
  font-size: 12px;
  color: var(--dc-fg-subtle);
}
.api-reference-document {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
}
.api-reference-document .document-main {
  display: contents;
}
.api-reference-document .document-header {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 0;
  border: 0;
}
.api-reference-document .document-header h1 {
  font-size: 28px;
  line-height: 1.35;
}
.api-reference-document .document-dates {
  font-size: 11px;
  margin-top: 12px;
}
.api-reference-toolbar {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}
.api-reference-toolbar > code {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 7px;
  background: var(--dc-surface-sunken);
}
.api-toai-button {
  background: var(--dc-primary);
  color: var(--dc-on-primary);
  font-size: 13px;
  border-radius: 6px;
}
.api-toai-preview summary {
  color: var(--dc-primary);
}
.api-toai-preview p {
  font-size: 12px;
  color: var(--dc-fg-subtle);
}
.api-copy-status:empty {
  display: none;
}
.api-copy-status {
  color: var(--dc-primary);
}
.reference-reading {
  min-width: 0;
}
.reference-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--dc-border);
  margin-bottom: 24px;
}
.reference-tabs a {
  padding: 0 0 12px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--dc-fg-subtle);
  border-bottom: 2px solid transparent;
}
.reference-tabs a[aria-selected="true"] {
  border-color: var(--dc-primary);
  color: var(--dc-primary);
}
.reference-panel {
  min-width: 0;
}
.reference-panel[hidden],
[data-reference-empty][hidden],
[data-reference-section][hidden] {
  display: none !important;
}
.api-reference-document .prose {
  font-size: 13px;
  line-height: 1.85;
}
.api-reference-document .prose h2 {
  font-size: 17px;
  margin: 28px 0 12px;
}
.api-reference-document .prose h2:first-child {
  margin-top: 0;
}
.api-reference-document .prose table {
  width: 100%;
  font-size: 12px;
  table-layout: fixed;
}
.api-reference-document .prose td,
.api-reference-document .prose th {
  padding: 10px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.api-reference-document .prose code {
  overflow-wrap: anywhere;
}
.reference-metadata {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--dc-border);
  color: var(--dc-fg-subtle);
  font-size: 12px;
}
.reference-metadata summary {
  cursor: pointer;
}
.reference-metadata .prose {
  margin-top: 18px;
}
.api-reference-document .api-samples {
  padding: 16px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  background: var(--dc-surface-sunken);
}
.api-reference-document .api-samples h2 {
  font-size: 14px;
  margin-top: 0;
}
.api-reference-document .api-sample-tabs {
  gap: 4px;
  flex-wrap: wrap;
}
.api-reference-document .api-sample-tabs button {
  font-size: 11px;
  padding: 7px;
}
.api-reference-document .api-sample-tabs button[aria-selected="true"] {
  color: var(--dc-primary);
  border-color: var(--dc-primary);
}
.api-reference-document .api-samples .code-block {
  background: var(--dc-surface);
  color: var(--dc-fg);
  border: 1px solid var(--dc-border);
  border-radius: 6px;
  max-height: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .reference-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .api-reference-document {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }
  .api-reference-document .api-samples {
    position: static;
  }
}
@media (max-width: 800px) {
  .reference-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  .api-reference-document {
    padding: 18px 14px;
  }
  .api-reference-document .document-header h1 {
    font-size: 24px;
  }
  .reference-tabs {
    gap: 14px;
    flex-wrap: wrap;
  }
  .reference-tabs a {
    font-size: 12px;
  }
  .api-reference-document .api-samples {
    padding: 12px;
  }
}
@media print {
  .reference-panel[hidden] {
    display: block !important;
  }
  .reference-tabs {
    display: none;
  }
}
.api-preview-button { border: 1px solid var(--dc-border-strong); background: var(--dc-surface); color: var(--dc-fg); border-radius: 6px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.document-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.document-heading-title { min-width: 0; flex: 1 1 240px; }
.document-guide-actions { display: flex; flex: 0 1 auto; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.document-guide-actions button { font-size: 13px; }
.docs-primary-navigation { padding-bottom: 8px; border-bottom: 1px solid var(--dc-border-subtle); }
@media (max-width: 680px) {
  .document-heading-row { flex-direction: column; gap: 12px; }
  .document-heading-title { flex: auto; width: 100%; }
  .document-guide-actions { justify-content: flex-start; padding-top: 0; }
}
.api-copy-hint { font-size: 12px; color: var(--dc-fg-subtle); }

.api-overview-entry {
  display: grid;
  gap: 4px;
  padding: 12px;
  margin: 0 0 12px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
}
.api-overview-entry strong { font-size: 15px; color: var(--dc-fg); }
.api-overview-entry span { font-size: 12px; color: var(--dc-fg-muted); }
.api-overview-entry:hover, .api-overview-entry.is-active { background: var(--dc-primary-soft); border-color: var(--dc-primary); }
.api-overview-card {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 10px;
  background: var(--dc-primary-soft);
}
.api-overview-card strong { font-size: 20px; color: var(--dc-primary); }
.api-overview-card span { font-size: 15px; color: var(--dc-fg); }
.api-overview-card p { margin: 0; font-size: 14px; color: var(--dc-fg-muted); }
.overview-link-field { margin-top: 20px; font-size: 13px; }
.overview-link-field > div { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.overview-link-field input { flex: 1; width: 0; min-width: 0; padding: 10px; border: 1px solid var(--dc-border); border-radius: 6px; background: var(--dc-surface-sunken); color: var(--dc-fg); font: 13px/1.5 var(--dc-font-mono); }
.overview-link-field p { margin: 8px 0 0; color: var(--dc-fg-muted); }
.overview-link-field a { flex: 0 0 auto; color: var(--dc-primary); }
.overview-link-field [data-link-status]:empty { display: none; }
.api-toai-preview[open] { padding: 14px; border: 1px solid var(--dc-border); border-radius: 8px; background: var(--dc-surface-sunken); }
.guide-dialog {
  width: min(920px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 64px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  background: var(--dc-surface);
  color: var(--dc-fg);
  box-shadow: 0 24px 80px rgb(0 0 0 / 25%);
  overflow: hidden;
}
.guide-dialog[open] { display: flex; flex-direction: column; }
.guide-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.guide-dialog-header, .guide-dialog-footer { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 18px 24px; }
.guide-dialog-header { border-bottom: 1px solid var(--dc-border); }
.guide-dialog-header > div { min-width: 0; }
.guide-dialog-header p { margin: 0 0 4px; font-size: 12px; color: var(--dc-fg-subtle); }
.guide-dialog-header h2 { margin: 0; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.guide-dialog-header button { flex-shrink: 0; }
.guide-dialog .guide-preview-content { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 16px 24px; }
.guide-preview-content p { margin: 0 0 8px; font-size: 12px; color: var(--dc-fg-subtle); }
.guide-dialog textarea { flex: 1 1 auto; min-height: 0; margin: 0; resize: none; overflow: auto; overscroll-behavior: contain; }
.guide-dialog-footer { border-top: 1px solid var(--dc-border); flex-wrap: wrap; }
.guide-dialog-footer .api-copy-status { margin: 0; flex: 1 1 180px; }
.guide-dialog-footer button { margin-left: auto; }
.guide-modal-open, .guide-modal-open body, .guide-modal-open .reading-column, .guide-modal-open .directory-panel { overflow: hidden !important; }
@media (max-width: 680px) {
  .guide-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 10px; }
  .guide-dialog-header, .guide-dialog-footer { padding: 12px 14px; gap: 10px; }
  .guide-dialog-header h2 { font-size: 17px; }
  .guide-dialog .guide-preview-content { padding: 12px 14px; }
}
@media print { .guide-dialog { display: none !important; } }
.api-reference-document .api-description { margin: 12px 0; }
.api-reference-document .api-samples .copy-code { color: var(--dc-fg-subtle); }
@media (max-width: 800px) {
 .reference-shell .docs-directory:not([open]) > .directory-panel { display: none; }
 .reference-shell .directory-toggle { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; }
 .reference-shell .docs-sidebar { position: static; }
}
