:root {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --bg-elev-2: #1c2330;
  --border: #2a3140;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --accent: #00b4d8;
  --accent-hover: #0096b8;
  --alert: #e63946;
  --alert-soft: rgba(230, 57, 70, 0.12);
  --good: #3fb950;
  --warn: #d29922;
  --code-bg: #0a0e14;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --radius: 6px;
  --radius-sm: 4px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

code, kbd, pre, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.45;
}

pre code { background: none; padding: 0; }

code {
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}

h1, h2, h3, h4 { color: var(--text); margin-top: 1.6em; margin-bottom: 0.5em; line-height: 1.25; }
h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.7rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0.6em 0; color: var(--text); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Top nav ---------- */
.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.nav-brand { font-weight: 700; font-size: 1.15rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.nav-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #001218; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-danger { background: var(--alert); color: white; }
.btn-danger:hover { background: #c92e3b; text-decoration: none; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* ---------- Forms ---------- */
.form { max-width: 420px; margin: 0 auto; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.9rem; }
.input, input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.input:focus { outline: none; border-color: var(--accent); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--text-muted); }
.checkbox-row input { margin-top: 4px; accent-color: var(--accent); }
.error-banner { background: var(--alert-soft); border: 1px solid var(--alert); color: var(--text); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.success-banner { background: rgba(63, 185, 80, 0.1); border: 1px solid var(--good); color: var(--text); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }

/* ---------- Hero ---------- */
.hero { padding: 80px 24px 60px; text-align: center; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 3rem; margin: 0 0 16px; }
.hero .subhead { font-size: 1.2rem; color: var(--text-muted); max-width: 640px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section ---------- */
.section { padding: 60px 0; border-bottom: 1px solid var(--border); }
.section h2 { text-align: center; margin-top: 0; }
.section .lede { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 40px; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-top: 0; color: var(--accent); }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; color: var(--accent); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.step { text-align: center; }
.step-num {
  display: inline-block;
  width: 40px; height: 40px; line-height: 40px;
  background: var(--accent); color: #001218;
  border-radius: 50%; font-weight: 700; margin-bottom: 12px;
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing tables ---------- */
.pricing-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .pricing-tables { grid-template-columns: 1fr; } }
.price-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.price-card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.price-card-header h3 { margin: 0 0 4px; }
.price-card-header .lede { margin: 0; color: var(--text-muted); font-size: 0.9rem; text-align: left; }
table.pricing { width: 100%; border-collapse: collapse; }
table.pricing th, table.pricing td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
table.pricing th { background: var(--bg-elev-2); font-weight: 600; color: var(--text-muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
table.pricing td .btn { width: 100%; }
table.pricing tr:last-child td { border-bottom: none; }

/* ---------- Tables generic ---------- */
table.data { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
table.data th { background: var(--bg-elev-2); color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- FAQ accordion ---------- */
details.faq { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: '+'; color: var(--accent); margin-right: 10px; font-weight: 700; }
details.faq[open] summary::before { content: '−'; }
details.faq p { color: var(--text-muted); margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { padding: 30px 24px; text-align: center; color: var(--text-dim); font-size: 0.88rem; border-top: 1px solid var(--border); }
.footer .links { margin-bottom: 8px; }
.footer .links a { margin: 0 10px; color: var(--text-muted); }

/* ---------- Dashboard panels ---------- */
.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.panel h3 { margin-top: 0; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .panel-grid { grid-template-columns: 1fr; } }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-credits { background: rgba(0, 180, 216, 0.15); color: var(--accent); }
.badge-seat { background: rgba(63, 185, 80, 0.15); color: var(--good); }

.meter { width: 100%; height: 10px; background: var(--bg-elev-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.meter > div { height: 100%; background: var(--accent); transition: width 0.3s; }
.meter.low > div { background: var(--alert); }
.meter.medium > div { background: var(--warn); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; align-items: baseline; }
.kv dt { color: var(--text-muted); font-size: 0.88rem; }
.kv dd { margin: 0; color: var(--text); }

.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }

/* ---------- Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding: 30px 0 60px; }
@media (max-width: 800px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-sidebar { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; }
.docs-sidebar h4 { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px; }
.docs-sidebar a { display: block; padding: 4px 0; color: var(--text-muted); font-size: 0.92rem; }
.docs-sidebar a:hover { color: var(--text); text-decoration: none; }
.docs-sidebar a.active { color: var(--accent); font-weight: 600; }
.docs-content h2 { margin-top: 1.8em; }
.docs-content h3 { margin-top: 1.4em; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.right { text-align: right; }
.spacer-sm { height: 12px; }
.spacer { height: 24px; }
.spacer-lg { height: 48px; }
.hidden { display: none !important; }
.notice {
  background: var(--bg-elev-2);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
