@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  /* backgrounds */
  --bg:       #07070c;
  --s1:       #0e0e16;
  --s2:       #16161f;
  --s3:       #1e1e2a;
  --s4:       #252534;

  /* accent */
  --accent:        #5dffb4;
  --accent-dim:    rgba(93,255,180,.12);
  --accent-glow:   rgba(93,255,180,.25);

  /* text */
  --txt:      #e8e8f0;
  --txt-2:    #b2b2cc;
  --txt-3:    #6e6e88;

  /* borders */
  --line:     rgba(255,255,255,.07);
  --line-2:   rgba(255,255,255,.12);

  /* state colours */
  --red:      #ff5f5f;
  --red-dim:  rgba(255,95,95,.12);
  --yellow:   #ffd166;
  --yel-dim:  rgba(255,209,102,.12);
  --blue:     #6ab4ff;
  --blue-dim: rgba(106,180,255,.12);

  /* radius */
  --r:   10px;
  --r2:  16px;

  /* type */
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* sidebar */
  --sidebar-w: 240px;
}

/* ─── RESET ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ─── TYPOGRAPHY ──────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--txt);
}
.mono { font-family: var(--font-mono); font-size: .85em; }

/* ─── SCROLLBAR ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--s1); }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 99px; }

/* ─── APP SHELL (sidebar layout) ─────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--s1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 1.5rem 1.25rem 1rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--txt);
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sidebar-logo .logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}
.sidebar-section {
  padding: .5rem 0;
}
.sidebar-label {
  padding: .5rem 1.25rem .25rem;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.sidebar a, .sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.25rem;
  color: var(--txt-2);
  font-size: .875rem;
  transition: color .15s, background .15s;
  border-radius: 0;
  cursor: pointer;
}
.sidebar a:hover, .sidebar-nav-item:hover {
  color: var(--txt);
  background: var(--s2);
  opacity: 1;
}
.sidebar a.active {
  color: var(--accent);
  background: var(--accent-dim);
}
.sidebar a .nav-icon {
  width: 16px;
  opacity: .6;
  flex-shrink: 0;
}
.sidebar a.active .nav-icon { opacity: 1; }
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 1rem 1.25rem;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  color: var(--txt-2);
}
.sidebar-avatar {
  width: 28px; height: 28px;
  background: var(--s3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}

/* main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 0 2rem;
  background: rgba(7,7,12,.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
  overflow: hidden;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.topbar-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.credits-badge {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--accent-dim);
  border: 1px solid rgba(93,255,180,.2);
  border-radius: 99px;
  padding: .25rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
}
.page-body {
  padding: 2rem;
  flex: 1;
}

/* ─── PUBLIC NAVBAR ───────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(7,7,12,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.navbar-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--txt);
  letter-spacing: -.5px;
  display: flex; align-items: center; gap: .4rem;
}
.navbar-logo .logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--txt-2); font-size: .875rem; }
.nav-links a:hover { color: var(--txt); opacity: 1; }

/* ─── CONTAINER ───────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ─── PAGE HEADER ─────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.page-header .subtitle {
  margin-top: .3rem;
  font-size: .875rem;
  color: var(--txt-2);
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #07070c;
}
.btn-primary:hover { background: #7fffc4; opacity: 1; color: #07070c; }
.btn-secondary {
  background: var(--s3);
  color: var(--txt);
  border: 1px solid var(--line-2);
}
.btn-secondary:hover { background: var(--s4); opacity: 1; color: var(--txt); }
.btn-ghost {
  background: transparent;
  color: var(--txt-2);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--s2); color: var(--txt); opacity: 1; }
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,95,95,.2);
}
.btn-danger:hover { background: rgba(255,95,95,.2); opacity: 1; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── CARDS ───────────────────────────────────────────────────────────── */
.card {
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 1.5rem;
  transition: border-color .2s;
}
.card:hover { border-color: var(--line-2); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.card-meta { color: var(--txt-2); font-size: .8rem; margin-top: .5rem; }
.card-actions { display: flex; gap: .5rem; margin-top: 1rem; align-items: center; }

/* ─── STATS ───────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 1.25rem 1.5rem;
}
.stat-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: .5rem;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--txt);
  line-height: 1;
}
.stat-card.accent-card { border-color: rgba(93,255,180,.2); }
.stat-card.accent-card .stat-value { color: var(--accent); }
.stat-sub {
  font-size: .75rem;
  color: var(--txt-3);
  margin-top: .25rem;
}

/* ─── BADGES ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.badge-draft    { background: rgba(156,163,175,.1); color: #9ca3af; }
.badge-draft::before { background: #6b7280; }

.badge-active   { background: var(--accent-dim); color: var(--accent); }
.badge-active::before { background: var(--accent); box-shadow: 0 0 4px var(--accent); }

.badge-in_progress { background: var(--blue-dim); color: var(--blue); }
.badge-in_progress::before { background: var(--blue); }

.badge-completed { background: rgba(52,211,153,.12); color: #34d399; }
.badge-completed::before { background: #34d399; }

.badge-failed   { background: var(--red-dim); color: var(--red); }
.badge-failed::before { background: var(--red); }

.badge-cancelled { background: rgba(107,114,128,.1); color: #6b7280; }
.badge-cancelled::before { background: #6b7280; }

.badge-firebase { background: rgba(251,146,60,.12); color: #fb923c; }
.badge-firebase::before { background: #fb923c; }

.badge-manual   { background: rgba(156,163,175,.1); color: #9ca3af; }
.badge-manual::before { background: #9ca3af; }

.badge-pending  { background: var(--yel-dim); color: var(--yellow); }
.badge-pending::before { background: var(--yellow); }

.badge-abandoned { background: var(--red-dim); color: var(--red); }
.badge-abandoned::before { background: var(--red); }

/* ─── ALERTS ──────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--r);
  font-size: .875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-error   { background: var(--red-dim);  color: #fca5a5; border-color: rgba(255,95,95,.2); }
.alert-success { background: var(--accent-dim); color: #6ee7b7;  border-color: rgba(93,255,180,.2); }
.alert-warn    { background: var(--yel-dim);  color: var(--yellow);  border-color: rgba(255,209,102,.2); }
.alert-info    { background: var(--blue-dim); color: var(--blue);  border-color: rgba(106,180,255,.2); }

/* legacy aliases */
.error   { background: var(--red-dim);  color: #fca5a5; padding: .75rem 1rem; border-radius: var(--r); margin-bottom: 1rem; font-size: .875rem; border: 1px solid rgba(255,95,95,.2); }
.success { background: var(--accent-dim); color: #6ee7b7; padding: .75rem 1rem; border-radius: var(--r); margin-bottom: 1rem; font-size: .875rem; border: 1px solid rgba(93,255,180,.2); }
.warn    { background: var(--yel-dim);  color: var(--yellow); padding: .75rem 1rem; border-radius: var(--r); margin-bottom: 1rem; font-size: .875rem; border: 1px solid rgba(255,209,102,.2); }

/* ─── FORMS ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label, .form-stack label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--txt-2);
  margin-bottom: .5rem;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
textarea,
select,
.form-stack input,
.form-stack textarea,
.form-stack select {
  display: block;
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: .65rem .9rem;
  color: var(--txt);
  font-size: .9rem;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  margin-top: .25rem;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { resize: vertical; min-height: 100px; }
select option { background: var(--s3); }
.form-hint {
  font-size: .75rem;
  color: var(--txt-3);
  margin-top: .35rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ─── TABLES ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r2); border: 1px solid var(--line); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  background: var(--s2);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--txt);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,.02); }
.table .mono { color: var(--txt-2); }

/* ─── AUTH PAGES ──────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(93,255,180,.07) 0%, transparent 70%);
  pointer-events: none;
}
.auth-box {
  position: relative;
  z-index: 1;
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: var(--r2);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}
.auth-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.75rem;
  justify-content: center;
}
.auth-logo .logo-dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
}
.auth-box h1 {
  font-size: 1.4rem;
  margin-bottom: .5rem;
  text-align: center;
}
.auth-box .auth-sub {
  text-align: center;
  color: var(--txt-2);
  font-size: .875rem;
  margin-bottom: 1.75rem;
}
.auth-box .btn-primary {
  width: 100%;
  justify-content: center;
  padding: .75rem;
  font-size: .95rem;
}
.auth-box .auth-foot {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .85rem;
  color: var(--txt-2);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem;
  background: var(--s3);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--txt);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 1rem;
}
.btn-google:hover { background: var(--s4); opacity: 1; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--txt-3);
  font-size: .8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ─── LANDING PAGE ────────────────────────────────────────────────────── */
.landing { padding-top: 60px; }

.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(93,255,180,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(93,255,180,.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.6) 30%, rgba(0,0,0,.6) 70%, transparent);
}
.hero .container {
  position: relative; z-index: 1;
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-dim);
  border: 1px solid rgba(93,255,180,.2);
  border-radius: 99px;
  padding: .3rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-inline: auto;
}
.hero h1 .accent-text {
  color: var(--accent);
  position: relative;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--txt-2);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.hero-cta .btn-lg { font-size: 1rem; padding: .85rem 2rem; }
.hero-social-proof {
  color: var(--txt-3);
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}
.hero-social-proof span { color: var(--accent); font-weight: 600; }

/* problem section */
.section {
  padding: 5rem 0;
}
.section-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--txt-2);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* problem flow */
.problem-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  margin-top: 2rem;
}
.problem-step {
  background: var(--s1);
  padding: 1.75rem 1.5rem;
}
.problem-step .step-num {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--txt-3);
  margin-bottom: .75rem;
}
.problem-step h4 {
  font-size: .95rem;
  margin-bottom: .4rem;
}
.problem-step p {
  font-size: .8rem;
  color: var(--txt-2);
  line-height: 1.6;
}
.problem-step.is-fail {
  background: rgba(255,95,95,.05);
}
.problem-step.is-fail h4 { color: var(--red); }

/* how it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.how-step {
  position: relative;
  padding: 1.75rem;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  transition: border-color .2s;
}
.how-step:hover { border-color: rgba(93,255,180,.2); }
.how-num {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .06em;
  margin-bottom: 1rem;
}
.how-step h3 { font-size: 1rem; margin-bottom: .5rem; }
.how-step p { font-size: .85rem; color: var(--txt-2); line-height: 1.6; }

/* features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
}
.feature-item {
  background: var(--s1);
  padding: 2rem;
}
.feature-icon {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  opacity: .9;
}
.feature-item h3 { font-size: .95rem; margin-bottom: .4rem; }
.feature-item p { font-size: .82rem; color: var(--txt-2); line-height: 1.65; }

/* CTA section */
.cta-section {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(93,255,180,.08) 0%, transparent 70%);
}
.cta-section h2 { position: relative; }
.cta-section .section-sub {
  margin-inline: auto;
  position: relative;
}
.cta-section .hero-cta { position: relative; }

/* section alt bg */
.section-alt { background: var(--s1); }

/* ─── MISC COMPONENTS ─────────────────────────────────────────────────── */

/* meta info */
.meta {
  font-size: .78rem;
  color: var(--txt-3);
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--txt-2);
  margin-top: .5rem;
}

/* activity indicator */
.activity-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--txt-3);
}
.activity-dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.activity-dot.warning { background: var(--yellow); }
.activity-dot.error { background: var(--red); }

/* campaign card extras */
.campaign-tester-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .85rem;
}
.campaign-tester-row:last-child { border-bottom: none; }

/* progress bar */
.progress-bar {
  height: 4px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
  margin-top: .75rem;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .4s ease;
}
.progress-fill.warn { background: var(--yellow); }
.progress-fill.danger { background: var(--red); }

/* empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--txt-3);
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .4;
}
.empty-state p { font-size: .95rem; margin-bottom: 1.5rem; }

/* tabs */
.tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: .6rem 1rem;
  font-size: .875rem;
  color: var(--txt-2);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s;
  font-family: var(--font-body);
  font-weight: 500;
}
.tab-btn:hover { color: var(--txt); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* section header inside page */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-head h3 { font-size: 1rem; font-weight: 700; }

/* inline form */
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form input { flex: 1; }

/* JSON/code block */
.code-block {
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--txt-2);
  overflow-x: auto;
  white-space: pre;
}

/* divider */
.divider {
  height: 1px;
  background: var(--line);
  margin: 1.5rem 0;
}

/* credit change colour */
.credit-pos { color: var(--accent); font-weight: 600; }
.credit-neg { color: var(--red); font-weight: 600; }

/* reputation bar */
.rep-bar-wrap { display: flex; align-items: center; gap: .75rem; }
.rep-bar {
  flex: 1;
  height: 6px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
}
.rep-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--accent) 100%);
  border-radius: 99px;
}
.rep-value {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--txt-2);
  min-width: 28px;
  text-align: right;
}

/* ─── FOOTER ──────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  color: var(--txt-3);
  font-size: .8rem;
}
footer a { color: var(--txt-2); }

/* ─── UTILITIES ───────────────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--txt-2); }
.text-dim    { color: var(--txt-3); }
.text-danger { color: var(--red); }
.text-warn   { color: var(--yellow); }
.fw-bold     { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */

/* Base styles — MUST come before media query overrides */
.topbar-hamburger {
  display: none;
  align-items: center;
  background: none;
  border: none;
  color: var(--txt);
  cursor: pointer;
  padding: .25rem;
  margin-right: .5rem;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}

/* Mobile overrides — after base styles so they win the cascade */
@media (max-width: 768px) {
  /* sidebar */
  .sidebar              { transform: translateX(-100%); transition: transform .25s ease; z-index: 200; }
  .sidebar.open         { transform: none; }
  .sidebar-overlay      { z-index: 199; }
  .sidebar-overlay.visible { display: block; }

  /* layout */
  .main-content         { margin-left: 0; max-width: 100vw; overflow-x: hidden; }
  .topbar               { padding: 0 1rem; }
  .page-body            { padding: 1.25rem; }

  /* hamburger — show on mobile */
  .topbar-hamburger     { display: flex; }

  /* credits badge — numero only */
  .credits-badge .credits-label { display: none; }
  .credits-badge        { padding: .25rem .5rem; gap: .25rem; }

  /* grids & layout */
  .stats-grid           { grid-template-columns: repeat(2, 1fr); }
  .form-row             { grid-template-columns: 1fr; }
  .features-grid,
  .problem-flow         { grid-template-columns: 1fr; }
  .cards                { grid-template-columns: 1fr; }
  .page-header          { flex-direction: column; }
  .hero h1              { font-size: 2.2rem; }
}

/* ─── MOBILE NAVBAR (landing/public pages) ────────────────────────── */
.nav-mobile-controls {
  display: none;
  align-items: center;
  gap: .25rem;
}
.nav-user-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--s3);
  border: 1px solid var(--line-2);
  color: var(--txt-2);
  transition: background .15s, color .15s;
}
.nav-user-icon:hover { background: var(--s4); color: var(--accent); opacity: 1; }
.nav-hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px; height: 36px;
  background: none;
  border: none;
  color: var(--txt-2);
  cursor: pointer;
  gap: 4px;
}
.nav-hamburger-btn .bar {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 99px;
  transition: transform .22s ease, opacity .22s ease;
  transform-origin: center;
}
.nav-hamburger-btn.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger-btn.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger-btn.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Drawer */
.nav-drawer {
  position: fixed;
  top: 60px; left: 0; right: 0;
  z-index: 190;
  background: var(--s1);
  border-bottom: 1px solid var(--line-2);
  padding: .75rem 1.5rem 1.25rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}
.nav-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-drawer-link {
  display: block;
  padding: .75rem 0;
  color: var(--txt-2);
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.nav-drawer-link:hover { color: var(--txt); opacity: 1; }
.nav-drawer .btn { display: block; text-align: center; margin-top: 1rem; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-controls { display: flex; }
  .container { padding: 0 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .hero-desc { font-size: 1rem; }
  .how-grid { grid-template-columns: 1fr; }
  .section-sub { font-size: .95rem; }
}
