/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
/* Existing Production Styles */

:root {
  --bg:        #f7f8fc;
  --bg-2:      #ffffff;
  --bg-3:      #f0f2f8;
  --bg-4:      #e8eaf2;
  --border:    #e2e5ef;
  --border-2:  #d0d4e4;
  --text:      #1a1d2e;
  --text-2:    #4a5068;
  --text-3:    #8890aa;
  --green:     #16a34a;
  --green-light: #dcfce7;
  --green-mid:   #22c55e;
  --green-dim:   rgba(22,163,74,0.1);
  --green-glow:  rgba(22,163,74,0.2);
  --blue:      #2563eb;
  --blue-dim:  rgba(37,99,235,0.09);
  --blue-light:#dbeafe;
  --yellow:    #d97706;
  --yellow-bg: #fef3c7;
  --red:       #dc2626;
  --red-bg:    #fee2e2;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

[data-theme="dark"] {
  --bg:        #0e0f16;
  --bg-2:      #15171f;
  --bg-3:      #1c1f2b;
  --bg-4:      #252836;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.13);
  --text:      #eceef5;
  --text-2:    #9099b5;
  --text-3:    #545c78;
  --green:          #4ade80;
  --green-light:    rgba(74,222,128,0.12);
  --green-mid:      #22c55e;
  --green-dim:      rgba(74,222,128,0.12);
  --green-glow:     rgba(74,222,128,0.22);
  --blue:      #60a5fa;
  --blue-dim:  rgba(96,165,250,0.12);
  --blue-light:rgba(96,165,250,0.15);
  --yellow:    #fbbf24;
  --yellow-bg: rgba(251,191,36,0.12);
  --red:       #f87171;
  --red-bg:    rgba(248,113,113,0.12);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════
   BASE RESET
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  font-size: 15px;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, button { font-family: var(--font); }

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,248,252,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="dark"] .header { background: rgba(14,15,22,0.9); }

.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-mark { font-size: 20px; }
.logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: all 0.18s; box-shadow: 0 2px 8px var(--green-glow);
}
.btn-primary:hover { background: #15803d; transform: translateY(-1px); box-shadow: 0 6px 20px var(--green-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary.large { width: 100%; padding: 15px 24px; font-size: 16px; border-radius: 10px; }
.btn-primary.small { padding: 9px 18px; font-size: 14px; white-space: nowrap; }

.btn-green {
  padding: 8px 18px;
  background: var(--green); color: #fff; border: none;
  border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.18s;
}
.btn-green:hover { background: #15803d; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: var(--green-dim); color: var(--green);
  border: 1.5px solid var(--green); border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
}
.btn-secondary:hover { background: var(--green); color: #fff; }
.btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.18s;
}
.btn-ghost:hover { background: var(--bg-3); color: var(--text); border-color: var(--border-2); }
.btn-ghost.danger { color: var(--red); border-color: rgba(220,38,38,0.25); }
.btn-ghost.danger:hover { background: var(--red-bg); }
.btn-ghost.icon-only { padding: 8px 10px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--bg-3);
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--green); transform: rotate(15deg); }

.link-btn {
  background: none; border: none; color: var(--green);
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: underline; padding: 0;
}
.link-help { font-size: 12px; font-weight: 600; color: var(--green); }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  position: relative; padding: 72px 24px 56px;
  display: flex; justify-content: center; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(22,163,74,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 680px; width: 100%; text-align: center; }
.badge {
  display: inline-block; margin-bottom: 22px; padding: 6px 16px;
  background: var(--green-light); color: var(--green);
  border-radius: 100px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px;
}
[data-theme="dark"] .badge { background: var(--green-dim); }
.hero-title {
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 800; line-height: 1.12; letter-spacing: -1.5px;
  color: var(--text); margin-bottom: 18px;
}
.hero-title em { font-style: normal; color: var(--green); }
.hero-sub {
  font-size: 17px; color: var(--text-2); line-height: 1.75;
  margin-bottom: 36px; max-width: 580px; margin-left: auto; margin-right: auto;
}

.input-card {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: var(--shadow-md); text-align: left;
}
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.key-wrap { position: relative; display: flex; align-items: center; }
.input-field {
  width: 100%; padding: 12px 16px;
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  outline: none; transition: all 0.18s;
}
.input-field:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); background: var(--bg-2); }
.input-field::placeholder { color: var(--text-3); }
.key-wrap .input-field { padding-right: 46px; }
.show-key-btn {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
  display: flex; align-items: center; transition: color 0.15s;
}
.show-key-btn:hover { color: var(--text); }
.key-hint {
  font-size: 12.5px; color: var(--text-3);
  background: var(--bg-3); border-radius: var(--radius-xs);
  padding: 8px 12px; line-height: 1.5;
}
.key-actions { margin-top: -6px; display: flex; justify-content: flex-end; }
.error-msg {
  display: none; padding: 11px 14px;
  background: var(--red-bg); border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-xs); color: var(--red); font-size: 13.5px; font-weight: 500;
}
.error-msg.show { display: block; }

.trust-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px; margin-top: 20px;
}
.trust-item { font-size: 13px; color: var(--text-3); font-weight: 500; }
.trust-dot { color: var(--border-2); }

.last-plan-banner { max-width: 720px; margin: 0 auto 20px; padding: 0 24px; }
.last-plan-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: var(--bg-2); border: 1.5px solid var(--green);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.last-plan-left { display: flex; align-items: center; gap: 14px; }
.last-plan-icon { font-size: 28px; }
.last-plan-label { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.last-plan-url { font-size: 14px; font-weight: 700; color: var(--text); word-break: break-all; }

/* ── HOW IT WORKS / FEATURES ── */
.explainer-section, .features-section {
  max-width: 900px; margin: 0 auto; padding: 40px 24px 56px; text-align: center;
}
.section-heading { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 32px; color: var(--text); }
.steps-row { display: flex; align-items: flex-start; justify-content: center; gap: 12px; flex-wrap: wrap; }
.step-card {
  flex: 1; min-width: 200px; max-width: 260px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.step-circle {
  width: 44px; height: 44px; background: var(--green); color: #fff;
  border-radius: 50%; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.step-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.step-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.step-arrow { font-size: 22px; color: var(--border-2); margin-top: 50px; flex-shrink: 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feature-card {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px;
  text-align: left; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.feature-emoji { font-size: 28px; margin-bottom: 12px; }
.feature-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feature-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

/* ═══════════════════════════════════════
   LOADING
═══════════════════════════════════════ */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(247,248,252,0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .loading-overlay { background: rgba(14,15,22,0.92); }
.loading-card {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 40px 48px;
  text-align: center; min-width: 340px; box-shadow: var(--shadow-lg);
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--bg-4); border-top-color: var(--green);
  border-radius: 50%; animation: spin 0.75s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.loading-steps { display: flex; flex-direction: column; gap: 8px; }
.loading-step { font-size: 14px; color: var(--text-3); padding: 6px 0; transition: color 0.3s; }
.loading-step.active { color: var(--green); font-weight: 700; }
.loading-note { font-size: 12.5px; color: var(--text-3); margin-top: 18px; }

/* ═══════════════════════════════════════
   RESULTS SECTION
═══════════════════════════════════════ */
.results-section { max-width: 1100px; margin: 0 auto; padding: 32px 24px 120px; }

.results-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 22px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.results-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.results-badge { font-size: 11.5px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.5px; }
.results-url { font-size: 15px; font-weight: 700; color: var(--text); word-break: break-all; }
.results-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Tabs */
.main-tabs-wrap { margin-bottom: 20px; }
.main-tabs {
  display: inline-flex; gap: 4px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px;
}
.main-tab {
  padding: 9px 20px; border: none; border-radius: 7px;
  background: none; color: var(--text-2);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.18s;
}
.main-tab.active { background: var(--green); color: #fff;}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ═══════════════════════════════════════
   PLAN SECTIONS — 3-col grid
   Expanded section spans full row
═══════════════════════════════════════ */

#tab-marketing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.plan-section {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, grid-column 0.1s;
  display: flex;
  flex-direction: column;
}
.plan-section:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }

/* When a section is expanded it takes the full row */
.plan-section.expanded {
  grid-column: 1 / -1;
  border-color: var(--green);
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; cursor: pointer; user-select: none;
  transition: background 0.15s; flex-shrink: 0;
}
.section-header:hover { background: var(--bg-3); }

.section-title-wrap { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.section-emoji { font-size: 24px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.section-title { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }
.section-subtitle { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

.collapse-icon { color: var(--text-3); transition: transform 0.25s; flex-shrink: 0; margin-top: 4px; }
.section-header.collapsed .collapse-icon { transform: rotate(-90deg); }

.section-body {
  padding: 4px 22px 22px;
  flex: 1;
  overflow-y: auto;
  max-height: 520px;
}
.section-body.hidden { display: none; }

/* When expanded, allow more height */
.plan-section.expanded .section-body {
  max-height: 620px;
}

.info-card {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.info-card-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.tag {
  padding: 4px 11px; background: var(--bg-4);
  color: var(--text-2); border-radius: 100px;
  font-size: 12.5px; font-weight: 500;
}
.tag.green { background: var(--green-light); color: var(--green); }
[data-theme="dark"] .tag.green { background: var(--green-dim); }
.tag.blue { background: var(--blue-light); color: var(--blue); }
[data-theme="dark"] .tag.blue { background: var(--blue-dim); }

/* SEO */
.seo-result-card {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.seo-result-card h4 { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.seo-result-card ul { padding-left: 16px; }
.seo-result-card li { font-size: 13px; color: var(--text-2); margin-bottom: 5px; line-height: 1.55; }

/* ═══════════════════════════════════════
   SOCIAL MEDIA — Link Cards
═══════════════════════════════════════ */
.social-platform-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.social-platform-tab {
  padding: 6px 13px; border: 1.5px solid var(--border);
  border-radius: 100px; background: none; color: var(--text-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.18s;
}
.social-platform-tab:hover:not(.active) { background: var(--bg-3); }
.social-platform-tab[data-platform="instagram"] { color: #db2777; border-color: rgba(236,72,153,0.32); }
.social-platform-tab[data-platform="linkedin"] { color: #0e76a8; border-color: rgba(14,118,168,0.32); }
.social-platform-tab[data-platform="twitter"] { color: #0f172a; border-color: rgba(15,23,42,0.28); }
.social-platform-tab[data-platform="facebook"] { color: #1877f2; border-color: rgba(24,119,242,0.32); }
.social-platform-tab[data-platform="reddit"] { color: #ff4500; border-color: rgba(255,69,0,0.32); }
.social-platform-tab[data-platform="discord"] { color: #5865f2; border-color: rgba(88,101,242,0.32); }
.social-platform-tab[data-platform="tiktok"] { color: #0f766e; border-color: rgba(0,194,186,0.35); }
[data-theme="dark"] .social-platform-tab[data-platform="twitter"] { color: #f8fafc; border-color: rgba(248,250,252,0.35); }
.social-platform-tab.active { background: var(--blue-light); color: var(--blue); border-color: var(--blue); }
.social-platform-tab[data-platform="instagram"].active { background: rgba(236,72,153,0.12); color: #db2777; border-color: #ec4899; }
.social-platform-tab[data-platform="linkedin"].active { background: rgba(14,118,168,0.12); color: #0e76a8; border-color: #0e76a8; }
.social-platform-tab[data-platform="twitter"].active { background: rgba(15,23,42,0.10); color: #0f172a; border-color: #0f172a; }
.social-platform-tab[data-platform="facebook"].active { background: rgba(24,119,242,0.12); color: #1877f2; border-color: #1877f2; }
.social-platform-tab[data-platform="reddit"].active { background: rgba(255,69,0,0.12); color: #ff4500; border-color: #ff4500; }
.social-platform-tab[data-platform="discord"].active { background: rgba(88,101,242,0.12); color: #5865f2; border-color: #5865f2; }
.social-platform-tab[data-platform="tiktok"].active { background: rgba(0,242,234,0.14); color: #0f766e; border-color: #00c2ba; }
[data-theme="dark"] .social-platform-tab.active:not([data-platform]) { background: var(--blue-dim); }
[data-theme="dark"] .social-platform-tab[data-platform="twitter"].active { background: rgba(255,255,255,0.12); color: #f8fafc; border-color: #f8fafc; }

.social-platform-panel { display: none; }
.social-platform-panel.active { display: flex; flex-direction: column; gap: 10px; }

.social-link-card {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  transition: border-color 0.18s;
}
.social-link-card:hover { border-color: var(--blue); }
.social-platform-panel[data-platform="instagram"] .social-link-card:hover { border-color: #ec4899; }
.social-platform-panel[data-platform="linkedin"] .social-link-card:hover { border-color: #0e76a8; }
.social-platform-panel[data-platform="twitter"] .social-link-card:hover { border-color: #0f172a; }
.social-platform-panel[data-platform="facebook"] .social-link-card:hover { border-color: #1877f2; }
.social-platform-panel[data-platform="reddit"] .social-link-card:hover { border-color: #ff4500; }
.social-platform-panel[data-platform="discord"] .social-link-card:hover { border-color: #5865f2; }
.social-platform-panel[data-platform="tiktok"] .social-link-card:hover { border-color: #00c2ba; }
.social-link-left { flex: 1; min-width: 0; }
.social-link-type {
  display: inline-block; padding: 2px 8px;
  background: var(--blue-light); color: var(--blue);
  border-radius: 100px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px;
}
[data-theme="dark"] .social-link-type { background: var(--blue-dim); }
.social-link-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.social-link-why { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.social-open-btn {
  flex-shrink: 0; padding: 7px 13px;
  background: var(--blue-light); color: var(--blue);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-xs); font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all 0.18s;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.social-open-btn:hover { background: var(--blue); color: #fff; text-decoration: none; }
[data-theme="dark"] .social-open-btn { background: var(--blue-dim); border-color: rgba(96,165,250,0.25); }

.post-preview {
  background: var(--bg-2); border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  padding: 10px 12px; position: relative;
}
.post-text { font-size: 13px; color: var(--text-2); line-height: 1.65; padding-right: 56px; }
.post-copy-btn { position: absolute; top: 8px; right: 8px; }

.copy-btn {
  flex-shrink: 0; padding: 4px 10px;
  background: var(--bg-4); border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 11.5px; color: var(--text-3);
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.copy-btn:hover { background: var(--green-light); color: var(--green); border-color: var(--green); }
[data-theme="dark"] .copy-btn:hover { background: var(--green-dim); }

/* Idea list */
.idea-list { display: flex; flex-direction: column; gap: 7px; }
.idea-item {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 12px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.55;
}
.idea-item-text { flex: 1; }

/* ═══════════════════════════════════════
   COLD EMAIL TABS
═══════════════════════════════════════ */
.ce-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--bg-3); border-radius: var(--radius-sm); padding: 4px;
  border: 1.5px solid var(--border);
}
.ce-tab {
  flex: 1; padding: 8px 14px; border: none; border-radius: 7px;
  background: none; color: var(--text-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.18s;
  text-align: center;
}
.ce-tab.active { background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-sm); }
.ce-panel { display: none; }
.ce-panel.active { display: block; }

.ce-generate-box {
  background: var(--bg-3); border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-sm); padding: 20px;
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px;
  text-align: center; align-items: center;
}
.ce-generate-icon { font-size: 36px; }
.ce-generate-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ce-generate-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; max-width: 440px; }
.ce-tone-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ce-tone-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ce-tone-options { display: flex; gap: 6px; flex-wrap: wrap; }
.ce-tone-btn {
  padding: 5px 13px; border: 1.5px solid var(--border);
  border-radius: 100px; background: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all 0.18s;
}
.ce-tone-btn.active { background: var(--green-light); color: var(--green); border-color: var(--green); }
[data-theme="dark"] .ce-tone-btn.active { background: var(--green-dim); }
.ce-tone-btn:hover:not(.active) { background: var(--bg-4); }

.email-validator-box {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.validator-title { font-size: 14px; font-weight: 700; color: var(--text); }
.validator-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.email-upload-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.or-label { font-size: 12.5px; color: var(--text-3); }
.textarea-field {
  width: 100%; min-height: 90px; padding: 10px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text); font-size: 13px;
  resize: vertical; outline: none; transition: border-color 0.18s; line-height: 1.6;
}
.textarea-field:focus { border-color: var(--green); }
.textarea-field::placeholder { color: var(--text-3); }

.validation-result {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); padding: 14px;
}
.validation-stats { display: flex; gap: 20px; margin-bottom: 8px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.stat-item.good .stat-num { color: var(--green); }
.stat-item.bad .stat-num { color: var(--red); }

.email-templates-list { display: flex; flex-direction: column; gap: 12px; }
.email-template-card {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.email-template-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-4); border-bottom: 1px solid var(--border);
}
.email-template-label { font-size: 11.5px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.5px; }
.email-subject {
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.email-subject span { color: var(--text-3); font-weight: 500; }
.email-body-text {
  padding: 12px 14px; font-size: 13px; color: var(--text-2);
  line-height: 1.75; white-space: pre-line;
}
.token {
  display: inline-block; padding: 1px 6px;
  background: var(--yellow-bg); color: var(--yellow);
  border-radius: 4px; font-size: 11.5px; font-weight: 700;
}

/* Placeholder */
.placeholder-section { text-align: center; padding: 60px 24px; }
.placeholder-icon { font-size: 48px; margin-bottom: 14px; }
.placeholder-section h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.muted-text { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.placeholder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-top: 28px; max-width: 640px; margin-left: auto; margin-right: auto;
}
.placeholder-card {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: left;
}
.placeholder-label { font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 10px; text-transform: uppercase; }
.placeholder-bar {
  height: 9px; background: var(--bg-4); border-radius: 100px;
  margin-bottom: 7px; animation: shimmer 1.8s ease infinite;
}
.placeholder-bar.short { width: 55%; }
@keyframes shimmer { 0%,100% { opacity:.35 } 50% { opacity:.75 } }

/* ═══════════════════════════════════════
   SPA PAGE ROUTING
═══════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

#page-loading.active {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 58px);
}
#page-loading .loading-overlay {
  position: static; display: flex !important;
  align-items: center; justify-content: center;
  width: 100%; background: transparent;
}

.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 6px 10px; margin-right: 4px;
}

/* ═══════════════════════════════════════
   HISTORY DRAWER
═══════════════════════════════════════ */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 150;
}
.history-drawer {
  position: fixed; top: 0; right: -420px; width: 390px; height: 100vh;
  background: var(--bg-2); border-left: 1.5px solid var(--border);
  z-index: 160; display: flex; flex-direction: column;
  transition: right 0.3s ease; padding: 20px; gap: 14px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.history-drawer.open { right: 0; }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-size: 16px; font-weight: 800; color: var(--text); }
.drawer-hint { font-size: 13px; color: var(--text-3); }
.history-list { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.history-item {
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  cursor: pointer; transition: all 0.18s;
}
.history-item:hover { border-color: var(--green); background: var(--bg-2); }
.history-item-url { font-size: 13.5px; font-weight: 700; color: var(--text); word-break: break-all; }
.history-item-date { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.history-empty { color: var(--text-3); font-size: 14px; text-align: center; padding: 24px 0; }

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; left: 24px;
  background: var(--text); color: var(--bg);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  transform: translateY(16px); opacity: 0;
  transition: all 0.25s; z-index: 300; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ═══════════════════════════════════════
   Positioning cards
═══════════════════════════════════════ */
.pos-card {
  width: 100%;
  margin-bottom: 12px;
}

.pos-card-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.pos-core-msg {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Bullet list */
.pos-bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pos-bullet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.pos-bullet-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
}

/* Competitor links */
.comp-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px dashed #ef4444;
  transition: color .15s, border-color .15s;
}
.comp-link:hover {
  color: #ef4444;
  border-bottom-color: transparent;
}

.pos-bullet.muted {
  color: var(--text-3);
  font-style: italic;
}

/* ═══════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  #tab-marketing { grid-template-columns: repeat(2, 1fr); }
  .plan-section.expanded { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  #tab-marketing { grid-template-columns: 1fr; }
  .plan-section.expanded { grid-column: 1; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .hero-sub { font-size: 15px; }
  .input-card { padding: 18px; }
  .explainer-section, .features-section { padding: 32px 16px 40px; }
  .step-arrow { display: none; }
  .results-section { padding: 16px 16px 100px; }
  .section-header { padding: 16px; }
  .section-body { padding: 4px 16px 16px; }
  .history-drawer { width: 100%; right: -100%; }
  .main-tabs { width: 100%; }
  .main-tab { flex: 1; font-size: 13px; padding: 8px 10px; text-align: center; }
  .results-topbar { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════
   Prachaar Saathi — CSS additions
   Add these rules to the bottom of your styles.css
═══════════════════════════════════════════════════════════ */

/* ─── 1. SEO section: Analyser moves to top (HTML reorder handles this) ─── */

/* ─── 2. Keyword Adder ──────────────────────────────────── */
.seo-kw-adder-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.kw-adder-header {
  margin-bottom: 14px;
}

.kw-adder-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.kw-adder-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.kw-adder-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
}

.kw-adder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: opacity .2s, background .15s;
}

.kw-adder-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.kw-text {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kw-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 100px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.kw-primary  { background: #dcfce7; color: #15803d; }
.kw-longtail { background: #dbeafe; color: #1d4ed8; }

[data-theme="dark"] .kw-primary  { background: #14532d; color: #86efac; }
[data-theme="dark"] .kw-longtail { background: #1e3a5f; color: #93c5fd; }

.kw-download-btn {
  margin-top: 12px;
}

/* ─── 3. Blog Idea Items ────────────────────────────────── */
.blog-idea-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 8px;
  transition: border-color .15s;
}

.blog-idea-item:hover {
  border-color: var(--text-3);
}

.idea-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.idea-item-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  padding-top: 1px;
}

.blog-generate-btn {
  font-size: 12px !important;
  padding: 4px 10px !important;
  white-space: nowrap;
}

/* Blog generator panel */
.blog-generator-panel {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--card-bg);
}

.blog-gen-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.blog-wc-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
}

.blog-loading,
.email-drafting-pulse {
  font-size: 13px;
  color: var(--text-2);
  padding: 14px;
  text-align: center;
  animation: kiq-pulse 1.5s ease-in-out infinite;
}

@keyframes kiq-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* Blog result */
.blog-result {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.blog-result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.blog-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.blog-result-actions {
  display: flex;
  gap: 6px;
}

.blog-content-rendered {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  max-height: 520px;
  overflow-y: auto;
}

.blog-content-rendered h1 { font-size: 19px; font-weight: 800; margin: 0 0 14px; color: var(--text); }
.blog-content-rendered h2 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; color: var(--text); }
.blog-content-rendered h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.blog-content-rendered h4 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.blog-content-rendered p  { margin: 0 0 12px; color: var(--text-2); }
.blog-content-rendered ul { padding-left: 18px; margin: 0 0 12px; }
.blog-content-rendered li { margin-bottom: 5px; color: var(--text-2); }
.blog-content-rendered strong { color: var(--text); }

/* ─── 4. Social Card — Dual Action Buttons ──────────────── */
.social-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
  min-width: 110px;
}

.draft-email-btn {
  font-size: 12px !important;
  padding: 5px 10px !important;
  text-align: center;
  white-space: nowrap;
}

/* ─── 5. Email Draft Panel ──────────────────────────────── */
.email-draft-panel {
  margin: 0 0 10px;
  padding: 0 2px;
}

.email-draft-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid #6366f1;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 6px;
  animation: slideDown .2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.email-draft-subject {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.email-draft-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.email-provider-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}


/* Extracted from home.html */
/* ── Two-Step Flow ─────────────────────────────────────── */
    .step-indicator {
      display: flex; align-items: center; gap: 0;
      margin-bottom: 28px; justify-content: center;
    }
    .step-node {
      display: flex; align-items: center; gap: 8px;
      font-size: 13px; font-weight: 600; color: var(--text-muted);
      transition: color 0.25s;
    }
    .step-node.active { color: var(--text-primary); }
    .step-node.done   { color: #22c55e; }
    .step-bubble {
      width: 28px; height: 28px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 11px; font-weight: 700;
      border: 2px solid currentColor; background: transparent;
      transition: all 0.25s; flex-shrink: 0;
    }
    .step-node.active .step-bubble { background: var(--accent); color: #fff; border-color: var(--accent); }
    .step-node.done   .step-bubble { background: #22c55e; color: #fff; border-color: #22c55e; }
    .step-connector {
      width: 40px; height: 2px; background: var(--border);
      margin: 0 6px; border-radius: 2px; position: relative; overflow: hidden;
    }
    .step-connector::after {
      content: ''; position: absolute; left: 0; top: 0; bottom: 0;
      width: 0%; background: #22c55e; border-radius: 2px; transition: width 0.4s ease;
    }
    .step-connector.done::after { width: 100%; }

    .step-panel { display: none; }
    .step-panel.active { display: block; }

    /* ── Idea Confirm Card ─────────────────────────────────── */
    .idea-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; overflow: hidden; margin-bottom: 16px;
    }
    .idea-card-header {
      display: flex; align-items: center; gap: 14px;
      padding: 18px 20px;
      background: var(--surface-raised, var(--surface));
      border-bottom: 1px solid var(--border);
    }
    .idea-logo-wrap {
      width: 44px; height: 44px; border-radius: 10px;
      background: var(--bg); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden; flex-shrink: 0; font-size: 20px;
    }
    .idea-logo-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
    .idea-header-text { flex: 1; min-width: 0; }
    .idea-product-name {
      font-size: 15px; font-weight: 700; color: var(--text-primary);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .idea-category-badge {
      display: inline-block; font-size: 10.5px; font-weight: 600;
      color: var(--accent); background: var(--accent-muted, rgba(59,130,246,0.1));
      border: 1px solid var(--accent-border, rgba(59,130,246,0.25));
      border-radius: 4px; padding: 2px 8px; margin-top: 3px; letter-spacing: 0.04em;
    }
    .idea-edit-btn {
      font-size: 12px; font-weight: 600; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 7px; padding: 6px 12px; cursor: pointer;
      transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
    }
    .idea-edit-btn:hover { color: var(--text-primary); border-color: var(--accent); }
    .idea-card-body { padding: 18px 20px; }
    .idea-field { margin-bottom: 14px; }
    .idea-field:last-child { margin-bottom: 0; }
    .idea-field-label {
      font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--text-muted); margin-bottom: 6px;
    }
    .idea-field-value { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary, var(--text-primary)); }
    .idea-textarea {
      width: 100%; box-sizing: border-box;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 13.5px; line-height: 1.6; color: var(--text-primary);
      background: var(--bg); border: 1.5px solid var(--border);
      border-radius: 8px; padding: 10px 12px; resize: vertical; min-height: 72px;
      transition: border-color 0.15s; outline: none;
    }
    .idea-textarea:focus { border-color: var(--accent); }

    /* Problems */
    .idea-problems { display: flex; flex-direction: column; gap: 6px; }
    .idea-problem-row { display: flex; align-items: flex-start; gap: 9px; }
    .idea-problem-bullet {
      width: 18px; height: 18px; border-radius: 50%;
      background: rgba(239,68,68,0.12); border: 1.5px solid rgba(239,68,68,0.3);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; margin-top: 2px; font-size: 9px;
    }
    .idea-problem-text { font-size: 13px; color: var(--text-secondary, var(--text-primary)); line-height: 1.55; flex: 1; }
    .idea-problem-input {
      flex: 1; font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 13px; line-height: 1.55; color: var(--text-primary);
      background: var(--bg); border: 1.5px solid var(--border);
      border-radius: 7px; padding: 7px 10px; outline: none; transition: border-color 0.15s;
    }
    .idea-problem-input:focus { border-color: var(--accent); }
    .idea-problem-del {
      background: none; border: none; cursor: pointer; color: var(--text-muted);
      font-size: 14px; padding: 0 2px; opacity: 0.5; transition: opacity 0.15s;
      margin-top: 6px; flex-shrink: 0;
    }
    .idea-problem-del:hover { opacity: 1; color: #ef4444; }
    .idea-add-problem {
      font-size: 12px; font-weight: 600; color: var(--accent); background: none;
      border: 1px dashed var(--accent); border-radius: 7px; padding: 6px 14px;
      cursor: pointer; margin-top: 6px; transition: all 0.15s; width: 100%;
    }
    .idea-add-problem:hover { background: rgba(59,130,246,0.06); }

    /* Competitors */
    .idea-competitors { display: flex; flex-wrap: wrap; gap: 7px; }
    .idea-comp-chip {
      display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
      color: var(--text-secondary, var(--text-muted));
      background: var(--surface-raised); border: 1px solid var(--border);
      border-radius: 6px; padding: 5px 10px; text-decoration: none; transition: all 0.15s;
    }
    .idea-comp-chip:hover { border-color: var(--accent); color: var(--text-primary); }
    .idea-comp-chip-initials {
      width: 18px; height: 18px; border-radius: 4px;
      background: var(--accent-muted, rgba(59,130,246,0.15));
      display: flex; align-items: center; justify-content: center;
      font-size: 9px; font-weight: 700; color: var(--accent); flex-shrink: 0;
    }

    /* Edit mode */
    .idea-card.editing .view-mode { display: none; }
    .idea-card:not(.editing) .edit-mode { display: none; }

    /* Confirm actions */
    .confirm-actions { display: flex; gap: 10px; margin-top: 4px; }
    .confirm-actions .btn-primary { flex: 1; }
    .confirm-actions .btn-ghost   { flex-shrink: 0; }

    /* Fetch progress */
    .fetch-progress {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 20px 22px; margin-bottom: 16px;
    }
    .fetch-progress-label {
      font-size: 12px; font-weight: 600; color: var(--text-muted);
      margin-bottom: 10px; display: flex; justify-content: space-between;
    }
    .fetch-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
    .fetch-fill  { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.4s ease; width: 0%; }
    .fetch-fill.pulsing { animation: fpulse 1.2s ease-in-out infinite; }
    @keyframes fpulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
    .fetch-status { font-size: 12px; color: var(--text-muted); }

    /* ── Refresh Nudge Banner ───────────────────────────────── */
    .refresh-nudge {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
      background: var(--surface);
      border: 1px solid rgba(59,130,246,0.35);
      border-left: 3px solid #3b82f6;
      border-radius: 10px; padding: 12px 16px;
      margin-bottom: 12px;
      animation: nudge-in 0.2s ease;
    }
    @keyframes nudge-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
    .refresh-nudge-text {
      flex: 1; font-size: 13px; color: var(--text-primary); line-height: 1.45;
      min-width: 180px;
    }
    .refresh-nudge-text strong { font-weight: 700; }
    .refresh-nudge-actions { display: flex; gap: 7px; flex-shrink: 0; }
    .nudge-yes {
      font-size: 12px; font-weight: 600; color: #fff;
      background: #3b82f6; border: 1px solid #3b82f6;
      border-radius: 6px; padding: 6px 14px; cursor: pointer;
      transition: background 0.15s; white-space: nowrap;
    }
    .nudge-yes:hover:not(:disabled) { background: #2563eb; }
    .nudge-yes:disabled { opacity: 0.6; cursor: not-allowed; }
    .nudge-no {
      font-size: 12px; font-weight: 600; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 6px; padding: 6px 14px; cursor: pointer; transition: all 0.15s;
    }
    .nudge-no:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .nudge-spinner {
      width: 14px; height: 14px; border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
      animation: spin 0.6s linear infinite; display: inline-block; vertical-align: middle; margin-right: 5px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Refreshing field highlight */
    .idea-textarea.refreshing, .idea-problem-input.refreshing {
      border-color: rgba(59,130,246,0.5);
      background: rgba(59,130,246,0.03);
      animation: blink-border 1s ease-in-out infinite;
    }
    @keyframes blink-border { 0%,100%{border-color:rgba(59,130,246,0.5)} 50%{border-color:rgba(59,130,246,0.15)} }

    @media (max-width: 600px) {
      .confirm-actions { flex-direction: column; }
      .step-connector  { width: 24px; }
      .step-node span  { display: none; }
      .refresh-nudge   { flex-direction: column; align-items: flex-start; }
    }


/* Extracted from plan.html */
/* ══ BUSINESS IDEA CARD ══════════════════════════════════ */
    .bi-shell {
      border-radius: 16px; overflow: hidden;
      border: 1px solid var(--border); background: var(--surface);
      font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .bi-hero {
      display: flex; align-items: center; gap: 16px;
      padding: 20px 24px;
      background: var(--surface-raised, var(--surface));
      border-bottom: 1px solid var(--border); flex-wrap: wrap;
    }
    .bi-logo-wrap {
      width: 52px; height: 52px; border-radius: 12px;
      background: var(--bg); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden; flex-shrink: 0; font-size: 24px;
    }
    .bi-logo-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
    .bi-hero-text { flex: 1; min-width: 0; }
    .bi-product-name {
      font-size: 18px; font-weight: 800; color: var(--text-primary);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .bi-tagline { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
    .bi-category-badge {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
      padding: 4px 10px; border-radius: 20px; margin-top: 6px;
      background: rgba(59,130,246,0.1); color: #3b82f6;
      border: 1px solid rgba(59,130,246,0.2);
    }
    [data-theme="dark"] .bi-category-badge { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); }
    .bi-url-chip {
      display: inline-flex; align-items: center; gap: 5px;
      font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 6px; padding: 4px 10px; text-decoration: none; flex-shrink: 0;
      transition: border-color 0.15s, color 0.15s;
    }
    .bi-url-chip:hover { border-color: #3b82f6; color: #3b82f6; }
    .bi-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
    @media (max-width: 680px) { .bi-body { grid-template-columns: 1fr; } }
    .bi-panel {
      padding: 22px 24px; border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }
    .bi-panel:nth-child(2n) { border-right: none; }
    .bi-panel-full { grid-column: 1 / -1; padding: 20px 24px; border-right: none; }
    @media (max-width: 680px) { .bi-panel { border-right: none; } }
    .bi-panel-label {
      display: flex; align-items: center; gap: 7px;
      font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--text-muted); margin-bottom: 14px;
    }
    .bi-panel-label-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #3b82f6); flex-shrink: 0; }
    .bi-panel-label-dot.red { background: #ef4444; }
    .bi-description { font-size: 14px; line-height: 1.7; color: var(--text-secondary, var(--text-primary)); }
    .bi-problems { display: flex; flex-direction: column; gap: 10px; }
    .bi-problem-item {
      display: flex; align-items: flex-start; gap: 11px;
      padding: 10px 13px; background: var(--bg);
      border: 1px solid var(--border); border-radius: 8px; transition: border-color 0.15s;
    }
    .bi-problem-item:hover { border-color: rgba(239,68,68,0.35); }
    .bi-problem-num {
      font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700;
      color: #ef4444; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
      border-radius: 4px; padding: 3px 6px; flex-shrink: 0; margin-top: 1px; letter-spacing: 0.07em;
    }
    .bi-problem-text { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary, var(--text-primary)); }
    .bi-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .bi-comp-card {
      display: flex; align-items: center; gap: 9px;
      padding: 10px 13px; background: var(--bg); border: 1px solid var(--border);
      border-radius: 9px; text-decoration: none; transition: border-color 0.15s, background 0.15s, transform 0.12s;
    }
    .bi-comp-card:hover { border-color: #3b82f6; transform: translateY(-1px); }
    .bi-comp-icon {
      width: 28px; height: 28px; border-radius: 6px;
      background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
      font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700; color: #3b82f6;
    }
    .bi-comp-name { font-size: 12.5px; font-weight: 600; color: var(--text-secondary, var(--text-muted)); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bi-comp-arrow { font-size: 10px; color: var(--text-muted); }
    .bi-comp-card:hover .bi-comp-name  { color: var(--text-primary); }
    .bi-comp-card:hover .bi-comp-arrow { color: #3b82f6; }
    .bi-segment-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .bi-chip {
      font-size: 12px; font-weight: 600; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 20px; padding: 5px 12px; transition: all 0.12s;
    }
    .bi-chip:hover { border-color: #3b82f6; color: var(--text-primary); }

    /* ══ PROGRESS BAR ════════════════════════════════════════ */
    .apb-label {
      font-size: 12px; color: var(--text-muted); margin-bottom: 10px;
      display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace;
    }
    .apb-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
    .apb-fill  { height: 100%; border-radius: 2px; background: #3b82f6; transition: width 0.4s ease; width: 0%; }
    .apb-fill.pulsing { animation: pulse-bar 1.2s ease-in-out infinite; }
    @keyframes pulse-bar { 0%,100%{opacity:1} 50%{opacity:0.45} }
    .apb-steps { display: flex; flex-direction: column; gap: 6px; }
    .apb-step {
      display: flex; align-items: center; gap: 10px;
      font-size: 12px; color: var(--text-muted); transition: color .2s;
      font-family: 'JetBrains Mono', monospace;
    }
    .apb-step.done   { color: #22c55e; }
    .apb-step.active { color: var(--text-primary); }
    .apb-step-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); flex-shrink: 0; transition: background .2s; }
    .apb-step.done   .apb-step-dot { background: #22c55e; }
    .apb-step.active .apb-step-dot { background: #3b82f6; }
    .apb-status { font-size: 11px; color: var(--text-muted); margin-top: 12px; min-height: 16px; letter-spacing: .03em; font-family: 'JetBrains Mono', monospace; }

    /* ══ SEO TRIGGER CARD ════════════════════════════════════ */
    .seo-trigger-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 32px 28px 28px; margin-bottom: 20px; text-align: center;
    }
    .seo-trigger-icon { font-size: 32px; margin-bottom: 12px; }
    .seo-trigger-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
    .seo-trigger-desc {
      font-size: 13.5px; color: var(--text-muted); line-height: 1.65;
      margin: 0 auto 22px; max-width: 480px;
    }
    .seo-trigger-features {
      display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
      margin-bottom: 22px;
    }
    .seo-trigger-feat {
      display: flex; align-items: center; gap: 6px;
      font-size: 12px; font-weight: 600; color: var(--text-muted);
    }
    .seo-trigger-feat-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }

    /* ══ SEO CHECKLIST ═══════════════════════════════════════ */
    .seo-checklist-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
    .seo-checklist-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px; background: var(--surface-raised, var(--surface));
      border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px;
    }
    .seo-checklist-title { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em; color: var(--text-muted); text-transform: uppercase; }
    .seo-checklist-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); opacity: 0.6; }
    .seo-checklist-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .seo-cl-btn {
      font-size: 11.5px; font-weight: 600; color: #3b82f6;
      background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25);
      border-radius: 5px; padding: 5px 12px; cursor: pointer;
      font-family: 'Plus Jakarta Sans', sans-serif; transition: all 0.15s;
    }
    .seo-cl-btn:hover { background: rgba(59,130,246,0.15); }
    .seo-cl-btn.danger { color: #ef4444; background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); }
    .seo-cl-btn.danger:hover { background: rgba(239,68,68,0.15); }
    .seo-checklist-body { padding: 6px 0; }
    .seo-cl-group { border-bottom: 1px solid var(--border); }
    .seo-cl-group:last-child { border-bottom: none; }
    .seo-cl-group-label {
      font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
      letter-spacing: 0.14em; color: var(--text-muted); opacity: 0.6; text-transform: uppercase;
      padding: 12px 20px 6px;
    }
    .seo-cl-item {
      display: flex; align-items: flex-start; gap: 13px;
      padding: 10px 20px; cursor: pointer; transition: background 0.12s;
    }
    .seo-cl-item:hover { background: var(--surface-raised, var(--surface)); }
    .seo-cl-item.checked { opacity: 0.5; }
    .seo-cl-checkbox {
      width: 16px; height: 16px; flex-shrink: 0; border: 1.5px solid var(--border);
      border-radius: 4px; background: var(--bg); margin-top: 1px;
      display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    }
    .seo-cl-item.checked .seo-cl-checkbox { background: rgba(34,197,94,0.15); border-color: #22c55e; }
    .seo-cl-item.checked .seo-cl-checkbox::after { content: '✓'; font-size: 10px; color: #22c55e; font-weight: 700; line-height: 1; }
    .seo-cl-text { flex: 1; }
    .seo-cl-item-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; line-height: 1.4; }
    .seo-cl-item.checked .seo-cl-item-title { text-decoration: line-through; color: var(--text-muted); }
    .seo-cl-item-desc { font-size: 12px; color: var(--text-muted); line-height: 1.55; }
    .seo-cl-priority {
      font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
      padding: 3px 7px; border-radius: 4px; letter-spacing: 0.08em;
      flex-shrink: 0; margin-top: 2px; text-transform: uppercase;
    }
    .seo-cl-priority.high   { color: #ef4444; background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.25); }
    .seo-cl-priority.medium { color: #f59e0b; background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.25); }
    .seo-cl-priority.low    { color: #3b82f6; background: rgba(59,130,246,0.1);  border: 1px solid rgba(59,130,246,0.25); }

    /* ── Code snippet in SEO item ─────────────────────────── */
    .seo-cl-code-wrap {
      margin-top: 10px; display: none;
    }
    .seo-cl-item.code-open .seo-cl-code-wrap { display: block; }
    .seo-cl-code-header {
      display: flex; align-items: center; justify-content: space-between;
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 7px 7px 0 0; padding: 6px 12px;
      border-bottom: none;
    }
    .seo-cl-code-label {
      font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
      letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase;
    }
    .seo-cl-code-copy {
      font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
      color: #3b82f6; background: none; border: none; cursor: pointer;
      padding: 2px 6px; border-radius: 4px; transition: background 0.15s;
    }
    .seo-cl-code-copy:hover { background: rgba(59,130,246,0.1); }
    .seo-cl-code-body {
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 0 0 7px 7px; padding: 12px 14px;
      font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.65;
      color: var(--text-primary); white-space: pre-wrap; word-break: break-all;
      max-height: 220px; overflow-y: auto;
    }
    .seo-cl-toggle-code {
      display: inline-flex; align-items: center; gap: 5px;
      margin-top: 8px; font-size: 11px; font-weight: 600; color: #3b82f6;
      background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.2);
      border-radius: 5px; padding: 3px 9px; cursor: pointer; transition: all 0.15s;
      font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .seo-cl-toggle-code:hover { background: rgba(59,130,246,0.12); }

    .seo-cl-progress-row {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 20px; border-top: 1px solid var(--border);
      background: var(--surface-raised, var(--surface));
    }
    .seo-cl-progress-bar-wrap { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .seo-cl-progress-bar { height: 100%; background: #22c55e; border-radius: 2px; transition: width 0.3s ease; width: 0%; }
    .seo-cl-progress-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); white-space: nowrap; }
    .seo-empty-state { text-align: center; padding: 40px 20px; font-size: 13px; color: var(--text-muted); }

    /* ══ CONTENT IDEAS SECTION ═══════════════════════════════ */
    .ci-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 14px;
      margin-bottom: 8px;
    }
    .ci-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; overflow: hidden;
      transition: border-color 0.15s, transform 0.12s;
      display: flex; flex-direction: column;
    }
    .ci-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-1px); }
    .ci-card-top {
      padding: 16px 18px 12px; flex: 1;
    }
    .ci-type-badge {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
      padding: 3px 8px; border-radius: 4px; margin-bottom: 10px;
    }
    .ci-type-badge.blog    { color: #8b5cf6; background: rgba(139,92,246,0.1);  border: 1px solid rgba(139,92,246,0.25); }
    .ci-type-badge.content { color: #f59e0b; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); }
    .ci-type-badge.youtube { color: #dc2626; background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.25); }
    .ci-type-badge.social  { color: #22c55e; background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.25); }
    .ci-card-title {
      font-size: 13.5px; font-weight: 700; color: var(--text-primary);
      line-height: 1.45; margin-bottom: 0;
    }
    .ci-card-footer {
      padding: 10px 18px 14px;
      display: flex; gap: 8px; align-items: center;
    }
    .ci-gen-btn {
      flex: 1; font-size: 12px; font-weight: 600;
      color: #fff; background: #3b82f6; border: 1px solid #3b82f6;
      border-radius: 7px; padding: 7px 12px; cursor: pointer;
      transition: background 0.15s; font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .ci-gen-btn:hover:not(:disabled) { background: #2563eb; border-color: #2563eb; }
    .ci-gen-btn:disabled { opacity: 0.6; cursor: not-allowed; }
    .ci-wc-sel {
      font-size: 11.5px; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 6px; padding: 6px 9px; cursor: pointer;
      font-family: 'Plus Jakarta Sans', sans-serif;
      outline: none; transition: border-color 0.15s;
    }
    .ci-wc-sel:focus { border-color: #3b82f6; }

    /* Generated post output */
    .ci-post-wrap {
      margin-top: 0; padding: 0 18px 14px;
      display: none;
    }
    .ci-post-wrap.visible { display: block; }
    .ci-post-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 0 6px;
    }
    .ci-post-label {
      font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
      letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
    }
    .ci-post-actions { display: flex; gap: 6px; }
    .ci-copy-btn, .ci-close-btn {
      font-size: 11px; font-weight: 600; cursor: pointer;
      border-radius: 5px; padding: 3px 9px; transition: all 0.15s;
      font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .ci-copy-btn { color: #3b82f6; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); }
    .ci-copy-btn:hover { background: rgba(59,130,246,0.15); }
    .ci-close-btn { color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); }
    .ci-close-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .ci-post-body {
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 8px; padding: 14px 16px;
      font-size: 12.5px; line-height: 1.75; color: var(--text-primary);
      max-height: 320px; overflow-y: auto;
      white-space: pre-wrap;
    }
    .ci-loading {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px; background: var(--bg); border: 1px solid var(--border);
      border-radius: 8px; font-size: 12.5px; color: var(--text-muted);
    }
    .ci-loading-spinner {
      width: 14px; height: 14px; border-radius: 50%;
      border: 2px solid var(--border); border-top-color: #3b82f6;
      animation: ci-spin 0.7s linear infinite; flex-shrink: 0;
    }
    @keyframes ci-spin { to { transform: rotate(360deg); } }

    /* ══ LEAD FINDER ════════════════════════════════════════ */
    .leads-finder-box {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 24px; margin-bottom: 20px;
    }
    .leads-finder-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
    .leads-finder-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
    .leads-finder-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
    .leads-finder-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
    .leads-config-row { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
    @media (max-width: 600px) { .leads-config-row { grid-template-columns: 1fr; } }
    .leads-config-group { display: flex; flex-direction: column; gap: 8px; }
    .leads-config-label { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.14em; color: var(--text-muted); text-transform: uppercase; }
    .leads-count-options, .leads-role-options { display: flex; flex-wrap: wrap; gap: 7px; }
    .leads-count-btn, .leads-role-btn {
      font-size: 12px; font-weight: 600; color: var(--text-muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 6px; padding: 6px 14px; cursor: pointer;
      transition: all 0.15s; font-family: 'Plus Jakarta Sans', sans-serif;
    }
    .leads-count-btn:hover, .leads-role-btn:hover { border-color: #3b82f6; color: var(--text-primary); }
    .leads-count-btn.active, .leads-role-btn.active { background: rgba(59,130,246,0.1); border-color: #3b82f6; color: #3b82f6; }
    .leads-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
    .leads-table-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px; background: var(--surface-raised, var(--surface));
      border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px;
    }
    .leads-table-title { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em; color: var(--text-muted); text-transform: uppercase; }
    .leads-table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .leads-dl-btn {
      font-size: 11.5px; font-weight: 600; color: #3b82f6;
      background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25);
      border-radius: 5px; padding: 5px 12px; cursor: pointer;
      font-family: 'Plus Jakarta Sans', sans-serif; transition: all 0.15s;
    }
    .leads-dl-btn:hover { background: rgba(59,130,246,0.15); }
    table.leads-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
    table.leads-table th {
      font-family: 'JetBrains Mono', monospace; font-size: 9px;
      letter-spacing: 0.12em; color: var(--text-muted); opacity: 0.7; text-transform: uppercase;
      padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border);
      background: var(--surface);
    }
    table.leads-table td { padding: 10px 16px; color: var(--text-muted); border-bottom: 1px solid var(--border); vertical-align: top; }
    table.leads-table tr:last-child td { border-bottom: none; }
    table.leads-table tr:hover td { background: var(--surface-raised, var(--surface)); color: var(--text-primary); }
    .lead-email-cell { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #3b82f6; }
    .lead-copy-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 11px; padding: 0 4px; transition: color 0.15s; }
    .lead-copy-btn:hover { color: #3b82f6; }
    .leads-note { font-size: 11px; color: var(--text-muted); padding: 10px 20px; border-top: 1px solid var(--border); font-style: italic; font-family: 'JetBrains Mono', monospace; }
    .leads-progress-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
    @media (max-width: 600px) {
      table.leads-table { min-width: 540px; }
      .leads-table-wrap > div { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    }

    /* ══ REGEN / EDIT BUTTONS ════════════════════════════════ */
    .btn-regen {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 12.5px; font-weight: 600; color: #3b82f6;
      background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.3);
      border-radius: 7px; padding: 6px 14px; cursor: pointer; transition: all 0.15s;
      font-family: 'Plus Jakarta Sans', sans-serif; white-space: nowrap;
    }
    .btn-regen:hover:not(:disabled) { background: rgba(59,130,246,0.15); border-color: #3b82f6; }
    .btn-regen:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-edit-idea {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 12.5px; font-weight: 600; color: var(--text-muted);
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 7px; padding: 6px 14px; cursor: pointer; transition: all 0.15s;
      font-family: 'Plus Jakarta Sans', sans-serif; white-space: nowrap;
    }
    .btn-edit-idea:hover { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,0.05); }

    /* ══ REGEN OVERLAY ═══════════════════════════════════════ */
    .regen-overlay {
      position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.55);
      display: flex; align-items: center; justify-content: center; padding: 20px;
      backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    }
    .regen-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 18px; padding: 32px 28px; width: 100%; max-width: 420px; text-align: center;
    }
    .regen-spinner {
      width: 42px; height: 42px; margin: 0 auto 18px;
      border: 3px solid var(--border); border-top-color: #3b82f6;
      border-radius: 50%; animation: spin 0.7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .regen-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
    .regen-sub   { font-size: 13px; color: var(--text-muted); margin: 0 0 22px; }
    .regen-steps-list { display: flex; flex-direction: column; gap: 8px; text-align: left; }
    .regen-step { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-muted); transition: color 0.2s; }
    .regen-step.done   { color: #22c55e; }
    .regen-step.active { color: var(--text-primary); }
    .regen-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); flex-shrink: 0; transition: background 0.2s; }
    .regen-step.done   .regen-dot { background: #22c55e; }
    .regen-step.active .regen-dot { background: #3b82f6; }

    /* ══ EDIT IDEA MODAL ════════════════════════════════════ */
    .edit-idea-modal-overlay {
      position: fixed; inset: 0; z-index: 8000; background: rgba(0,0,0,0.55);
      display: flex; align-items: center; justify-content: center; padding: 20px;
      backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); overflow-y: auto;
    }
    .edit-idea-modal {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 18px; width: 100%; max-width: 560px; overflow: hidden; position: relative;
    }
    .edit-idea-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 18px 22px; background: var(--surface-raised, var(--surface));
      border-bottom: 1px solid var(--border);
    }
    .edit-idea-modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
    .edit-idea-modal-close {
      background: none; border: none; cursor: pointer; color: var(--text-muted);
      font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; transition: color 0.15s, background 0.15s;
    }
    .edit-idea-modal-close:hover { color: var(--text-primary); background: var(--bg); }
    .edit-idea-modal-body { padding: 20px 22px; max-height: 68vh; overflow-y: auto; }
    .edit-idea-field { margin-bottom: 18px; }
    .edit-idea-field:last-child { margin-bottom: 0; }
    .edit-idea-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }
    .edit-idea-input, .edit-idea-textarea {
      width: 100%; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 13.5px; line-height: 1.6; color: var(--text-primary);
      background: var(--bg); border: 1.5px solid var(--border); border-radius: 9px;
      padding: 10px 13px; outline: none; transition: border-color 0.15s;
    }
    .edit-idea-input:focus, .edit-idea-textarea:focus { border-color: #3b82f6; }
    .edit-idea-textarea { resize: vertical; min-height: 70px; }
    .edit-idea-problems-list { display: flex; flex-direction: column; gap: 7px; }
    .edit-idea-problem-row { display: flex; align-items: center; gap: 8px; }
    .edit-idea-problem-input {
      flex: 1; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px;
      color: var(--text-primary); background: var(--bg); border: 1.5px solid var(--border);
      border-radius: 8px; padding: 8px 11px; outline: none; transition: border-color 0.15s;
    }
    .edit-idea-problem-input:focus { border-color: #3b82f6; }
    .edit-idea-problem-del { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 15px; padding: 0 3px; transition: color 0.15s; }
    .edit-idea-problem-del:hover { color: #ef4444; }
    .edit-idea-add-problem {
      width: 100%; margin-top: 7px; font-size: 12px; font-weight: 600; color: #3b82f6;
      background: none; border: 1px dashed rgba(59,130,246,0.45);
      border-radius: 8px; padding: 7px; cursor: pointer; transition: all 0.15s;
    }
    .edit-idea-add-problem:hover { background: rgba(59,130,246,0.06); }
    .edit-idea-modal-footer {
      display: flex; gap: 10px; padding: 16px 22px;
      border-top: 1px solid var(--border); background: var(--surface-raised, var(--surface));
    }
    .edit-idea-modal-footer .btn-primary { flex: 1; }
    .edit-idea-modal-footer .btn-ghost   { flex-shrink: 0; }
    .edit-idea-save-note {
      font-size: 11.5px; color: var(--text-muted); padding: 10px 22px;
      border-top: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; text-align: center;
    }

/* Shared utility classes replacing inline template styles */
.clickable { cursor: pointer; }
.is-hidden { display: none; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-actions-compact { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.final-cta { padding-top: 40px; padding-bottom: 90px; }
.final-cta-title { font-size: clamp(30px, 4vw, 52px); }
.site-footer { border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.site-footer-brand { margin-bottom: 10px; font-weight: 700; color: var(--text); }
.site-footer-credit { margin-top: 8px; }
.home-footer { text-align: center; padding: 16px 12px; color: var(--text-muted); font-size: 13px; }
.logo-emoji { font-size: 20px; }
.logo-emoji-large { font-size: 24px; }
.muted-inline { font-size: 13px; color: var(--text-muted); }
.mt-4 { margin-top: 4px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.py-empty { padding: 8px 0; }
.p-empty-community { padding: 14px 0 4px; }
.p-32 { padding: 32px; }
.w-full { width: 100%; }
.min-w-220 { min-width: 220px; }
.width-130 { width: 130px; }
.input-compact { padding: 5px 10px; }
.template-copy { font-size: 13.5px; color: var(--text-2); margin-bottom: 14px; line-height: 1.6; }
.validation-copy { font-size: 13.5px; color: var(--text-2); }
.seo-check-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.pos-eyebrow-warning { color: #d97706; }
.pos-eyebrow-danger { color: #ef4444; }
.pos-bullet-dot-red { background: #ef4444; }
.pos-bullet-dot-blue { background: #3b82f6; }
.pos-bullet-dot-purple { background: #8b5cf6; }
.pos-bullet-dot-green { background: #22c55e; }
.external-link-icon { margin-left: 4px; opacity: .6; }
.bi-panel-divider { border-bottom: 1px solid var(--border); }
.bi-description-audience { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.seo-error-text { color: #ef4444; }
.seo-progress-inline { width: var(--progress-width, 0%); }
.leads-table-scroll { overflow-x: auto; max-height: 480px; overflow-y: auto; }
.lead-row-number { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 10px; }
.lead-name-cell { font-weight: 600; color: var(--text-primary); }
.lead-link { color: #3b82f6; font-size: 11.5px; text-decoration: none; }
.danger-soft-btn { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.email-template-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.placeholder-highlight { background: var(--yellow-bg); color: var(--yellow); padding: 1px 5px; border-radius: 3px; font-weight: 700; }

/* Badge shown inline in the section header next to the title */
.seo-auto-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 10px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.seo-auto-badge:empty {
  display: none;
}

.seo-badge-running {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.seo-badge-done {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.seo-badge-error {
  background: rgba(239, 68, 68, 0.10);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.20);
}

[data-theme="dark"] .seo-badge-running  { background: rgba(59,130,246,0.18); color:#60a5fa; border-color:rgba(59,130,246,0.3); }
[data-theme="dark"] .seo-badge-done { background: rgba(34,197,94,0.15); color:#4ade80; border-color:rgba(34,197,94,0.3); }
[data-theme="dark"] .seo-badge-error    { background: rgba(239,68,68,0.15); color:#f87171; border-color:rgba(239,68,68,0.25); }

/* Inline progress bar shown while auto-running inside the section body */
.seo-auto-progress {
  margin: 20px 0 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  background: var(--surface-2, #f9fafb);
}

[data-theme="dark"] .seo-auto-progress {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.seo-auto-progress.is-hidden {
  display: none !important;
}

.seo-auto-progress-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.seo-auto-progress-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.seo-auto-progress-text {
  flex: 1;
  min-width: 0;
}

.seo-auto-progress-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #111827);
  margin-bottom: 8px;
}

[data-theme="dark"] .seo-auto-progress-title {
  color: rgba(255,255,255,0.9);
}

.mt-6 { margin-top: 6px; }

.leads-verify-summary { margin-left: 8px; color: var(--text-muted); opacity: .75; letter-spacing: normal; text-transform: none; }
.verify-list-btn:disabled { opacity: .65; cursor: wait; }
.lead-status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 800; line-height: 1.4; }
.lead-status-active { color: #047857; background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.28); }
.lead-status-invalid { color: #fca5a5; background: rgba(7,10,18,0.9); border: 1px solid rgba(239,68,68,0.5); }
.lead-status-unverified { color: var(--text-muted); background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.24); }
table.leads-table tr.lead-row-invalid td { background: rgba(7,10,18,0.93); color: #8f1d1d; }
table.leads-table tr.lead-row-invalid .lead-name-cell,
table.leads-table tr.lead-row-invalid .lead-email-cell { color: #ef4444; text-decoration: line-through; text-decoration-thickness: 2px; }
table.leads-table tr.lead-row-invalid .lead-link,
table.leads-table tr.lead-row-invalid .lead-copy-btn { color: #6b7280; opacity: .55; }
table.leads-table tr.lead-row-invalid:hover td { background: #05070d; color: #ef4444; }
table.leads-table tr.lead-row-active .lead-email-cell { color: #059669; }
