/* =========================================================
   BirdReply — Design System & Styles
   ========================================================= */

/* ===== TOKENS ===== */
:root {
  --bg: #f7fbff;
  --bg-elevated: #eef7ff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --surface: rgba(15, 23, 42, 0.045);
  --surface-hover: rgba(37, 99, 235, 0.075);
  --border: rgba(30, 64, 175, 0.11);
  --border-active: rgba(37, 99, 235, 0.24);
  --text: #102033;
  --text-secondary: #486176;
  --text-muted: #8191a3;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-warm: #f97316;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-glow: rgba(37, 99, 235, 0.18);
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.10);
  --green-text: #047857;
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.10);
  --amber-text: #b45309;
  --red-soft: rgba(248, 113, 113, 0.10);
  --red-text: #fca5a5;
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.10);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.10);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.10);
  --reddit: #ff4500;
  --hn: #ff6600;
  --youtube: #ff0000;
  --indiehackers: #0e6db0;
  --stackoverflow: #f48024;
  --quora: #b92b27;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 10px rgba(29, 78, 216, 0.08);
  --shadow-md: 0 12px 34px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 80px rgba(15, 23, 42, 0.13);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.13), transparent 28%),
    linear-gradient(180deg, #f8fcff 0%, #eef7ff 46%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.cookie-widget-hidden .cky-consent-container,
body.cookie-widget-hidden .cky-btn-revisit-wrapper,
body.cookie-widget-hidden .cky-modal,
body.cookie-widget-hidden #cky-consent,
body.cookie-widget-hidden #cookie-law-info-bar,
body.cookie-widget-hidden .cli-modal,
body.cookie-widget-hidden .cli_settings_button {
  display: none !important;
}

/* ===== AUTH GATE ===== */
.auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(37,99,235,0.12), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(249,115,22,0.10), transparent 50%),
    var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  text-align: center;
  padding: 48px 36px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.auth-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.google-signin-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 10px;
}

.guest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.guest-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}


.auth-terms {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-gate.hidden { display: none !important; }

/* ===== LAYOUT ===== */
.page {
  width: min(1600px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 18px;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  letter-spacing: -0.035em;
}

.logo-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, 0.16));
}

.logo-bird .bird-wing {
  fill: #dbeafe;
  stroke: #2563eb;
  stroke-width: 1.6;
}

.logo-bird .bird-body {
  fill: #2563eb;
}

.logo-bird .bird-beak {
  fill: var(--accent-warm);
}

.logo-bird .bird-eye {
  fill: #ffffff;
}

.logo-bird .bird-tail {
  color: #1d4ed8;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
}

.logged-in-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.15s var(--ease);
}

.nav-login-btn:hover {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.42);
  transform: translateY(-1px);
}

.plan-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #eff6ff;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s var(--ease);
}

.user-avatar:hover { border-color: var(--border-active); }

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.dropdown-user {
  padding: 14px 16px;
  display: grid;
  gap: 2px;
}

.dropdown-user strong { font-size: 14px; font-weight: 700; }
.dropdown-user span { font-size: 12px; color: var(--text-muted); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dropdown-link {
  display: block;
  text-decoration: none;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 64px 24px 48px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 92vw);
  height: 470px;
  background:
    radial-gradient(ellipse at 45% 38%, rgba(37, 99, 235, 0.18), transparent 58%),
    radial-gradient(ellipse at 68% 38%, rgba(249, 115, 22, 0.11), transparent 45%);
  pointer-events: none;
  opacity: 0.5;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

h1 {
  font-family: "Fraunces", "Plus Jakarta Sans", serif;
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.02;
  color: var(--text);
  margin-bottom: 18px;
}

h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

.hero-sub {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ===== PLATFORM ROW ===== */
.platforms-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.platform-pill:hover {
  background: var(--surface-hover);
  color: var(--text-secondary);
}

.platform-pill svg { width: 14px; height: 14px; }

/* ===== SEARCH BAR ===== */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 580px;
  margin: 0 auto 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 18px 60px rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(18px);
}

.search-bar:focus-within {
  border-color: rgba(37,99,235,0.32);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.08), 0 18px 60px rgba(37, 99, 235, 0.14);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-icon svg { width: 18px; height: 18px; }

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  padding: 12px 0;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar button {
  flex-shrink: 0;
  appearance: none;
  border: 0;
  border-radius: calc(var(--radius-xl) - 6px);
  padding: 0 22px;
  height: 46px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.24);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
}

.search-bar button:active:not(:disabled) { transform: translateY(0); }
.search-bar button:disabled { opacity: 0.8; cursor: wait; }

.scan-settings-panel {
  max-width: 920px;
  margin: 14px auto 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.scan-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.scan-settings-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.settings-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
}

.settings-status.pro {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.24);
}

.scan-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(180px, 0.7fr);
  gap: 10px;
}

.scan-setting-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.scan-setting-field span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.scan-context-value {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-left .scan-settings-panel {
  max-width: none;
  margin: 16px 0 0;
  padding: 12px;
  box-shadow: none;
}

.dashboard-left .scan-settings-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.dashboard-left .scan-settings-grid {
  grid-template-columns: 1fr;
}

.scan-setting-field.wide {
  grid-column: 1 / -1;
}

.spinner { width: 18px; height: 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== HOW IT WORKS ===== */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  min-height: 122px;
  padding: 18px 18px 17px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.66)),
    var(--surface);
  border: 1px solid rgba(37, 99, 235, 0.10);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.step:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.78)),
    var(--surface-hover);
  border-color: rgba(37, 99, 235, 0.20);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(14,165,233,0.10));
  color: var(--accent-strong);
  border: 1px solid rgba(37,99,235,0.16);
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.step > div:last-child {
  flex: 1;
}

.step strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
  display: block;
  line-height: 1.35;
  margin-bottom: 6px;
}

.step p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ===== STATUS BAR ===== */
.status-bar {
  text-align: center;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  animation: fadeIn 0.3s ease;
}

.status-bar.error {
  background: var(--red-soft);
  color: var(--red-text);
  border-color: rgba(248,113,113,0.12);
}

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

/* ===== SCAN OVERLAY (inline, below search bar) ===== */

.scan-overlay {
  animation: fadeIn 0.35s ease;
  width: 100%;
  max-width: 580px;
  margin: 16px auto 0;
}

.scan-card {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.12);
  position: relative;
  overflow: hidden;
}

/* ===== INTERMEDIATE SCAN SETUP ===== */
.scan-setup-screen { width: min(900px, calc(100% - 32px)); margin: 36px auto 72px; animation: fadeIn 0.35s ease; }
.scan-setup-shell { background: var(--bg-card); border: 1px solid rgba(37,99,235,.16); border-radius: var(--radius-xl); box-shadow: 0 24px 70px rgba(37,99,235,.12); padding: 32px; }
.scan-setup-progress { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--text); }
.scan-setup-progress div { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.scan-setup-progress span:not(.scan-setup-pulse) { color: var(--text-muted); font-size: .86rem; }
#scan-setup-progress-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-setup-next-btn {
  flex: 0 0 auto;
  min-width: 154px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37,99,235,.25);
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.scan-setup-progress .scan-setup-next-btn span { color: inherit; font-size: inherit; }
.scan-setup-next-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.32); filter: saturate(1.08); }
.scan-setup-next-btn:focus-visible { outline: 3px solid rgba(37,99,235,.24); outline-offset: 3px; }
.scan-setup-next-btn:disabled { opacity: .72; cursor: wait; }
.scan-setup-next-arrow { font-size: 19px !important; line-height: 1; transition: transform .16s var(--ease); }
.scan-setup-next-btn:hover .scan-setup-next-arrow { transform: translateX(3px); }
.scan-setup-pulse { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(37,99,235,.4); animation: setup-pulse 1.8s infinite; }
@keyframes setup-pulse { 70% { box-shadow: 0 0 0 9px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); } }
.scan-setup-heading { margin: 30px 0 24px; }
.scan-setup-heading h1 { margin: 8px 0 10px; font-family: "Fraunces", serif; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; }
.scan-setup-heading > p:last-child { max-width: 700px; color: var(--text-muted); line-height: 1.65; }
.scan-setup-form { display: grid; gap: 20px; }
.scan-setup-field, .scan-setup-questions { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.scan-setup-field > span, .scan-setup-questions legend { font-weight: 800; color: var(--text); }
.scan-setup-field textarea, .scan-setup-field input, .scan-setup-question input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; padding: 13px 14px; line-height: 1.5; }
.scan-setup-field textarea:focus, .scan-setup-field input:focus, .scan-setup-question input:focus { outline: 3px solid rgba(37,99,235,.13); border-color: var(--accent); }
.scan-setup-field [readonly], .scan-setup-question [readonly] { background: rgba(148,163,184,.08); color: var(--text-muted); cursor: default; }
.scan-setup-field small { color: var(--text-muted); }
#scan-setup-question-list { display: grid; gap: 10px; margin-top: 4px; }
.scan-setup-question { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; }
.scan-setup-question > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .82rem; }
.scan-setup-footer { display: grid; gap: 8px; padding-top: 8px; }
.scan-setup-footer p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.5; }
.scan-setup-save-status { color: var(--red-text) !important; }

@media (max-width: 700px) {
  .scan-setup-screen { width: min(100% - 24px, 900px); margin-top: 20px; }
  .scan-setup-shell { padding: 20px; }
  .scan-setup-progress { padding: 10px 10px 10px 13px; gap: 9px; }
  .scan-setup-next-btn { min-width: 132px; min-height: 46px; padding: 10px 13px; }
}

@media (max-width: 420px) {
  .scan-setup-pulse { display: none; }
  .scan-setup-next-btn { min-width: 124px; padding-inline: 11px; }
  .scan-setup-next-arrow { display: none; }
}

/* animated shimmer sweep */
.scan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(37, 99, 235, 0.055) 50%,
    transparent 60%);
  animation: shimmer 2s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Radar pulsing icon */
.scan-radar {
  flex-shrink: 0;
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: radar-pulse 2.2s ease-out infinite;
}

.radar-ring.r1 { width: 72px; height: 72px; animation-delay: 0s; }
.radar-ring.r2 { width: 72px; height: 72px; animation-delay: 0.7s; }
.radar-ring.r3 { width: 72px; height: 72px; animation-delay: 1.4s; }

@keyframes radar-pulse {
  0%   { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.radar-core {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: core-pulse 2s ease-in-out infinite;
}

.radar-core svg { width: 22px; height: 22px; }

@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.24); }
  50%       { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

/* Info column */
.scan-info { flex: 1; min-width: 0; }

.scan-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.scan-domain-name {
  color: var(--accent);
  font-style: italic;
}

.scan-message {
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
  margin-bottom: 14px;
  transition: opacity 0.3s;
}

/* Thin progress bar */
.scan-progress-bar {
  height: 3px;
  border-radius: 99px;
  background: var(--surface);
  margin-bottom: 18px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #0ea5e9, var(--accent-warm));
  width: 0%;
  transition: width 1.8s ease;
}

/* Step checklist */
.scan-steps {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.scan-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.scan-step.active { color: var(--text-secondary); }
.scan-step.done   { color: var(--green-text); }

.step-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
}

.scan-step.active .step-icon {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--accent);
}

.scan-step.done .step-icon {
  background: rgba(52, 211, 153, 0.10);
  border-color: rgba(52, 211, 153, 0.25);
  color: var(--green);
}

.step-icon svg { width: 12px; height: 12px; }

.step-label { flex: 1; font-weight: 500; }

.step-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.scan-step.active .step-status::after {
  content: "Working…";
  color: var(--accent);
}

.scan-step.done .step-status::after {
  content: "✓ Done";
  color: var(--green-text);
}

/* Platform pills */
.scan-platforms-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
  align-items: stretch;
}

.scan-platform-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  opacity: 0.4;
  transition: opacity 0.6s, transform 0.4s;
}

.scan-platform-pill.lit {
  opacity: 1;
  transform: scale(1.06);
}

.scan-platform-pill.reddit  { background: rgba(255,69,0,0.10);   color: #ff7040; border-color: rgba(255,69,0,0.2); }
.scan-platform-pill.hn      { background: rgba(255,102,0,0.10);  color: #ff8c38; border-color: rgba(255,102,0,0.2); }
.scan-platform-pill.yt      { background: rgba(255,0,0,0.08);    color: #ff5555; border-color: rgba(255,0,0,0.18); }
.scan-platform-pill.ih      { background: rgba(14,109,176,0.10); color: #60a5fa; border-color: rgba(14,109,176,0.2); }
.scan-platform-pill.so      { background: rgba(244,128,36,0.10); color: #f48024; border-color: rgba(244,128,36,0.2); }
.scan-platform-pill.qr      { background: rgba(185,43,39,0.10);  color: #f87171; border-color: rgba(185,43,39,0.2); }
.scan-platform-pill.gh      { background: rgba(36,41,47,0.10);  color: #57606a; border-color: rgba(36,41,47,0.18); }
.scan-platform-pill.ph      { background: rgba(218,85,47,0.12); color: #da552f; border-color: rgba(218,85,47,0.20); }
.scan-platform-pill.dev     { background: rgba(15,23,42,0.10);  color: #334155; border-color: rgba(15,23,42,0.18); }
.scan-platform-pill.blog    { background: rgba(34,197,94,0.12); color: #15803d; border-color: rgba(34,197,94,0.22); }
.scan-platform-pill.forum   { background: rgba(124,58,237,0.10); color: #6d28d9; border-color: rgba(124,58,237,0.20); }
.scan-platform-pill.web     { background: rgba(14,165,233,0.12); color: #0369a1; border-color: rgba(14,165,233,0.22); }

/* ===== ANALYSIS CHIPS ===== */
.analysis-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.analysis-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.analysis-chip svg { width: 12px; height: 12px; flex-shrink: 0; }

.analysis-chip.chip-accent {
  background: var(--accent-soft);
  border-color: rgba(255, 107, 53, 0.2);
  color: var(--accent);
}

.analysis-chip.chip-green {
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.2);
  color: var(--green-text);
}

/* ===== CARD THREADS AREA ===== */
.card-threads-area {
  padding: 0 24px 16px;
}

.card-threads-area:empty { display: none; }

/* ===== RESULTS AREA ===== */

.results-area { animation: fadeIn 0.4s ease; }

.results-header {
  margin-bottom: 20px;
  padding: 22px 26px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.results-header h2 { margin-bottom: 6px; }

.results-summary {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.results-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.stat-dot.green { background: var(--green); }
.stat-dot.amber { background: var(--amber); }
.stat-dot.accent { background: var(--accent); }
.stat-dot.blue { background: var(--blue); }

/* ===== RESULTS HEADER REDESIGN ===== */
.header-main {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-top: 16px;
}

.header-title-block {
  flex: 1 1 260px;
}

.header-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 2px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-active);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
}

.kpi-card:active {
  transform: translateY(0);
}

.kpi-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 8px var(--accent-glow);
}

.kpi-card.kpi-green.active {
  border-color: var(--green);
  background: rgba(52,211,153,0.12);
  box-shadow: 0 0 8px rgba(52,211,153,0.20);
}

.kpi-card.kpi-red.active {
  border-color: #f87171;
  background: rgba(248,113,113,0.12);
  box-shadow: 0 0 8px rgba(248,113,113,0.20);
}

.kpi-card.kpi-amber.active {
  border-color: var(--amber);
  background: rgba(251,191,36,0.12);
  box-shadow: 0 0 8px rgba(251,191,36,0.20);
}

.kpi-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

.kpi-card.kpi-green .kpi-val { color: var(--green); }
.kpi-card.kpi-green { border-color: rgba(52,211,153,0.2); background: rgba(52,211,153,0.06); }
.kpi-card.kpi-red .kpi-val { color: #f87171; }
.kpi-card.kpi-red { border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.06); }
.kpi-card.kpi-amber .kpi-val { color: var(--amber); }
.kpi-card.kpi-amber { border-color: rgba(251,191,36,0.2); background: rgba(251,191,36,0.06); }

/* ===== RESULTS TOOLBAR (filter tabs + sort label) ===== */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-filters-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-filters-label {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.platform-filter-select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  min-width: 220px;
  padding: 9px 38px 9px 12px;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.platform-filter-select:hover,
.platform-filter-select:focus {
  border-color: rgba(37,99,235,0.35);
  color: var(--text);
}

.platform-filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.filter-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.filter-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(37,99,235,0.22);
  color: var(--text);
}

.filter-tab.active {
  background: rgba(37,99,235,0.10);
  border-color: rgba(37,99,235,0.26);
  color: var(--accent-strong);
}

.sort-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.thread-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.load-more-threads-btn {
  appearance: none;
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: var(--radius-sm);
  background: rgba(34,197,94,0.10);
  color: var(--green-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.load-more-threads-btn .spinner {
  width: 16px;
  height: 16px;
}

.load-more-threads-btn:hover:not(:disabled) {
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.34);
  transform: translateY(-1px);
}

.load-more-threads-btn:disabled,
.load-more-threads-btn.disabled-style {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.load-more-threads-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  min-height: 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-active);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(14, 165, 233, 0.07));
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease),
    border-color 0.15s var(--ease),
    color 0.15s var(--ease);
}

.load-more-threads-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(14, 165, 233, 0.13));
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.load-more-threads-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.load-more-threads-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.load-more-threads-btn .btn-icon svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.load-more-threads-btn .btn-loading {
  display: inline-flex;
  align-items: center;
}

.load-more-threads-btn .btn-loading .spinner {
  width: 14px;
  height: 14px;
  animation: spin 0.9s linear infinite;
}

.thread-refresh-status {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 12.5px;
  font-weight: 800;
}

/* ===== TRAFFIC BADGE ===== */
.traffic-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.traffic-badge.traffic-med {
  background: rgba(251,191,36,0.10);
  color: var(--amber-text);
  border: 1px solid rgba(251,191,36,0.2);
}

.traffic-badge.traffic-low {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ===== VISIBILITY PILLS ===== */
.visibility-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.demand-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.demand-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

.vis-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.vis-pill svg { width: 12px; height: 12px; flex-shrink: 0; }

.vis-pill.vis-yes {
  background: rgba(52,211,153,0.08);
  border-color: rgba(52,211,153,0.2);
  color: var(--green-text);
}

.vis-pill.vis-no {
  background: rgba(248,113,113,0.07);
  border-color: rgba(248,113,113,0.18);
  color: #b91c1c;
}

.ai-vis-pill.vis-yes {
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.2);
  color: var(--amber-text);
}

.ai-vis-pill.vis-no {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-muted);
}

/* ===== CARD TOP ROW ===== */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card.brand-mentioned .card-top-row {
  padding-right: 138px;
}

@media (max-width: 640px) {
  .card.brand-mentioned .card-top-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding-top: 34px;
    padding-right: 0;
  }

  .card.brand-mentioned .card-meta-right {
    width: 100%;
    justify-content: flex-start;
  }
}

.question-focus-banner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.95));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.question-focus-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: min(100%, 540px);
}

.question-focus-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.question-focus-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.question-focus-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.focus-edit-btn,
.focus-clear-btn {
  appearance: none;
  border: 0;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    background 0.15s var(--ease),
    color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.focus-edit-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.focus-edit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.30);
}

.focus-edit-btn:focus-visible,
.focus-clear-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.focus-clear-btn {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(72, 97, 118, 0.14);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.focus-clear-btn:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(72, 97, 118, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}


.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.scroll-load-more-indicator {
  width: 100%;
  max-width: 980px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.scroll-load-more-indicator .spinner {
  width: 18px;
  height: 18px;
}

.end-load-more-row {
  width: 100%;
  max-width: 980px;
  display: flex;
  justify-content: center;
  margin: 24px auto 8px;
}

.end-load-more-btn {
  min-height: 48px;
  padding-inline: 22px;
  border-color: rgba(37, 99, 235, .28);
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(14, 165, 233, .12));
  box-shadow: 0 10px 24px rgba(37, 99, 235, .1);
}

.end-load-more-btn:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(37, 99, 235, .16);
}

.thread-scroll-sentinel {
  width: 100%;
  height: 1px;
  margin-top: 2px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.card-mention-check {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px 0 7px;
  border-radius: 999px;
  background: rgba(34,197,94,0.13);
  color: var(--green-text);
  border: 1px solid rgba(34,197,94,0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(34,197,94,0.12);
  z-index: 3;
}

.card-mention-check svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.card-mention-label {
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-mention-label[href]:hover {
  text-decoration: underline;
}

.card-mention-check.hidden {
  display: none;
}

.card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card.search-visible {
  background:
    linear-gradient(180deg, rgba(240,253,244,0.95), rgba(236,253,245,0.88)),
    var(--bg-card);
  border-color: rgba(74,222,128,0.20);
  box-shadow: 0 16px 34px rgba(34,197,94,0.08);
}

.card.search-visible:hover {
  border-color: rgba(74,222,128,0.30);
  box-shadow: 0 18px 38px rgba(34,197,94,0.12);
}

.card.ai-visible {
  background:
    linear-gradient(180deg, rgba(220,252,231,0.98), rgba(187,247,208,0.92)),
    var(--bg-card);
  border-color: rgba(34,197,94,0.34);
  box-shadow: 0 18px 40px rgba(34,197,94,0.16);
}

.card.ai-visible:hover {
  border-color: rgba(34,197,94,0.42);
  box-shadow: 0 20px 44px rgba(34,197,94,0.20);
}

.card.search-visible.ai-visible {
  background:
    linear-gradient(180deg, rgba(220,252,231,0.98), rgba(187,247,208,0.92)),
    var(--bg-card);
  border-color: rgba(22,163,74,0.42);
  box-shadow: 0 20px 44px rgba(22,163,74,0.18);
}

.card.search-visible.ai-visible:hover {
  border-color: rgba(22,163,74,0.52);
  box-shadow: 0 22px 48px rgba(22,163,74,0.22);
}

.card.brand-mentioned {
  background:
    linear-gradient(180deg, rgba(240,253,244,0.96), rgba(236,253,245,0.90)),
    var(--bg-card);
  border-color: rgba(34,197,94,0.28);
  box-shadow: 0 18px 40px rgba(34,197,94,0.12);
}

.card.brand-mentioned:hover {
  border-color: rgba(34,197,94,0.36);
  box-shadow: 0 20px 44px rgba(34,197,94,0.16);
}

.card.blurred-card {
  position: relative;
  overflow: hidden;
  user-select: none;
}

.card.blurred-card > * {
  filter: blur(5px);
  opacity: 0.4;
  pointer-events: none;
}

.card.blurred-card::before {
  content: "Premium Opportunity";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(255,255,255,0.45);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.card.locked-thread-preview-card {
  cursor: pointer;
}

.card.locked-thread-preview-card::before {
  content: "upgrade to unlock all posts";
  opacity: 1;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.card.locked-thread-preview-card:hover::before,
.card.locked-thread-preview-card:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, -54%);
}

.card-header { padding: 22px 24px 18px; }

.card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.subreddit-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,69,0,0.10);
  color: #ff7040;
  font-size: 12px;
  font-weight: 700;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.signal-badge.good { background: var(--green-soft); color: var(--green-text); }
.signal-badge.warn { background: var(--amber-soft); color: var(--amber-text); }

.thread-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.thread-score-badge.strong {
  background: rgba(22, 163, 74, .13);
  border-color: rgba(22, 163, 74, .24);
  color: var(--green-text);
}

.thread-score-badge.good {
  background: rgba(37, 99, 235, .1);
  border-color: rgba(37, 99, 235, .2);
  color: var(--accent);
}

.thread-score-badge.low {
  background: var(--amber-soft);
  border-color: rgba(217, 119, 6, .2);
  color: var(--amber-text);
}

.card-question {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.card-question a {
  display: inline;
  color: var(--text);
  text-decoration: none;
}

.card-question a:hover {
  color: var(--accent);
}

.card-fit {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.card-kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fit-opportunity-label {
  display: inline-flex;
  margin-top: 10px;
  color: var(--amber-text);
  font-size: 12px;
  font-weight: 700;
}

/* ===== CARD SECTIONS ===== */
.card-section {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.card-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-section-label svg { width: 15px; height: 15px; }

.thread-summary-box,
.thread-preview-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.matched-question-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.thread-summary-reason,
.thread-preview-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.thread-open-link {
  display: inline-flex;
  align-items: center;
  justify-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255,107,53,0.18);
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.thread-open-link:hover {
  background: rgba(255,107,53,0.16);
}

/* ===== THREAD LIST ===== */
.thread-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.thread-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.thread-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.clickable-thread-surface {
  cursor: pointer;
}

.clickable-thread-surface:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card.clickable-thread-surface:hover {
  border-color: rgba(255, 107, 53, 0.28);
}

.thread-item.locked-thread-preview {
  cursor: pointer;
  overflow: visible;
}

.thread-item.locked-thread-preview .thread-icon,
.thread-item.locked-thread-preview .thread-info {
  filter: blur(2.5px);
  opacity: 0.48;
  pointer-events: none;
  user-select: none;
}

.locked-thread-tooltip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: min(260px, calc(100vw - 40px));
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
  opacity: 1;
  pointer-events: none;
  text-align: center;
  z-index: 20;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.thread-item.locked-thread-preview:hover .locked-thread-tooltip,
.thread-item.locked-thread-preview:focus-visible .locked-thread-tooltip {
  opacity: 1;
  transform: translate(-50%, -54%);
}

.thread-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.thread-icon svg { width: 16px; height: 16px; }
.thread-icon.reddit { color: var(--reddit); }
.thread-icon.hackernews { color: var(--hn); }
.thread-icon.youtube { color: var(--youtube); }
.thread-icon.indiehackers { color: var(--indiehackers); }
.thread-icon.stackoverflow { color: var(--stackoverflow); }
.thread-icon.quora { color: var(--quora); }
.thread-icon.github,
.thread-icon.producthunt,
.thread-icon.linkedin,
.thread-icon.facebookgroups,
.thread-icon.devto,
.thread-icon.medium,
.thread-icon.discourse,
.thread-icon.webdiscussion { color: var(--accent); }

.thread-platform-tag {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.thread-platform-tag.reddit { background: rgba(255,69,0,0.10); color: #ff7040; }
.thread-platform-tag.hackernews { background: rgba(255,102,0,0.10); color: #ff8533; }
.thread-platform-tag.youtube { background: rgba(255,0,0,0.10); color: #ff6666; }
.thread-platform-tag.indiehackers { background: var(--blue-soft); color: var(--blue); }
.thread-platform-tag.stackoverflow { background: rgba(244,128,36,0.10); color: #f4a236; }
.thread-platform-tag.quora { background: rgba(185,43,39,0.10); color: #e05550; }
.thread-platform-tag.github { background: rgba(36,41,47,0.10); color: #57606a; }
.thread-platform-tag.producthunt { background: rgba(218,85,47,0.12); color: #da552f; }
.thread-platform-tag.linkedin { background: rgba(10,102,194,0.12); color: #0a66c2; }
.thread-platform-tag.facebookgroups { background: rgba(24,119,242,0.12); color: #1877f2; }
.thread-platform-tag.devto { background: rgba(15,23,42,0.10); color: #334155; }
.thread-platform-tag.medium { background: rgba(34,197,94,0.12); color: #15803d; }
.thread-platform-tag.discourse { background: rgba(124,58,237,0.10); color: #6d28d9; }
.thread-platform-tag.webdiscussion { background: rgba(14,165,233,0.12); color: #0369a1; }

.thread-info {
  flex: 1;
  min-width: 0;
}

.thread-info a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: block;
  transition: color 0.15s var(--ease);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.thread-info a:hover { color: var(--accent); }

.thread-snippet {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: 2px;
}

.thread-list-mentioned-btn,
.thread-mentioned-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.thread-list-mentioned-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.thread-list-mentioned-btn svg,
.thread-mentioned-btn svg {
  width: 15px;
  height: 15px;
}

.thread-mentioned-btn {
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.thread-list-mentioned-btn:hover,
.thread-mentioned-btn:hover {
  border-color: rgba(34,197,94,0.34);
  color: var(--green-text);
  transform: translateY(-1px);
}

.thread-list-mentioned-btn.mentioned,
.thread-mentioned-btn.mentioned {
  background: rgba(34,197,94,0.13);
  border-color: rgba(34,197,94,0.36);
  color: var(--green-text);
}

.no-reddit-threads,
.no-platform-threads {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
}

/* ===== REPLY SECTION ===== */
.card-reply { position: relative; }

.reply-text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid transparent;
}

.reply-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.reply-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.copy-btn,
.reply-on-platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.reply-on-platform-btn {
  color: var(--accent);
  border-color: rgba(255,107,53,0.22);
  background: var(--accent-soft);
}

.copy-btn svg,
.reply-on-platform-btn svg { width: 13px; height: 13px; }

.copy-btn:hover,
.reply-on-platform-btn:hover {
  color: var(--text);
  border-color: var(--border-active);
  background: var(--surface-hover);
}

.copy-btn.copied {
  color: var(--green-text);
  border-color: rgba(52,211,153,0.2);
}

.generate-reply-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.generate-reply-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.generate-reply-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.generate-reply-btn.disabled-style {
  opacity: 0.6;
  cursor: not-allowed;
}

.generate-reply-btn.disabled-style:hover {
  border-color: var(--border) !important;
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
}

.premium-lock-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-text);
  font-size: 12px;
  font-weight: 600;
}

.premium-lock-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(251,191,36,0.18);
  border: 1px solid rgba(251,191,36,0.28);
}

.premium-lock-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ===== CARD FOOTER ===== */
.card-footer {
  display: flex;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.signal-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
}

.signal-dot.on-green { background: var(--green); box-shadow: 0 0 6px rgba(52,211,153,0.35); }
.signal-dot.on-amber { background: var(--amber); box-shadow: 0 0 6px rgba(251,191,36,0.35); }
.signal-dot.off { background: var(--text-muted); opacity: 0.35; }

.results-preview-note {
  margin-top: 8px;
  color: var(--amber-text);
  font-size: 13px;
  line-height: 1.5;
}

.results-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-active);
  background: var(--surface);
  color: var(--text-secondary);
  text-align: center;
}

/* ===== RECENT SECTION ===== */
.recent-section { margin-top: 48px; }

.recent-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.recent-item {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
  display: grid;
  gap: 3px;
  color: var(--text);
  font: inherit;
}

.recent-item:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.recent-item strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== NAVIGATION ===== */
.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.topbar-links::-webkit-scrollbar { display: none; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s var(--ease);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== BLOG VIEW ===== */
.blog-hero, .faq-hero, .pricing-hero {
  text-align: center;
  padding: 48px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-hero h1, .faq-hero h1, .pricing-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0;
  max-width: 600px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.blog-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.blog-img-placeholder,
.blog-img {
  height: 160px;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.blog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.blog-meta span {
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.blog-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.read-more-btn {
  appearance: none;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s var(--ease);
  text-align: left;
}

.read-more-btn:hover {
  color: var(--text);
}

/* ===== BLOG DETAIL ===== */
.blog-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0;
}

.back-to-blog-btn, .back-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-to-blog-btn:hover, .back-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.back-btn svg {
  width: 14px;
  height: 14px;
}

.blog-post-detail h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}

.category-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.post-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content p {
  margin-bottom: 24px;
}

.post-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 12px;
}

/* ===== FAQ ACCORDION ===== */
.faq-container {
  max-width: 720px;
  margin: 24px auto 0;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s var(--ease);
}

.faq-item.active {
  border-color: var(--border-active);
}

.faq-trigger {
  width: 100%;
  appearance: none;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s var(--ease), padding 0.25s var(--ease);
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: 20px;
}

/* ===== PRICING VIEWS ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 32px auto 0;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pricing-card:hover {
  border-color: var(--border-active);
}

.pricing-card.premium {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.08);
  transform: scale(1.02);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.pricing-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.pricing-header .price {
  font-size: 42px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: baseline;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.pricing-header .price span:first-child {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 4px;
}

.pricing-header .price span:last-child {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.pricing-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 32px;
  flex: 1;
}

.pricing-features li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.pricing-features li strong {
  color: var(--text);
}

.pricing-btn {
  appearance: none;
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  text-align: center;
  border: 1px solid transparent;
}

.pricing-btn.primary {
  background: var(--accent);
  color: white;
}

.pricing-btn.primary:hover {
  background: #ff7c4d;
}

.pricing-btn.secondary {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.pricing-btn.secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-active);
}

.pricing-btn:disabled {
  background: rgba(255,255,255,0.05);
  border-color: transparent;
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ===== ANIMATIONS ===== */
.card { animation: cardIn 0.3s ease both; }
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }
.card:nth-child(7) { animation-delay: 0.3s; }
.card:nth-child(8) { animation-delay: 0.35s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page {
    width: 100%;
    padding: 0 12px 64px;
  }

  .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: auto;
    gap: 10px 12px;
    padding: 12px 0;
  }

  .logo {
    flex: 0 1 auto;
    min-width: 0;
  }

  .logo span {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-right {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .nav-google-signin-btn {
    max-width: 180px;
    overflow: hidden;
  }

  .logged-in-profile {
    min-width: 0;
  }

  .topbar-links {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    border-top: 1px solid var(--border);
    padding: 10px 2px 2px;
    margin-top: 8px;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .topbar-links::-webkit-scrollbar {
    display: none;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .pricing-card.premium {
    transform: none;
  }
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px;
  }
  .platform-filters-wrap {
    width: 100%;
  }
  .platform-filter-select {
    flex: 1;
    width: 100%;
    min-width: 0;
  }
  .sort-label {
    text-align: center;
    width: 100%;
  }

  .dashboard-left {
    position: static;
    top: auto;
  }

  .dashboard-right {
    padding: 20px;
  }

  .dashboard-top-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    margin: -2px -4px 20px;
    padding: 2px 4px 12px;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .dashboard-top-nav::-webkit-scrollbar {
    display: none;
  }

  .dash-top-nav-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .page {
    width: 100%;
    padding-inline: 10px;
  }

  .hero {
    padding: 28px 6px 28px;
    overflow: visible;
  }

  .hero-badge {
    max-width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.35;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 48px);
    letter-spacing: -0.035em;
  }

  .hero-sub {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .platforms-row { gap: 6px; }

  .search-bar {
    flex-direction: column;
    padding: 8px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
  }

  .search-icon { display: none; }

  .search-bar input {
    width: 100%;
    padding: 14px 16px;
    text-align: center;
  }

  .search-bar button {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }

  .scan-settings-panel {
    padding: 12px;
    margin-top: 12px;
  }

  .scan-settings-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-settings-grid {
    grid-template-columns: 1fr;
  }

  .scan-overlay {
    max-width: 100%;
  }

  .scan-card {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
  }

  .scan-radar {
    align-self: center;
    width: 58px;
    height: 58px;
    margin-top: 0;
  }

  .radar-ring.r1,
  .radar-ring.r2,
  .radar-ring.r3 {
    width: 58px;
    height: 58px;
  }

  .scan-title,
  .scan-message {
    text-align: center;
  }

  .scan-step {
    align-items: flex-start;
    gap: 8px;
  }

  .step-label {
    min-width: 0;
    line-height: 1.35;
  }

  .step-status {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .scan-platforms-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding-bottom: 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scan-platforms-row::-webkit-scrollbar {
    display: none;
  }

  .scan-platform-pill {
    flex: 0 0 auto;
  }

  .card-header { padding: 18px 16px 14px; }
  .card-section { padding: 14px 16px; }
  .card-footer { padding: 10px 16px; }
  .results-header { padding: 18px; }
  .results-stats { flex-direction: column; gap: 8px; }
  .recent-list { grid-template-columns: 1fr 1fr; }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .header-main {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .header-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    width: 100%;
  }

  .kpi-card {
    min-width: 0;
    padding: 8px 10px;
  }

  .auth-card {
    padding: 32px 20px;
  }

  .copy-btn {
    position: static;
    margin-top: 10px;
  }

  .topbar-right { gap: 8px; }
  .nav-google-signin-btn { max-width: 150px; }
  .plan-badge { display: none; }

  .results-area {
    margin-top: 0;
  }

  .dashboard-container {
    gap: 14px;
  }

  .site-profile-card,
  .dashboard-right {
    border-radius: var(--radius-md);
  }

  .site-profile-card {
    padding: 18px;
  }

  .dashboard-right {
    padding: 16px;
    min-height: 0;
  }

  .dashboard-top-nav {
    margin-inline: -2px;
    padding-inline: 2px;
  }

  .dash-top-nav-btn {
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .filter-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ===== PLAYBOOKS VIEW ===== */
.playbooks-hero {
  text-align: center;
  padding: 48px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.playbooks-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0;
  max-width: 600px;
}

.playbooks-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.playbook-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.playbook-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.playbook-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.playbooks-container {
  max-width: 1300px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

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

.playbook-section h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.playbook-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 24px;
}

.playbook-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 190px;
}

.playbook-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.playbook-card h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.playbook-card p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.playbook-card a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.playbook-card a:hover {
  text-decoration: underline;
}

.playbook-table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.playbook-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.playbook-table th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.playbook-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.5;
}

.playbook-table tr:last-child td {
  border-bottom: none;
}

.playbook-table td strong {
  color: var(--text);
}

.playbook-table td a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.playbook-table td a:hover {
  text-decoration: underline;
}

.playbook-tip {
  background: rgba(52, 211, 153, 0.04);
  border: 1px dashed rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--green-text);
  line-height: 1.6;
}

.playbook-tip strong {
  color: var(--green);
}

.playbook-warning {
  background: rgba(251, 191, 36, 0.04);
  border: 1px dashed rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--amber-text);
  line-height: 1.6;
}

.playbook-warning strong {
  color: var(--amber);
}

@media (max-width: 1100px) {
  .playbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .playbooks-hero {
    padding: 34px 16px;
  }

  .playbooks-hero h1 {
    font-size: 30px;
  }

  .playbooks-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 16px 6px;
    margin-left: -16px;
    margin-right: -16px;
  }

  .playbook-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .playbook-grid {
    grid-template-columns: 1fr;
  }

  .playbook-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .playbook-section {
    padding: 18px;
  }
  .playbook-table th, .playbook-table td {
    padding: 10px 12px;
  }
}

/* ===== VALUE PROPOSITION SECTION ===== */
.hero-value-props {
  margin-top: 72px;
  text-align: center;
  padding: 34px 28px 10px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top, rgba(37,99,235,0.11), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.62));
  border: 1px solid rgba(37, 99, 235, 0.10);
  box-shadow: var(--shadow-sm);
}

.value-heading {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 850;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.value-heading::after {
  content: "Why founders use it instead of guessing where to promote";
  display: block;
  max-width: 620px;
  margin: 10px auto 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--text-secondary);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
  align-items: stretch;
}

.value-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 30px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.72)),
    var(--surface);
  border: 1px solid rgba(37, 99, 235, 0.10);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 18px 38px -18px rgba(37, 99, 235, 0.28);
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(14,165,233,0.08));
  color: var(--accent-strong);
  border: 1px solid rgba(37,99,235,0.16);
  margin-bottom: 22px;
}

.value-icon svg {
  width: 22px;
  height: 22px;
}

.value-card h3 {
  font-size: 19px;
  font-weight: 760;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.value-card p {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .hero-value-props {
    margin-top: 56px;
    padding: 26px 18px 4px;
    border-radius: 24px;
  }

  .value-heading::after {
    font-size: 14px;
  }

  .value-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== SITE FOOTER ===== */
.site-footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  width: 100%;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.auth-terms a {
  color: var(--text-secondary);
  text-decoration: underline;
  transition: color 0.2s var(--ease);
}

.auth-terms a:hover {
  color: var(--accent);
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  width: min(1200px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 0 0 80px;
}

.legal-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.legal-content h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-content p, .legal-content li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
}

.legal-content a:hover {
  border-bottom-style: solid;
}

.last-updated {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

/* ===== MERGED LOGIN & APP STYLES ===== */
.hero-auth-prompt {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.4s ease;
}

.hero-auth-prompt p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  max-width: 500px;
  text-align: center;
  margin: 0;
}

.hero-google-btn {
  display: inline-flex;
  justify-content: center;
  background: transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.nav-google-signin-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ===== SIMPLIFIED READABLE CARD STYLES ===== */
.thread-quote {
  position: relative;
  margin: 16px 0;
  padding: 14px 18px 14px 26px;
  background: rgba(37, 99, 235, 0.045);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quote-icon {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 28px;
  font-family: Georgia, serif;
  color: rgba(37, 99, 235, 0.25);
  line-height: 1;
}

.thread-snippet-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
}

.card-relevance-block {
  margin: 16px 0;
  padding: 12px 14px;
  background: rgba(14, 165, 233, 0.045);
  border: 1px dashed rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-md);
}

.relevance-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}

.relevance-label svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.relevance-label strong {
  color: var(--text);
  font-weight: 600;
}

.thread-summary-reason {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.thread-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.thread-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s var(--ease);
}

.thread-open-link svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s var(--ease);
}

.thread-open-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.thread-open-link:hover svg {
  transform: translate(1px, -1px);
}

.card .thread-open-link {
  align-self: flex-start;
  margin-top: 0;
  margin-bottom: 0;
}

.thread-action-row .thread-open-link {
  margin-top: 0;
  margin-bottom: 0;
}

/* ===== CONTENT ANALYSIS BOX ===== */
.analysis-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
.analysis-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.analysis-label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.analysis-content-view {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.inline-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.inline-btn:hover {
  background: var(--accent-soft);
}
.save-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.save-btn:hover {
  opacity: 0.9;
}
.cancel-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.cancel-btn:hover {
  background: var(--surface-hover);
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: min(500px, 90%);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s var(--ease);
}
.modal-overlay:not(.hidden) .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: color 0.2s;
}
.close-btn:hover {
  color: var(--text);
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* KPI Hint */
.kpi-action-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.kpi-card:hover .kpi-action-hint {
  background: var(--accent);
  color: #fff;
}
.kpi-card {
  position: relative;
  transition: all 0.2s var(--ease);
}

/* ===== INTERMEDIATE AUTH VIEW ===== */
.auth-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.auth-box-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.auth-logo {
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}
.auth-logo svg {
  width: 60px;
  height: 60px;
}

.auth-box-container h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.google-login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.intermediate-google-btn {
  min-height: 40px;
}

.auth-secure-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== PROFILE VIEW ===== */
.profile-hero {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.profile-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(10px);
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 3px solid var(--accent);
  overflow: hidden;
  background: var(--bg-elevated);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-user-info {
  flex: 1;
}

.profile-user-info h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: var(--text);
}

.profile-user-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
}

.profile-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-upgrade-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  transition: background 0.2s, color 0.2s;
}

.profile-upgrade-link:hover {
  background: var(--accent);
  color: #fff;
}

.scans-section {
  max-width: 800px;
  margin: 0 auto 60px;
}

.scans-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.scans-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.scans-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scans-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

.scan-row-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.scan-row-item:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.scan-row-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.scan-row-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.scan-row-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.scan-row-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.scan-row-btn:hover {
  opacity: 0.9;
}

/* ===== HOW IT WORKS VIEW STYLES ===== */
.how-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 40px 0 20px;
}

.flow-schema {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: var(--radius-xl);
  margin: 20px auto 60px;
  max-width: 1000px;
  overflow-x: auto;
}

.flow-node {
  flex: 1;
  text-align: center;
  min-width: 150px;
}

.flow-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 12px;
  transition: all 0.25s var(--ease);
}

.flow-node:hover .flow-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.flow-node h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.flow-node p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.flow-connector {
  font-size: 24px;
  color: var(--text-muted);
  user-select: none;
}

.auth-how-works {
  border-top: 1px solid var(--border);
  padding: 40px clamp(12px, 3vw, 24px) 0;
  margin: 40px auto 80px;
  max-width: 1120px;
}

.auth-flow-schema {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  max-width: 100%;
  margin: 30px auto;
  overflow: visible;
  padding: 22px;
}

.auth-flow-schema .flow-node {
  min-width: 0;
  padding: 2px;
}

.auth-flow-schema .flow-connector {
  display: none;
}

.auth-flow-schema .flow-node h4 {
  font-size: 13px;
}

.auth-flow-schema .flow-node p {
  font-size: 11px;
}

@media (max-width: 980px) {
  .auth-flow-schema {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .auth-how-works {
    padding-inline: 0;
  }

  .auth-flow-schema {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 14px;
  }

  .auth-flow-schema .flow-node {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 12px;
    text-align: left;
    align-items: center;
  }

  .auth-flow-schema .flow-icon {
    width: 48px;
    height: 48px;
    margin: 0;
    grid-row: span 2;
  }
}

.how-steps-container {
  max-width: 900px;
  margin: 0 auto 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 50px;
}

.how-step:nth-child(even) {
  flex-direction: row-reverse;
}

.how-step-image {
  flex: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease);
}

.how-step-image:hover {
  transform: scale(1.02);
}

.how-step-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.how-step-content {
  flex: 1.2;
}

.step-number-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  padding: 2px 8px;
  background: var(--accent-soft);
  border-radius: var(--radius-xs);
}

.how-step-content h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}

.how-step-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .how-step, .how-step:nth-child(even) {
    flex-direction: column;
    gap: 20px;
  }
  .flow-schema {
    flex-direction: column;
    padding: 20px;
    gap: 24px;
    overflow-x: visible;
  }
  .flow-connector {
    transform: rotate(90deg);
    margin: 4px auto;
    font-size: 28px;
  }
}

/* ===== TARGET QUESTION BOX ===== */
.target-question-box {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 10.5px 14px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  margin-bottom: 14px;
  text-align: left;
}
.target-question-label {
  display: block;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.target-question-text {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
}

/* ===== DOUBLE-PANE DASHBOARD ===== */
.dashboard-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 20px;
  text-align: left;
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dashboard-left {
    position: static;
    top: auto;
  }
}

.dashboard-left {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.site-profile-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.site-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-chips .analysis-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.site-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  width: 100%;
}

.dash-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.dash-nav-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-icon {
  font-size: 24px;
}

.nav-btn-text {
  display: flex;
  flex-direction: column;
}

.nav-btn-text strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}

.nav-btn-text span {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dashboard-right {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  min-height: 500px;
  box-shadow: var(--shadow-sm);
}

.tab-pane-content {
  animation: fadeIn 0.3s var(--ease);
}

.tab-pane-content.hidden {
  display: none !important;
}

/* ===== MARKET ANALYSIS TAB ===== */
.market-analysis-view {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.market-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.market-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

.market-hero h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.market-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .market-grid {
    grid-template-columns: 1fr;
  }
}

.market-metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-metric-card.accent {
  border-left: 4px solid var(--accent);
}

.market-metric-card.success {
  border-left: 4px solid var(--green);
}

.metric-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.metric-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
}

.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.market-section h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.market-sec-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.market-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-keyword-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.competitor-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .competitor-list {
    grid-template-columns: 1fr;
  }
}

.competitor-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.comp-icon {
  font-size: 20px;
}

.comp-info {
  display: flex;
  flex-direction: column;
}

.comp-info strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}

.comp-info span {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.strategy-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.strategy-step {
  display: flex;
  gap: 20px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.step-details h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.step-details p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== TARGET QUESTIONS TAB ===== */
.questions-tab-view {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.questions-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.questions-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

.questions-hero h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.questions-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.questions-list-detailed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== PROSPECTS TAB ===== */
.prospects-tab-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.prospects-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.prospects-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--green-text);
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

.prospects-hero h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.prospects-sub,
.prospects-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.prospects-loading-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.prospects-empty {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.prospects-empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.prospects-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prospect-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prospect-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.prospect-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0 0;
}

.prospect-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 800;
}

.prospect-confidence {
  flex-shrink: 0;
  background: var(--green-soft);
  color: var(--green-text);
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: var(--radius-xs);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.prospect-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prospect-field {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 0;
}

.prospect-field span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.prospect-field a,
.prospect-field strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.prospect-field a:hover {
  color: var(--accent);
}

.prospect-evidence,
.prospect-angle {
  border-left: 3px solid var(--border-active);
  padding-left: 14px;
}

.prospect-evidence strong,
.prospect-angle strong {
  display: block;
  font-size: 12px;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 5px;
}

.prospect-evidence p,
.prospect-angle p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}

.prospect-emails,
.prospect-draft-recipients {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.prospect-emails strong,
.prospect-draft-recipients strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prospect-email-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prospect-email-list a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.prospect-email-list a:hover {
  text-decoration: underline;
}

.prospect-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.primary-action-btn,
.secondary-action-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.primary-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), #5b9cff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.primary-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.secondary-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.secondary-action-btn:hover {
  border-color: var(--border-active);
  background: var(--surface-hover);
}

.secondary-action-btn.hidden,
.prospect-draft.hidden {
  display: none;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 14px;
  height: 14px;
  animation: spin 0.75s linear infinite;
}

.prospect-draft {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.prospect-draft-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prospect-draft-head strong {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prospect-draft-head span {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.prospect-draft-body {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prospects-upgrade-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.20);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(22, 163, 74, 0.06));
}

.prospects-upgrade-cta strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.prospects-upgrade-cta p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
}

.prospects-upgrade-cta .upgrade-link-btn {
  align-self: flex-start;
}

@media (max-width: 760px) {
  .prospect-contact-grid {
    grid-template-columns: 1fr;
  }

  .prospect-head {
    flex-direction: column;
  }

  .prospect-actions {
    width: 100%;
  }

  .primary-action-btn,
  .secondary-action-btn {
    width: 100%;
  }
}

/* ===== ROADMAP TAB ===== */
.roadmap-tab-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.roadmap-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.roadmap-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--amber-text);
  background: var(--amber-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

.roadmap-hero h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.roadmap-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.roadmap-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roadmap-metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.roadmap-metric span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 5px;
  flex-shrink: 0;
}

.roadmap-metric strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.roadmap-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.roadmap-phase {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
}

.roadmap-phase-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.roadmap-phase-marker::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: -18px;
  width: 1px;
  background: var(--border);
}

.roadmap-phase:last-child .roadmap-phase-marker::after {
  display: none;
}

.roadmap-phase-marker span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  z-index: 1;
}

.roadmap-phase-body {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.roadmap-phase-head span {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.roadmap-phase-head h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}

.roadmap-phase-head p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}

.roadmap-columns {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.roadmap-columns strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.roadmap-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.roadmap-columns li + li {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .roadmap-metrics,
  .roadmap-columns {
    grid-template-columns: 1fr;
  }

  .roadmap-phase {
    grid-template-columns: 1fr;
  }

  .roadmap-phase-marker {
    justify-content: flex-start;
  }

  .roadmap-phase-marker::after {
    display: none;
  }
}

.q-detail-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.q-detail-card.clickable {
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.q-detail-card.clickable:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.q-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.q-open-scanner-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.q-edit-search-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.q-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.q-index-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  margin-top: 2px;
}

.q-detail-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.q-why-fits {
  background: rgba(255, 255, 255, 0.015);
  border-left: 2px solid var(--border-active);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
}

.q-why-fits strong {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.q-why-fits p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.q-visibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .q-visibility-grid {
    grid-template-columns: 1fr;
  }
}

.q-vis-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-vis-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.q-vis-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  flex-wrap: wrap;
}

.q-thread-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.20);
  color: var(--green-text);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.q-vis-status.yes .status-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.q-vis-status.no .status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.q-vis-status.yes strong {
  color: var(--green-text);
}

.q-vis-status.no strong {
  color: #fca5a5;
}

.vis-link {
  font-size: 11px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.vis-link:hover {
  text-decoration: underline;
}

.q-ai-response-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-md);
}

.q-ai-response-box strong {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.ai-response-quote {
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ===== CUSTOMER PERSONAS ===== */
.personas-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .personas-list {
    grid-template-columns: 1fr;
  }
}

.persona-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.persona-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.persona-icon {
  font-size: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.persona-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.persona-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.persona-body p {
  margin: 0;
}

.persona-fit-line {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  color: var(--green-text);
}

.find-more-prospects-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.find-more-prospects-btn {
  appearance: none;
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: var(--radius-sm);
  background: rgba(34,197,94,0.12);
  color: var(--green-text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.find-more-prospects-btn:hover:not(:disabled) {
  border-color: rgba(34,197,94,0.42);
  background: rgba(34,197,94,0.18);
}

.find-more-prospects-btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.prospect-quota-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.locked-prospect-placeholder {
  min-height: 230px;
}

/* ===== TOP TAB BAR ===== */
.mobile-dashboard-nav {
  display: none;
}

.mobile-dashboard-menu-btn,
.mobile-dashboard-menu-item {
  font: inherit;
}

.dashboard-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.dash-top-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.dash-top-nav-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-active);
  color: var(--text);
}

.dash-top-nav-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-scan-context-tab {
  display: none;
}

@media (max-width: 1024px) {
  .dashboard-left .dashboard-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .results-area {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-width: 0;
    margin-top: 12px;
  }

  .dashboard-left,
  .dashboard-right {
    width: 100%;
    min-width: 0;
  }

  .dashboard-left {
    order: 2;
    gap: 12px;
    display: none;
  }

  .results-area.mobile-context-open .dashboard-left {
    display: flex;
  }

  .results-area.mobile-context-open .dashboard-right {
    display: none;
  }

  .results-area.mobile-context-open .dashboard-left .site-profile-card > *:not(#scan-settings-panel) {
    display: none;
  }

  .results-area.mobile-context-open .dashboard-left .scan-settings-panel {
    display: block;
    margin: 0;
  }

  .dashboard-right {
    order: 1;
  }

  .dashboard-left .dashboard-nav {
    display: none !important;
  }

  .dashboard-left .scan-settings-panel {
    display: none;
  }

  .mobile-scan-context-tab {
    display: flex;
  }

  .site-profile-card {
    padding: 16px;
    gap: 12px;
  }

  .analysis-box,
  .scan-settings-panel {
    max-height: none;
    overflow: visible;
  }

  .dashboard-right {
    padding: 14px;
    overflow: visible;
  }

  .dashboard-top-nav {
    position: static;
    z-index: 5;
    display: flex;
    flex-wrap: nowrap;
    width: calc(100% + 28px);
    margin: -14px -14px 16px;
    padding: 10px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .dashboard-top-nav::-webkit-scrollbar {
    display: none;
  }

  .dash-top-nav-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .site-profile-card h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .site-desc {
    font-size: 13px;
    line-height: 1.5;
  }

  .dashboard-right {
    padding: 12px;
  }

  .dashboard-top-nav {
    width: calc(100% + 24px);
    margin: -12px -12px 14px;
    padding: 9px 12px;
  }

  .dash-top-nav-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* ===== SHOW MORE THREADS BUTTON ===== */
.show-more-container {
  display: flex;
  justify-content: center;
  margin: 32px 0 20px 0;
  width: 100%;
}

.show-more-btn {
  appearance: none;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-card, #ffffff);
  color: var(--text-main, #0f172a);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.show-more-btn:hover {
  background: var(--bg-hover, #f8fafc);
  border-color: var(--border-hover, #cbd5e1);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.show-more-btn.upgrade-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  color: #ffffff;
}

.show-more-btn.upgrade-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.2);
}

/* ===== MOBILE SCAN NAVIGATION & READABILITY ===== */
@media (max-width: 768px) {
  .mobile-dashboard-nav {
    position: sticky;
    top: 8px;
    z-index: 60;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 8px 0 12px;
    pointer-events: none;
  }

  .mobile-dashboard-menu-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: min(230px, calc(100vw - 28px));
    min-height: 48px;
    padding: 8px 12px 8px 14px;
    border: 1px solid var(--border-active);
    border-radius: 14px;
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    text-align: left;
    cursor: pointer;
  }

  .mobile-dashboard-menu-btn > span {
    display: grid;
    gap: 1px;
  }

  .mobile-dashboard-menu-btn small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .mobile-dashboard-menu-btn strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .mobile-dashboard-menu-btn svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: var(--accent);
  }

  .mobile-dashboard-menu {
    pointer-events: auto;
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: min(310px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
  }

  .mobile-dashboard-menu-item {
    appearance: none;
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
  }

  .mobile-dashboard-menu-item span {
    font-size: 18px;
    text-align: center;
  }

  .mobile-dashboard-menu-item strong {
    font-size: 14px;
    line-height: 1.3;
  }

  .mobile-dashboard-menu-item.active {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .mobile-dashboard-menu-divider {
    height: 1px;
    margin: 6px 8px;
    background: var(--border);
  }

  .dashboard-top-nav {
    display: none !important;
  }

  .dashboard-right {
    padding: 14px;
    border-radius: 14px;
  }

  .filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex: 0 0 auto;
    min-height: 42px;
  }

  .thread-item {
    gap: 9px;
    padding: 14px 11px;
  }

  .thread-info a {
    font-size: 15px;
    line-height: 1.5;
  }

  .thread-snippet {
    margin-top: 5px;
    font-size: 13.5px;
    line-height: 1.55;
  }

  .thread-list-mentioned-btn {
    width: 36px;
    height: 36px;
  }

  .prospect-card,
  .q-detail-card {
    padding: 16px;
    border-radius: 14px;
  }

  .prospect-contact-grid,
  .q-visibility-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .mobile-dashboard-menu-btn {
    min-width: min(210px, calc(100vw - 24px));
  }

  .end-load-more-btn {
    width: 100%;
    justify-content: center;
  }
}
