.api-page { --api-code-comment: #91a9b2; background: var(--card); }
.api-page [hidden] { display: none !important; }
.api-page .site-header { width: min(1040px, calc(100% - 48px)); }
.api-page .brand, .api-page .header-link { min-height: 44px; display: inline-flex; align-items: center; }
.api-page-shell { width: min(960px, calc(100% - 48px)); padding: 40px 0 48px; }
.api-page .api-section { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.api-page .api-header { align-items: center; gap: 24px; padding-bottom: 0; border: 0; }
.api-page .api-header h1 { margin: 0; font-size: 28px; font-weight: 720; line-height: 1.3; letter-spacing: -.025em; }
.api-page .api-intro { max-width: 70ch; margin-top: 8px; font-size: 14px; line-height: 1.6; }
.api-page .docs-button { min-height: 44px; padding-inline: 14px; border-color: var(--line); border-radius: 10px; background: var(--card); font-weight: 600; }
.api-page .docs-button:hover { background: var(--paper); }
.api-page .base-url-row { min-height: 56px; margin-top: 24px; padding: 4px 8px 4px 16px; gap: 16px; border: 0; border-radius: 10px; background: var(--paper); }
.api-page .base-url-row .base-url-label { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-weight: 400; }
.api-page .base-url-row code { flex: 1; font-size: 13px; font-weight: 500; }
.api-page .copy-button { min-width: 44px; min-height: 44px; padding-inline: 12px; border-color: var(--line); border-radius: 8px; font-size: 12px; font-weight: 600; }
.api-page .base-url-row .copy-button { border: 0; background: transparent; }
.api-page .base-url-row .copy-button:hover { background: var(--primary-soft); }
.api-content { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); align-items: start; gap: 28px; margin-top: 32px; }
.request-heading { margin-bottom: 16px; }
.request-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0; font-size: 16px; line-height: 1.5; }
.request-heading h2 code { color: var(--ink-strong); font-size: inherit; font-weight: 650; }
.api-page .method.post { min-width: 48px; padding: 4px 8px; color: var(--safe); background: var(--safe-soft); font-size: 11px; font-weight: 700; }
.request-format { display: block; margin-top: 8px; color: var(--muted); font: 12px/1.5 "SFMono-Regular", Consolas, monospace; }
.api-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 13px; line-height: 1.65; }
.api-table th, .api-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.api-table thead th { padding-block: 8px; color: var(--muted); background: var(--paper); font-size: 12px; font-weight: 500; }
.api-table tbody th { color: var(--ink-strong); font-weight: 500; }
.api-table td { color: var(--muted); }
.api-table code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.request-params th:first-child { width: 38%; }
.request-params td code { white-space: nowrap; }
.param-required, .param-optional { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; white-space: nowrap; }
.param-required { color: var(--danger); }
.param-optional { color: var(--muted); }
.examples-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.examples-heading h2 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.5; }
.examples-heading > span { color: var(--muted); font-size: 12px; }
.example-frame { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.example-sources { display: flex; padding-inline: 16px; gap: 24px; border-bottom: 1px solid var(--line); }
.example-sources button { position: relative; min-width: 64px; min-height: 48px; padding: 12px 0; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 500; transition: color .15s ease; }
.example-sources button:hover { color: var(--primary-dark); }
.example-sources button[aria-selected="true"] { color: var(--primary-dark); font-weight: 650; }
.example-sources button[aria-selected="true"]::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: currentColor; content: ""; }
.example-sources button:focus-visible { outline-offset: -4px; }
.example-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 16px; background: var(--paper); }
.example-languages { display: flex; align-items: center; gap: 4px; }
.example-languages button { min-width: 64px; min-height: 44px; padding: 6px 12px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; }
.example-languages button[aria-pressed="true"] { border-color: var(--line); color: var(--ink-strong); background: var(--card); }
.example-languages button:hover { color: var(--primary-dark); }
.example-panel { min-width: 0; }
.example-note { margin: 0; padding: 12px 20px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.api-page .example-panel .code-block { min-height: 0; max-height: 420px; padding: 20px; overflow: auto; border-radius: 0; font-size: 12px; line-height: 1.75; }
.api-page .code-block:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.api-page .code-block .tok-comment { color: var(--api-code-comment); }
.api-reference { margin-top: 24px; border-top: 1px solid var(--line); }
.api-reference-item { border-bottom: 1px solid var(--line); }
.api-reference-item > summary { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 16px 0; color: var(--ink-strong); font-size: 14px; font-weight: 550; list-style: none; cursor: pointer; }
.api-reference-item > summary::-webkit-details-marker { display: none; }
.api-reference-item > summary:hover { color: var(--primary-dark); }
.api-reference-item > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.api-reference-item .endpoint-chevron { margin-left: auto; }
.api-reference-item[open] > summary .endpoint-chevron { transform: rotate(180deg); }
.reference-meta { color: var(--muted); font-size: 12px; font-weight: 400; }
.reference-body { padding-bottom: 24px; }
.api-page .response-card { margin-top: 0; }
.usage-list { display: grid; gap: 8px; max-width: 75ch; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.usage-list code { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.api-page .field-note { margin: 12px 0 20px; color: var(--muted); font-size: 12px; }
.api-page .code-heading { min-height: 56px; padding: 6px 8px 6px 20px; border-radius: 10px 10px 0 0; font-size: 12px; }
.api-page .code-block.compact { max-height: 320px; font-size: 12px; }
.field-heading { margin: 0 0 12px; color: var(--ink); font-size: 13px; font-weight: 600; }
.field-tree, .field-tree ul { margin: 0; padding: 0; list-style: none; }
.field-tree ul { margin-left: 8px; padding-left: 20px; border-left: 1px solid var(--line); }
.field-tree li { position: relative; min-width: 0; }
.field-tree ul > li::before { position: absolute; top: 19px; left: -20px; width: 12px; border-top: 1px solid var(--line); content: ""; }
.field-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; padding: 8px 0; font-size: 13px; line-height: 1.65; }
.field-row > :first-child { flex: 0 1 180px; min-width: 0; color: var(--ink-strong); }
.field-row code { font-size: 12px; overflow-wrap: anywhere; }
.field-description { flex: 1 1 240px; color: var(--muted); overflow-wrap: anywhere; }
.error-codes th:first-child { width: 12%; }
.error-codes th:nth-child(2) { width: 46%; }
.api-page .disclaimer { margin-top: 24px; color: var(--muted); font-size: 12px; }
@media (max-width: 880px) {
  .api-content { grid-template-columns: minmax(0, 1fr); }
  .request-params th:first-child { width: 30%; }
}
@media (max-width: 620px) {
  .api-page .site-header, .api-page-shell { width: calc(100% - 32px); }
  .api-page-shell { padding: 28px 0 32px; }
  .api-page .api-header { display: flex; align-items: flex-start; gap: 16px; }
  .api-page .api-header h1 { font-size: 25px; }
  .api-page .api-intro { font-size: 13px; }
  .api-page .docs-button { flex: 0 0 auto; width: auto; padding-inline: 10px; font-size: 12px; }
  .api-page .base-url-row { padding-left: 12px; gap: 8px; }
  .api-page .base-url-label { display: none; }
  .api-page .base-url-row code { min-width: 0; font-size: 12px; }
  .api-content { margin-top: 24px; gap: 24px; }
  .request-heading { display: block; }
  .request-format { display: block; margin-top: 8px; }
  .api-table th, .api-table td { padding: 10px 8px; }
  .request-params th:first-child { width: 31%; }
  .param-required, .param-optional { display: block; margin: 2px 0 0; }
  .example-sources { justify-content: space-between; gap: 12px; }
  .example-sources button { flex: 1; }
  .example-toolbar { padding-inline: 10px; gap: 8px; }
  .example-note { padding-inline: 14px; }
  .api-page .example-panel .code-block { padding: 16px 14px; }
  .api-page .brand { font-size: 13px; gap: 8px; }
  .field-tree ul { padding-left: 14px; }
  .field-tree ul > li::before { left: -14px; width: 8px; }
  .field-row { display: block; }
  .field-description { display: block; margin-top: 2px; }
  .error-codes th:first-child { width: 16%; }
  .error-codes th:nth-child(2) { width: 44%; }
}
