:root {
  --bg: #0a0f14;
  --surface: #141c24;
  --surface2: #1e2a36;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #22d3ee;
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--surface2); background: var(--surface); }
.brand { display: flex; gap: 0.75rem; align-items: center; }
.brand h1 { margin: 0; font-size: 1.25rem; }
.tagline { margin: 0; color: var(--muted); font-size: 0.85rem; }
.logo { font-size: 1.5rem; color: var(--accent); }
.ops-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  border-radius: 10px;
  background: #0b0f14;
}

.ops-card { padding-bottom: 0.5rem; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.tabs { display: flex; gap: 0.5rem; padding: 1rem 1.5rem 0; }
.tab { background: transparent; border: none; color: var(--muted); padding: 0.6rem 1rem; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 1rem 1.5rem 2rem; }
.tab-panel.active { display: block; }
.toolbar { margin-bottom: 1rem; }
.btn { border: none; border-radius: var(--radius); padding: 0.5rem 1rem; cursor: pointer; }
.btn.primary { background: var(--accent); color: #042f2e; font-weight: 600; }
.btn.secondary { background: var(--surface2); color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--surface2); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--surface2); }
.stage-list { line-height: 1.8; }
.stage-done .badge { background: #14532d; color: #86efac; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-card { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); width: min(400px, 92vw); }
.key-modal-card { width: min(560px, 94vw); max-height: 90vh; overflow: auto; }
.keys-lede { margin: 0 0 1rem; font-size: 0.95rem; }
.scope-fieldset { border: 1px solid rgba(139,156,179,0.35); border-radius: 8px; padding: 0.75rem 1rem 1rem; margin: 1rem 0; }
.scope-fieldset legend { padding: 0 0.35rem; font-weight: 600; }
.scope-help { margin: 0.25rem 0 0.75rem; font-size: 0.85rem; }
.scope-toolbar { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.scope-list { display: flex; flex-direction: column; gap: 0.5rem; }
.scope-row { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.65rem; align-items: start; padding: 0.5rem 0.6rem; border-radius: 6px; background: rgba(15,23,42,0.35); }
.scope-row input { margin-top: 0.2rem; }
.scope-row-label { font-weight: 600; }
.scope-row-id { font-family: ui-monospace, monospace; font-size: 0.8rem; opacity: 0.75; margin-left: 0.35rem; font-weight: 400; }
.scope-row-desc { grid-column: 2; font-size: 0.85rem; color: var(--muted, #8b9cb3); margin: 0; }
.scope-row-eps { grid-column: 2; font-size: 0.75rem; font-family: ui-monospace, monospace; color: #94a3b8; margin: 0.15rem 0 0; }
.key-card-scopes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.scope-chip { font-size: 0.75rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: rgba(34,211,238,0.15); border: 1px solid rgba(34,211,238,0.35); }
.key-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.75rem; }
.key-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
}
.key-meta > div { margin: 0; }
.key-meta dt {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}
.key-meta dd { margin: 0.15rem 0 0; font-size: 0.9rem; }
.key-secret-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(139,156,179,0.3); }
.key-secret-value { display: block; word-break: break-all; padding: 0.75rem; margin: 0.75rem 0; background: rgba(0,0,0,0.35); border-radius: 6px; font-size: 0.85rem; }
.optional-cap { display: block; margin-top: 0.75rem; }
.key-modal-actions { margin-top: 1rem; justify-content: flex-end; }
.modal.hidden { display: none; }
label { display: block; margin-bottom: 0.75rem; }
input { width: 100%; margin-top: 0.25rem; padding: 0.5rem; border-radius: 6px; border: 1px solid var(--surface2); background: var(--bg); color: var(--text); }
.hint { font-size: 0.85rem; color: var(--muted); }
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--surface2); padding: 0.75rem 1rem; border-radius: var(--radius); }
.toast.hidden { display: none; }
.landing { padding: 2rem 1.5rem 3rem; max-width: 960px; margin: 0 auto; }
.hero { margin-bottom: 2rem; }
.eyebrow { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.5rem; }
.hero h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 0.75rem; line-height: 1.2; }
.lede { color: var(--muted); max-width: 52rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.25rem 0 0.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.feature-grid h3, .pricing h3 { margin-top: 0; }
.price-list { padding-left: 1.2rem; line-height: 1.7; }
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.auth-tab { background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 0.25rem 0.5rem; }
.auth-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.auth-form.hidden { display: none; }
.code-block { background: var(--surface); border: 1px solid var(--surface2); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.85rem; white-space: pre-wrap; }
textarea { width: 100%; font-family: ui-monospace, monospace; }
label { display: block; margin-bottom: 0.75rem; }
select, input[type="email"] { margin-top: 0.25rem; padding: 0.4rem 0.6rem; border-radius: 6px; border: 1px solid var(--surface2); background: var(--surface); color: inherit; }

/* ——— Marketing landing ——— */
.marketing { position: relative; overflow-x: hidden; }
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: float 18s ease-in-out infinite; }
.orb-a { width: 420px; height: 420px; background: #0891b2; top: -8%; left: -5%; }
.orb-b { width: 360px; height: 360px; background: #6366f1; top: 40%; right: -10%; animation-delay: -6s; }
.orb-c { width: 280px; height: 280px; background: #14b8a6; bottom: 5%; left: 30%; animation-delay: -12s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }
.glass { background: rgba(20, 28, 36, 0.72); backdrop-filter: blur(12px); border: 1px solid rgba(34, 211, 238, 0.12); }
.topbar.glass { position: sticky; top: 0; z-index: 50; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent); }
.landing { position: relative; z-index: 1; padding: 2rem 1.5rem 3rem; max-width: 1100px; margin: 0 auto; }
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 1rem; line-height: 1.15; font-weight: 700; }
.gradient-text { background: linear-gradient(135deg, #22d3ee, #818cf8, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shimmer { animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
.pulse { animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.glow { box-shadow: 0 0 24px rgba(34, 211, 238, 0.35); }
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; padding: 1.25rem; margin: 2rem 0 3rem; border-radius: var(--radius); }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.section { margin-bottom: 3.5rem; }
.section-title { font-size: 1.5rem; margin: 0 0 1.25rem; }
.section-lede { margin: -0.75rem 0 1.5rem; max-width: 42rem; }
.price-sub { color: var(--muted); font-size: 0.95rem; margin: -0.5rem 0 1rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.price-card .price { font-size: 2rem; font-weight: 700; margin: 0.5rem 0; }
.price-card .price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card.featured { border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 20px rgba(34, 211, 238, 0.12); }
.price-card ul { padding-left: 1.1rem; line-height: 1.7; font-size: 0.9rem; color: var(--muted); }
.price-card .btn { width: 100%; margin-top: 0.75rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } .nav-links { display: none; } }
.feature-card { transition: transform 0.2s, border-color 0.2s; }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); }
.feature-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.animate-in { animation: fadeUp 0.8s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.check-list { list-style: none; padding: 0; line-height: 2; }
.check-list .check { color: #34d399; margin-right: 0.5rem; }
.chart-card { padding: 1.25rem; border-radius: var(--radius); }
.chart-caption { font-size: 0.8rem; margin-top: 0.5rem; }
.pipeline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.5rem; border-radius: var(--radius); margin-bottom: 2rem; }
.pipe-step { text-align: center; padding: 1rem; border-radius: var(--radius); min-width: 120px; opacity: 0.5; transition: opacity 0.3s, transform 0.3s; }
.pipe-step.active { opacity: 1; transform: scale(1.05); background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3); }
.pipe-num { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: var(--accent); color: #042f2e; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.35rem; }
.pipe-arrow { color: var(--muted); font-size: 1.25rem; }
.radar-row { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .radar-row { grid-template-columns: 1fr; } }
.endpoint-list { padding: 1.25rem; border-radius: var(--radius); }
.endpoint-ul { list-style: none; padding: 0; margin: 0.5rem 0 0; line-height: 1.9; font-size: 0.85rem; }
.endpoint-ul code { color: var(--accent); }
.code-preview pre { margin: 0; font-size: 0.8rem; overflow-x: auto; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.price-card .price { font-size: 2rem; font-weight: 700; margin: 0.5rem 0; }
.price-card .price span { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.price-card ul { padding-left: 1.2rem; line-height: 1.8; color: var(--muted); }
.price-card.featured { border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 0 32px rgba(34, 211, 238, 0.15); }
.site-footer { text-align: center; padding: 2rem 0 1rem; border-top: 1px solid var(--surface2); margin-top: 2rem; }
.site-footer a { color: var(--accent); }
