:root {
  --bg: #0d0f14;
  --surface: #151820;
  --border: #1e2330;
  --accent: #4f8ef7;
  --accent-dim: #2a4a8a;
  --green: #34d399;
  --text: #e2e8f0;
  --muted: #64748b;
  --code-bg: #0a0c10;
  --radius: 8px;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

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

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.nav-logo span { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul a { color: var(--muted); font-size: 0.9rem; }
nav ul a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
}
.nav-cta:hover { background: #6aa0ff; text-decoration: none !important; }

/* ── Hero ── */
.hero {
  max-width: 800px;
  margin: 5rem auto 3rem;
  padding: 0 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
}
.btn-primary:hover { background: #6aa0ff; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.btn-secondary:hover { border-color: var(--muted); text-decoration: none; }

/* ── Endpoint pill ── */
.endpoint-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 3rem;
}
.endpoint-pill code { color: var(--text); }

/* ── Features grid ── */
.section { max-width: 1000px; margin: 0 auto 5rem; padding: 0 2rem; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.section > p { color: var(--muted); margin-bottom: 2.5rem; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.tool-card-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.tool-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.tool-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.badge-free { background: rgba(52,211,153,0.12); color: var(--green); }
.badge-paid { background: rgba(79,142,247,0.12); color: var(--accent); }
.badge-pro  { background: rgba(251,191,36,0.15); color: #f59e0b; border: 1px solid rgba(251,191,36,0.35); }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.plan-card.featured {
  border-color: var(--accent);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.75rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.plan-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }

.plan-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.plan-features li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.88rem;
  align-items: flex-start;
}

.check { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.dash  { color: var(--muted); flex-shrink: 0; margin-top: 2px; }

.plan-cta {
  display: block;
  text-align: center;
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.plan-cta-primary {
  background: var(--accent);
  color: #fff;
}
.plan-cta-primary:hover { background: #6aa0ff; text-decoration: none; }

.plan-cta-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.plan-cta-secondary:hover { border-color: var(--muted); text-decoration: none; }

/* ── Code block ── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.code-block .cm { color: #4b5563; }
.code-block .kw { color: #c084fc; }
.code-block .st { color: #34d399; }
.code-block .fn { color: #60a5fa; }
.code-block .nu { color: #fb923c; }
.code-block .py { color: #e2e8f0; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── Docs specific ── */
.docs-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  gap: 3rem;
}

.docs-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  align-self: flex-start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.docs-sidebar h3 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
}

.docs-sidebar h3:first-child { margin-top: 0; }

.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: 0.3rem; }
.docs-sidebar a { font-size: 0.85rem; color: var(--muted); }
.docs-sidebar a:hover { color: var(--text); text-decoration: none; }
.docs-sidebar a.active { color: var(--accent); }

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

.docs-content h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.docs-content p.lead {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 3rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.docs-content h2:first-of-type { border-top: none; margin-top: 0; }

.docs-content h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
}

.docs-content p { color: var(--muted); margin-bottom: 1rem; }
.docs-content ul { color: var(--muted); padding-left: 1.5rem; margin-bottom: 1rem; }
.docs-content li { margin-bottom: 0.3rem; }

.inline-code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  color: var(--text);
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.param-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.param-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.param-table td:first-child { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.param-table td:nth-child(2) { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.param-table td:nth-child(3) { color: var(--muted); }

.response-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.status-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.4rem;
}
.status-ok     { background: rgba(52,211,153,0.12); color: var(--green); }
.status-pending { background: rgba(251,146,60,0.12); color: #fb923c; }
.status-empty  { background: rgba(100,116,139,0.12); color: var(--muted); }

@media (max-width: 700px) {
  .docs-layout { flex-direction: column; padding: 1rem; }
  .docs-sidebar { width: 100%; position: static; }
  .hero h1 { font-size: 2rem; }
  .pricing-grid { grid-template-columns: 1fr; }
}
