:root {
  --bg: #0a0a0f;
  --bg-elevated: #0f0c16;
  --bg-card: rgba(18, 16, 26, 0.88);
  --bg-card-strong: rgba(22, 18, 32, 0.96);
  --border: #2d1b69;
  --border-soft: rgba(167, 139, 250, 0.18);
  --accent-primary: #c026d3;
  --accent-primary-2: #a21caf;
  --accent-secondary: #ec4899;
  --accent-glow: rgba(192, 38, 211, 0.28);
  --text-primary: #f0e6ff;
  --text-muted: #a78bfa;
  --text-dim: #7c63c7;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(192, 38, 211, 0.18), 0 0 32px rgba(192, 38, 211, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(162, 28, 175, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.12), transparent 22%),
    linear-gradient(180deg, #0a0a0f 0%, #09070e 100%);
  color: var(--text-primary);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
code, pre, .mono, .stat-value, .token-preview, .kpi-value { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }

.shell {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.75);
  border-bottom: 1px solid rgba(45, 27, 105, 0.4);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 30px rgba(192, 38, 211, 0.34);
  display: grid;
  place-items: center;
  color: white;
  font-size: 20px;
}

.brand-copy span {
  display: block;
  line-height: 1.05;
}

.brand-copy small {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 160ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: rgba(192, 38, 211, 0.12);
  box-shadow: inset 0 0 0 1px rgba(192, 38, 211, 0.2);
}

.hero {
  padding: 88px 0 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(192, 38, 211, 0.11);
  color: var(--text-muted);
  border: 1px solid rgba(192, 38, 211, 0.18);
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  align-items: center;
  margin-top: 22px;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.04em; }

h1 {
  font-size: clamp(44px, 8vw, 78px);
  line-height: 0.95;
  max-width: 12ch;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  color: #d7c9ff;
  max-width: 60ch;
  margin-top: 22px;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 180ms ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 18px 40px rgba(162, 28, 175, 0.32);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.03);
  border-color: rgba(167, 139, 250, 0.16);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: rgba(192, 38, 211, 0.38);
  box-shadow: var(--shadow-glow);
}

.card {
  background: linear-gradient(180deg, rgba(24, 20, 35, 0.95), rgba(18, 16, 26, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.glass { box-shadow: var(--shadow-lg), var(--shadow-glow); }

.hero-card {
  padding: 26px;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.kpi {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 800;
}

.kpi-note {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.section {
  padding: 42px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-copy {
  color: #c7baff;
  max-width: 62ch;
  line-height: 1.6;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.value-card,
.flow-card,
.teaser-card,
.panel,
.sidebar-card,
.doc-card,
.jobs-card,
.controls-card,
.quickstart-card {
  padding: 24px;
}

.value-card h3,
.doc-card h3,
.panel h3 { font-size: 22px; margin-bottom: 12px; }
.value-card p,
.doc-card p,
.panel p,
.panel li,
.flow-step p,
.footer p { color: #cfbfff; line-height: 1.65; }

.icon-chip {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(192, 38, 211, 0.12);
  color: var(--accent-secondary);
  font-size: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(192, 38, 211, 0.18);
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.flow-step {
  padding: 22px;
  text-align: center;
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 24px;
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(167, 139, 250, 0.16);
  color: var(--text-muted);
}

.badge-success { color: var(--success); border-color: rgba(52, 211, 153, 0.22); }
.badge-warning { color: var(--warning); border-color: rgba(251, 191, 36, 0.24); }
.badge-error { color: var(--error); border-color: rgba(248, 113, 113, 0.22); }

.split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 34px 0 56px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.sidebar-card nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sidebar-card nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text-muted);
}

.sidebar-card nav a:hover,
.sidebar-card nav a.active {
  background: rgba(192, 38, 211, 0.1);
  color: var(--text-primary);
}

.stack {
  display: grid;
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.provider-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.provider-title h1,
.page-title h1 {
  font-size: clamp(34px, 4vw, 52px);
  max-width: none;
}

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

.token-form {
  display: grid;
  gap: 14px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.field,
.textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(167, 139, 250, 0.18);
  color: var(--text-primary);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}

.field:focus,
.textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(192, 38, 211, 0.12);
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.stat-box {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.02);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.stat-value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(192, 38, 211, 0.1);
  border: 1px solid rgba(192, 38, 211, 0.18);
  color: #f4dcff;
  font-size: 14px;
}

.job-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.job-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.02);
}

.job-item h4 { margin: 0 0 10px; font-size: 16px; }
.job-meta { color: var(--text-muted); font-size: 13px; }
.job-empty { color: #cfbfff; }

.code-block {
  padding: 16px;
  border-radius: 18px;
  background: #0c0a14;
  border: 1px solid rgba(167, 139, 250, 0.18);
  overflow: auto;
  color: #f4e9ff;
  line-height: 1.65;
  font-size: 13px;
}

.docs-grid {
  display: grid;
  gap: 18px;
}

.doc-card ul { padding-left: 18px; }
.doc-card li + li { margin-top: 8px; }

.footer {
  border-top: 1px solid rgba(45, 27, 105, 0.42);
  padding: 28px 0 54px;
  margin-top: 32px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background: rgba(255,255,255,0.03);
  color: #dccccf;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.4);
}

.dot.warning { background: var(--warning); box-shadow: 0 0 18px rgba(251, 191, 36, 0.4); }
.dot.error { background: var(--error); box-shadow: 0 0 18px rgba(248, 113, 113, 0.4); }

.hide { display: none !important; }

@media (max-width: 1024px) {
  .hero-grid,
  .dashboard-grid,
  .split,
  .grid-3,
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); min-height: 22px; }
  .sidebar { position: static; }
}

@media (max-width: 720px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; }
  .hero { padding-top: 52px; }
  h1 { max-width: none; }
  .hero-kpis,
  .stat-grid { grid-template-columns: 1fr; }
}
