/* Developer portal — light/dark themes. No external fonts or images. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #ffffff;
  --text: #344054;
  --text-strong: #101828;
  --text-2: #667085;
  --text-3: #98a2b3;
  --section: rgba(16, 24, 40, 0.8);
  --accent: #f87916;
  --accent-soft: #ffefe3;
  --post: #ef6820;
  --post-soft: #fff4ed;
  --border: #e5e7eb;
  --border-card: #f2f4f7;
  --border-acc: #eaecf0;
  --border-search: rgba(0, 0, 0, 0.118);
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --hover: rgba(16, 24, 40, 0.04);
  --field: #155eef;
  --field-bg: #eff4ff;
  --tip-bg: #f0fdf4;
  --tip-border: #bbf7d0;
  --tip-text: #15803d;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1d4ed8;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #b45309;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #b91c1c;
  --code-bg: #f9fafb;
  --j-key: #155eef;
  --j-str: #067647;
  --j-num: #c4320a;
  --j-lit: #7a5af8;
  --glow-a: rgba(186, 214, 255, 0.55);
  --glow-b: rgba(255, 214, 226, 0.55);
  --glow-c: rgba(255, 236, 214, 0.45);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  --mask: rgba(16, 24, 40, 0.42);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #16161e;
  --text: #e4e7ec;
  --text-strong: #f5f5f6;
  --text-2: #98a2b3;
  --text-3: #667085;
  --section: rgba(245, 245, 246, 0.86);
  --accent: #f87916;
  --accent-soft: rgba(248, 121, 22, 0.16);
  --post: #fd853a;
  --post-soft: rgba(248, 121, 22, 0.14);
  --border: #2b2b3a;
  --border-card: #2a2a38;
  --border-acc: #30303f;
  --border-search: rgba(255, 255, 255, 0.14);
  --surface: #1e1e2a;
  --surface-2: #1b1b26;
  --surface-3: #262634;
  --hover: rgba(255, 255, 255, 0.05);
  --field: #84adff;
  --field-bg: rgba(41, 112, 255, 0.16);
  --tip-bg: rgba(22, 163, 74, 0.12);
  --tip-border: rgba(74, 222, 128, 0.28);
  --tip-text: #4ade80;
  --info-bg: rgba(37, 99, 235, 0.12);
  --info-border: rgba(96, 165, 250, 0.3);
  --info-text: #93c5fd;
  --warn-bg: rgba(217, 119, 6, 0.12);
  --warn-border: rgba(251, 191, 36, 0.3);
  --warn-text: #fbbf24;
  --danger-bg: rgba(220, 38, 38, 0.12);
  --danger-border: rgba(248, 113, 113, 0.3);
  --danger-text: #fca5a5;
  --code-bg: #1b1b26;
  --j-key: #84adff;
  --j-str: #75e0a7;
  --j-num: #fdb022;
  --j-lit: #bdb4fe;
  --glow-a: rgba(80, 90, 170, 0.22);
  --glow-b: rgba(160, 70, 120, 0.16);
  --glow-c: rgba(248, 121, 22, 0.06);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5);
  --mask: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page-glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 88% -60px, var(--glow-b), transparent 70%),
    radial-gradient(760px 380px at 18% -120px, var(--glow-a), transparent 70%),
    radial-gradient(640px 300px at 60% 40px, var(--glow-c), transparent 72%);
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: relative;
  z-index: 30;
  flex: 0 0 65px;
  height: 65px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  backdrop-filter: none;
}
.topbar-inner {
  max-width: 1560px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); font-size: 16px; font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { color: var(--accent); flex: none; }
.topnav { display: flex; align-items: stretch; gap: 4px; height: 64px; min-width: 0; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 64px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-strong); text-decoration: none; }
.nav-link.active { color: var(--text-strong); font-weight: 600; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.has-menu .nav-link.active::after { right: 30px; }
.nav-link .chev-down { color: var(--text-2); transition: transform 0.18s ease; }
.nav-item.is-open .chev-down { transform: rotate(180deg); }
.nav-menu {
  position: absolute;
  top: 58px;
  left: 0;
  min-width: 260px;
  max-width: 420px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  line-height: 20px;
}
.nav-section + .nav-section { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border-card); }
.nav-section-title, .nav-menu-link { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.nav-section-title { font-weight: 600; color: var(--text-strong); }
.nav-menu-link { padding-left: 24px; color: var(--text-2); }
.nav-section-title:hover, .nav-menu-link:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
}
.icon-button:hover { background: var(--hover); }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }
.drawer-toggle { display: none; margin-left: -6px; }

/* ---------------------------------------------------------------- frame */
.frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
}
.sidebar {
  flex: 0 0 320px;
  width: 320px;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 20px 40px 8px;
  background: transparent;
  scrollbar-width: thin;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  height: 36px;
  margin: 0 0 22px 12px;
  padding: 0 12px;
  border: 1px solid var(--border-search);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}
.search-trigger:hover { border-color: var(--accent); }
.search-placeholder { flex: 1; }
.search-kbd { min-width: 0; padding: 0; border: 0; background: none; font-family: var(--font); font-size: 13px; color: var(--text-2); }
.tree { font-size: 14px; line-height: 20px; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin: 1px 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}
.tree-row:hover { background: var(--hover); text-decoration: none; }
.tree-row.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tree-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tree-group-row .chev { flex: none; color: var(--text-3); transition: transform 0.18s ease; }
.tree-group-row[aria-expanded="true"] .chev { transform: rotate(90deg); }
.tree-children { position: relative; }
.d1 { padding-left: 33px; }
.d2 { padding-left: 46px; }
.d3 { padding-left: 59px; }
.d4 { padding-left: 72px; }
.d5 { padding-left: 85px; }
.d6 { padding-left: 98px; }
.d7 { padding-left: 111px; }
.d8, .d9 { padding-left: 124px; }
.method-badge {
  flex: none;
  display: inline-block;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--post);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.doc-badge { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 11px; line-height: 18px; }
.main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: auto;
}
.main:focus { outline: none; }
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding: 30px 30px 64px 44px;
}
.content-wrap.has-toc { grid-template-columns: minmax(0, 1fr) 240px; }
.content { min-width: 0; }
.loading { color: var(--text-2); }

/* ---------------------------------------------------------------- toc */
.toc { position: sticky; top: 8px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 14px; line-height: 20px; padding-top: 2px; }
.toc-title { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--text-strong); font-weight: 500; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-link {
  display: block;
  width: 100%;
  padding: 5px 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}
.toc-link:hover { color: var(--accent); }
.toc-link.active { color: var(--accent); }
.toc-l3 { padding-left: 14px; color: var(--text-2); }

/* ---------------------------------------------------------------- typography */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-2); font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.crumb-sep { color: var(--text-3); }
.page-title { margin: 0 0 24px; color: var(--text-strong); font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.markdown { font-size: 16px; line-height: 28px; overflow-wrap: break-word; }
.markdown > :first-child { margin-top: 0; }
.markdown h2 { margin: 36px 0 16px; color: var(--text-strong); font-size: 24px; line-height: 30px; font-weight: 500; }
.markdown h3 { margin: 28px 0 12px; color: var(--text-strong); font-size: 20px; line-height: 25px; font-weight: 500; }
.markdown h4, .markdown h5, .markdown h6 { margin: 22px 0 10px; color: var(--text-strong); font-size: 17px; line-height: 24px; font-weight: 600; }
.markdown p { margin: 0 0 16px; }
.markdown strong { color: var(--text-strong); font-weight: 600; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.markdown blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--border-acc); color: var(--text-2); }
.markdown blockquote p { margin: 6px 0; }
.md-list { margin: 0 0 16px; padding-left: 26px; }
.md-list li { margin: 4px 0; }
.md-list li::marker { color: var(--text-3); }
.md-list .md-list { margin: 4px 0; }
.markdown :not(pre) > code, .field-desc :not(pre) > code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-strong);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}
.ext-link { color: var(--text-strong); border-bottom: 1px dashed var(--text-3); }
.icon-check { vertical-align: -3px; margin-right: 4px; color: var(--accent); }
.muted { color: var(--text-2); font-size: 14px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; margin: 0 0 20px; }
.md-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; line-height: 28px; }
.md-table th, .md-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: left; vertical-align: middle; overflow-wrap: anywhere; min-width: 72px; }
.md-table th:last-child, .md-table td:last-child { border-right: 0; }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table td[rowspan] { background: var(--surface); }
.md-table th { color: var(--text-strong); font-weight: 500; background: var(--surface-2); }
.md-table thead th:first-child { border-top-left-radius: 8px; }
.md-table thead th:last-child { border-top-right-radius: 8px; }
.md-table.has-merged td a { font-weight: 500; }
.md-table.has-merged th { white-space: nowrap; }
.api-quick td:nth-child(2) { white-space: nowrap; }
.path-code { font-size: 13px; }

/* ---------------------------------------------------------------- code */
.code-block { margin: 0 0 20px; border: 1px solid var(--border-card); border-radius: 12px; background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border-card); font-size: 12px; line-height: 20px; color: var(--text-2); }
.code-lang { text-transform: none; font-family: var(--mono); }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; background: transparent; font-size: 14px; line-height: 24px; }
.code-block code { font-family: var(--mono); color: var(--text-strong); white-space: pre; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 12px; line-height: 20px; cursor: pointer; }
.copy-btn:hover { background: var(--hover); color: var(--text-strong); }
.j-key { color: var(--j-key); }
.j-str { color: var(--j-str); }
.j-num { color: var(--j-num); }
.j-lit { color: var(--j-lit); }
.j-muted { color: var(--text-3); }
.clipboard-proxy { position: fixed; top: 0; left: -9999px; opacity: 0; }

/* ---------------------------------------------------------------- callouts / components */
.callout { margin: 0 0 20px; padding: 16px 20px; border: 1px solid; border-radius: 12px; }
.callout-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.callout-body { padding-left: 26px; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-tip { background: var(--tip-bg); border-color: var(--tip-border); }
.callout-tip .callout-title { color: var(--tip-text); }
.callout-info { background: var(--info-bg); border-color: var(--info-border); }
.callout-info .callout-title { color: var(--info-text); }
.callout-warning { background: var(--warn-bg); border-color: var(--warn-border); }
.callout-warning .callout-title { color: var(--warn-text); }
.callout-danger { background: var(--danger-bg); border-color: var(--danger-border); }
.callout-danger .callout-title { color: var(--danger-text); }
.md-card { margin: 0 0 20px; padding: 16px 20px; border: 1px solid var(--border-acc); border-radius: 12px; background: var(--surface); }
.md-card > :last-child { margin-bottom: 0; }
.accordion { margin: 0 0 20px; border: 1px solid var(--border-acc); border-radius: 12px; background: var(--surface); box-shadow: none; }
.accordion-head { display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 12px 16px; cursor: pointer; list-style: none; color: var(--text-strong); font-weight: 500; user-select: none; }
.accordion-head::-webkit-details-marker { display: none; }
.accordion-head .chev { flex: none; color: var(--text-2); transition: transform 0.18s ease; }
.accordion[open] > .accordion-head .chev { transform: rotate(90deg); }
.accordion[open] > .accordion-head { border-bottom: 1px solid var(--border-acc); }
.accordion-body { padding: 14px 20px 6px; }
.steps { list-style: none; margin: 8px 0 24px; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding-bottom: 8px; }
.step::before { content: ""; position: absolute; left: 13px; top: 34px; bottom: 4px; width: 1px; background: var(--border); }
.step:last-child::before { display: none; }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; border-radius: 8px; background: var(--surface-3); color: var(--text-strong); font-size: 14px; font-weight: 600; line-height: 1; }
.step-main { min-width: 0; }
.step-title { margin: 1px 0 10px; color: var(--text-strong); font-size: 18px; line-height: 28px; font-weight: 600; }
.step-body { padding-bottom: 12px; }
.content-doc.is-wide .markdown { max-width: none; }

/* ---------------------------------------------------------------- diagrams */
.diagram { margin: 8px 0 28px; padding: 18px; border: 1px solid var(--border-acc); border-radius: 12px; background: var(--surface); font-size: 13px; line-height: 20px; }
.diagram figcaption { margin-top: 12px; color: var(--text-2); font-size: 13px; text-align: center; }
.arch-layer { padding: 12px 14px 14px; border-radius: 10px; }
.arch-layer + .arch-layer { margin-top: 10px; }
.arch-layer-title { margin-bottom: 10px; text-align: center; color: var(--text-strong); font-weight: 600; font-size: 14px; }
.arch-title-accent { color: var(--accent); }
.arch-enterprise { background: rgba(21, 94, 239, 0.06); }
.arch-eco { background: rgba(248, 121, 22, 0.06); }
.arch-model { border: 1.5px dashed var(--accent); background: rgba(248, 121, 22, 0.05); }
.arch-gov { background: rgba(21, 94, 239, 0.06); }
.arch-row { display: grid; gap: 10px; }
.arch-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.arch-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arch-row-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.arch-box { padding: 8px 10px; border: 1px solid rgba(21, 94, 239, 0.45); border-radius: 8px; background: var(--surface); text-align: center; color: var(--text-strong); }
.arch-chip { padding: 6px 4px; }
.arch-card { padding: 10px 12px; border: 1px solid var(--border-acc); border-radius: 8px; background: var(--surface); }
.arch-card ol { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.arch-card p { margin: 6px 0 0; color: var(--text-2); text-align: center; }
.arch-card .arch-strong { color: var(--text-strong); font-weight: 600; }
.arch-pill { width: fit-content; margin: 0 auto; padding: 2px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.arch-pill-green { background: #16a34a; }
.arch-arrows { display: flex; justify-content: space-around; color: var(--accent); margin: 4px 0; }
.pano-band { padding: 10px; border-radius: 10px; text-align: center; font-weight: 600; color: var(--text-strong); background: var(--surface-3); }
.pano-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.pano-col { padding: 12px; border-radius: 10px; border: 1px solid var(--border-acc); }
.pano-a { background: rgba(21, 94, 239, 0.05); }
.pano-b { background: rgba(248, 121, 22, 0.06); }
.pano-c { background: rgba(22, 163, 74, 0.06); }
.pano-title { margin-bottom: 8px; text-align: center; font-weight: 600; color: var(--text-strong); font-size: 14px; }
.pano-item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-card); }
.pano-item + .pano-item { margin-top: 8px; }
.pano-item span { color: var(--text-2); }
.selector { text-align: center; }
.sel-start { width: fit-content; margin: 0 auto 10px; padding: 6px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.sel-q { margin: 0 auto 10px; padding: 8px 12px; border: 1px solid var(--border-acc); border-radius: 8px; background: var(--surface-2); color: var(--text-strong); max-width: 420px; }
.sel-root { border-color: var(--accent); }
.sel-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sel-branch { padding: 12px; border: 1px dashed var(--border-acc); border-radius: 10px; }
.sel-label { display: inline-block; margin-bottom: 8px; color: var(--text-2); font-weight: 500; }
.sel-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sel-result { display: flex; flex-direction: column; padding: 8px; border-radius: 8px; background: var(--accent-soft); }
.sel-result span { color: var(--text-2); font-size: 12px; }
.sel-result strong { color: var(--accent); }
.flow { padding: 16px; }
.flow-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.flow-node { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border-acc); border-radius: 10px; background: var(--surface-2); color: var(--text-strong); font-weight: 500; }
.flow-index { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; line-height: 1; }
.flow-sep { color: var(--text-3); display: inline-flex; }

/* ---------------------------------------------------------------- footer / pager */
.doc-footer { margin-top: 48px; }
.updated { margin: 0 0 32px; color: var(--text-2); font-size: 14px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 0; }
.pager-card { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 14px 20px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-strong); }
.pager-card:hover { border-color: var(--accent); text-decoration: none; }
.pager-next { grid-column: 2; justify-content: space-between; text-align: left; }
.pager-prev { grid-column: 1; }
.pager-text { display: flex; flex-direction: column; min-width: 0; }
.pager-label { color: var(--text-2); font-size: 12px; line-height: 18px; }
.pager-title { font-size: 15px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.pager-card svg { flex: none; color: var(--text-2); }

/* ---------------------------------------------------------------- api page */
.api-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.content-api .page-title { margin-bottom: 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill-sm { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.pill-light { height: 28px; padding: 0 10px; font-size: 12px; color: var(--text-2); }
.pill-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.deprecated-tag { margin-left: 10px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 13px; font-weight: 500; vertical-align: middle; }
.api-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 20px;
}
.method-tag { padding: 4px 8px; border-radius: 6px; background: var(--post-soft); color: var(--post); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.api-host { padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-strong); overflow-wrap: anywhere; }
.api-path { padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: var(--text-strong); font-size: 14px; cursor: copy; overflow-wrap: anywhere; text-align: left; }
.api-path:hover { background: var(--hover); }
.api-url-actions { display: inline-flex; gap: 8px; margin-left: auto; }
.api-desc h2 { font-size: 24px; line-height: 30px; font-weight: 500; margin-top: 0; }
.api-section { margin-top: 32px; }
.section-title { margin: 0 0 16px; color: var(--section); font-size: 20px; line-height: 28px; font-weight: 600; }
.param-card { margin: 0 0 20px; border: 1px solid var(--border-card); border-radius: 12px; background: transparent; box-shadow: none; }
.param-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-card); color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 24px; }
.ctype { padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 400; line-height: 20px; }
.param-card-body { padding: 6px 16px 10px; }
.param-row { padding: 10px 0; max-width: 780px; }
.param-row + .param-row { border-top: 1px solid var(--border-card); }
.field-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 26px; font-size: 14px; line-height: 20px; }
.field-name { padding: 1px 6px; border-radius: 6px; background: var(--field-bg); color: var(--field); font-family: var(--font); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.field-type { color: var(--text-strong); font-size: 14px; }
.field-null, .field-ref { padding: 0 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 12px; line-height: 18px; }
.field-req { margin-left: auto; color: var(--text-2); font-size: 12px; }
.field-req.is-required { color: var(--accent); }
.field-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0 30px; color: var(--text-2); font-size: 13px; line-height: 22px; }
.param-row .field-meta, .param-row .field-desc { margin-left: 8px; }
.tag { display: inline-block; margin: 0 4px 2px 4px; padding: 0 6px; border-radius: 5px; background: var(--surface-3); color: var(--text); font-family: var(--font); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.field-desc { margin: 4px 0 0 30px; color: var(--text); font-size: 14px; line-height: 22px; }
.markdown.compact p { margin: 0 0 4px; }
.markdown.compact .md-table { font-size: 13px; line-height: 20px; }
.markdown.compact .md-table th, .markdown.compact .md-table td { padding: 6px 8px; min-width: 48px; }
.markdown.compact .table-wrap { margin: 6px 0; }
.markdown.compact h2, .markdown.compact h3, .markdown.compact h4 { margin: 8px 0 4px; font-size: 14px; line-height: 22px; font-weight: 600; }
.markdown.compact .md-list { margin: 0 0 4px; padding-left: 18px; }
.markdown.compact .code-block { margin: 6px 0; }
.markdown.compact .code-block pre { font-size: 12px; line-height: 20px; padding: 8px 10px; }
.markdown.compact .callout { padding: 10px 12px; margin: 6px 0; }
.schema-tree { padding: 6px 16px 10px; }
.field { padding: 10px 0 8px; }
.field + .field { border-top: 1px solid var(--border-card); }
.field-children { margin: 8px 0 0 10px; padding-left: 14px; border-left: 1px solid var(--border-acc); }
.field-children .field:first-child { padding-top: 4px; }
.field-toggle { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--border-acc); border-radius: 6px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.field-toggle:hover { color: var(--accent); border-color: var(--accent); }
.field-toggle .chev { transition: transform 0.18s ease; }
.field-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.field-toggle-spacer { display: inline-block; width: 22px; flex: none; }
.param-row .field-toggle-spacer { display: none; }
.field-root { padding: 8px 0; color: var(--text-2); font-size: 13px; }
.empty-note { margin: 0; padding: 14px 16px; color: var(--text-2); font-size: 14px; }
.split { display: grid; grid-template-columns: 60fr 9px 40fr; align-items: stretch; min-width: 0; }
.split.r35 { grid-template-columns: 35fr 9px 65fr; }
.split.r40 { grid-template-columns: 40fr 9px 60fr; }
.split.r45 { grid-template-columns: 45fr 9px 55fr; }
.split.r50 { grid-template-columns: 50fr 9px 50fr; }
.split.r55 { grid-template-columns: 55fr 9px 45fr; }
.split.r60 { grid-template-columns: 60fr 9px 40fr; }
.split.r65 { grid-template-columns: 65fr 9px 35fr; }
.split.r70 { grid-template-columns: 70fr 9px 30fr; }
.split.r75 { grid-template-columns: 75fr 9px 25fr; }
.split-left, .split-right { min-width: 0; }
.split-handle { position: relative; cursor: col-resize; touch-action: none; }
.split-handle span { position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--border-card); }
.split-handle:hover span, .split.is-dragging .split-handle span, .split-handle:focus-visible span { left: 3px; width: 3px; border-radius: 2px; background: var(--accent); }
.split.is-dragging { user-select: none; cursor: col-resize; }
.split-right { display: flex; flex-direction: column; }
.example-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border-card); }
.example-title { color: var(--text-strong); font-size: 15px; font-weight: 500; }
.example-actions { display: inline-flex; gap: 6px; }
.json-example { position: sticky; top: 0; margin: 0; padding: 14px 16px; overflow: auto; max-height: 640px; background: transparent; font-family: var(--mono); font-size: 13px; line-height: 22px; color: var(--text-strong); }
.json-example code { white-space: pre; }
.resp-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.resp-tab { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 8px; background: var(--surface-3); color: var(--text-strong); font-size: 14px; font-weight: 500; line-height: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }

/* ---------------------------------------------------------------- modals */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.modal-backdrop { position: absolute; inset: 0; background: var(--mask); }
.search-panel, .dialog-panel { position: relative; width: 100%; max-width: 640px; max-height: 76vh; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; }
.dialog-panel { max-width: 920px; max-height: 84vh; }
#dialog-modal { padding-top: 6vh; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.search-input-row input { flex: 1; min-width: 0; height: 32px; border: 0; outline: none; background: transparent; color: var(--text-strong); font: inherit; font-size: 16px; }
kbd { display: inline-block; min-width: 22px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-family: var(--font); font-size: 12px; line-height: 20px; text-align: center; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.search-result.is-active, .search-result:hover { background: var(--accent-soft); }
.search-kind { flex: 0 0 40px; display: flex; justify-content: center; }
.search-text { display: flex; flex-direction: column; min-width: 0; }
.search-title { color: var(--text-strong); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.search-sub { color: var(--text-2); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.search-result mark { background: transparent; color: var(--accent); font-weight: 600; }
.search-empty { padding: 28px 12px; color: var(--text-2); text-align: center; font-size: 14px; }
.search-footer { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12px; }
.search-footer kbd { margin-right: 4px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.dialog-title { margin: 0; color: var(--text-strong); font-size: 18px; line-height: 26px; font-weight: 600; }
.dialog-sub { margin: 2px 0 0; color: var(--text-2); font-size: 13px; line-height: 20px; }
.codegen-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
.code-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.code-tab { padding: 4px 12px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 13px; line-height: 20px; cursor: pointer; }
.code-tab[aria-selected="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.codegen-option { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.codegen-block { margin: 0 20px 20px; min-height: 0; display: flex; flex-direction: column; }
.codegen-block pre { overflow: auto; max-height: 56vh; }
.dialog-panel > .code-block:not(.codegen-block) { margin: 0 20px 20px; }
.dialog-panel > .code-block pre { max-height: 46vh; overflow: auto; }
.mcp-meta { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; margin: 0; padding: 16px 20px; font-size: 14px; line-height: 22px; }
.mcp-meta dt { color: var(--text-2); }
.mcp-meta dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 80; transform: translateX(-50%); padding: 8px 16px; border-radius: 10px; background: var(--text-strong); color: var(--bg); font-size: 14px; line-height: 20px; box-shadow: var(--shadow-pop); }
.drawer-mask { position: fixed; inset: 65px 0 0 0; z-index: 25; background: var(--mask); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .content-wrap.has-toc { grid-template-columns: minmax(0, 1fr) 200px; gap: 36px; }
}
@media (max-width: 1100px) {
  .content-wrap.has-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1023px) {
  .drawer-toggle { display: inline-grid; }
  .sidebar {
    position: fixed;
    top: 65px;
    bottom: 0;
    left: 0;
    z-index: 26;
    width: min(320px, 86vw);
    padding-left: 8px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    visibility: hidden;
  }
  body.drawer-open .sidebar { transform: translateX(0); visibility: visible; }
  .search-trigger { width: calc(100% - 12px); }
  .content-wrap { padding: 24px 24px 56px; }
  .topbar-inner { gap: 12px; }
  .nav-link { padding: 0 8px; }
}
@media (max-width: 960px) {
  .split, .split[class*=" r"] { grid-template-columns: minmax(0, 1fr); }
  .split-handle { display: none; }
  .split-right { border-top: 1px solid var(--border-card); }
  .json-example { position: static; max-height: 420px; }
  .arch-row-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .topnav { display: none; }
  .brand-name { font-size: 15px; }
  .content-wrap { padding: 20px 16px 48px; }
  .page-title { font-size: 26px; line-height: 34px; }
  .markdown h2 { font-size: 21px; line-height: 28px; }
  .md-table { font-size: 14px; line-height: 22px; }
  .arch-row-2, .arch-row-3, .pano-grid, .sel-branches { grid-template-columns: minmax(0, 1fr); }
  .arch-row-7 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .api-url-actions { margin-left: 0; width: 100%; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next, .pager-prev { grid-column: 1; }
  .param-row { max-width: none; }
  .modal { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
