/* 站内 API 演示页：统一使用站点主题变量，浅色/深色自动跟随 */
.api-demo-page .page-head code { font-size: 12px; }
.api-demo-siblings { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--ak-sp-8); }
.api-demo-sibling { display: flex; align-items: center; gap: var(--ak-sp-8); min-width: 0; padding: var(--ak-sp-8) var(--ak-sp-10); border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); text-decoration: none; font-size: 12.5px; }
.api-demo-sibling:hover { border-color: var(--brand); color: var(--brand); }
.api-demo-sibling.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.api-demo-sibling b { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.api-demo-sibling span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-demo-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--ak-sp-10) var(--ak-sp-15); padding: var(--ak-sp-4) 0 var(--ak-sp-10); }
.api-demo-field { display: flex; flex-direction: column; gap: var(--ak-sp-4); min-width: 0; }
.api-demo-field label { font-size: 12px; color: var(--muted); }
.api-demo-field .input, .api-demo-field select { width: 100%; }
.api-demo-field small { color: var(--muted); font-size: 11px; }
.api-demo-url { display: flex; align-items: center; gap: var(--ak-sp-8); min-width: 0; padding: var(--ak-sp-8) var(--ak-sp-10); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: var(--ak-sp-10); }
.api-demo-url code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--brand); }
.api-demo-actions { display: flex; flex-wrap: wrap; gap: var(--ak-sp-8); margin-bottom: var(--ak-sp-10); }
.api-demo-result { display: grid; gap: var(--ak-sp-10); }
.api-demo-out { margin: 0; min-height: 120px; max-height: 360px; overflow: auto; padding: var(--ak-sp-10); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.api-demo-preview { padding: var(--ak-sp-10); background: var(--surface-2); border: 1px solid var(--line); }
.api-demo-preview[hidden] { display: none; }
.api-demo-preview img { display: block; max-width: 100%; max-height: 420px; }
.api-demo-code { margin: 0; padding: var(--ak-sp-10) var(--ak-sp-10); overflow: auto; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 720px) {
  .api-demo-form { grid-template-columns: 1fr; }
  .api-demo-siblings { grid-template-columns: 1fr 1fr; }
}
