:root {
  color-scheme: dark;
  --bg: #080b14;
  --surface: #101523;
  --surface-2: #151c2e;
  --line: #273149;
  --text: #f5f7ff;
  --muted: #aeb8cf;
  --primary: #a78bfa;
  --primary-2: #60a5fa;
  --accent: #67e8f9;
  --success: #6ee7b7;
  --warning: #fcd34d;
  --danger: #fda4af;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 4%, rgba(96, 165, 250, 0.12), transparent 28rem),
    radial-gradient(circle at 8% 16%, rgba(167, 139, 250, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #b7f5ff;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(103, 232, 249, 0.7);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: #111827;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(39, 49, 73, 0.8);
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--accent));
  color: #07101e;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 30px rgba(96, 165, 250, 0.28);
}

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

.nav-links a {
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 0.6rem;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

.btn:hover {
  border-color: #485879;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #07101e;
  box-shadow: 0 12px 35px rgba(96, 165, 250, 0.2);
}

.btn-primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #b9a5ff, #79b6ff);
  color: #07101e;
}

.hero {
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.06);
  color: #b7f5ff;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.1);
  content: "";
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.75rem, 7vw, 5.4rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.gradient-text {
  background: linear-gradient(100deg, #d8b4fe 5%, #93c5fd 52%, #67e8f9);
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin-top: 1.5rem;
  color: #8995ad;
  font-size: 0.86rem;
}

.hero-notes span::before {
  margin-right: 0.42rem;
  color: var(--success);
  content: "✓";
}

.terminal {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 15, 27, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal::after {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28), transparent 40%, rgba(103, 232, 249, 0.2));
  content: "";
  filter: blur(22px);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: #8490a8;
  font: 0.78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #47536b;
}

.terminal-title {
  margin-left: auto;
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

pre {
  max-width: 100%;
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  color: #d9e4ff;
  font-size: 0.84rem;
  line-height: 1.7;
  tab-size: 2;
}

:not(pre) > code {
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(147, 197, 253, 0.14);
  border-radius: 6px;
  background: rgba(147, 197, 253, 0.08);
  color: #bfdbfe;
  font-size: 0.9em;
}

.code-keyword { color: #c4b5fd; }
.code-string { color: #86efac; }
.code-number { color: #fcd34d; }

.section {
  padding: 5.5rem 0;
}

.section-soft {
  border-block: 1px solid rgba(39, 49, 73, 0.65);
  background: rgba(16, 21, 35, 0.5);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(21, 28, 46, 0.78), rgba(13, 17, 29, 0.82));
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.08);
  color: #ddd6fe;
  font-weight: 900;
}

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 4.5rem;
}

.step::before {
  position: absolute;
  left: 1.3rem;
  top: 1.35rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #07101e;
  content: counter(step);
  counter-increment: step;
  font-weight: 900;
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.model-family {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.model-family strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.model-family span {
  color: var(--muted);
}

.cta {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(125deg, rgba(167, 139, 250, 0.12), rgba(96, 165, 250, 0.08) 52%, rgba(103, 232, 249, 0.1)),
    var(--surface);
}

.cta h2 {
  margin-bottom: 0.5rem;
}

.cta p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid rgba(39, 49, 73, 0.7);
}

.page-hero h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 780px);
  justify-content: center;
  gap: 4rem;
  padding-block: 3.5rem 6rem;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 1rem;
  border-left: 1px solid var(--line);
}

.toc strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #dbe4f8;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 0.32rem 0;
  color: #8f9bb3;
  font-size: 0.9rem;
}

.toc a:hover {
  color: var(--text);
}

.prose h2 {
  margin-top: 3.3rem;
  padding-top: 1rem;
  scroll-margin-top: 90px;
  font-size: 1.8rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 2rem;
  scroll-margin-top: 90px;
}

.prose p,
.prose li {
  color: #c0c9dc;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose pre {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0f1b;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 800;
}

.method {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(110, 231, 183, 0.12);
  color: var(--success);
  font: 800 0.72rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.method.get {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-left: 4px solid var(--primary-2);
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.07);
  color: #c9d8f7;
}

.callout.warning {
  border-color: rgba(252, 211, 77, 0.2);
  border-left-color: var(--warning);
  background: rgba(252, 211, 77, 0.06);
}

.table-wrap {
  margin: 1.25rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.035);
  color: #dce5f8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: #bdc7da;
}

tr:last-child td {
  border-bottom: 0;
}

.price {
  color: #fff;
  font-weight: 800;
}

.pricing-note {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.metric {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.metric strong {
  display: block;
  font-size: 1.5rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.88rem;
}

.legal-meta {
  margin-bottom: 2rem;
  color: #8490a8;
  font-size: 0.9rem;
}

.legal h2 {
  font-size: 1.45rem;
}

.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.75);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer p {
  max-width: 430px;
  color: #8490a8;
  font-size: 0.9rem;
}

.footer h3 {
  margin-bottom: 0.7rem;
  color: #dce5f8;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer a {
  display: block;
  width: fit-content;
  margin: 0.35rem 0;
  color: #9ca8c0;
  font-size: 0.9rem;
}

.footer a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(39, 49, 73, 0.65);
  color: #707c94;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    padding-block: 0.8rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .nav-actions {
    margin-left: auto;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero-grid,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 3rem;
  }

  .doc-layout {
    gap: 1.5rem;
  }

  .toc {
    position: static;
    display: flex;
    gap: 0 1rem;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .toc strong {
    display: none;
  }

  .toc a {
    white-space: nowrap;
  }

  .grid-3,
  .model-strip,
  .pricing-note {
    grid-template-columns: 1fr;
  }

  .cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 1.25rem, 1160px);
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding-inline: 0.55rem;
  }

  .nav-actions .btn:first-child {
    display: none;
  }

  .hero {
    padding-block: 3.8rem;
  }

  h1 {
    font-size: 2.7rem;
  }

  .section {
    padding-block: 4rem;
  }

  .cta {
    padding: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
