/* ==========================================================================
   Prembot — landing + checkout + panel
   Reuses the Bleedline Arts token palette (Supabase-inspired, green accent).
   ========================================================================== */

:root {
  color-scheme: dark;
  --page: #141414;
  --page-glow: #1c1c1c;
  --surface: #1f1f1f;
  --surface-raised: #262626;
  --surface-hover: #2f2f2f;
  --surface-inset: #141414;
  --surface-glass: rgba(20, 20, 20, 0.72);
  --line: #2e2e2e;
  --line-bright: #3d3d3d;
  --line-focus: #565656;
  --text: #f4f4f4;
  --text-secondary: #b4b4b4;
  --muted: #909090;
  --faint: #737373;
  --accent: #3ecf8e;
  --accent-bright: #46e6a0;
  --accent-deep: #24b47e;
  --accent-soft: rgba(62, 207, 142, 0.14);
  --accent-line: rgba(62, 207, 142, 0.34);
  --accent-glow: rgba(62, 207, 142, 0.18);
  --accent-ink: #063b2c;
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --good: #3ecf8e;
  --good-soft: rgba(62, 207, 142, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.14);
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;
  --r-2xl: 16px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 8px 28px var(--accent-glow);
  --font: "Circular Std", "CircularStd", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --page: #f4f5f7;
  --page-glow: #ffffff;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-hover: #eef0f2;
  --surface-inset: #f4f5f7;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --line: #e6e8eb;
  --line-bright: #d5d8dc;
  --line-focus: #b6bac0;
  --text: #1c1c1c;
  --text-secondary: #55595f;
  --muted: #6b7076;
  --faint: #8a9097;
  --accent: #24b47e;
  --accent-bright: #1f9d6d;
  --accent-deep: #157a54;
  --accent-soft: rgba(36, 180, 126, 0.12);
  --accent-line: rgba(36, 180, 126, 0.4);
  --accent-glow: rgba(36, 180, 126, 0.16);
  --accent-ink: #ffffff;
  --good-soft: rgba(36, 180, 126, 0.12);
  --warn-soft: rgba(180, 130, 0, 0.12);
  --bad-soft: rgba(200, 40, 40, 0.1);
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.08);
  --shadow: 0 14px 36px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 28px 72px rgba(16, 24, 40, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--page);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── layout ───────────────────────────────────────────────────────────── */
.shell { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(12px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  color: var(--accent-ink); font-weight: 700;
}
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-secondary);
  font-size: 14px; font-weight: 500; transition: background .12s ease, color .12s ease;
}
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.active { color: var(--text); background: var(--surface-hover); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 0 16px; min-height: 40px;
  transition: background .12s ease, border-color .12s ease, transform .05s ease, color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-bright); }
.btn-quiet { background: var(--surface-raised); border-color: var(--line); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-hover); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.btn-paypal { background: #ffc439; color: #003087; }
.btn-paypal:hover:not(:disabled) { background: #f5b800; }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; font-size: 15px; }
.btn-sm { min-height: 32px; font-size: 12px; padding: 0 10px; }

/* ── cards & sections ─────────────────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--text-secondary); max-width: 620px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  background: var(--surface-raised); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; color: var(--text-secondary);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.pill.warn .dot { background: var(--warn); box-shadow: none; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-sm);
  padding: 26px; margin-bottom: 22px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.panel-subtitle { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

.grid { display: grid; gap: 18px; }
.plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
.plan:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.plan.highlight { border-color: var(--accent-line); box-shadow: var(--shadow-glow); }
.plan .tag {
  position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
}
.plan .name { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.plan .price { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan .desc { font-size: 14px; color: var(--text-secondary); flex: 1; }
.plan .slots { font-size: 13px; color: var(--accent); font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .ic {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent); flex: none;
}
.feature h3 { font-size: 14px; margin: 2px 0 4px; }
.feature p { font-size: 13px; color: var(--muted); margin: 0; }

/* ── forms ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.field input {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-inset); color: var(--text);
  font-size: 15px; font-family: inherit; transition: border-color .12s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.code { font-family: var(--mono); letter-spacing: 0.5em; text-align: center; font-size: 22px; }
.hint { font-size: 12.5px; color: var(--muted); }

/* ── auth ─────────────────────────────────────────────────────────────── */
.auth-wrap { max-width: 460px; margin: 56px auto; }
.auth-card { padding: 30px; }

/* ── code / keys ──────────────────────────────────────────────────────── */
.copybox {
  display: flex; align-items: center; gap: 10px; background: var(--surface-inset);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
}
.copybox code { font-family: var(--mono); font-size: 13px; flex: 1; overflow-x: auto; white-space: nowrap; color: var(--text); }
.paircode {
  font-family: var(--mono); font-size: 32px; letter-spacing: 0.3em; text-align: center;
  padding: 20px; background: var(--surface-inset); border: 1px dashed var(--accent-line);
  border-radius: var(--r-lg); color: var(--accent); font-weight: 700;
}

/* ── tables ───────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-inset);
}
table.data tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text-secondary); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-inset); }

/* ── badges ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.badge.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.badge.neutral { color: var(--muted); background: var(--surface-inset); }

/* ── stats ────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }

/* ── toast ────────────────────────────────────────────────────────────── */
#toast-root { position: fixed; inset: auto 0 24px 0; display: flex; justify-content: center; z-index: 100; pointer-events: none; }
.toast {
  background: var(--surface-raised); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: var(--r-md); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 500; animation: toastIn .18s ease;
}
.toast.error { border-color: var(--bad); color: var(--bad); }
.toast.success { border-color: var(--accent-line); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── misc ─────────────────────────────────────────────────────────────── */
.center { text-align: center; }
.muted { color: var(--muted); }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--line-bright); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 36px; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0; color: var(--muted); font-size: 12.5px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.hide { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

@media (max-width: 720px) {
  .hero { padding: 48px 0 28px; }
  .panel, .plan { padding: 20px; }
  .site-header .inner { padding: 12px 18px; }
  .shell { padding: 0 18px; }
}
