:root {
  --bg: #070a12;
  --bg-elevated: #0b1020;
  --bg-card: rgba(15, 23, 42, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.28);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(900px 500px at -10% 20%, rgba(139, 92, 246, 0.14), transparent), var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code,
pre {
  font-family: var(--mono);
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  opacity: 0.35;
  z-index: -1;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.55);
}

.nav {
  display: none;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #04101a;
}

.btn-secondary,
.btn-ghost {
  background: rgba(15, 23, 42, 0.65);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-grid > *,
.card-grid > *,
.endpoint-grid > *,
.docs-blocks > *,
.docs-shell > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 14ch;
}

.lede,
.section-copy {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 42rem;
}

.lede {
  margin: 1.25rem 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-points {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hero-points li::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.code-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(7, 10, 18, 0.95));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 100%;
}

.code-panel-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #334155;
}

.dot:nth-child(1) {
  background: #f87171;
}

.dot:nth-child(2) {
  background: #fbbf24;
}

.dot:nth-child(3) {
  background: #34d399;
}

.code-panel-title {
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.code-panel pre,
.docs-block pre {
  margin: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.code-panel code,
.docs-block pre code,
.docs-section pre code {
  display: block;
  width: max-content;
  max-width: none;
}

.tok-comment {
  color: #64748b;
}

.tok-string {
  color: #7dd3fc;
}

.section {
  padding: 4.5rem 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.35), rgba(11, 16, 32, 0.8));
  border-block: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.85rem;
}

.card-grid,
.endpoint-grid,
.docs-blocks {
  display: grid;
  gap: 1rem;
}

.card,
.endpoint-card,
.docs-block,
.docs-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow: hidden;
  max-width: 100%;
}

.card h3,
.endpoint-card h3,
.docs-block h3,
.docs-cta h3 {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.card p,
.endpoint-card p,
.docs-block p,
.docs-cta p,
.note {
  margin: 0;
  color: var(--muted);
}

.icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 0.9rem;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(139, 92, 246, 0.12));
  border: 1px solid var(--border);
}

.icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.endpoint-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.method {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.endpoint-meta code,
.docs-block code,
.section-copy code {
  font-size: 0.85em;
  color: #e2e8f0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.endpoint-meta code {
  min-width: 0;
}

.docs-block pre {
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.55);
}

.steps {
  margin: 0.85rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
}

.steps li + li {
  margin-top: 0.4rem;
}

.note {
  font-size: 0.92rem;
}

.docs-cta {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.12));
}

.docs-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.2rem;
  color: var(--muted);
}

.faq-item code {
  font-size: 0.85em;
  color: #e2e8f0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-copy {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 719px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .header-actions a[href='/llms.txt'] {
    display: none;
  }

  .hero {
    padding: 2.75rem 0 2rem;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
    max-width: none;
  }

  .hero-actions .btn,
  .docs-cta-actions .btn,
  .docs-cta > .btn {
    width: 100%;
  }

  .section {
    padding: 3rem 0;
  }

  .card,
  .endpoint-card,
  .docs-block,
  .docs-cta {
    padding: 1.15rem;
  }

  .faq-item summary {
    padding: 1rem 1.05rem;
    align-items: flex-start;
  }

  .faq-item p {
    padding: 0 1.05rem 1.05rem;
  }

  .code-panel pre,
  .docs-block pre,
  .docs-section pre {
    font-size: 0.75rem;
    padding: 0.95rem 0.9rem 1.05rem;
  }
}

@media (min-width: 720px) {
  .nav {
    display: flex;
  }

  .card-grid,
  .endpoint-grid,
  .docs-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-cta {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }
}

.is-scrolled .site-header {
  background: rgba(7, 10, 18, 0.88);
}

/* Docs reference page */
.docs-page .docs-main {
  padding: 2.5rem 0 4rem;
}

.docs-shell {
  display: grid;
  gap: 2.5rem;
}

.docs-sidebar {
  display: none;
}

.docs-sidebar-title {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-toc {
  display: grid;
  gap: 0.35rem;
}

.docs-toc a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-toc a:hover {
  color: var(--text);
  border-left-color: var(--accent);
}

.docs-content {
  min-width: 0;
}

.docs-hero {
  margin-bottom: 2.5rem;
}

.docs-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 20ch;
}

.docs-section {
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.docs-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.docs-section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
}

.docs-section h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.docs-section p {
  color: var(--muted);
  max-width: 48rem;
}

.docs-section .endpoint-meta {
  margin-bottom: 1rem;
}

.docs-section pre {
  margin: 0.85rem 0 0;
  padding: 1.1rem 1.15rem 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #cbd5e1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.55);
}

.table-scroll {
  width: 100%;
  margin-top: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.param-table {
  width: 100%;
  min-width: 36rem;
  margin-top: 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.param-table th,
.param-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.param-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.param-table td {
  color: var(--muted);
}

.param-table code {
  font-size: 0.85em;
  color: #e2e8f0;
}

@media (min-width: 720px) {
  .docs-cta {
    grid-template-columns: 1fr auto;
  }

  .docs-cta-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 960px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .docs-sidebar {
    display: block;
    position: sticky;
    top: 5rem;
  }
}
