:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #0d121a;
  --panel-2: #111927;
  --text: #ecf2ff;
  --muted: #91a0b6;
  --line: #223044;
  --accent: #4fd1c5;
  --accent-2: #9ae6b4;
  --danger: #ff7b7b;
  --warn: #ffd166;
  --radius: 8px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
pre { position: relative; overflow: auto; background: #070a0f; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: #d7e4f5; }
pre .copy-btn + code { display: block; padding-top: 22px; }
main { min-height: 80vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(8, 11, 16, .88); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #2d405b; border-radius: 8px; background: #111927; color: var(--accent); font-family: var(--mono); font-size: 13px; }
.nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.nav a:hover, .doc-sidebar a:hover, .toc a:hover { color: var(--text); }
.nav-cta, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #121a27; color: var(--text); font-weight: 650; cursor: pointer; }
.button.primary, .nav-cta { background: var(--accent); color: #031012; border-color: var(--accent); }
.button.ghost { background: transparent; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.link-button { border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 620px); gap: 42px; align-items: center; padding: 72px 6vw 56px; border-bottom: 1px solid var(--line); }
.hero h1, .page-head h1, .auth-shell h1 { margin: 0; max-width: 820px; font-size: clamp(42px, 6vw, 78px); line-height: .95; letter-spacing: 0; }
.lead { color: #bfcede; font-size: 20px; line-height: 1.6; max-width: 760px; }
.eyebrow { color: var(--accent); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.muted { color: var(--muted); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.code-panel, .api-card, .price-card, .panel-form, .metric-board, .one-time-key { background: linear-gradient(180deg, var(--panel), #0a0f16); border: 1px solid var(--line); border-radius: var(--radius); }
.hero-console { padding: 14px; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.code-head, .request-line, .response-meta, .card-top, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code-head { color: var(--muted); font-family: var(--mono); font-size: 13px; padding: 6px 6px 12px; }
.json-card pre { margin-bottom: 0; }
.section, .page-shell { padding: 56px 6vw; }
.narrow { max-width: 860px; }
.section-head { margin-bottom: 22px; }
.section h2, .page-shell h1, .doc-main h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 48px); letter-spacing: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.api-card { padding: 18px; min-height: 260px; display: flex; flex-direction: column; gap: 12px; }
.api-card h2, .api-card h3 { margin: 0; font-size: 20px; }
.api-card p { color: var(--muted); line-height: 1.55; margin: 0; }
.icon, .badge, .method { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 9px; border-radius: 999px; background: #162133; color: #d9e8ff; border: 1px solid #26374f; font-size: 12px; font-family: var(--mono); }
.method { color: var(--accent-2); }
.status-live { color: #9ae6b4; border-color: rgba(154,230,180,.4); }
.status-beta { color: #ffd166; border-color: rgba(255,209,102,.4); }
.status-coming-soon { color: #aab7cc; }
.status-ok { color: #9ae6b4; border-color: rgba(154,230,180,.5); background: rgba(154,230,180,.08); }
.status-error { color: #ffb4b4; border-color: rgba(255,123,123,.5); background: rgba(255,123,123,.08); }
.status-running { color: #ffd166; border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.08); }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.meta-grid dt { color: var(--muted); font-size: 12px; }
.meta-grid dd { margin: 2px 0 0; font-size: 13px; }
.card-actions { display: flex; gap: 12px; margin-top: auto; color: var(--accent); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.feature-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.feature-list span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; color: #c6d4e6; background: #101722; }
.metric-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.metric-board div { padding: 24px; border-right: 1px solid var(--line); }
.metric-board div:last-child { border-right: 0; }
.metric-board strong { display: block; font-size: 32px; color: var(--accent); }
.metric-board span { color: var(--muted); }
.filter-bar, .inline-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
input, select { min-height: 40px; background: #08111d; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0 12px; font: inherit; }
label { display: grid; gap: 8px; color: #c9d6e8; font-weight: 650; }
.check { display: inline-flex; grid-template-columns: none; align-items: center; gap: 8px; min-height: 40px; }
.check input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); }
.page-head.centered { text-align: center; max-width: 880px; margin: 0 auto 28px; }
.pricing-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.pricing-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.price-card.recommended, .price-card.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(79,209,197,.22); }
.price { font-size: 30px; font-weight: 800; margin: 0; }
.price span { color: var(--muted); font-size: 14px; }
.price-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: #c9d6e8; }
.price-card li::before { content: "✓"; color: var(--accent); margin-right: 8px; }
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 220px; gap: 28px; padding: 34px 6vw 64px; }
.doc-sidebar, .toc { position: sticky; top: 78px; align-self: start; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #0a0f16; }
.doc-sidebar a, .toc a { color: var(--muted); padding: 8px; border-radius: 6px; }
.doc-sidebar a.active { background: #142033; color: var(--text); }
.doc-main { min-width: 0; }
.doc-main section { margin: 28px 0; }
.doc-main h2 { margin-top: 0; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); margin-bottom: 24px; }
.endpoint-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: #0a0f16; }
.source-list { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #0a0f16; }
.source-list a { color: var(--accent); font-weight: 700; }
.source-list span { color: var(--muted); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 42px; align-items: start; padding: 72px 6vw; }
.panel-form { padding: 20px; display: grid; gap: 14px; }
.flash-stack { position: fixed; right: 18px; top: 74px; z-index: 50; display: grid; gap: 8px; width: min(440px, calc(100vw - 36px)); }
.flash { border: 1px solid var(--line); background: #111927; border-radius: 8px; padding: 12px 14px; }
.flash-error { border-color: var(--danger); }
.flash-success { border-color: var(--accent); }
.tester-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr) 420px; gap: 18px; padding: 30px 4vw 60px; }
.tester-list, .tester-main, .response-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #0a0f16; padding: 16px; min-width: 0; }
.response-panel { align-self: start; position: sticky; top: 84px; }
#response-json { white-space: pre-wrap; overflow-wrap: anywhere; }
.response-panel pre { max-height: 68vh; }
#endpoint-list { display: grid; gap: 8px; }
#endpoint-list button, .tabs button, .key-pick button { border: 1px solid var(--line); background: #101722; color: var(--text); border-radius: 8px; padding: 10px; text-align: left; cursor: pointer; }
#endpoint-list button.active, .tabs button.active { border-color: var(--accent); color: var(--accent); }
.param-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0; }
.url-preview { display: grid; gap: 6px; margin: 14px 0; }
.tabs { display: flex; gap: 8px; }
.copy-btn { position: absolute; right: 8px; top: 8px; border: 1px solid var(--line); background: #111927; color: var(--muted); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.empty-state { border: 1px solid var(--line); border-radius: var(--radius); background: #0a0f16; padding: 22px; margin: 18px 0; }
.empty-state h2 { margin-top: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.stats-grid div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #0a0f16; }
.stats-grid span { color: var(--muted); display: block; margin-bottom: 8px; }
.stats-grid strong { font-size: 28px; color: var(--text); }
.usage-bar { height: 10px; background: #131b28; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; max-width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #0a0f16; margin: 16px 0 28px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.one-time-key { padding: 16px; margin: 16px 0; border-color: var(--accent); }
.one-time-key code { display: block; margin: 10px 0; color: var(--accent); word-break: break-all; }
.footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px 6vw; border-top: 1px solid var(--line); color: var(--muted); }
.footer div { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 1180px) {
  .catalog-grid, .catalog-grid.compact, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tester-shell, .docs-layout { grid-template-columns: 1fr; }
  .doc-sidebar, .toc, .response-panel { position: static; }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
  .nav { width: 100%; overflow-x: auto; gap: 12px; padding-bottom: 4px; }
  .hero, .auth-shell, .split { grid-template-columns: 1fr; padding: 44px 18px; }
  .hero h1, .page-head h1, .auth-shell h1 { font-size: 42px; }
  .section, .page-shell, .docs-layout, .tester-shell { padding-left: 18px; padding-right: 18px; }
  .catalog-grid, .catalog-grid.compact, .pricing-grid, .pricing-grid.small, .stats-grid, .param-grid { grid-template-columns: 1fr; }
  .hero-console { min-width: 0; }
  pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .footer { flex-direction: column; }
}
