/* =========================================================
   Wylon Docs — Notion-style, three-column, card-based
   Reuses class names from the legacy shell; no HTML edits needed.
   ========================================================= */

@font-face {
  font-family: 'WylonBrand';
  src: url('assets/font/wylon_modified.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette — matches wylon.css (light only here; docs are always light) */
  --bg:          #fafaf9;
  --bg-soft:     #f7f6f3;
  --bg-sunken:   #f1f0ed;
  --bg-code:     #f6f6f3;
  --card:        #fcfcfb;
  --line:        #ecebe6;
  --line-2:      #e4e3dd;
  --line-strong: #dcdad3;

  --ink:    #191919;
  --ink-2:  #2f2e2b;
  --mute:   #787572;
  --mute-2: #a9a6a0;

  --accent:       #2383e2;
  --accent-hover: #1a6dc2;
  --accent-soft:  #e7f3fb;
  --accent-ink:   #0b4d86;

  --green:   #4c8a5c;
  --orange:  #c5864f;
  --red:     #c05252;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(15,15,15,0.04);
  --shadow-md: 0 4px 12px rgba(15,15,15,0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body { overflow-x: hidden; }
body.docs-mobile-nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  vertical-align: middle;
}

/* ---------- Top bar ---------- */
.docs-topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  /* Brand column matches docs-layout sidebar (260px) so the brand sits
     above the sidebar. Search lives in the 1fr column so its left edge
     lines up exactly with the content column. Nav auto-sizes so it
     never spills past the topbar edge. */
  grid-template-columns: 260px minmax(0, 1fr) auto;
  align-items: center;
  height: 56px;
  /* Align inner edges with .docs-layout (max-width 1380px + padding 24px) */
  padding-left: max(28px, calc(50% - 690px + 24px));
  padding-right: max(28px, calc(50% - 690px + 24px));
  background: rgba(250,250,249,0.85);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.docs-topbar .brand {
  display: inline-block;
  width: 103px; height: 26px;
  background: url(assets/wylon_logo/wylon_light.svg) left center / contain no-repeat;
  transition: opacity 150ms;
  justify-self: start;
}
.docs-topbar .brand span {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.docs-topbar .brand:hover { opacity: 0.78; }

.search {
  /* Sit in column 2, aligned with main content; cap width so the bar
     doesn't stretch absurdly on wide screens */
  width: 100%;
  min-width: 0;
  max-width: 520px;
  position: relative;
  display: flex; align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  transition: border-color 120ms, box-shadow 120ms;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35,131,226,0.15);
}
.search .sicon { color: var(--mute); font-size: 18px; margin-right: 6px; }
.search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
}
.search input::placeholder { color: var(--mute); }
.search .kbd {
  font-family: var(--mono); font-size: 11px;
  color: var(--mute);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.command-search-open { overflow: hidden; }
.command-search[hidden] { display: none; }
.command-search {
  position: fixed;
  inset: 0;
  z-index: 200;
}
.command-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25,25,25,0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.command-search-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 80px));
  margin: 72px auto 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 24px 80px rgba(15,15,15,0.18);
}
.command-search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.command-search-input .material-symbols-outlined {
  color: var(--mute);
  font-size: 18px !important;
}
.command-search-input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.command-search-input input::placeholder { color: var(--mute); }
.command-search-kbd {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--mute);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 5px;
  padding: 2px 6px;
}
.command-search-results {
  padding: 10px;
  overflow-y: auto;
}
.command-search-group + .command-search-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.command-search-label {
  padding: 4px 8px 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.command-search-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  border: 1px solid transparent;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.command-search-item:hover,
.command-search-item.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
}
.command-search-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--mute);
  font-size: 16px !important;
}
.command-search-item.active .command-search-icon,
.command-search-item:hover .command-search-icon {
  color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: #fff;
}
.command-search-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.command-search-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.command-search-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.35;
}
.command-search-method {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: #fff;
  border-radius: 999px;
  padding: 2px 7px;
}
.command-search-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--mute);
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .command-search-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 40px);
    margin-top: 20px;
  }
  .command-search-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .command-search-icon { display: none; }
}

.docs-topbar .nav {
  display: flex; align-items: center; gap: 4px;
  min-width: 0;
  justify-self: end;
}
.docs-topbar .nav a {
  font-size: 13.5px; font-weight: 500;
  color: var(--mute); padding: 6px 10px;
  border-radius: 6px;
  transition: background 120ms, color 120ms;
  display: inline-flex; align-items: center; gap: 6px;
}
.docs-topbar .nav a:hover { background: var(--bg-sunken); color: var(--ink); }
.docs-topbar .nav .lang-toggle,
.docs-topbar .nav .github-link {
  color: var(--mute);
}

@media (max-width: 1180px) {
  .docs-topbar { grid-template-columns: 240px minmax(0, 1fr) auto; }
}
@media (max-width: 820px) {
  .docs-topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 16px;
  }
  .docs-topbar .brand { grid-column: 1; }
  .docs-mobile-menu-toggle { grid-column: 2; }
  .search { grid-column: 3; }
  .docs-topbar .nav { grid-column: 4; }
  .search { max-width: none; }
  .docs-topbar .nav a:not(.lang-toggle):not(.github-link) { display: none; }
  .search .kbd { display: none; }
  .search input { font-size: 13px; }
}
@media (max-width: 560px) {
  .docs-topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }
  .search {
    cursor: pointer;
    overflow: hidden;
  }
  .search input {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
  }
  .search::after {
    content: attr(data-mobile-label);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mute);
    font-size: 12.5px;
  }
  .search:not([data-mobile-label])::after {
    content: "Search";
  }
}
@media (max-width: 420px) {
  .docs-topbar {
    gap: 6px;
    padding: 0 10px;
  }
  .docs-topbar .brand {
    width: 88px;
    height: 22px;
  }
  .search {
    padding: 5px 8px;
  }
  .search .sicon {
    margin-right: 4px;
  }
  .docs-topbar .nav a {
    padding: 6px 7px;
  }
  .docs-topbar .nav .github-link {
    display: none;
  }
  .docs-layout,
  .api-layout {
    padding-inline: 10px;
  }
}
@media (max-width: 360px) {
  .docs-topbar {
    padding: 0 8px;
  }
  .docs-topbar .brand {
    width: 78px;
  }
  .docs-mobile-menu-toggle,
  .docs-topbar .nav a {
    width: 32px;
    height: 32px;
  }
}

.docs-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.docs-mobile-menu-toggle:hover {
  border-color: var(--line-strong);
  background: var(--bg-sunken);
  color: var(--ink);
}
.docs-mobile-menu-toggle .material-symbols-outlined {
  font-size: 20px !important;
}
.docs-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
}
.docs-mobile-nav.open {
  display: block;
}
.docs-mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25,25,25,0.24);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.docs-mobile-nav-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, calc(100vw - 44px));
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 80px rgba(15,15,15,0.18);
  transform: translateX(-100%);
  transition: transform 220ms ease;
}
.docs-mobile-nav.open .docs-mobile-nav-panel {
  transform: translateX(0);
}
.docs-mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
}
.docs-mobile-nav-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.docs-mobile-nav-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
}
.docs-mobile-nav-close:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}
.docs-mobile-nav-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 28px;
}
.docs-mobile-nav-content .docs-sidebar {
  display: block;
  position: static;
  height: auto;
  overflow: visible;
  padding: 0;
  border-right: 0;
}
.docs-mobile-primary-nav {
  display: grid;
  gap: 6px;
}
.docs-mobile-primary-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.docs-mobile-primary-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.docs-mobile-primary-link.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.docs-mobile-primary-arrow {
  flex: 0 0 auto;
  color: var(--mute);
  font-size: 20px !important;
}
.docs-mobile-primary-link.active .docs-mobile-primary-arrow {
  color: var(--accent-ink);
}
.docs-mobile-section-tree {
  display: grid;
  gap: 12px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 72%, var(--card));
}
.docs-mobile-tree-group {
  min-width: 0;
}
.docs-mobile-tree-label {
  margin: 4px 2px 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.docs-mobile-tree-group ul {
  list-style: none;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.docs-mobile-tree-group li {
  margin: 0;
}
.docs-mobile-tree-group a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
}
.docs-mobile-tree-group a:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}
.docs-mobile-tree-group a.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 600;
}
.docs-mobile-tree-group .sidebar-sub {
  margin: 2px 0 6px 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.docs-mobile-tree-group .sidebar-sub a {
  padding: 7px 10px;
  color: var(--mute);
  font-size: 13px;
}
.docs-mobile-tree-group .sidebar-sub a.active {
  color: var(--accent-ink);
}
@media (max-width: 820px) {
  .docs-mobile-menu-toggle {
    display: inline-flex;
  }
}

/* ---------- Layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 240px;
  gap: 0;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: calc(100vh - 56px);
}
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; padding: 0 16px; }
  .docs-sidebar { display: none; }
}

/* ---------- Left Sidebar ---------- */
.docs-sidebar {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 28px 18px 48px 0;
  border-right: 1px solid var(--line);
  font-size: 13.5px;
}
.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.sidebar-group { margin-bottom: 22px; }
.sidebar-group .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 10px 6px;
}
.sidebar-group ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.sidebar-group li a {
  display: block;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: 6px;
  color: var(--ink-2);
  font-weight: 400;
  transition: background 120ms, color 120ms;
  position: relative;
}
.sidebar-group li a:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}
.sidebar-group li a.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 500;
}
.sidebar-group .sidebar-sub {
  margin: 2px 0 6px 11px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.sidebar-group .sidebar-sub li a { font-size: 13px; padding: 5px 10px; }

/* ---------- Main Content ---------- */
.docs-content {
  padding: 40px 48px 80px;
  min-width: 0;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 1180px) { .docs-content { padding: 32px 24px 64px; max-width: none; } }
@media (max-width: 820px)  { .docs-content { padding: 24px 0 48px; } }
@media (max-width: 480px) {
  .docs-content {
    padding: 20px 0 42px;
  }
  .docs-content h1 {
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -0.02em;
  }
  .docs-content h2 {
    margin-top: 42px;
    font-size: 20px;
  }
  .docs-content .lead {
    font-size: 15.5px;
    margin-bottom: 22px;
  }
}

.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--mute);
  margin-bottom: 20px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.breadcrumbs a,
.breadcrumbs .current {
  min-width: 0;
  overflow-wrap: anywhere;
}
.breadcrumbs .sep { color: var(--line-strong); }
.breadcrumbs .current { color: var(--ink-2); }

.docs-content h1 {
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}
.docs-content h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 56px 0 14px;
  padding-top: 8px;
  color: var(--ink);
  scroll-margin-top: 72px;
}
.docs-content h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 36px 0 10px;
  color: var(--ink);
  scroll-margin-top: 72px;
}
.docs-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--ink);
}

.docs-content p {
  margin: 10px 0 14px;
  color: var(--ink-2);
}
.docs-content .text-muted,
.api-content .text-muted {
  color: var(--mute);
}
.docs-content p > .text-muted,
.api-content p > .text-muted,
.docs-content li > .text-muted,
.api-content li > .text-muted {
  display: inline-block;
  margin-top: 2px;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  color: var(--mute);
  font-size: 0.94em;
  line-height: 1.55;
}
.docs-content .lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--mute);
  margin: 4px 0 28px;
}

.docs-content a:not(.inline):not(.prev):not(.next):not(.doc-card) {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 120ms;
}
.docs-content a:hover { border-bottom-color: var(--accent); }
.docs-content a.inline,
.api-content a.inline {
  display: inline;
  margin: 0 0.04em;
  padding: 0.08em 0.28em;
  color: var(--accent-ink);
  font-weight: 550;
  line-height: 1.45;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}
.docs-content a.inline:hover,
.api-content a.inline:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}
.docs-content a.inline:focus-visible,
.api-content a.inline:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 48%, transparent);
  outline-offset: 2px;
  border-bottom-color: transparent;
}
.docs-content a.inline[href^="http"]::after,
.api-content a.inline[href^="http"]::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.18em;
  font-size: 0.78em;
  font-weight: 650;
  line-height: 1;
  transform: translateY(-0.08em);
}
.docs-content a.inline.link-action,
.api-content a.inline.link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  min-height: 0;
  padding: 0.08em 0.3em;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-weight: 550;
  vertical-align: baseline;
}
.docs-content a.inline.link-action::after,
.api-content a.inline.link-action::after {
  content: "→";
  margin-left: 0;
  color: color-mix(in srgb, var(--accent) 78%, var(--ink-2));
  font-size: 0.82em;
  opacity: 0.78;
  transform: none;
  transition: transform 140ms ease, opacity 140ms ease;
}
.docs-content a.inline.link-action[href^="http"]::after,
.api-content a.inline.link-action[href^="http"]::after {
  content: "↗";
}
.docs-content a.inline.link-action:hover,
.api-content a.inline.link-action:hover {
  border-bottom-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: none;
}
.docs-content a.inline.link-action:hover::after,
.api-content a.inline.link-action:hover::after {
  transform: translateX(2px);
  opacity: 1;
}
.docs-content a.inline.link-action[href^="http"]:hover::after,
.api-content a.inline.link-action[href^="http"]:hover::after {
  transform: translate(1px, -1px);
}
.docs-content .callout a.inline,
.api-content .callout a.inline,
.docs-content table a.inline,
.api-content table a.inline {
  margin-inline: 0;
  padding-inline: 0.08em;
  background: transparent;
  border-radius: 2px;
  box-shadow: none;
}
.docs-content .callout a.inline:hover,
.api-content .callout a.inline:hover,
.docs-content table a.inline:hover,
.api-content table a.inline:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.docs-content .text-muted a.inline,
.api-content .text-muted a.inline {
  color: var(--mute);
  border-bottom-color: color-mix(in srgb, var(--mute) 35%, transparent);
  background: transparent;
}
.docs-content .text-muted a.inline:hover,
.api-content .text-muted a.inline:hover {
  color: var(--ink-2);
  border-bottom-color: var(--mute);
}

.docs-content .section-intro {
  margin: -4px 0 18px;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.6;
}
.docs-content .card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.docs-content .doc-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 16px 44px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}
.docs-content .doc-card .title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.docs-content .doc-card .desc {
  margin-top: 5px;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.55;
}
.docs-content .doc-card .arr {
  position: absolute;
  top: 16px;
  right: 14px;
  color: var(--mute-2);
  font-size: 18px !important;
  transition: color 150ms ease, transform 150ms ease;
}
.docs-content .doc-card:hover {
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.docs-content .doc-card:hover .arr {
  color: var(--accent);
  transform: translateX(2px);
}
.docs-content .scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
  margin: 16px 0;
  width: 100%;
  max-width: 100%;
}
.docs-content .scenario-item {
  min-width: 0;
  width: auto;
  max-width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}
.docs-content .scenario-item > div {
  min-width: 0;
}
.docs-content .scenario-item > .material-symbols-outlined {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--mute);
  font-size: 18px !important;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.docs-content .scenario-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.docs-content .scenario-item p {
  margin: 5px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.55;
}
.docs-content .scenario-item:hover {
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.docs-content .scenario-item:hover > .material-symbols-outlined {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.docs-content .capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 24px;
}
.docs-content .capability-item {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}
.docs-content .capability-item > div {
  min-width: 0;
}
.docs-content .capability-item > .material-symbols-outlined {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--mute);
  font-size: 18px !important;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.docs-content .capability-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.docs-content .capability-item p {
  margin: 6px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.6;
}
.docs-content .capability-item a.inline {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
}
.docs-content .capability-item:hover {
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.docs-content .capability-item:hover > .material-symbols-outlined {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.docs-content .dimension-list {
  margin: 16px 0 24px;
  border-top: 1px solid var(--line);
}
.docs-content .dimension-list > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}
.docs-content .dimension-list dt {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
}
.docs-content .dimension-list dt .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--mute);
  font-size: 18px !important;
}
.docs-content .dimension-list dd {
  min-width: 0;
  margin: 0;
  color: var(--mute);
}
.docs-content .dimension-list > div:hover {
  background: var(--bg-soft);
}
@media (max-width: 640px) {
  .docs-content .card-grid,
  .docs-content .scenario-grid,
  .docs-content .capability-grid {
    grid-template-columns: 1fr;
  }
  .docs-content .dimension-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.docs-content ul, .docs-content ol { margin: 10px 0 16px; padding-left: 22px; }
.docs-content li { margin: 6px 0; color: var(--ink-2); }
.docs-content li::marker { color: var(--mute-2); }
.docs-content :where(p, li, dd, td, th) {
  overflow-wrap: anywhere;
}

.docs-content .steps {
  list-style: none;
  counter-reset: guide-step;
  display: grid;
  gap: 26px;
  margin: 16px 0 28px;
  padding-left: 0;
}
.docs-content .steps > li {
  counter-increment: guide-step;
  position: relative;
  min-width: 0;
  padding-left: 48px;
}
.docs-content .steps > li::before {
  content: counter(guide-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.docs-content .steps > li > h3:first-child {
  margin-top: 0;
}
.docs-content .steps > li > :last-child {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .docs-content .steps {
    gap: 22px;
  }
  .docs-content .steps > li {
    padding-left: 40px;
  }
}

.legal-document ol:not(.legal-subitems) {
  list-style: none;
  counter-reset: legal-item;
  padding-left: 0;
}

.legal-document ol:not(.legal-subitems) > li {
  counter-increment: legal-item;
  position: relative;
  padding-left: 3em;
}

.legal-document ol:not(.legal-subitems) > li::before {
  content: "（" counter(legal-item) "）";
  position: absolute;
  left: 0;
  color: var(--mute-2);
}

.legal-document .legal-subitems {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.legal-document .legal-subitems > li {
  position: relative;
  padding-left: 2em;
}

.legal-document .legal-subitems > li:nth-child(1)::before { content: "①"; }
.legal-document .legal-subitems > li:nth-child(2)::before { content: "②"; }
.legal-document .legal-subitems > li:nth-child(3)::before { content: "③"; }
.legal-document .legal-subitems > li:nth-child(4)::before { content: "④"; }
.legal-document .legal-subitems > li:nth-child(5)::before { content: "⑤"; }
.legal-document .legal-subitems > li:nth-child(6)::before { content: "⑥"; }
.legal-document .legal-subitems > li:nth-child(7)::before { content: "⑦"; }
.legal-document .legal-subitems > li:nth-child(8)::before { content: "⑧"; }
.legal-document .legal-subitems > li:nth-child(9)::before { content: "⑨"; }
.legal-document .legal-subitems > li:nth-child(10)::before { content: "⑩"; }

.legal-document .legal-subitems > li::before {
  position: absolute;
  left: 0;
  color: var(--mute-2);
}
@media (max-width: 640px) {
  .legal-document ol:not(.legal-subitems) > li {
    padding-left: 2.5em;
  }
  .legal-document .legal-subitems > li {
    padding-left: 1.65em;
  }
}

.legal-document:lang(en) ol:not(.legal-subitems) > li::before {
  content: "(" counter(legal-item, lower-alpha) ")";
}

.legal-document:lang(en) .legal-subitems {
  counter-reset: legal-subitem;
}

.legal-document:lang(en) .legal-subitems > li {
  counter-increment: legal-subitem;
}

.legal-document:lang(en) .legal-subitems > li::before {
  content: "(" counter(legal-subitem, lower-roman) ")";
}

.docs-content .best-practice-list {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  border-top: 1px solid var(--line);
}

/* Migration page SDK switcher; defined here so zh/en variants behave the same on mobile. */
.sdk-switcher {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sdk-switcher .sdk-pill {
  flex: 0 0 auto;
}
.sdk-section {
  min-width: 0;
}
.migration-label {
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .sdk-switcher {
    display: flex !important;
    width: 100%;
  }
  .sdk-switcher .sdk-pill {
    flex: 1 0 auto;
    justify-content: center;
    padding-inline: 14px;
  }
}
.docs-content .best-practice-list > li {
  position: relative;
  margin: 0;
  padding: 14px 12px 14px 42px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  line-height: 1.65;
  transition: background 120ms ease;
}
.docs-content .best-practice-list > li::before {
  content: "check";
  position: absolute;
  top: 15px;
  left: 10px;
  color: var(--green);
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  line-height: 1;
}
.docs-content .best-practice-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 600;
}
.docs-content .best-practice-list > li:hover {
  background: var(--bg-soft);
}

.docs-content .setup-steps {
  list-style: none;
  counter-reset: setup-step;
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
  padding-left: 0;
}
.docs-content .setup-steps > li {
  counter-increment: setup-step;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.docs-content .setup-steps > li::before {
  content: counter(setup-step);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.docs-content .setup-steps > li:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.docs-content .cli-steps {
  list-style: none;
  counter-reset: cli-step;
  display: grid;
  gap: 0;
  margin: 14px 0 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.docs-content .cli-steps > li {
  counter-increment: cli-step;
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 64px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.6;
}
.docs-content .cli-steps > li:last-child {
  border-bottom: none;
}
.docs-content .cli-steps > li::before {
  content: counter(cli-step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.docs-content .cli-steps > li::after {
  content: "?";
  position: absolute;
  left: 38px;
  top: 9px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}
.docs-content .cli-steps code {
  background: #fff;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  color: var(--accent-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.docs-content .cli-steps strong {
  color: var(--ink);
}
@media (max-width: 640px) {
  .docs-content .cli-steps > li {
    padding: 12px 14px 12px 54px;
  }
  .docs-content .cli-steps > li::before {
    left: 14px;
  }
  .docs-content .cli-steps > li::after {
    left: 34px;
  }
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.docs-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-sunken);
  color: var(--ink);
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.docs-content pre {
  margin: 16px 0;
  padding: 18px 20px;
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.docs-content pre code {
  background: transparent; border: none; padding: 0;
  color: var(--ink-2); font-size: inherit;
}

/* Endpoint URL block */
.endpoint-url,
pre.endpoint-url {
  display: flex !important;
  align-items: center;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 10px 14px !important;
  font-family: var(--mono) !important;
  font-size: 13px !important;
  color: var(--ink) !important;
  white-space: pre-wrap;
  word-break: break-all;
}
.endpoint-url .tag.post,
.endpoint-url .tag {
  display: inline-block;
  background: color-mix(in srgb, var(--green) 18%, transparent) !important;
  color: var(--green) !important;
  font-weight: 600;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  margin-right: 10px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  line-height: 1.35;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .endpoint-url,
  pre.endpoint-url {
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px !important;
  }
  .endpoint-url .tag.post,
  .endpoint-url .tag {
    flex: 0 0 auto;
    margin-right: 0 !important;
  }
}

/* ---------- Callouts ---------- */
.callout {
  --callout-accent: var(--accent);
  --callout-accent-soft: var(--accent-soft);
  --callout-accent-ink: var(--accent-ink);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px 18px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--callout-accent) 18%, var(--line));
  border-left: 4px solid var(--callout-accent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--callout-accent) 8%, transparent), transparent 52%),
    var(--card);
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}
.callout::before {
  content: attr(data-callout-label);
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--callout-accent-ink);
  background: color-mix(in srgb, var(--callout-accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--callout-accent) 18%, transparent);
  border-radius: 999px;
  padding: 1px 7px;
}
.callout:not([data-callout-label])::before {
  display: none;
}
.callout .icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px !important;
  background: color-mix(in srgb, var(--callout-accent) 12%, #fff);
  color: var(--callout-accent);
  border: 1px solid color-mix(in srgb, var(--callout-accent) 18%, transparent);
}
.callout .body {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  padding-right: 74px;
}
.callout .body strong { color: var(--ink); display: block; margin-bottom: 2px; font-weight: 600; }
.callout .body p strong,
.callout .body li strong {
  display: inline;
  margin-bottom: 0;
}

.callout.tip {
  --callout-accent: var(--green);
  --callout-accent-ink: #2f6f40;
}
.callout.info {
  --callout-accent: var(--accent);
  --callout-accent-ink: var(--accent-ink);
}
.callout.warn {
  --callout-accent: var(--orange);
  --callout-accent-ink: #76501e;
}
.callout.danger {
  --callout-accent: var(--red);
  --callout-accent-ink: #823232;
}
@media (max-width: 640px) {
  .docs-content pre {
    padding: 14px 16px;
    font-size: 12.5px;
  }
  .callout {
    padding: 16px 14px;
    gap: 12px;
  }
  .callout::before {
    position: static;
    grid-column: 2;
    justify-self: start;
    margin-bottom: -4px;
  }
  .callout .body {
    padding-right: 0;
  }
}

/* ---------- Parameter table ---------- */
.param-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13.5px;
  background: var(--card);
}
.param-table thead th {
  text-align: center;
  font-weight: 500;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.param-table tbody td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.param-table tbody tr:last-child td { border-bottom: none; }
.param-table tbody tr:hover { background: var(--bg-soft); }
.param-table td code {
  font-size: 12.5px;
}
.param-table td:first-child { white-space: nowrap; }
@media (max-width: 720px) {
  .param-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .param-table table {
    width: 100%;
  }
  .param-table th,
  .param-table td {
    min-width: 140px;
  }
  .param-table td:first-child {
    white-space: normal;
  }
}
@media (max-width: 640px) {
  .docs-content .param-table,
  .api-content .param-table {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .docs-content .param-table thead,
  .api-content .param-table thead {
    display: none;
  }
  .docs-content .param-table tbody,
  .docs-content .param-table tr,
  .docs-content .param-table td,
  .api-content .param-table tbody,
  .api-content .param-table tr,
  .api-content .param-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .docs-content .param-table tbody,
  .api-content .param-table tbody {
    display: grid;
    gap: 10px;
  }
  .docs-content .param-table tr,
  .api-content .param-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
  }
  .docs-content .param-table tbody td,
  .api-content .param-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .docs-content .param-table tbody td:last-child,
  .api-content .param-table tbody td:last-child {
    border-bottom: 0;
  }
  .docs-content .param-table tbody td:first-child,
  .api-content .param-table tbody td:first-child {
    font-weight: 650;
    color: var(--ink);
    background: var(--bg-soft);
  }
}

@media (max-width: 640px) {
  .docs-content .compat-table {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .docs-content .compat-table thead {
    display: none;
  }
  .docs-content .compat-table tbody {
    display: grid;
    gap: 12px;
  }
  .docs-content .compat-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
  }
  .docs-content .compat-table td {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 0;
    white-space: normal;
  }
  .docs-content .compat-table td:first-child {
    grid-column: 1 / -1;
    display: block;
    font-weight: 650;
    color: var(--ink);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
  }
  .docs-content .compat-table td:nth-child(2),
  .docs-content .compat-table td:nth-child(3) {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    color: var(--ink-2);
  }
  .docs-content .compat-table td:nth-child(2) {
    border-right: 1px solid var(--line);
  }
  .docs-content .compat-table td:nth-child(2)::before,
  .docs-content .compat-table td:nth-child(3)::before {
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mute);
    line-height: 1.3;
  }
  html[lang^="zh"] .docs-content .compat-table td:nth-child(2)::before {
    content: "OpenAI SDK";
  }
  html[lang^="zh"] .docs-content .compat-table td:nth-child(3)::before {
    content: "Anthropic SDK";
  }
  html:not([lang^="zh"]) .docs-content .compat-table td:nth-child(2)::before {
    content: "OpenAI SDK";
  }
  html:not([lang^="zh"]) .docs-content .compat-table td:nth-child(3)::before {
    content: "Anthropic SDK";
  }
}

/* ---------- Code block with tabs ---------- */
.code-block {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.code-block .tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.code-block .tabs .spacer {
  flex: 1 0 12px;
}
.code-block .tab {
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, color 120ms;
}
.code-block .tab:hover { color: var(--ink); background: var(--bg-sunken); }
.code-block .tab.active {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.code-block .code-lang {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  white-space: nowrap;
}
.code-block.has-tabs .code-lang {
  margin-left: auto;
}
.code-block .wrap-btn,
.code-block .copy-btn,
.code-block .copy-target-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.code-block .wrap-btn:hover,
.code-block .copy-btn:hover,
.code-block .copy-target-btn:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}
.code-block .wrap-btn.active {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.code-block .copy-btn.copied {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--card));
  color: var(--green);
}
.code-block .copy-target-btn {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: #fff;
  color: var(--accent-ink);
}
.code-block .copy-target-btn.copied {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--card));
  color: var(--green);
}
.code-block .panel { display: none; }
.code-block .panel.active { display: block; }
.code-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 16px 20px;
}
.code-block.wrap-lines pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code-block.wrap-lines pre code {
  white-space: inherit;
}
@media (max-width: 640px) {
  .code-block .tabs {
    gap: 4px;
    padding: 6px;
    align-items: flex-start;
  }
  .code-block .code-lang {
    display: none;
  }
  .code-block .tabs .spacer {
    display: none;
  }
  .code-block .wrap-btn,
  .code-block .copy-btn,
  .code-block .copy-target-btn {
    padding: 5px 8px;
  }
  .code-block pre {
    padding: 14px 16px;
    font-size: 12.5px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: hidden;
  }
}

/* ---------- Migration page diff ---------- */
.migration-diff {
  background: #fff;
}
.migration-diff .tabs {
  position: static;
  z-index: 2;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 10px;
  min-height: 44px;
  overflow-x: auto;
}
.migration-diff .tab,
.migration-diff .code-lang {
  display: none;
}
.migration-diff .panel {
  display: block;
  min-width: 0;
  border-top: 1px solid var(--line);
}
.migration-diff .panel.active {
  display: block;
}
.migration-diff .migration-before {
  border-top: none;
}
.migration-diff .migration-panel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.migration-diff .migration-before .migration-panel-label {
  color: var(--ink-2);
  background: var(--bg-soft);
}
.migration-diff .migration-after .migration-panel-label {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}
.migration-diff pre {
  padding: 14px 0;
}
.migration-diff .migration-line {
  display: block;
  padding: 0 18px;
  border-left: 3px solid transparent;
  min-height: 1.6em;
}
.migration-diff .migration-line.changed {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.migration-diff .migration-after .migration-line.changed {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}
@media (min-width: 1020px) {
  .migration-diff {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .migration-diff .tabs {
    grid-column: 1 / -1;
  }
  .migration-diff .panel {
    border-top: none;
  }
  .migration-diff .migration-after {
    border-left: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .migration-diff .tabs { justify-content: flex-start; }
  .migration-diff .migration-panel-label {
    padding: 0 14px;
  }
  .migration-diff .migration-line {
    padding: 0 14px;
  }
}

/* ---------- FAQ accordion ---------- */
.faq.faq-accordion {
  display: grid;
  gap: 10px;
  margin: 16px 0 24px;
}
.faq.faq-accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}
.faq.faq-accordion details:hover {
  border-color: var(--line-strong);
}
.faq.faq-accordion details[open] {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: #fff;
  box-shadow: var(--shadow-md);
}
.faq.faq-accordion summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 16px 56px 16px 18px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.faq.faq-accordion summary::-webkit-details-marker {
  display: none;
}
.faq.faq-accordion summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}
.faq.faq-accordion details[open] summary::after {
  content: "−";
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.faq.faq-accordion summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: -4px;
  border-radius: var(--radius-sm);
}
.faq.faq-accordion .faq-answer {
  margin: 0 18px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}
.faq.faq-accordion .faq-answer p,
.faq.faq-accordion .faq-answer ul,
.faq.faq-accordion .faq-answer ol {
  margin-top: 0;
}
.faq.faq-accordion .faq-answer .answer-lead {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
}
.faq.faq-accordion .faq-answer .text-muted {
  display: block;
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  color: var(--mute);
  font-size: 0.96em;
  line-height: 1.7;
}
.faq.faq-accordion .faq-answer > :last-child {
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .faq.faq-accordion summary {
    padding: 14px 48px 14px 14px;
  }
  .faq.faq-accordion .faq-answer {
    margin: 0 14px 14px;
  }
}

/* ---------- Page footer (prev / next) ---------- */
.page-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.page-footer a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 18px 58px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  min-height: 84px;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}
.page-footer a:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15,15,15,0.08);
}
.page-footer a.prev { align-items: flex-start; text-align: left; }
.page-footer a.next { align-items: flex-end;   text-align: right; }
.page-footer a.prev {
  padding-right: 22px;
  padding-left: 58px;
}
.page-footer a.prev .footer-icon {
  left: 20px;
  right: auto;
}
.page-footer a .tip {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 160ms ease, transform 160ms ease;
}
.page-footer a.prev:hover .tip { transform: translateX(-2px); color: var(--accent); }
.page-footer a.next:hover .tip { transform: translateX( 2px); color: var(--accent); }
.page-footer a .title {
  display: block;
  max-width: 100%;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.page-footer .footer-desc {
  display: block;
  max-width: 100%;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45;
  text-wrap: pretty;
}
.page-footer a:hover .footer-desc {
  color: var(--ink-2);
}
.page-footer .footer-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 18px !important;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}
.page-footer a:hover .footer-icon {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  color: var(--accent-ink);
}
.page-footer a.prev:hover .footer-icon {
  transform: translate(-2px, -50%);
}
.page-footer a.next:hover .footer-icon {
  transform: translate(2px, -50%);
}
@media (max-width: 600px) {
  .page-footer { grid-template-columns: 1fr; gap: 10px; }
  .page-footer a.next { align-items: flex-start; text-align: left; }
  .page-footer a,
  .page-footer a.prev {
    padding: 16px 52px 16px 18px;
  }
  .page-footer a.prev .footer-icon,
  .page-footer .footer-icon {
    left: auto;
    right: 18px;
  }
  .page-footer > span:empty { display: none; }
}

/* ---------- Right TOC ---------- */
.docs-toc {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 40px 0 48px 24px;
  font-size: 13px;
  --toc-progress: 0%;
}
.docs-toc::-webkit-scrollbar { width: 6px; }
.docs-toc::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.docs-toc .toc-progress {
  position: absolute;
  left: 24px;
  top: 72px;
  bottom: 92px;
  width: 2px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.docs-toc .toc-progress-fill {
  display: block;
  width: 100%;
  height: var(--toc-progress);
  border-radius: inherit;
  background: var(--accent);
  transition: height 120ms ease;
}
.toc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}
.docs-toc ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.docs-toc li a {
  display: block;
  padding: 4px 10px;
  color: var(--mute);
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  transition: color 120ms, border-color 120ms;
}
.docs-toc li a:hover { color: var(--ink-2); }
.docs-toc li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}
.docs-toc li.nested a { padding-left: 22px; font-size: 12.5px; }
.toc-back-top {
  position: fixed;
  right: max(24px, calc((100vw - 760px) / 2 + 24px));
  bottom: 24px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252,252,251,0.94);
  color: var(--mute);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.toc-back-top:hover {
  border-color: var(--line-strong);
  background: var(--bg-sunken);
  color: var(--ink);
}
.toc-back-top.api-back-top {
  right: max(404px, calc((100vw - 1480px) / 2 + 404px));
  text-decoration: none;
}
.toc-mobile-actions {
  display: contents;
}
@media (max-width: 1280px) {
  .toc-back-top.api-back-top {
    right: 364px;
  }
}
@media (max-width: 1080px) {
  .toc-back-top.api-back-top {
    right: 24px;
  }
}

.toc-mobile {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: none;
}
.toc-mobile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252,252,251,0.94);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.toc-mobile-panel {
  position: absolute;
  right: 0;
  bottom: 50px;
  width: min(320px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 120px));
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(252,252,251,0.98);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.toc-mobile:not(.open) .toc-mobile-panel {
  display: none;
}
.toc-mobile-panel .toc-label {
  margin-bottom: 8px;
}
.toc-mobile-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-mobile-panel li a {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45;
}
.toc-mobile-panel li a.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 500;
}
.toc-mobile-panel li.nested a {
  padding-left: 20px;
  font-size: 12.5px;
}
.toc-mobile-panel .toc-back-top {
  position: static;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
@media (max-width: 1180px) {
  .toc-mobile-actions {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 24px);
    transform: translateX(-50%);
  }
  .toc-mobile {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
  }
  .toc-mobile-actions > .toc-back-top {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    justify-content: center;
    gap: 0;
    padding: 0;
    font-size: 0;
  }
  .toc-mobile-actions > .toc-back-top .material-symbols-outlined {
    font-size: 20px !important;
  }
  .toc-mobile-toggle {
    min-height: 44px;
    max-width: calc(100vw - 76px);
    padding: 0 16px;
    white-space: nowrap;
  }
  .toc-mobile-panel {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(68px + env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 132px));
    transform: translateX(-50%);
  }
}
@media (max-width: 480px) {
  .toc-mobile-actions {
    bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 6px;
  }
  .toc-mobile-actions > .toc-back-top {
    flex-basis: 42px;
    width: 42px;
    min-height: 42px;
  }
  .toc-mobile-toggle {
    min-height: 42px;
    max-width: calc(100vw - 72px);
    padding: 0 14px;
  }
  .toc-mobile-panel {
    bottom: calc(62px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

/* ---------- Misc bits some pages reference ---------- */
.kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink-2);
}

.pill, .chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

blockquote {
  margin: 16px 0;
  padding: 4px 16px;
  border-left: 3px solid var(--line-strong);
  color: var(--mute);
  font-style: normal;
}

img { max-width: 100%; display: block; border-radius: var(--radius-sm); }

/* Cards utility (in case content uses it) */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

/* =========================================================
   API Reference (Mintlify-style)
   3-column layout: sidebar | content+params | sticky code panel
   ========================================================= */
.api-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 380px;
  gap: 0;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: calc(100vh - 56px);
}
@media (max-width: 1280px) {
  .api-layout { grid-template-columns: 240px minmax(0, 1fr) 340px; }
}
@media (max-width: 1080px) {
  .api-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .api-code-rail {
    grid-column: 2;
    position: static;
    margin: 0 24px 64px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .api-code-panel {
    grid-column: 2;
    position: static;
    margin: 0 24px 64px;
    max-height: none;
  }
  .api-code-rail .api-code-panel {
    margin: 0;
  }
}
@media (max-width: 820px) {
  .api-layout { grid-template-columns: 1fr; padding: 0 16px; }
  .api-code-rail,
  .api-code-panel {
    grid-column: 1;
    margin: 0 0 52px;
  }
}

/* Reuse .docs-sidebar for left rail; nothing extra needed there */

.api-content {
  padding: 32px 36px 80px;
  min-width: 0;
}
@media (max-width: 1080px) { .api-content { padding: 28px 24px 64px; } }
@media (max-width: 820px)  { .api-content { padding: 24px 0 48px; } }
@media (max-width: 480px) {
  .api-content {
    padding: 20px 0 42px;
  }
  .api-content h1 {
    font-size: 28px;
    line-height: 1.18;
  }
  .api-content > .lead {
    font-size: 14.5px;
    margin-bottom: 22px;
  }
}

.api-content h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 4px 0 14px;
}
.api-content > .lead {
  font-size: 15px;
  color: var(--mute);
  margin: 0 0 28px;
  line-height: 1.6;
}
.api-content h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 14px;
  padding-top: 4px;
}
.api-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: color-mix(in srgb, var(--ink) 76%, var(--mute));
  background: color-mix(in srgb, var(--bg-sunken) 58%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 4px;
  padding: 0 4px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .api-content code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
.api-content pre code,
.api-content .code-block code,
.api-content .api-example code,
.api-code-panel code {
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  white-space: inherit;
}

/* API page orientation — purpose first, fields second */
.api-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.api-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.api-orientation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 28px;
}
.api-orientation > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.api-orientation strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--ink);
}
.api-orientation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute);
}
.api-orientation.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.api-orientation.compact {
  margin-top: 12px;
  margin-bottom: 18px;
}
.api-kicker {
  margin: -6px 0 14px;
  color: var(--mute);
  font-size: 13.5px;
  line-height: 1.65;
}
.api-kicker a.inline {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-bottom-color: color-mix(in srgb, var(--accent) 48%, transparent);
}
.api-kicker a.inline:hover {
  color: var(--accent-hover);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-bottom-color: var(--accent);
}
.api-kicker code {
  color: color-mix(in srgb, var(--ink) 84%, var(--mute));
  background: color-mix(in srgb, var(--bg-sunken) 76%, transparent);
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
}
.api-checklist {
  margin: 10px 0 22px;
  padding-left: 19px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.72;
}
.api-checklist li { margin: 3px 0; }
.api-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 22px;
}
.api-mini-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.api-mini-card strong {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 4px;
}
.api-mini-card p {
  margin: 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.55;
}
.api-table-wrap {
  overflow-x: auto;
  margin: 10px 0 22px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.api-table-wrap .param-table {
  margin: 0;
  min-width: 620px;
}
.api-code-inline {
  margin: 12px 0 20px;
}
.api-code-inline .code-block,
.api-code-inline .api-example {
  margin-bottom: 10px;
}
.api-status-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 16px 0 24px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--orange) 32%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 8%, var(--card));
}
.api-status-note .material-symbols-outlined {
  color: var(--orange);
  font-size: 22px !important;
}
.api-status-note strong { display: block; margin-bottom: 3px; font-size: 13.5px; }
.api-status-note p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.api-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 30px;
}
.api-endpoint-card {
  display: block;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 150ms, border-color 150ms, box-shadow 150ms;
}
.api-endpoint-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.api-endpoint-card .api-method { margin-right: 7px; }
.api-endpoint-card code { font-size: 12px; color: var(--ink); }
.api-endpoint-card strong { display: block; margin-top: 10px; font-size: 14px; }
.api-endpoint-card p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--mute); }
.api-endpoint-card.is-unavailable { background: var(--bg-soft); }
.api-endpoint-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.api-section-label {
  margin: 22px 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
@media (max-width: 640px) {
  .api-orientation,
  .api-orientation.three,
  .api-endpoint-grid,
  .api-mini-grid { grid-template-columns: 1fr; }
  .api-endpoint-card:last-child:nth-child(odd) { grid-column: auto; }
  .api-orientation > div,
  .api-mini-card,
  .api-endpoint-card,
  .api-param,
  .api-status-note {
    padding-left: 14px;
    padding-right: 14px;
  }
  .api-status-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* HTTP method + endpoint row */
.api-method-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13.5px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
  max-width: 100%;
}
.api-method {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}
.api-method.get    { background: #2c84db; }
.api-method.post   { background: #14a96b; }
.api-method.put    { background: #c98013; }
.api-method.patch  { background: #b56cd1; }
.api-method.delete { background: #c44b4b; }
.api-endpoint-path {
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
  min-width: 0;
}

/* Parameter card */
.api-param {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--card);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.api-param[data-param] {
  cursor: default;
}
.api-param[data-param]:hover,
.api-param[data-param]:focus-visible,
.api-param[data-param].is-linked,
.api-param[data-param].is-pinned {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--card)), var(--card));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent),
    0 10px 24px color-mix(in srgb, var(--accent) 8%, transparent);
  outline: none;
}
.api-param[data-param].is-pinned {
  border-color: color-mix(in srgb, #ffd166 58%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 209, 102, 0.18), rgba(255, 248, 226, 0.72) 58%, var(--card));
  box-shadow:
    0 0 0 3px rgba(255, 209, 102, 0.18),
    0 10px 24px rgba(255, 209, 102, 0.10);
}
.api-param-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.api-param-name {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.api-param-type {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
}
.api-param-required {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.api-param-optional {
  font-size: 10px;
  font-weight: 600;
  color: var(--mute-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.api-param-default {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--mute);
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 3px;
}
.api-param-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}
.api-param-desc > p { margin: 0 0 6px; }
.api-param-desc > p:last-child { margin-bottom: 0; }
.api-param-desc ul { margin: 6px 0; padding-left: 18px; }
.api-param-desc li { margin: 2px 0; }

/* Nested children — collapsed list under expandable parent */
.api-param-children {
  margin-top: 10px;
  padding: 10px 12px 4px;
  border-left: 2px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.api-param-children .api-param {
  border: none;
  background: transparent;
  padding: 6px 0 4px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.api-param-children .api-param:last-child { border-bottom: none; margin-bottom: 0; }

/* Response status tabs */
.api-resp-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 8px 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.api-resp-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms, border-color 120ms;
}
.api-resp-tab.active {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.api-resp-tab:hover:not(.active) { color: var(--ink); }
.api-resp-panel { display: none; }
.api-resp-panel.active { display: block; }

/* Code samples panel — sticky right, dark theme */
.api-code-rail {
  position: sticky;
  top: 80px;
  align-self: start;
  margin: 28px 0 32px 24px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding-right: 2px;
}
.api-code-rail .api-code-panel {
  position: relative;
  top: auto;
  margin: 0;
  max-height: none;
}
.api-code-panel {
  position: sticky;
  top: 80px;
  align-self: start;
  margin: 28px 0 32px 24px;
  border: 1px solid #1f2a3c;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f1722;
  color: #e6edf6;
  font-family: var(--mono);
  font-size: 11.75px;
  line-height: 1.5;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}
.api-code-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px 7px 12px;
  background: #131e2e;
  border-bottom: 1px solid #1f2a3c;
}
.api-code-panel-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.api-code-panel-head .scenario-label {
  font-family: var(--mono);
  font-size: 11px;
  color: #8b9bb3;
  letter-spacing: 0.04em;
  text-transform: none;
}
.api-code-panel-hint {
  color: #66758c;
  font-size: 10.5px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
.api-code-tabs {
  display: flex;
  align-items: center;
  padding: 4px 6px 0;
  gap: 2px;
  background: #131e2e;
  border-bottom: 1px solid #1f2a3c;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.api-code-tab {
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: #889bb3;
  background: transparent;
  border: none;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}
.api-code-tab.active {
  color: #fff;
  background: #0f1722;
}
.api-code-tab:hover:not(.active) { color: #cdd6e0; }
.api-code-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #889bb3;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.api-code-wrap:hover {
  color: #cdd6e0;
  background: #182438;
}
.api-code-wrap.active {
  color: #d7e7ff;
  background: rgba(130, 170, 255, 0.12);
  border-color: rgba(130, 170, 255, 0.26);
}
.api-code-tab:focus-visible,
.api-code-copy:focus-visible,
.api-code-wrap:focus-visible {
  outline: 2px solid color-mix(in srgb, #82aaff 70%, transparent);
  outline-offset: 2px;
}
.api-code-panel pre {
  margin: 0;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
  min-height: 0;
}
.api-code-panel pre code { color: inherit; background: transparent; padding: 0; font-size: inherit; }
.api-code-panel pre[hidden] { display: none; }
.api-code-panel.wrap-lines pre {
  white-space: pre-wrap;
  overflow-x: hidden;
}
.api-code-panel.wrap-lines pre code,
.api-code-panel.wrap-lines .api-code-line {
  white-space: inherit;
  overflow-wrap: anywhere;
}
.api-code-line {
  position: relative;
  display: block;
  min-height: 1.5em;
  margin: 0 -14px;
  padding: 0 14px 0 17px;
  border-left: 4px solid transparent;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}
.api-code-line.is-linked {
  background:
    linear-gradient(90deg, rgba(130, 170, 255, 0.28), rgba(130, 170, 255, 0.12) 64%, rgba(130, 170, 255, 0.04));
  border-left-color: #82aaff;
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(130, 170, 255, 0.18),
    0 0 18px rgba(130, 170, 255, 0.14);
}
.api-code-line.is-pinned {
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.34), rgba(255, 209, 102, 0.15) 68%, rgba(255, 209, 102, 0.05));
  border-left-color: #ffd166;
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 209, 102, 0.24),
    0 0 20px rgba(255, 209, 102, 0.16);
}
.api-code-line.is-linked .tok-str,
.api-code-line.is-pinned .tok-str,
.api-code-line.is-linked .tok-num,
.api-code-line.is-pinned .tok-num,
.api-code-line.is-linked .tok-fn,
.api-code-line.is-pinned .tok-fn,
.api-code-line.is-linked .tok-kw,
.api-code-line.is-pinned .tok-kw {
  filter: brightness(1.16) saturate(1.08);
}

/* Dark-theme syntax tokens for the code panel */
.api-code-panel .tok-kw  { color: #c792ea; }
.api-code-panel .tok-fn  { color: #82aaff; }
.api-code-panel .tok-str { color: #c3e88d; }
.api-code-panel .tok-num { color: #f78c6c; }
.api-code-panel .tok-com { color: #5e6c80; font-style: italic; }
.api-code-panel .tok-var,
.api-code-panel .tok-editable {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 4px;
  padding: 0 3px;
}
.api-content .tok-editable,
.api-content .tok-var {
  color: #8a5b00;
  background: color-mix(in srgb, #ffd166 20%, var(--card));
  border: 1px solid color-mix(in srgb, #ffd166 42%, var(--line));
  border-radius: 4px;
  padding: 0 3px;
}

/* Copy button on code panel */
.api-code-copy {
  font-family: inherit;
  font-size: 11px;
  color: #8b9bb3;
  background: transparent;
  border: 1px solid #1f2a3c;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.api-code-copy:hover { color: #cdd6e0; border-color: #2a3850; }
@media (max-width: 640px) {
  .api-code-panel {
    font-size: 11.5px;
  }
  .api-code-panel-head {
    align-items: flex-start;
    padding: 9px 10px;
  }
  .api-code-tabs {
    padding: 4px 6px 0;
  }
  .api-code-tab {
    padding: 6px 10px;
  }
  .api-code-wrap {
    margin-left: 0;
    flex: 0 0 auto;
  }
  .api-code-panel pre {
    padding: 12px;
  }
  .api-code-line {
    margin-inline: -12px;
    padding-inline: 15px 12px;
  }
}

/* Response example block (inside response panel) — subtle frame */
.api-example {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--mono);
  font-size: 12.5px;
  margin: 0 0 10px;
}
.api-example-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.api-example pre {
  margin: 0; padding: 14px 16px;
  background: transparent; border: none; border-radius: 0;
  white-space: pre; overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
  .api-example {
    font-size: 12px;
  }
  .api-example pre {
    padding: 12px 14px;
  }
}

/* ---- Beian strip (page-bottom ICP / police filing notice) ---- */
.beian-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 24px 24px;
  font-size: 12px;
  color: var(--mute);
  border-top: 1px solid var(--line);
}
.beian-strip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}
.beian-strip a:hover { color: var(--ink); }
.beian-strip img {
  height: 14px;
  width: auto;
  display: inline-block;
}
