/* ============================================================
   RankRadar — Modern, gradient, image-driven local SEO app
   ============================================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #ec4899;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --card-bg-alt: #f8fafc;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
}

/* ============================================================
   DARK MODE — toggled via [data-theme="dark"] on <html>
   Set by an inline script in header.ejs reading localStorage
   BEFORE first paint, so no flash of light theme on load.
   ============================================================ */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;
  --accent: #f472b6;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --bg: #0b1120;
  --bg-soft: #111827;
  --bg-dark: #050810;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #1f2937;
  --card-bg: #111827;
  --card-bg-alt: #1f2937;
  --nav-bg: rgba(15, 23, 42, 0.88);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --gradient-soft: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
  color-scheme: dark;
}

/* Auto-swap background-color and text color anywhere we hard-coded white surfaces */
[data-theme="dark"] body,
[data-theme="dark"] html { background: var(--bg); color: var(--text); }
[data-theme="dark"] .nav { background: var(--nav-bg); border-bottom-color: var(--border); }

/* Card-y surfaces — pages tile with white in light mode; in dark they need contrast */
[data-theme="dark"] .feature-card,
[data-theme="dark"] .step,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .cat-card,
[data-theme="dark"] .issue-card,
[data-theme="dark"] .gbp-card,
[data-theme="dark"] .geo-card,
[data-theme="dark"] .geo-check,
[data-theme="dark"] .ps-card,
[data-theme="dark"] .keyword-card,
[data-theme="dark"] .comp-table-wrap,
[data-theme="dark"] .roadmap-week,
[data-theme="dark"] .stat-block,
[data-theme="dark"] .competitor-card,
[data-theme="dark"] .audit-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .login-card,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .admin-table,
[data-theme="dark"] .funnel-stat,
[data-theme="dark"] .reactivation-card,
[data-theme="dark"] .attempt-stats .stat-block {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}

/* Inputs / forms */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--card-bg-alt);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--muted); }

/* Tables */
[data-theme="dark"] table { color: var(--text); }
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .comp-table th { background: var(--card-bg-alt); color: var(--text); }
[data-theme="dark"] .admin-table td,
[data-theme="dark"] .comp-table td { border-color: var(--border); }
[data-theme="dark"] .admin-table tr:hover,
[data-theme="dark"] .comp-table tr:hover { background: var(--card-bg-alt); }

/* Code / inline marks */
[data-theme="dark"] code,
[data-theme="dark"] pre {
  background: var(--card-bg-alt);
  color: #f9a8d4;
  border-color: var(--border);
}

/* Buttons that were ghost/secondary */
[data-theme="dark"] .btn-ghost {
  background: var(--card-bg-alt);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .btn-ghost:hover { background: var(--card-bg); }

/* Hero overlay — keep gradient but soften so dark text still reads */
[data-theme="dark"] .hero { background: var(--bg-dark); }

/* Pricing page price strike-throughs, "muted" copy, etc. */
[data-theme="dark"] .muted { color: var(--muted); }

/* Footer */
[data-theme="dark"] .footer { background: var(--bg-dark); color: var(--muted); border-top-color: var(--border); }

/* Alerts — convert pastel light backgrounds to darker tinted variants */
[data-theme="dark"] .alert-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
[data-theme="dark"] .alert-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* Result summary block uses gradient-soft → that's already overridden in vars */
[data-theme="dark"] .result-summary { color: var(--text); }

/* Result header (the white card above the score circle) */
[data-theme="dark"] .result-header { background: var(--card-bg); border-color: var(--border); }

/* Status pills — pending pill is gray on light, needs darkening */
[data-theme="dark"] .status-pending { background: var(--card-bg-alt); color: var(--muted); }

/* Severity / category / cost pills — these usually have pastel bgs that look fine on dark, but force border + readability */
[data-theme="dark"] .severity-pill,
[data-theme="dark"] .cat-pill,
[data-theme="dark"] .cost-pill { filter: brightness(0.92); }

/* Faq, blog, fix, paywall-card subtle inner surfaces */
[data-theme="dark"] .faq-item,
[data-theme="dark"] .fix-unlock-card,
[data-theme="dark"] .blog-tab,
[data-theme="dark"] .bt-option,
[data-theme="dark"] .error-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .price-card,
[data-theme="dark"] .cta-card { background: var(--card-bg); color: var(--text); border-color: var(--border); }

/* Tab/option active state stays slightly brighter than its sibling tabs */
[data-theme="dark"] .blog-tab.active,
[data-theme="dark"] .bt-option.active { background: var(--card-bg-alt); }

/* Theme toggle button itself */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
}
.theme-toggle:hover { background: var(--card-bg-alt); transform: rotate(15deg); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Example-report banner (used on /example) */
.example-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}
.example-banner .example-banner-icon { font-size: 28px; }
.example-banner .example-banner-text { flex: 1; line-height: 1.4; }
.example-banner .example-banner-text strong { font-weight: 700; }
.example-banner .example-banner-cta {
  background: #fff;
  color: #4f46e5;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.example-banner .example-banner-cta:hover { background: #f8fafc; color: #4f46e5; }
@media (max-width: 640px) {
  .example-banner { flex-direction: column; text-align: center; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 640px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-icon { font-size: 22px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}
.nav-links a:hover { color: var(--primary); }

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 0;
}
.link-btn:hover { color: var(--primary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-ghost {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: 12px;
}
.btn-block {
  display: flex;
  width: 100%;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(236, 72, 153, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(139, 92, 246, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-soft);
  border: 1px solid #e9d5ff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hl {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hl-green {
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 32px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stats strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stats span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 80px 0;
  background: var(--bg-soft);
}
.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 48px;
  font-size: 17px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.2s ease;
}
.feature-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
  padding: 10px;
  background: var(--gradient-soft);
  border-radius: 12px;
}
.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding: 80px 0;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.step {
  position: relative;
}
.step-num {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  z-index: 2;
  box-shadow: var(--shadow);
}
.step-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 3 / 2;
  background: var(--bg-soft);
}
.step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.step p {
  color: var(--muted);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 60px 0;
}
.cta-card {
  background: var(--gradient);
  color: white;
  padding: 60px 40px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 60%);
  pointer-events: none;
}
.cta-card h2 {
  color: white;
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
  position: relative;
}
.cta-card p {
  font-size: 17px;
  margin-bottom: 28px;
  opacity: 0.95;
  position: relative;
}
.cta-card .btn {
  position: relative;
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.cta-card .btn:hover {
  background: #fff;
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.auth-card h1 {
  margin-bottom: 8px;
  font-size: 28px;
}
.auth-card form {
  margin-top: 24px;
  text-align: left;
}
.auth-card label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 16px;
}
.auth-card input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
.dev-note {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  margin: 24px 0;
  font-size: 13px;
}
.magic-link-display {
  display: block;
  word-break: break-all;
  margin-top: 8px;
  padding: 8px;
  background: var(--card-bg);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  text-align: left;
}
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert code {
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard {
  padding: 48px 0 80px;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-header h1 {
  font-size: 32px;
  margin-bottom: 4px;
}

.empty-state {
  text-align: center;
  padding: 80px 32px;
  background: var(--bg-soft);
  border-radius: 20px;
  border: 2px dashed var(--border);
}
.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.empty-state h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.audit-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
}
.audit-card:hover {
  color: var(--text);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.audit-card-head {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.audit-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.audit-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.status-running { background: #dbeafe; color: #1e40af; }
.status-complete { background: #d1fae5; color: #065f46; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-paid { background: var(--gradient); color: white; }
.status-pending { background: #f1f5f9; color: var(--muted); }

/* ============================================================
   FORMS
   ============================================================ */
.form-page {
  padding: 48px 0 80px;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}
.back-link:hover { color: var(--primary); }

.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}
.form-card label {
  display: block;
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 14px;
}
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--card-bg);
}
.form-card input:focus,
.form-card select:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
.req { color: var(--red); }
.hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

/* ============================================================
   AUDIT RESULT
   ============================================================ */
.result-page {
  padding: 48px 0 80px;
}
.loading-state {
  text-align: center;
  padding: 80px 32px;
}
.spinner-lg {
  display: inline-block;
  width: 64px;
  height: 64px;
  border: 6px solid var(--bg-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.result-meta h1 {
  font-size: 28px;
  margin-bottom: 6px;
}
.score-circle-lg {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.score-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}
.score-of {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.result-summary {
  background: var(--gradient-soft);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  font-size: 17px;
  line-height: 1.5;
}

.section-title-sm {
  font-size: 22px;
  margin: 32px 0 16px;
  text-transform: capitalize;
}
.section-title-sm .muted {
  font-weight: 400;
  font-size: 16px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.cat-name {
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--muted);
  margin-bottom: 8px;
}
.cat-bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.cat-bar-fill {
  height: 100%;
  background: var(--gradient);
  transition: width 0.4s ease;
}
.cat-score {
  font-weight: 700;
  font-size: 16px;
}

.quick-wins {
  background: linear-gradient(135deg, #ecfdf5, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 20px 20px 20px 40px;
  margin-bottom: 16px;
}
.quick-wins li {
  margin-bottom: 6px;
  font-size: 15px;
}
.quick-wins li:last-child { margin-bottom: 0; }

.issues {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.issue-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 20px 24px;
}
.issue-card.severity-high { border-left-color: var(--red); }
.issue-card.severity-medium { border-left-color: var(--amber); }
.issue-header {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.severity-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--green);
  color: white;
}
.severity-pill.severity-high { background: var(--red); }
.severity-pill.severity-medium { background: var(--amber); }
.cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--border);
}
.issue-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.issue-fix {
  font-size: 14px;
  margin-bottom: 8px;
}
.issue-impact {
  font-size: 14px;
  color: var(--muted);
}

.paywall-card {
  background: var(--gradient);
  color: white;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}
.paywall-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent 60%);
}
.paywall-card > * { position: relative; }
.paywall-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.paywall-card h2 {
  color: white;
  font-size: 28px;
  margin-bottom: 8px;
}
.paywall-card > p {
  font-size: 16px;
  opacity: 0.95;
  max-width: 540px;
  margin: 0 auto 28px;
}
.paywall-tiers {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.paywall-tiers .btn {
  background: #fff;
  color: var(--primary-dark);
}
.paywall-tiers .btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: rgba(255,255,255,0.3);
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-page {
  padding: 60px 0 80px;
}
.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}
.pricing-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 12px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
  position: relative;
  transition: all 0.2s ease;
}
.price-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.price-card-featured {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.price-card h3 {
  font-size: 18px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-tagline {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.price-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-soft);
  font-size: 14px;
}
.price-card li:last-child { border-bottom: none; }

.pricing-faq {
  max-width: 720px;
  margin: 80px auto 0;
}
.pricing-faq h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 28px;
}
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.faq-item h4 {
  font-size: 16px;
  margin-bottom: 6px;
}
.faq-item p {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   AUDIT — premium fields styling
   ============================================================ */
.dev-preview-banner {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}
.business-classification {
  font-style: italic;
  color: var(--muted);
  margin: 4px 0 8px;
  font-size: 15px;
}

.gbp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.coming-soon-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: white;
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.coming-soon-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.15), transparent 60%);
  pointer-events: none;
}
.cs-icon {
  font-size: 56px;
  flex-shrink: 0;
  position: relative;
}
.cs-content {
  flex: 1;
  position: relative;
}
.cs-content h2 {
  color: white;
  font-size: 22px;
  margin: 6px 0 8px;
}
.cs-content p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.cs-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cs-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.cs-features li {
  font-size: 13px;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.95);
}
.coming-soon-card .btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}
.coming-soon-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}
@media (max-width: 640px) {
  .coming-soon-card { flex-direction: column; }
  .cs-icon { font-size: 40px; }
}
.gbp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.gbp-stat {
  text-align: center;
}
.gbp-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.gbp-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}
.gbp-info {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}
.gbp-info dt {
  font-weight: 600;
  color: var(--muted);
}
.gbp-info dd {
  margin: 0;
  word-break: break-word;
}
@media (max-width: 640px) {
  .gbp-grid { grid-template-columns: repeat(2, 1fr); }
  .gbp-info { grid-template-columns: 1fr; }
  .gbp-info dt { margin-top: 8px; }
}

.issue-evidence {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 8px 0;
  border-left: 3px solid var(--primary);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.issue-evidence strong {
  font-family: 'Inter', sans-serif;
  color: var(--primary-dark);
}

.ps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.ps-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
}
.ps-score {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
.ps-score-good { color: #10b981; }
.ps-score-mid  { color: #f59e0b; }
.ps-score-bad  { color: #ef4444; }
.ps-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}
.ps-vitals {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.ps-vitals strong { color: var(--text); margin-right: 4px; }

/* Subscription-locked sections: blurred preview + paywall overlay */
.locked-card {
  position: relative !important;
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  min-height: 240px;
}
.locked-card > .locked-content {
  filter: blur(8px) saturate(0.7);
  -webkit-filter: blur(8px) saturate(0.7);
  pointer-events: none;
  user-select: none;
  transform: scale(1.02);
}
.locked-card > .lock-overlay {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.6));
  border-radius: 16px;
  padding: 24px;
  z-index: 10;
}
.lock-overlay-inner {
  text-align: center;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.lock-icon-big {
  font-size: 38px;
  margin-bottom: 6px;
  line-height: 1;
}
.lock-overlay-inner h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
}
.lock-overlay-inner p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.lock-overlay-inner .btn {
  display: inline-block;
  margin-bottom: 10px;
}
.lock-pricing {
  font-size: 12px !important;
  color: var(--muted);
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

.muted-feature {
  color: var(--muted) !important;
  opacity: 0.7;
}

.bonus-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 4px;
  vertical-align: 1px;
}

.geo-fomo-note {
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  font-size: 13px;
  color: #fef3c7;
  line-height: 1.5;
}
.geo-fomo-note strong {
  color: #fde68a;
}
.geo-fomo-note a {
  color: #fbbf24;
  font-weight: 700;
  margin-left: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.geo-fomo-note a:hover {
  text-decoration: underline;
  color: #fbbf24;
}

.geo-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: white;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.geo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 95% -20%, rgba(251, 191, 36, 0.18), transparent 55%);
  pointer-events: none;
}
.geo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  position: relative;
}
.geo-header-text {
  flex: 1;
}
.geo-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.geo-header strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
  font-weight: 700;
}
.geo-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.geo-scoreblock {
  text-align: center;
  flex-shrink: 0;
}
.geo-score {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}
.geo-score span {
  font-size: 14px;
  opacity: 0.6;
  margin-left: 2px;
  font-weight: 600;
}
.geo-score-good { color: #34d399; }
.geo-score-mid  { color: #fbbf24; }
.geo-score-bad  { color: #f87171; }
.geo-score-label {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  position: relative;
}
.geo-check {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
}
.geo-check-pass {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.25);
}
.geo-check-fail {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
}
.geo-check-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.geo-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.geo-check-pass .geo-icon { background: #34d399; color: #064e3b; }
.geo-check-fail .geo-icon { background: #f87171; color: #7f1d1d; }
.geo-check strong {
  font-size: 13px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}
.geo-tip {
  margin: 8px 0 0 32px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .geo-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .geo-scoreblock { align-self: flex-start; }
}

.geo-locked-hint {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.geo-lock-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.geo-locked-hint strong {
  display: block;
  font-size: 13px;
  color: #fde68a;
  margin-bottom: 2px;
}
.geo-locked-hint span {
  font-size: 12px;
  color: rgba(253, 230, 138, 0.7);
}

.competitor-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.6;
}

.comp-table-wrap {
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}
.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.comp-table th,
.comp-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comp-table th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-self {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
}
.comp-self td { font-weight: 600; }

.keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.keyword-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.keyword-term {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.keyword-why,
.keyword-how {
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.keyword-why strong, .keyword-how strong {
  color: var(--text);
}

.industry-recs {
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 20px 20px 20px 40px;
}
.industry-recs li {
  margin-bottom: 8px;
  font-size: 15px;
}
.industry-recs li:last-child { margin-bottom: 0; }

.roadmap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.roadmap-week {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.roadmap-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.roadmap-focus {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.roadmap-content ul {
  margin: 0;
  padding-left: 20px;
}
.roadmap-content li {
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .roadmap-week { grid-template-columns: 1fr; gap: 8px; }
  .ps-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PRICING — extra styles for tiers + toggle
   ============================================================ */
.pricing-section-title {
  font-size: 24px;
  text-align: center;
  margin: 60px 0 6px;
}
.pricing-section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}
.pricing-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 720px;
}
.pricing-grid-1 {
  grid-template-columns: 1fr;
  max-width: 520px;
}
.pricing-grid-3 {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  max-width: 1140px;
  gap: 18px;
}
@media (max-width: 1024px) {
  .pricing-grid-3 {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

.billing-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  padding: 6px;
  border-radius: 999px;
  margin: 0 auto 28px;
  border: 1px solid var(--border);
}
.billing-toggle {
  display: flex;
  width: fit-content;
  margin: 0 auto 28px;
}
.bt-option {
  background: transparent;
  border: none;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.15s;
}
.bt-option.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow);
}
.save-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  margin-left: 6px;
}

.price-strike {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  -webkit-text-fill-color: var(--muted);
  background: none;
  margin-bottom: -4px;
}
.price-per {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  -webkit-text-fill-color: var(--muted);
}

.price-card-pro {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: white;
  border: none;
}
.price-card-pro h3,
.price-card-pro li {
  color: white;
}
.price-card-pro .price {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-card-pro .price-tagline {
  color: rgba(255, 255, 255, 0.7);
}
.price-card-pro li {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.price-card-pro .price-per {
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}
.price-card-pro li em {
  color: rgba(255, 255, 255, 0.5);
  font-style: normal;
  font-size: 12px;
}
.pro-features { padding-top: 8px; }

/* Ultimate tier — premium gold/violet gradient */
.price-card-ultimate {
  background: linear-gradient(135deg, #0c0a1f 0%, #4c1d95 40%, #b45309 100%);
  color: white;
  border: 2px solid #fbbf24;
  position: relative;
  box-shadow: 0 10px 32px rgba(251, 191, 36, 0.18), 0 4px 12px rgba(76, 29, 149, 0.3);
}
.price-card-ultimate::before {
  content: "✨";
  position: absolute;
  top: -14px;
  right: 18px;
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.6));
}
.price-card-ultimate h3,
.price-card-ultimate li {
  color: white;
}
.price-card-ultimate .price {
  background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-card-ultimate .price-tagline {
  color: rgba(255, 255, 255, 0.75);
}
.price-card-ultimate li {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.price-card-ultimate .price-per {
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}
.price-card-ultimate li em {
  color: rgba(251, 191, 36, 0.85);
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
}
.price-card-ultimate li .small {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}
.price-badge-ultimate {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #1e1b4b !important;
  font-weight: 800;
}

/* Studio-tier paywall button — teal/blue accent on a ghost button */
.btn.btn-studio {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #0c4a6e;
  font-weight: 700;
}
.btn.btn-studio:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.28));
  border-color: #0ea5e9;
}

/* Ultimate-tier paywall button — gold accent on a ghost button */
.btn.btn-ultimate {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.18));
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #92400e;
  font-weight: 700;
}
.btn.btn-ultimate:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.28));
  border-color: #f59e0b;
}

/* ============================================================
   PAYWALL — extra options
   ============================================================ */
.paywall-card .paywall-tiers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  max-width: 460px;
  margin: 0 auto;
}
.paywall-option {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.paywall-option form {
  margin: 0;
}
.paywall-deal-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.paywall-strike {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: line-through;
}
.paywall-strike span {
  color: white;
  text-decoration: none;
  font-weight: 700;
  margin-left: 6px;
}

.paywall-form { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.promo-details {
  width: 100%;
  max-width: 280px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.promo-details summary {
  cursor: pointer;
  text-align: center;
  padding: 6px;
  list-style: none;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  user-select: none;
}
.promo-details summary::-webkit-details-marker { display: none; }
.promo-details input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: 14px;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.paywall-or {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  opacity: 0.7;
  margin: 4px 0;
}
.paywall-sub-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.paywall-sub-options form {
  margin: 0;
}
.paywall-sub-options .btn {
  width: 100%;
}

.license-entry {
  margin-top: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
}
.license-entry h3 {
  font-size: 16px;
  margin: 0 0 4px;
  color: white;
}
.license-entry p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.85);
}
.license-entry form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.license-entry input,
.license-entry select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-family: ui-monospace, 'SF Mono', monospace;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}
.license-entry select {
  font-family: inherit;
}
.license-entry .btn {
  width: 100%;
  background: var(--card-bg);
  color: var(--primary-dark);
}
.license-status {
  text-align: left;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}
.license-status.success { color: #6ee7b7; }
.license-status.error { color: #fca5a5; }
.license-status.pending { color: rgba(255,255,255,0.85); }

/* Manual payment options on paywall */
.manual-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  color: white;
  transition: all 0.15s;
}
.pay-method:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}
.pay-icon {
  font-size: 24px;
}
.pay-label {
  font-weight: 700;
  font-size: 14px;
}
.pay-handle {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  opacity: 0.85;
}
.paywall-price-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin: 12px 0;
}

/* Admin panel */
.admin-link {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-soft); }
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ============================================================
   SUCCESS / ERROR
   ============================================================ */
.success-page,
.error-page {
  padding: 80px 0;
}
.success-card,
.error-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.success-icon {
  font-size: 72px;
  margin-bottom: 16px;
}
.success-card h1 {
  font-size: 32px;
  margin-bottom: 12px;
}
.success-card p {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 16px;
}
.success-card .btn {
  margin: 0 6px;
}

/* ============================================================
   FAQ SECTION (homepage — also boosts GEO/SEO)
   ============================================================ */
.faq-section {
  padding: 80px 0;
  background: var(--bg-soft);
}
.faq-list {
  max-width: 760px;
  margin: 40px auto 0;
}
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item[open] {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 18px 24px;
  list-style: none;
  position: relative;
  padding-right: 50px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.faq-item p {
  padding: 0 24px 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================================
   AUDIT TAG (per-audit reference at end of page)
   ============================================================ */
.audit-tag-display {
  text-align: center;
  margin: 60px auto 20px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.audit-tag-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 11px;
}
.audit-tag-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.05em;
  user-select: all;
}
/* Inline audit-id chip in admin table — slightly tighter than audit-tag-code */
.audit-id-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--text);
  letter-spacing: 0.04em;
  user-select: all;
  white-space: nowrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .nav { padding: 14px 20px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn { padding: 8px 14px; font-size: 13px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 50px 20px 70px; }
  .hero-stats { gap: 24px; }
  .auth-card { padding: 32px 24px; }
  .form-card { padding: 24px 20px; }
  .result-header { flex-direction: column; align-items: flex-start; }
  .score-circle-lg { width: 110px; height: 110px; }
  .score-num { font-size: 36px; }
  .features, .how-it-works { padding: 60px 0; }
  .cta-card { padding: 40px 24px; }
}

/* ============================================================
   REVENUE LOSS BANNER — shows on every audit, above issues
   ============================================================ */
.revloss-banner {
  margin: 28px 0 36px;
  padding: 28px 28px 20px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.revloss-banner.revloss-free {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fed7aa 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18);
}
.revloss-banner.revloss-paid {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
  border: 2px solid #16a34a;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.15);
}
.revloss-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.revloss-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}
.revloss-text { flex: 1; }
.revloss-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
  margin-bottom: 4px;
}
.revloss-banner.revloss-paid .revloss-label { color: #14532d; }
.revloss-amount {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: #b45309;
  letter-spacing: -0.02em;
}
.revloss-banner.revloss-paid .revloss-amount { color: #15803d; }
.revloss-per {
  font-size: 22px;
  color: rgba(180, 83, 9, 0.65);
  font-weight: 600;
  margin-left: 4px;
}
.revloss-banner.revloss-paid .revloss-per { color: rgba(21, 128, 61, 0.65); }
.revloss-sub {
  margin-top: 8px;
  font-size: 14px;
  color: #78350f;
  font-weight: 500;
}
.revloss-banner.revloss-paid .revloss-sub { color: #166534; }
.revloss-locked {
  margin-top: 8px;
  padding: 12px 16px;
  background: rgba(180, 83, 9, 0.12);
  border-left: 4px solid #b45309;
  border-radius: 8px;
  font-size: 14px;
  color: #78350f;
  font-weight: 500;
}
.revloss-locked strong {
  font-weight: 800;
  color: #92400e;
}
.revloss-reasons {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: #166534;
}
.revloss-reasons li { margin-bottom: 4px; }
.revloss-disclaimer {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: rgba(120, 53, 15, 0.7);
  font-style: italic;
  line-height: 1.45;
}
.revloss-banner.revloss-paid .revloss-disclaimer { color: rgba(22, 101, 52, 0.7); }

/* Cost pill on each issue card */
.cost-pill {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-left: auto;
}

/* Paywall card revenue-loss callout */
.paywall-loss-callout {
  margin: 14px 0 20px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(254, 215, 170, 0.5);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: white;
}
.paywall-loss-callout strong {
  font-weight: 800;
  font-size: 17px;
  color: #fde68a;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .revloss-banner { padding: 20px 18px; }
  .revloss-main { flex-direction: column; align-items: flex-start; gap: 12px; }
  .revloss-icon { font-size: 44px; }
  .revloss-amount { font-size: 44px; }
  .revloss-per { font-size: 18px; }
  .cost-pill { margin-left: 0; margin-top: 4px; }
}

/* PDF download button on audit page */
.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-pdf-download:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* Studio tier — middle ground, teal/blue gradient (between Pro purple and Ultimate gold) */
.price-card-studio {
  background: linear-gradient(135deg, #0c1e3d 0%, #1e40af 50%, #0891b2 100%);
  color: white;
  border: 2px solid #38bdf8;
  position: relative;
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.18), 0 4px 12px rgba(30, 64, 175, 0.3);
  transform: scale(1.02);
  z-index: 2;
}
.price-card-studio::before {
  content: "⭐";
  position: absolute;
  top: -14px;
  right: 18px;
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.6));
}
.price-card-studio h3,
.price-card-studio li {
  color: white;
}
.price-card-studio .price {
  background: linear-gradient(135deg, #67e8f9, #38bdf8, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-card-studio .price-tagline {
  color: rgba(255, 255, 255, 0.78);
}
.price-card-studio li {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}
.price-card-studio .price-per {
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}
.price-card-studio li em {
  color: rgba(56, 189, 248, 0.85);
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
}
.price-card-studio li .small {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}
.price-badge-studio {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
  color: #0c1e3d !important;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .price-card-studio { transform: none; }
}

/* ============================================================
   AI FIXER — Ultimate-tier feature
   ============================================================ */

/* Fix badges next to severity/cat pills on issue cards */
.fix-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.fix-badge-free {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.fix-badge-paid {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Fix action button area at the bottom of an issue card */
.issue-fix-action {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* Banner explaining the fixer system */
.fixer-cta-banner {
  margin: 24px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fef3c7, #fde68a, #fed7aa);
  border: 2px solid #fbbf24;
  border-radius: 14px;
  font-size: 14px;
  color: #78350f;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}
.fixer-cta-banner strong {
  font-weight: 800;
  color: #92400e;
}

/* Unlock prompt card (when user hasn't paid for a non-top3 fix) */
.fix-unlock-card {
  background: var(--card-bg);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}
.fix-unlock-header {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.fix-unlock-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fix-unlock-body {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: 10px;
}
.fix-unlock-body h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.fix-unlock-body ul {
  margin: 8px 0 16px 20px;
  font-size: 14px;
  color: var(--text);
}
.fix-unlock-body li {
  margin-bottom: 4px;
}

/* Fix result page layout */
.fix-result-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.fix-result-header h1 {
  font-size: 32px;
  margin: 8px 0 12px;
}
.fix-tag-row {
  margin-bottom: 8px;
}
.fix-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fix-section {
  margin-bottom: 28px;
}
.fix-section h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
.fix-issue-summary {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 8px;
}
.fix-where {
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  font-size: 14.5px;
  color: #1e3a8a;
}

/* Code snippet block with copy button */
.fix-snippet-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fix-snippet {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 18px 20px 18px 20px;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Before/After diff blocks */
.fix-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fix-diff-block {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fix-diff-label {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fix-diff-before .fix-diff-label {
  background: #fee2e2;
  color: #991b1b;
}
.fix-diff-after .fix-diff-label {
  background: #dcfce7;
  color: #166534;
}
.fix-diff pre {
  padding: 12px 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--bg-soft);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.fix-fallback {
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
}

.fix-disclaimer {
  margin-top: 32px;
  padding: 16px;
  background: #fef9c3;
  border-left: 3px solid #ca8a04;
  border-radius: 8px;
}

@media (max-width: 720px) {
  .fix-diff { grid-template-columns: 1fr; }
}

/* ============================================================
   AI BLOG POST WRITER
   ============================================================ */

/* Blog feature CTA banner on the audit results page */
.blog-cta-banner {
  margin: 24px 0;
  padding: 22px 24px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}
.blog-cta-icon {
  font-size: 40px;
  line-height: 1;
}
.blog-cta-body { flex: 1; }
.blog-cta-body h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #065f46;
}
.blog-cta-body p {
  color: #064e3b;
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.blog-cta-body code {
  font-family: ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.5);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.blog-cta-meta {
  font-size: 13px !important;
  margin-top: 6px;
}
.blog-cta-body .btn {
  margin-top: 10px;
}

/* Blog post writer page layout */
.blog-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.blog-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.blog-quota-card {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
}
.blog-quota-numbers {
  text-align: center;
  flex: 0 0 110px;
  padding-right: 20px;
  border-right: 1px solid var(--border);
}
.blog-quota-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.blog-quota-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.blog-quota-status {
  flex: 1;
}
.blog-quota-status strong {
  font-size: 16px;
}

/* Generator card */
.blog-generator-card {
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 32px;
}
.blog-generator-card h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
.blog-generator-card label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.blog-generator-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 14px;
}
.blog-generator-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* List of generated posts */
.blog-list-title {
  font-size: 18px;
  margin-bottom: 14px;
  margin-top: 8px;
}
.blog-list {
  display: grid;
  gap: 12px;
}
.blog-post-card {
  padding: 16px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.blog-post-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: inherit;
}
.blog-post-card h3 {
  font-size: 16px;
  margin: 6px 0 4px;
}
.blog-post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.blog-date {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.blog-brief {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}

.blog-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.blog-badge-quota {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.blog-badge-paid {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

/* Single-post view */
.blog-post-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.blog-post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.blog-post-header h1 {
  font-size: 32px;
  margin-bottom: 12px;
}
.blog-meta-desc, .blog-slug {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.blog-meta-desc strong, .blog-slug strong {
  color: var(--text);
}
.blog-slug code {
  font-family: ui-monospace, monospace;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.blog-section { margin-bottom: 28px; }
.blog-section h3 { font-size: 17px; margin-bottom: 10px; }

.blog-tabs {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 12px;
}
.blog-tab {
  padding: 6px 16px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.blog-tab.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.blog-tab-pane { display: none; }
.blog-tab-pane.active { display: block; }

.blog-rendered {
  padding: 24px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.65;
  font-size: 15px;
  color: var(--text);
}
.blog-rendered h2 {
  font-size: 22px;
  margin: 18px 0 10px;
}
.blog-rendered h3 {
  font-size: 18px;
  margin: 14px 0 8px;
}
.blog-rendered p {
  margin-bottom: 12px;
}
.blog-rendered ul, .blog-rendered ol {
  margin: 10px 0 10px 22px;
}
.blog-rendered li {
  margin-bottom: 6px;
}
.blog-rendered a {
  color: var(--primary);
  text-decoration: underline;
}

.blog-internal-links {
  margin-left: 20px;
}
.blog-internal-links a {
  font-size: 13px;
  font-family: ui-monospace, monospace;
}

.blog-keyword-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================================
   AUTH — 6-digit code input
   ============================================================ */
.code-form {
  margin-top: 8px;
}
.code-input {
  width: 100%;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5em;
  padding: 18px 8px 18px 28px; /* extra left so centering accounts for letter-spacing */
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text);
  margin-bottom: 16px;
  transition: all 0.15s ease;
}
.code-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.code-input::placeholder {
  color: rgba(15, 23, 42, 0.18);
  letter-spacing: 0.5em;
}

/* Dev-mode helper that surfaces the code for local testing */
.dev-code-display {
  font-family: ui-monospace, monospace;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.4em;
  text-align: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 16px;
  border-radius: 10px;
  margin: 12px 0 4px;
  user-select: all;
  border: 2px dashed #f59e0b;
}

/* Admin-viewing-foreign-audit banner */
.admin-viewing-banner {
  margin: 20px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  font-size: 14px;
  color: #78350f;
  line-height: 1.55;
}
.admin-viewing-banner strong { color: #92400e; }
.admin-viewing-banner code {
  font-family: ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.admin-back-link {
  display: inline-block;
  margin-top: 6px;
  color: #92400e;
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================================
   ADMIN — Users panel + funnel viz
   ============================================================ */
.admin-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.funnel-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 50%, #fef3c7 100%);
  border-radius: 14px;
  margin: 18px 0 28px;
  border: 1px solid #ddd6fe;
  flex-wrap: wrap;
}
.funnel-stat {
  text-align: center;
  flex: 1;
  min-width: 120px;
}
.funnel-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #4c1d95;
  line-height: 1;
}
.funnel-label {
  font-size: 11px;
  color: #6b21a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-top: 4px;
}
.funnel-arrow {
  font-size: 24px;
  color: #a78bfa;
  font-weight: 800;
}

/* Stage pills + row tinting */
.stage-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.stage-cold {
  background: #fef3c7;
  color: #92400e;
}
.stage-engaged {
  background: #dbeafe;
  color: #1e40af;
}
.stage-paid {
  background: #d1fae5;
  color: #065f46;
}
tr.stage-cold td { background: rgba(254, 243, 199, 0.25); }
tr.stage-engaged td { background: rgba(219, 234, 254, 0.25); }
tr.stage-paid td { background: rgba(209, 250, 229, 0.25); }

.ghost-title {
  margin: 36px 0 10px;
  font-size: 20px;
}

.reactivation-card {
  margin-top: 32px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 14px;
}
.reactivation-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #92400e;
}
.reactivation-card p {
  color: #78350f;
  font-size: 14px;
  margin-bottom: 12px;
}
.reactivation-emails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.reactivation-emails code {
  font-family: ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.6);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #78350f;
  user-select: all;
}

/* Test-account stage */
.stage-test {
  background: #f1f5f9;
  color: var(--muted);
}
tr.stage-test td {
  background: rgba(241, 245, 249, 0.4);
  opacity: 0.65;
}
.link-btn.small {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
}
.link-btn.small:hover {
  color: var(--primary);
}

/* Activation-friendly audit form */
.form-optional {
  margin: 4px 0 16px;
  padding: 12px 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}
.form-optional summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  user-select: none;
}
.form-optional summary:hover { color: var(--primary); }
.form-optional[open] summary { color: var(--primary); margin-bottom: 12px; }
.form-optional-fields { padding-top: 4px; }

/* First-time empty state — make activation more inviting */
.empty-state-activation {
  padding: 60px 32px;
  text-align: center;
}
.empty-state-activation h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.empty-bullets {
  display: inline-block;
  text-align: left;
  margin: 16px 0 24px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text);
}
.empty-bullets li {
  padding: 4px 0;
  color: var(--muted);
}

/* Attempt log stats */
.attempt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}
.stat-block {
  text-align: center;
  padding: 18px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-top: 4px;
}
.stat-success { background: #dcfce7; border-color: #86efac; }
.stat-success .stat-num { color: #166534; }
.stat-warning { background: #fef3c7; border-color: #fcd34d; }
.stat-warning .stat-num { color: #92400e; }
.stat-danger { background: #fee2e2; border-color: #fca5a5; }
.stat-danger .stat-num { color: #991b1b; }

.attempts-table .error-snippet {
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-word;
  display: inline-block;
  max-width: 320px;
}

/* ============================================================
   ADMIN — Stats page (Cloudflare + Stripe)
   ============================================================ */
.stats-section-title {
  font-size: 22px;
  margin: 32px 0 16px;
}
.stats-subhead {
  font-size: 17px;
  margin: 24px 0 12px;
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  padding: 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.stat-card-label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-card-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-card-revenue {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}
.stat-card-revenue .stat-card-num { color: #166534; }
.stat-card-revenue .stat-card-label { color: #166534; }
.stat-card-traffic {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}
.stat-card-traffic .stat-card-num { color: #1e40af; }
.stat-card-traffic .stat-card-label { color: #1e40af; }

/* Daily bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.bar-col {
  flex: 1 0 24px;
  min-width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(to top, #6366f1, #8b5cf6);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: opacity 0.15s ease;
}
.bar-col:hover .bar-fill {
  opacity: 0.85;
}
.bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 9.5px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  transform: rotate(-30deg);
  transform-origin: top right;
}

.path-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg-soft);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--text);
  word-break: break-all;
}

/* ============================================================
   ADMIN — Visitor sessions + per-session timeline
   ============================================================ */
.session-meta {
  margin: 16px 0 24px;
  padding: 18px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
}
.session-meta strong { color: var(--text); margin-right: 4px; }
.session-meta code.path-code { font-size: 12px; }

.event-timeline {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  position: relative;
}
.event-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  z-index: 0;
}
.event-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 4px;
  position: relative;
  z-index: 1;
}
.event-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-size: 16px;
}
.event-body { flex: 1; }
.event-headline {
  font-size: 14px;
  color: var(--text);
}
.event-headline strong { color: var(--text); }
.event-data {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.event-data span { margin-right: 10px; }
.event-time {
  font-size: 11.5px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  margin-top: 9px;
}
.event-pageview .event-icon { border-color: #93c5fd; background: #eff6ff; }
.event-click .event-icon { border-color: #c4b5fd; background: #ede9fe; }
.event-unload .event-icon { border-color: #fecaca; background: #fee2e2; }
.event-signup .event-icon { border-color: #86efac; background: #dcfce7; }
.event-signup .event-headline strong { color: #15803d; }
.event-audit .event-icon { border-color: #fbbf24; background: #fef3c7; }
.event-audit .event-headline strong { color: #92400e; }

/* Admin row actions — keep lock/unlock + delete grouped neatly */
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

/* Delete button — distinct destructive red so it can't be confused with the other actions */
.btn-delete-audit {
  padding: 6px 10px;
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-delete-audit:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

/* ============================================================
   RIVAL CARD — competitor head-to-head shown in free preview
   to surface the "you're losing to a specific person" pain
   BEFORE the paywall. Highest-leverage conversion block.
   ============================================================ */
.rival-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}
.rival-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, transparent 40%, rgba(99, 102, 241, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}
.rival-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.rival-col {
  padding: 16px;
  border-radius: 12px;
  background: var(--card-bg-alt);
}
.rival-them {
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.rival-you {
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.rival-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.rival-badge-win {
  background: rgba(16, 185, 129, 0.18);
  color: var(--green);
}
.rival-badge-lose {
  background: rgba(239, 68, 68, 0.18);
  color: var(--red);
}
.rival-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.25;
}
.rival-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.rival-stat {
  text-align: center;
  padding: 10px 4px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.rival-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  line-height: 1.1;
}
.rival-them .rival-num {
  color: var(--green);
}
.rival-you .rival-num {
  color: var(--red);
}
.rival-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}
.rival-vs {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--muted);
  align-self: center;
  justify-self: center;
  letter-spacing: 0.06em;
}
.rival-callout {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.rival-locked-note {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--card-bg-alt);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .rival-card { padding: 18px; }
  .rival-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rival-vs {
    font-size: 16px;
    padding: 4px 0;
  }
  .rival-stats {
    gap: 4px;
  }
  .rival-stat {
    padding: 8px 2px;
  }
  .rival-num { font-size: 14px; }
  .rival-label { font-size: 9px; }
}

/* ============================================================
   Blog (marketing) — /blog index + /blog/:slug post pages
   ============================================================ */
.blog-marketing-page {
  padding: 60px 0 80px;
}

.blog-hero {
  text-align: center;
  margin-bottom: 48px;
}
.blog-hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.blog-hero-tagline {
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

.blog-list-marketing {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
}

.blog-card-marketing {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.blog-card-marketing:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.blog-card-emoji {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 4px;
}

.blog-card-body {
  flex: 1;
  min-width: 0;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
}

.blog-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.blog-card-readtime {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.blog-card-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text);
}

.blog-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.blog-card-date {
  color: var(--muted);
}
.blog-card-arrow {
  color: var(--primary);
  font-weight: 600;
}

.blog-cta-block {
  background: var(--gradient-soft);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--border);
}
[data-theme="dark"] .blog-cta-block {
  background: var(--card-bg-alt);
}
.blog-cta-block h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
}
.blog-cta-block p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 20px;
}

/* ----------------------------------------------------------
   Individual blog post page
   ---------------------------------------------------------- */
.blog-article {
  padding: 40px 0 80px;
}

.blog-article-header {
  text-align: center;
  margin: 24px 0 48px;
}
.blog-article-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}
.blog-article-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.blog-article-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}
.blog-article-desc {
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 20px;
}
.blog-article-byline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.blog-article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}
.blog-article-content p.lead {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  padding: 20px 24px;
  background: var(--card-bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  margin: 24px 0 32px;
}
.blog-article-content p {
  margin: 0 0 20px;
}
.blog-article-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  line-height: 1.3;
  color: var(--text);
}
.blog-article-content h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 36px 0 12px;
  line-height: 1.35;
  color: var(--text);
}
.blog-article-content ul,
.blog-article-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.blog-article-content li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.blog-article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.blog-article-content a:hover {
  text-decoration-thickness: 2px;
}
.blog-article-content code {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: var(--text);
}
.blog-article-content pre {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
}
.blog-article-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
}
.blog-article-content strong {
  font-weight: 700;
  color: var(--text);
}

.blog-cta-box {
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  margin: 40px 0 24px;
  text-align: center;
}
[data-theme="dark"] .blog-cta-box {
  background: var(--card-bg-alt);
}
.blog-cta-box h3 {
  font-size: 22px;
  margin: 0 0 8px;
  font-weight: 700;
}
.blog-cta-box p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 18px;
}

/* ----------------------------------------------------------
   Article footer: share row + related posts
   ---------------------------------------------------------- */
.blog-article-footer {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.blog-article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.blog-share-link {
  padding: 6px 14px;
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.blog-share-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.blog-related {
  max-width: 720px;
  margin: 48px auto 0;
}
.blog-related h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.blog-related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.blog-related-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.blog-related-emoji {
  font-size: 28px;
  flex-shrink: 0;
}
.blog-related-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

/* ----------------------------------------------------------
   Mobile
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .blog-hero h1 {
    font-size: 32px;
  }
  .blog-card-marketing {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  .blog-card-emoji {
    font-size: 32px;
    margin-top: 0;
  }
  .blog-card-title {
    font-size: 18px;
  }
  .blog-article-title {
    font-size: 28px;
  }
  .blog-article-desc {
    font-size: 16px;
  }
  .blog-article-content {
    font-size: 16px;
  }
  .blog-article-content p.lead {
    font-size: 17px;
    padding: 16px 18px;
  }
  .blog-article-content h2 {
    font-size: 24px;
  }
  .blog-article-content h3 {
    font-size: 19px;
  }
  .blog-article-content pre {
    font-size: 13px;
    padding: 12px 14px;
  }
  .blog-article-byline {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
  }
  .blog-article-share {
    justify-content: center;
  }
  .blog-cta-block {
    padding: 28px 20px;
  }
  .blog-cta-block h3 {
    font-size: 20px;
  }
}

/* ============================================================
   /admin/sources — traffic source breakdown page
   ============================================================ */
.sources-google-card {
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 28px 0 32px;
}
[data-theme="dark"] .sources-google-card {
  background: var(--card-bg-alt);
}
.sources-google-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.sources-google-icon {
  font-size: 38px;
  line-height: 1;
}
.sources-google-header h2 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 700;
}
.sources-google-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.sources-google-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.sources-google-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.sources-google-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.sources-section-title {
  font-size: 19px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--text);
}

.sources-table {
  font-size: 13px;
}
.sources-table th.num,
.sources-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sources-table .small {
  font-size: 12px;
}
.sources-table tr.sources-row-google {
  background: rgba(99, 102, 241, 0.06);
}
[data-theme="dark"] .sources-table tr.sources-row-google {
  background: rgba(99, 102, 241, 0.12);
}
.source-icon {
  display: inline-block;
  margin-right: 4px;
  font-size: 14px;
}

.badge-conv {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-conv-strong {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* Google daily-visits bar chart */
.sources-timeline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding: 16px 16px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.sources-timeline-bar-wrap {
  flex: 1;
  min-width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.sources-timeline-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: opacity 0.15s;
}
.sources-timeline-bar:hover {
  opacity: 0.75;
}
.sources-timeline-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .sources-google-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .sources-google-num {
    font-size: 22px;
  }
  .sources-timeline {
    height: 100px;
  }
  .sources-timeline-label {
    display: none;
  }
}
