@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap");

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #060d14;
  --surface: #0b1e2d;
  --surface-2: #102638;
  --surface-3: #162f44;
  --border: rgba(255, 255, 255, 0.07);
  --border-mid: rgba(255, 255, 255, 0.12);
  --border-lime: rgba(226, 228, 26, 0.28);
  --border-aqua: rgba(0, 169, 211, 0.24);
  --text: #c8dce6;
  --text-2: #5e8193;
  --text-3: #2c4858;
  --lime: #e2e41a;
  --lime-dim: rgba(226, 228, 26, 0.11);
  --lime-mid: rgba(226, 228, 26, 0.22);
  --aqua: #00a9d3;
  --aqua-dim: rgba(0, 169, 211, 0.11);
  --navy: #133546;
  --ok: #1ec99c;
  --ok-dim: rgba(30, 201, 156, 0.11);
  --warn: #f0a429;
  --warn-dim: rgba(240, 164, 41, 0.11);
  --err: #f16060;
  --err-dim: rgba(241, 96, 96, 0.11);
  --info: #8b9ef4;
  --info-dim: rgba(139, 158, 244, 0.11);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --shell: min(1160px, 100% - 3rem);
  --font-display: "Bebas Neue", "Impact", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --nav-h: 60px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 70% 45% at 15% 0%, rgba(0, 169, 211, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 5%, rgba(226, 228, 26, 0.05) 0%, transparent 55%);
  -webkit-font-smoothing: antialiased;
}

/* subtle grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}

* {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--aqua);
  text-decoration: none;
  transition: color 140ms;
}
a:hover {
  color: var(--text);
}
p {
  margin: 0 0 1rem;
}
p:last-child {
  margin-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
}
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ─── Shell ──────────────────────────────────────────────────────────────── */
.shell {
  width: var(--shell);
  margin: 0 auto;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(6, 13, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-brand:hover {
  color: var(--text);
}
.nav-brand img {
  height: 26px;
  width: auto;
}
.nav-brand-sep {
  width: 1px;
  height: 16px;
  background: var(--border-mid);
}
.nav-brand-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.7rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 140ms, background 140ms;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-primary {
  background: var(--lime-dim);
  border: 1px solid var(--border-lime);
  color: var(--lime);
}
.nav-link-primary:hover {
  background: var(--lime-mid);
  color: var(--lime);
}

/* ─── Breadcrumbs ────────────────────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}
.breadcrumbs a {
  color: var(--text-2);
}
.breadcrumbs a:hover {
  color: var(--text);
}
.bc-sep {
  color: var(--text-3);
  user-select: none;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 1.2rem;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 150ms, box-shadow 150ms, background 150ms, border-color 150ms, color 150ms;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--lime);
  color: #0b1e2d;
  border-color: var(--lime);
}
.btn-primary:hover {
  background: #ecee40;
  color: #0b1e2d;
  box-shadow: 0 6px 24px rgba(226, 228, 26, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border-mid);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-mid);
}

.btn-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--r-md);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* ─── Labels / Eyebrows ──────────────────────────────────────────────────── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.label-aqua {
  color: var(--aqua);
  background: var(--aqua-dim);
  border: 1px solid var(--border-aqua);
}
.label-lime {
  color: var(--lime);
  background: var(--lime-dim);
  border: 1px solid var(--border-lime);
}
.label-muted {
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

/* ─── Tags / Badges ──────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag-default {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.tag-aqua {
  background: var(--aqua-dim);
  color: var(--aqua);
  border: 1px solid var(--border-aqua);
}
.tag-lime {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--border-lime);
}

.method {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.52rem;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.method-post {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--border-lime);
}
.method-get {
  background: var(--aqua-dim);
  color: var(--aqua);
  border: 1px solid var(--border-aqua);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.52rem;
  min-width: 3rem;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
}
.status-ok {
  background: var(--ok-dim);
  color: var(--ok);
  border: 1px solid rgba(30, 201, 156, 0.22);
}
.status-warn {
  background: var(--warn-dim);
  color: var(--warn);
  border: 1px solid rgba(240, 164, 41, 0.22);
}
.status-err {
  background: var(--err-dim);
  color: var(--err);
  border: 1px solid rgba(241, 96, 96, 0.22);
}
.status-info {
  background: var(--info-dim);
  color: var(--info);
  border: 1px solid rgba(139, 158, 244, 0.22);
}

.req {
  display: inline-flex;
  padding: 0.12rem 0.44rem;
  border-radius: var(--r-sm);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.req-yes {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--border-lime);
}
.req-no {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-3);
  border: 1px solid var(--border);
}

/* ─── HOME HERO ──────────────────────────────────────────────────────────── */
.home-hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--aqua) 35%, var(--lime) 65%, transparent 100%);
  opacity: 0.35;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-overline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
}
.hero-overline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(226, 228, 26, 0.4);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 5px rgba(226, 228, 26, 0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 6.5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 1.35rem;
}
.hero-title em {
  font-style: normal;
  color: var(--lime);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.hero-metrics {
  display: flex;
  gap: 1.75rem;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.hero-metric-val {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--text);
  display: block;
}
.hero-metric-label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-2);
  display: block;
  margin-top: 0.18rem;
}

/* Hero code panel */
.hero-panel {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.hero-panel-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.hero-panel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.hero-panel-dot:nth-child(1) {
  background: #ff5f57;
}
.hero-panel-dot:nth-child(2) {
  background: #febc2e;
}
.hero-panel-dot:nth-child(3) {
  background: #28c840;
}
.hero-panel-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
  margin-left: 0.3rem;
}
.hero-panel-body {
  padding: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: #7ab8cc;
  overflow-x: auto;
}
.hc {
  color: var(--text-3);
}
.hk {
  color: var(--aqua);
}
.hs {
  color: #7bd4a5;
}
.hn {
  color: #e2966a;
}
.hf {
  color: var(--lime);
  font-weight: 500;
}
.hp {
  color: var(--text-3);
}

/* ─── HOME SECTIONS ──────────────────────────────────────────────────────── */
.home-section {
  padding: 3.5rem 0;
}
.home-section + .home-section {
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 2rem;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 0.55rem;
  margin-bottom: 0.5rem;
}
.section-sub {
  font-size: 0.97rem;
  color: var(--text-2);
  max-width: 44rem;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.step-card {
  background: var(--surface);
  padding: 1.75rem 1.5rem;
  transition: background 180ms;
}
.step-card:hover {
  background: var(--surface-2);
}
.step-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--lime);
  opacity: 0.55;
  margin-bottom: 0.85rem;
}
.step-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
}
.step-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* API feature cards */
.api-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.api-card {
  padding: 1.75rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  transition: border-color 200ms, box-shadow 200ms;
  overflow: hidden;
  position: relative;
}
.api-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--aqua), var(--lime));
}
.api-card:hover {
  border-color: var(--border-aqua);
  box-shadow: 0 0 0 1px rgba(0, 169, 211, 0.08), var(--shadow-md);
}
.api-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--aqua-dim);
  border: 1px solid var(--border-aqua);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--aqua);
}
.api-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
}
.api-card-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.api-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
}

/* Integration cards */
.int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 0.75rem;
}
.int-card {
  padding: 1.35rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 200ms, transform 200ms;
  display: block;
  color: inherit;
  text-decoration: none;
}
.int-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
  color: inherit;
}
.int-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.int-card-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.3rem;
}
.int-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.int-card-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* CTA band */
.cta-band {
  padding: 3rem 0 4rem;
}
.cta-inner {
  padding: 2.5rem 3rem;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-3) 100%);
  border: 1px solid var(--border-mid);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.45rem;
}
.cta-desc {
  font-size: 0.93rem;
  color: var(--text-2);
}

/* ─── PAGE HERO (inner pages) ────────────────────────────────────────────── */
.page-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.7rem;
  max-width: 26ch;
}
.page-hero-desc {
  font-size: 0.97rem;
  color: var(--text-2);
  max-width: 42rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

/* Stat boxes */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.stat-box {
  padding: 1rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-align: center;
}
.stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
  display: block;
}
.stat-label {
  font-size: 0.76rem;
  color: var(--text-2);
  display: block;
  margin-top: 0.2rem;
}

/* ─── API REFERENCE LAYOUT ───────────────────────────────────────────────── */
.api-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: start;
  min-height: calc(100vh - var(--nav-h));
}

.api-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.api-sidebar::-webkit-scrollbar {
  width: 4px;
}
.api-sidebar::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 4px;
}

.sidebar-group-label {
  display: block;
  padding: 0.6rem 1.25rem 0.22rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 0.85rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-2);
  border-left: 2px solid transparent;
  transition: color 130ms, background 130ms, border-color 130ms;
  text-decoration: none;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-link.active {
  color: var(--lime);
  border-left-color: var(--lime);
  background: rgba(226, 228, 26, 0.05);
}
.sidebar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.55;
}

.api-content {
  padding: 2.5rem 3rem 6rem;
  min-width: 0;
}

.api-section {
  margin-bottom: 3.25rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.api-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.api-section-desc {
  color: var(--text-2);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

/* Endpoint cards */
.endpoint {
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 1.35rem;
  background: var(--surface);
}
.endpoint-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.95rem 1.35rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
.endpoint-summary {
  font-size: 0.86rem;
  color: var(--text-2);
  margin-left: auto;
}
.endpoint-body {
  padding: 1.5rem 1.35rem;
  display: grid;
  gap: 1.65rem;
}
.endpoint-sub {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.6rem;
}

/* Param rows */
.param-list {
  display: grid;
  gap: 0.45rem;
}
.param-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  align-items: start;
}
.param-name {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--aqua);
  font-weight: 500;
}
.param-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
  align-items: center;
}
.param-type {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}
.param-desc {
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.55;
}
.param-ex {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-3);
  margin-top: 0.28rem;
}

/* Response list */
.response-list {
  display: grid;
  gap: 0.38rem;
}
.response-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 0.85rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-2);
}

/* Schema tables */
.schema-heading {
  font-family: var(--font-mono);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--aqua);
  margin: 2rem 0 0.45rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.schema-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.schema-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

table.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.schema-table th {
  text-align: left;
  padding: 0.52rem 1rem;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
table.schema-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.schema-table tr:last-child td {
  border-bottom: none;
}
table.schema-table tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}
.fname {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--aqua);
  font-weight: 500;
  white-space: nowrap;
}
.ftype {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--lime);
  display: block;
  white-space: nowrap;
}
.fdesc {
  color: var(--text-2);
  line-height: 1.55;
}
.fex {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
  display: block;
  margin-top: 0.18rem;
}

.sref {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--aqua);
  background: var(--aqua-dim);
  border: 1px solid var(--border-aqua);
  padding: 0.08rem 0.38rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 130ms;
}
.sref:hover {
  background: rgba(0, 169, 211, 0.2);
  color: var(--aqua);
}

.enum-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.38rem;
}
.enum-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.1rem 0.42rem;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* ─── Code blocks ────────────────────────────────────────────────────────── */
.code-block {
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--r-lg);
  background: #020b12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.78;
  color: #9ecde0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.code-block code {
  font-family: inherit;
  color: inherit;
  font-size: inherit;
}

/* ─── Notice boxes ───────────────────────────────────────────────────────── */
.notice {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-lg);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}
.notice-icon {
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.notice p {
  margin: 0;
  color: var(--text-2);
}
.notice strong {
  color: inherit;
}
.notice-info {
  background: var(--aqua-dim);
  border: 1px solid var(--border-aqua);
}
.notice-warn {
  background: var(--warn-dim);
  border: 1px solid rgba(240, 164, 41, 0.22);
}
.notice-info .notice-icon {
  color: var(--aqua);
}
.notice-warn .notice-icon {
  color: var(--warn);
}

/* Info box (inline, simpler) */
.info-box {
  padding: 1rem 1.2rem;
  border-radius: var(--r-lg);
  background: var(--aqua-dim);
  border: 1px solid var(--border-aqua);
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}
.info-box strong {
  color: var(--aqua);
}
.info-box a {
  color: var(--aqua);
}
.info-box a:hover {
  color: var(--text);
}
.info-box code {
  font-size: 0.85em;
  color: var(--text);
}

/* ─── Lists ──────────────────────────────────────────────────────────────── */
.check-list {
  display: grid;
  gap: 0;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-2);
}
.check-list li:last-child {
  border-bottom: none;
}
.check-list li::before {
  content: "";
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 0.24rem;
  border-radius: 50%;
  background: var(--aqua-dim)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%2300a9d3' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/9px no-repeat;
  border: 1.5px solid var(--border-aqua);
}

.flow-list {
  display: grid;
  gap: 0.7rem;
}
.flow-list li {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}
.flow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-md);
  background: var(--lime-dim);
  border: 1px solid var(--border-lime);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--lime);
  flex-shrink: 0;
  line-height: 1;
}

/* ─── Content cards ──────────────────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.content-card {
  padding: 1.5rem;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-mid);
  background: var(--surface);
}
.content-card.dark {
  background: var(--surface-2);
  border-color: var(--border);
}
.content-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.9rem;
}

/* Download grid */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.65rem;
}
.download-card {
  padding: 1rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.download-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.download-card-desc {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.45;
  flex: 1;
}

/* On-page nav (integration guide pages) */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-nav-link {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color 130ms, background 130ms, border-color 130ms;
}
.page-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-mid);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.65rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.footer-left img {
  height: 19px;
  opacity: 0.55;
  filter: brightness(1.4);
}
.footer-divider {
  width: 1px;
  height: 14px;
  background: var(--border-mid);
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-link {
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer-link:hover {
  color: var(--text-2);
}

/* ─── Reveal animations ──────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .api-layout {
    grid-template-columns: 1fr;
  }
  .api-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .sidebar-group-label {
    display: none;
  }
  .sidebar-link {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    border-left-width: 1px;
    font-size: 0.8rem;
  }
  .sidebar-link.active {
    border-color: var(--border-lime);
  }
  .api-content {
    padding: 2rem 0 4rem;
  }
  .api-cards {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .param-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .home-hero {
    padding: 3rem 0 2.5rem;
  }
  .hero-metrics {
    gap: 1.25rem;
  }
  .cta-inner {
    padding: 1.75rem;
  }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
