:root {
  --font: 'Montserrat', sans-serif;
  /* Brand */
  --teal: #16ADAF;
  --teal-light: #EBF8F8;
  --teal-d: #0F6E56;
  --teal-mid: #9FE0E1;
  --sand: #A69E83;
  /* Backgrounds */
  --sidebar-bg: #0D2B3E;
  --page-bg: #FAFBFC;
  --white: #ffffff;
  /* Text — contrast raised to meet WCAG AA on white (text-3/muted were #9CA3AF,
     ~2.6:1, which fails; #6B7280 is ~4.8:1 and passes for body text). */
  --text: #1d1d1b;
  --text-2: #1d1d1b;
  --text-3: #1d1d1b;
  /* UI */
  --border: #EDEEF0;
  --muted: #1d1d1b;
  /* Status */
  --success: #2FBF71;
  --success-bg: #EAFAF2;
  --warning: #E8C547;
  --warning-bg: #FEF9E7;
  --danger: #E87070;
  --danger-bg: #FEF0F0;
  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  /* Legacy aliases — keep JS working */
  --primary: #16ADAF;
  --bg: #FAFBFC;
  --bg-grey: #F3F4F6;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --radius: 8px;
  /* Layout */
  --sidebar-w: 224px;
  --nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--page-bg); color: var(--text); font-size: 14px; line-height: 1.55; }
.hidden { display: none !important; }
a { color: var(--teal); text-decoration: none; }
svg:not([width]):not([height]) {
  width: 1em;
  height: 1em;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: #fff; display: flex; align-items: center;
  padding: 0 28px; gap: 20px; z-index: 100;
  border-bottom: 1px solid #E5E7EB;
}
.nav-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 26px; width: auto; display: block; }
.nav-divider { width: 1px; height: 18px; background: #E5E7EB; flex-shrink: 0; }
.nav-app { color: #1d1d1b; font-size: 12px; font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-link {
  color: #1d1d1b; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: color 0.15s;
}
.nav-link:hover { color: #1d1d1b; }
.nav-credits {
  display: flex; align-items: center; gap: 6px;
  background: #F3F4F6; border: 1px solid #E5E7EB;
  border-radius: 20px; padding: 5px 14px;
}
.nav-credits-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }
.nav-credits-text { font-size: 11px; font-weight: 600; color: #1d1d1b; }
.nav-credits-text strong { color: var(--teal); }
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
/* Legacy nav-auth — used by renderNavAuth() */
.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-auth button {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--teal); color: var(--teal);
  background: transparent; transition: all 0.2s;
}
.nav-auth button:hover { background: var(--teal); color: #fff; }
.nav-auth button.primary { background: var(--teal); color: #fff; }

/* ── LANDING ── */
.landing { padding-top: var(--nav-h); background: var(--white); }

/* ── APP LAYOUT ── */
.app { display: flex; padding-top: var(--nav-h); min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); position: fixed; top: var(--nav-h);
  left: 0; bottom: 0; background: linear-gradient(180deg, #0D2B3E 0%, #0A2333 100%);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-section { padding: 20px 12px 6px; }
.sidebar-label {
  font-size: 12px; font-weight: 700; color: #8CA6B6;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 0 10px; margin-bottom: 8px;
}
/* Support both .s-btn (new) and .side-btn (legacy JS selectors) */
.s-btn, .side-btn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm);
  cursor: pointer; color: #C4D2DB; font-size: 14px; font-weight: 600;
  transition: all 0.15s; border: none; background: none;
  text-align: left; font-family: var(--font);
}
.s-btn:hover, .side-btn:hover { background: rgba(255,255,255,0.05); color: #E5EDF2; }
.s-btn.active, .side-btn.active { background: #123D54; color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.s-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.s-btn .badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px;
}
.s-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 12px; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom { padding: 14px 12px 16px; }
.plan-card { background: linear-gradient(135deg, #12455F, #0F3A50); border: 1px solid rgba(22,173,175,0.25); border-radius: var(--r-md); padding: 14px; }
.plan-name { font-size: 11px; font-weight: 700; color: #7E9BAD; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 6px; }
.plan-credits { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 2px; }
.plan-credits span { font-size: 12px; font-weight: 500; color: #7E9BAD; }
.plan-bar { height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; margin: 8px 0; }
.plan-bar-fill { height: 3px; background: var(--teal); border-radius: 2px; }
.plan-upgrade {
  display: block; margin-top: 10px; background: var(--teal); color: #fff;
  text-align: center; font-size: 11px; font-weight: 700; text-decoration: none;
  padding: 8px; border-radius: var(--r-sm); border: none; width: 100%;
  font-family: var(--font); cursor: pointer;
}
/* Support / report-a-bug link under the plan card */
.sidebar-support {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 9px 11px; border-radius: var(--r-sm); text-decoration: none;
  background: rgba(22,173,175,0.10); border: 1px solid rgba(22,173,175,0.28);
  color: #cfeef0; font-size: 12.5px; font-weight: 600; line-height: 1.35;
  transition: background .15s, border-color .15s;
}
.sidebar-support:hover { background: rgba(22,173,175,0.18); border-color: rgba(22,173,175,0.5); }
.sidebar-support svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--teal); }
.sidebar-support strong { color: #fff; font-weight: 700; }

/* Legacy sidebar-plan styles */
.sidebar-plan { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); margin: 0 8px; }
.plan-badge { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.plan-limits { font-size: 13px; color: #1d1d1b; margin-bottom: 8px; }
.plan-upgrade-link { font-size: 13px; color: var(--teal); font-weight: 600; }

/* ── MAIN ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}
.view { display: none; }
.view.active { display: block; }
.main > .view.active { flex: 0 0 auto; }
.main > .app-footer { margin-top: auto; }
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding: 32px 32px 0;
}
.view-title { font-size: 24px; font-weight: 700; }
.view-desc { color: var(--text-2); margin-bottom: 28px; font-size: 13px; padding: 0 32px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-weight: 700; font-size: 12px;
  padding: 8px 16px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-2); transition: all 0.15s;
}
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn.primary, .btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 10px rgba(22,173,175,0.25); }
.btn.primary:hover, .btn-primary:hover { opacity: 0.9; }
.btn svg { width: 14px; height: 14px; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--page-bg); border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 6px 12px; font-size: 11px; }

/* ── SEARCH BAR ── */
.search-bar { background: #0F1013; padding: 20px 32px; border-bottom: 1px solid #1e2025; }
.search-inner { display: flex; gap: 10px; max-width: 800px; }
.search-input {
  flex: 1; padding: 11px 16px; border: 1px solid #2a2d32;
  border-radius: var(--r-sm); font-family: var(--font); font-size: 13px;
  background: #1B1D21; color: #fff; outline: none; transition: border-color 0.2s;
}
.search-input::placeholder { color: #1d1d1b; }
.search-input:focus { border-color: var(--teal); }
.search-btn { padding: 11px 22px; font-size: 13px; white-space: nowrap; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-3); }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; }
.example-searches { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.example-label { font-size: 12px; color: var(--text-3); }
.example-btn {
  font-family: var(--font); font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; color: var(--text-2); transition: all 0.15s;
}
.example-btn:hover { border-color: var(--teal); color: var(--teal); }

/* ── RESULTS ── */
#research-results { padding: 24px 32px; }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.results-topic { font-size: 20px; font-weight: 800; color: var(--text); }

/* ── OPPORTUNITY BANNER ── */
.opp-banner {
  background: linear-gradient(135deg, #f0fafa, #fff);
  border: 1px solid #c7eeee; border-radius: var(--r-lg);
  padding: 24px; display: flex; gap: 32px; align-items: center;
  margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.opp-score-wrap { text-align: center; flex-shrink: 0; }
.opp-score { font-size: 56px; font-weight: 800; color: var(--teal); line-height: 1; }
.opp-score-label {
  font-size: 11px; color: var(--text-3); font-weight: 700;
  letter-spacing: 0.8px; margin-top: 4px; text-transform: uppercase;
}
.opp-verdict { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.opp-factors { display: flex; gap: 8px; flex-wrap: wrap; }
.opp-factor {
  font-size: 11px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; background: var(--white); border: 1px solid var(--border);
}

/* ── RESULT TABS (pill style) ── */
.result-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: #F3F4F6; border-radius: 20px;
  padding: 4px; width: fit-content; max-width: 100%;
}
.tab-btn {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 7px 16px; border: none; background: transparent;
  cursor: pointer; color: var(--text-3); border-radius: 16px;
  transition: all 0.15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { background: var(--white); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── PANELS ── */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  background: var(--white); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title {
  font-size: 11px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px;
}
.panel-desc { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }

/* ── BOOK LIST ── */
.book-list { display: flex; flex-direction: column; gap: 2px; }
.book-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #F9FAFB;
}
.book-row:last-child { border-bottom: none; }
.book-rank { font-size: 11px; font-weight: 700; color: var(--text-3); min-width: 20px; padding-top: 2px; }
.book-thumb { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.book-thumb-ph {
  width: 36px; height: 50px; background: var(--page-bg);
  border-radius: 4px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; flex-shrink: 0;
  border: 1px solid var(--border);
}
.book-info { flex: 1; min-width: 0; }
.book-title { font-size: 12px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.book-author { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.book-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.book-badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.badge-free { background: #dbeafe; color: #2563eb; }
.badge-paid { background: var(--page-bg); color: var(--text-2); }
.badge-new { background: var(--success-bg); color: #1A8C50; }
.book-rating { font-size: 11px; color: var(--text-3); }
.book-bsr { font-size: 11px; color: var(--teal); font-weight: 700; background: var(--teal-light); padding: 2px 7px; border-radius: 10px; }
.book-price { font-size: 11px; font-weight: 700; }
.book-date { font-size: 11px; color: var(--text-3); }

/* ── AI CONTENT ── */
.ai-content { font-size: 13px; line-height: 1.7; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--text-3); padding: 24px 0; }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-section { margin-bottom: 20px; }
.ai-section h4 { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.ai-section ul { padding-left: 18px; }
.ai-section li { margin-bottom: 4px; font-size: 13px; }

/* ── KEYWORDS TABLE ── */
.kw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kw-table th {
  text-align: left; padding: 8px 12px; font-size: 11px;
  font-weight: 700; color: var(--text-3); letter-spacing: 0.8px;
  text-transform: uppercase; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.kw-table td { padding: 11px 12px; border-bottom: 1px solid #F9FAFB; vertical-align: middle; }
.kw-table tr:last-child td { border-bottom: none; }
.kw-table tr:hover td { background: #FAFBFC; }
.opp-bar { height: 5px; background: #F3F4F6; border-radius: 3px; overflow: hidden; min-width: 80px; display: block; }
.opp-bar-fill { height: 5px; background: linear-gradient(90deg, var(--teal), var(--success)); border-radius: 3px; display: block; }

/* ── CATEGORIES ── */
.categories-list { display: flex; flex-direction: column; gap: 10px; }
.category-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  background: var(--white); transition: all 0.2s; cursor: pointer;
}
.category-row:hover { border-color: var(--teal); box-shadow: var(--shadow-md); }
.category-name { flex: 1; font-size: 13px; font-weight: 700; }
.category-meta { font-size: 12px; color: var(--text-3); }

/* ── BOOK CONCEPTS ── */
.concepts-grid { display: flex; flex-direction: column; gap: 12px; }
.concept-card {
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 18px; background: var(--white);
  box-shadow: var(--shadow-sm); transition: all 0.2s; cursor: pointer;
  display: flex; gap: 14px; align-items: flex-start;
}
.concept-card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.concept-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(22,173,175,0.3);
}
.concept-body { flex: 1; min-width: 0; }
.concept-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.concept-angle { font-size: 12px; color: var(--text-2); margin-bottom: 8px; font-style: italic; }
.concept-why { font-size: 12px; line-height: 1.6; color: var(--text-2); margin-bottom: 10px; }
.concept-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.concept-tag {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 10px; background: var(--page-bg);
  border: 1px solid var(--border); color: var(--text-2);
}
.concept-tag.hot { background: var(--teal-light); border-color: var(--teal-mid); color: var(--teal); }
/* Copy as AI prompt button */
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: 11px; font-weight: 700;
  color: #8a6200; background: var(--warning-bg);
  border: 1.5px solid var(--warning); border-radius: 20px;
  cursor: pointer; font-family: var(--font); transition: all 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { background: var(--warning); color: #5a3f00; }
.copy-btn.copied { background: var(--success-bg); color: var(--success); border-color: #9FE1CB; }
.concept-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 0 32px; }
.project-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.2s;
}
.project-card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); }
.project-topic { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.project-meta { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.project-score { font-size: 24px; font-weight: 800; color: var(--teal); }

/* ── LOADING ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(250,251,252,0.92);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; z-index: 300; gap: 16px;
  font-size: 14px; color: var(--text-3);
}
.loading-spinner-lg {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.loading-step { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.loading-step.done { color: var(--success); }
.loading-step.active { color: var(--teal); font-weight: 600; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #0F1013; color: #fff; padding: 12px 20px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  z-index: 400; animation: slideUp 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── CATEGORY INSIGHTS ── */
.category-insights { margin-bottom: 20px; }
.insights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.insight-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.insight-val { font-size: 18px; font-weight: 800; color: var(--teal); line-height: 1.2; }
.insight-label {
  font-size: 10px; color: var(--text-3); font-weight: 700;
  text-transform: uppercase; margin-top: 4px; letter-spacing: 0.5px;
}

/* ── DATE FILTER TABS ── */
.date-filter-tabs { display: flex; gap: 4px; }
.date-filter-btn {
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-3); cursor: pointer; font-weight: 600;
  font-family: var(--font); transition: all 0.15s;
}
.date-filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.date-filter-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── AI SUMMARY BANNER ── */
.ai-summary-banner {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--teal); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .panel-grid { grid-template-columns: 1fr; }
  .result-tabs { overflow-x: auto; }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════
   PHASE 2 — Niche Research redesign
   ════════════════════════════════════════════════════════ */

/* ── Opportunity Hero ── */
.opp-hero2 {
  background: var(--white); border-radius: var(--r-lg);
  padding: 0; margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 0;
}
.opp-hero2-top {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 24px 28px 20px;
}
.opp-stats2 {
  display: flex; border-top: 1px solid var(--border); margin: 0; padding: 0;
}
.opp-ring2 { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.opp-ring2 svg { transform: rotate(-90deg); }
.opp-ring-bg2 { fill: none; stroke: #F3F4F6; stroke-width: 8; }
.opp-ring-fill2 {
  fill: none; stroke: url(#tealGrad2); stroke-width: 8;
  stroke-linecap: round; stroke-dasharray: 283;
  transition: stroke-dashoffset 0.6s ease;
}
.opp-ring-center2 {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.opp-num2 { font-size: 28px; font-weight: 800; color: var(--teal); line-height: 1; }
.opp-denom2 { font-size: 11px; font-weight: 600; color: var(--text-3); }
.opp-verdict2 {
  font-size: 11px; font-weight: 700; color: var(--teal);
  background: var(--teal-light); padding: 4px 12px;
  border-radius: 20px; margin-top: 8px; display: inline-block;
}
.opp-body2 { min-width: 0; }
.opp-kw2 {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.opp-title2 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.opp-desc2 { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }
.opp-pills2 { display: flex; gap: 8px; flex-wrap: wrap; }
.pill2 {
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border-radius: 20px; display: flex; align-items: center; gap: 5px;
}
.pill2 svg { width: 12px; height: 12px; flex-shrink: 0; }
.pill-green2 { background: var(--success-bg); color: #1A8C50; }
.pill-amber2 { background: var(--warning-bg); color: #9B7C0A; }
.pill-blue2 { background: #EBF2FD; color: #1D5FA8; }

.opp-stat2 { background: var(--page-bg); border-radius: var(--r-md); padding: 12px 14px; }
.opp-stat-val2 { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 3px; }
.opp-stat-label2 {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
}

/* ── AI Summary Banner ── */
.ai-sum {
  background: var(--teal-light); border-left: 3px solid var(--teal);
  border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.ai-sum-icon {
  width: 30px; height: 30px; background: var(--teal);
  border-radius: var(--r-sm); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.ai-sum-icon svg { color: #fff; width: 15px; height: 15px; }
.ai-sum-label {
  font-size: 11px; font-weight: 700; color: var(--teal);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.ai-sum-text { font-size: 12px; color: #2D6E6F; line-height: 1.65; }

/* ── Pill Tab Bar (Niche Research) ── */
.tab-bar2 {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.tab2 {
  padding: 7px 16px; font-size: 12px; font-weight: 600;
  color: var(--text-2); cursor: pointer; border-radius: 20px;
  transition: all 0.15s; border: 1px solid var(--border);
  background: var(--white); box-shadow: var(--shadow-sm);
  font-family: var(--font);
}
.tab2:hover { border-color: var(--teal); color: var(--teal); }
.tab2.active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 10px rgba(22,173,175,0.25); }
.tab2-spacer { flex: 1; }
.tab2-generate {
  background: var(--text); color: #fff; border: none;
  border-radius: 20px; padding: 7px 16px; font-size: 12px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: var(--font); transition: opacity 0.15s;
}
.tab2-generate:hover { opacity: 0.85; }
.tab2-generate svg { width: 13px; height: 13px; color: var(--teal); }

/* ── Two-col panel ── */
.two-col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel2 {
  background: var(--white); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.panel2-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel2-title {
  font-size: 11px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.8px;
  display: flex; align-items: center; gap: 7px;
}
.panel2-title svg { color: var(--teal); width: 15px; height: 15px; flex-shrink: 0; }
.panel2-count { font-size: 11px; color: var(--text-3); }
.panel2-action { font-size: 11px; color: var(--teal); font-weight: 700; cursor: pointer; }

/* ── Book items (new card style) ── */
.book-item2 {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid #F9FAFB; align-items: flex-start;
  cursor: pointer; transition: all 0.15s; border-radius: var(--r-sm);
}
.book-item2:hover { background: #FAFBFC; padding-left: 6px; }
.book-item2:last-child { border-bottom: none; }
.book-rank2b { font-size: 11px; font-weight: 700; color: #D1D5DB; width: 16px; flex-shrink: 0; padding-top: 4px; }
.book-cover2b {
  width: 44px; height: 62px; border-radius: 4px; flex-shrink: 0;
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.book-cover2b img { width: 100%; height: 100%; object-fit: cover; }
.book-body2b { flex: 1; min-width: 0; }
.book-title2b { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; line-height: 1.4; }
.book-author2b { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.book-row2b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bsr2b { background: var(--teal-light); color: var(--teal); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.rating2b { font-size: 11px; font-weight: 700; color: #D4A017; white-space: nowrap; }
.reviews2b { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.price2b { font-size: 11px; font-weight: 700; color: var(--teal); margin-left: auto; white-space: nowrap; }
.sales2b { font-size: 11px; font-weight: 700; color: var(--success); white-space: nowrap; }
.revenue2b { font-size: 11px; font-weight: 700; color: #7C3AED; white-space: nowrap; }
.cat2b { font-size: 10px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }
.asin-link2b {
  color: var(--teal); font-size: 11px; font-weight: 600; flex-shrink: 0;
  display: flex; align-items: center; gap: 3px; padding-top: 4px;
  text-decoration: none; white-space: nowrap;
}
.asin-link2b:hover { opacity: 0.75; }
.asin-link2b svg { width: 10px; height: 10px; }

/* ── Reader Analysis cards ── */
.reader-grid2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.reader-card2 { border-radius: var(--r-md); padding: 12px 14px; }
.reader-card2.loves   { border-top: 3px solid var(--success); background: var(--white); box-shadow: var(--shadow-sm); }
.reader-card2.dislikes { border-top: 3px solid var(--danger);  background: var(--white); box-shadow: var(--shadow-sm); }
.reader-card2.gaps    { border-top: 3px solid var(--warning); background: var(--white); box-shadow: var(--shadow-sm); }
.reader-title2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.reader-card2.loves    .reader-title2 { color: #1A8C50; }
.reader-card2.dislikes .reader-title2 { color: #B85050; }
.reader-card2.gaps     .reader-title2 { color: #9B7C0A; }
.reader-item2 {
  font-size: 11px; color: var(--text-2); line-height: 1.5;
  padding: 4px 0; border-bottom: 1px solid #F9FAFB;
  display: flex; gap: 6px;
}
.reader-item2:last-child { border-bottom: none; }

/* ── Concept cards (new style) ── */
.concept-card2 {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: all 0.2s; cursor: pointer; box-shadow: var(--shadow-sm);
}
.concept-card2:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.concept-card2:last-child { margin-bottom: 0; }
.concept-num2 {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 6px rgba(22,173,175,0.3);
}
.concept-body2 { flex: 1; min-width: 0; }
.concept-title2 { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 7px; }
.concept-tags2 { display: flex; gap: 5px; flex-wrap: wrap; }
.concept-tag2 {
  font-size: 11px; background: var(--page-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 2px 9px; color: var(--text-2); font-weight: 600;
}
.concept-tag2.hot { background: var(--teal-light); border-color: var(--teal-mid); color: var(--teal); }
.concept-footer2 {
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .opp-hero2-top { grid-template-columns: auto 1fr; }
  .opp-stats2 { flex-wrap:wrap; overflow-x:auto; }
  .two-col2 { grid-template-columns: 1fr; }
  .reader-grid2 { grid-template-columns: 1fr; }
}

/* ── Phase 2 layout fixes ── */
/* research-results no longer needs its own padding — panels handle spacing */

/* opp-hero and tab-bar sit flush with their own internal padding */
.opp-hero2 { margin: 0 32px 20px; }
.tab-bar2 { margin-bottom:20px; }
.category-insights { padding: 0 32px; }
.ai-sum { margin: 0 32px 20px; }

/* tab panels get padding */
.tab-panel.active .panel2,
.tab-panel.active .panel { margin: 0 32px 18px; }

/* Ensure tab2 buttons render correctly on all browsers */
button.tab2 { cursor: pointer; }
button.tab2-generate { cursor: pointer; }



/* ── Search hero (matches mockup exactly) ── */
.search-hero { background:var(--white); border-radius:var(--r-lg); padding:24px 28px; margin-bottom:20px; box-shadow:var(--shadow-md); }
.search-eyebrow { font-size: 11px; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:1.5px; margin-bottom:6px; }
.search-title { font-size:18px; font-weight:800; color:var(--text); margin-bottom:14px; }
.search-row { display:flex; gap:10px; align-items:center; }
.search-iw { flex:1; display:flex; align-items:center; gap:10px; border:1.5px solid var(--border); border-radius:var(--r-md); padding:12px 16px; background:var(--page-bg); transition:all 0.15s; }
.search-iw:focus-within { border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(22,173,175,0.1); }
.search-iw svg { color:var(--teal); width:18px; height:18px; flex-shrink:0; }
.search-iw input { border:none; outline:none; background:transparent; font-family:var(--font); font-size:14px; font-weight:500; color:var(--text); width:100%; }
.search-iw input::placeholder { color:#C4C8CC; font-weight:400; }
.search-go { background:var(--teal); color:#fff; border:none; border-radius:var(--r-md); padding:13px 24px; font-family:var(--font); font-size:13px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:7px; box-shadow:0 4px 12px rgba(22,173,175,0.3); transition:all 0.15s; white-space:nowrap; }
.search-go:hover { opacity:0.9; }
.search-go svg { width:14px; height:14px; }
.search-chips { display:flex; align-items:center; gap:8px; margin-top:14px; flex-wrap:wrap; }
.chips-lbl { font-size:11px; color:var(--text-3); font-weight:500; }
.chip2 { background:var(--page-bg); border:1px solid var(--border); border-radius:20px; padding:4px 12px; font-size:11px; color:var(--text-2); cursor:pointer; font-weight:600; transition:all 0.15s; }
.chip2:hover { border-color:var(--teal); color:var(--teal); background:var(--teal-light); }

/* ── Sticky bar ── */
.sticky-bar { background:rgba(250,251,252,0.92); backdrop-filter:blur(8px); border-radius:var(--r-lg); padding:10px 16px; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow-md); margin-bottom:20px; border:1px solid var(--border); }
.sticky-kw { font-size:13px; font-weight:700; color:var(--text); flex:1; }
.sticky-kw span { color:var(--teal); }
#results-timestamp { color: var(--text-3); font-weight: 600; font-size: 11.5px; margin-left: 2px; }
.action-btn2 { display:flex; align-items:center; gap:6px; padding:7px 14px; border-radius:var(--r-sm); font-size:11px; font-weight:700; cursor:pointer; font-family:var(--font); border:1px solid var(--border); background:var(--white); color:var(--text-2); transition:all 0.15s; text-decoration:none; }
.action-btn2:hover { border-color:var(--teal); color:var(--teal); }
.action-btn2 svg { width:13px; height:13px; }
.action-btn2.primary2 { background:var(--teal); color:#fff; border-color:var(--teal); }
.action-btn2.primary2:hover { opacity:0.9; }

/* ── Research results padding ── */

.opp-hero2 { margin-bottom:20px; }
.ai-sum { margin-bottom:20px; }
.tab-bar2 { margin-bottom:20px; }
.two-col2 { margin-bottom:0; }

/* ── Niche tab panels ── */
.niche-tab-panel { display:block; }
.niche-tab-panel.hidden { display:none; }



/* ════════════════════════════════════════════════════════
   PHASE 3 — Keywords, Categories
   ════════════════════════════════════════════════════════ */

/* View header */
.view-title { font-size:20px; font-weight:800; color:var(--text); display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.view-sub { font-size:13px; color:var(--text-3); }
.view-header { padding:28px 32px 16px; }

/* Keywords filters */
.kw-filters { display:flex; gap:8px; align-items:center; margin-bottom:16px; flex-wrap:wrap; }
.kw-search { display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:var(--r-sm); padding:7px 12px; background:var(--page-bg); min-width:180px; }
.kw-search svg { color:var(--text-3); width:14px; height:14px; flex-shrink:0; }
.kw-search input { border:none; outline:none; background:transparent; font-family:var(--font); font-size:12px; color:var(--text); width:100%; }
.filter-pill { padding:5px 12px; font-size:11px; font-weight:600; border-radius:20px; border:1px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; font-family:var(--font); transition:all 0.15s; }
.filter-pill.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.filter-pill:hover:not(.active) { border-color:var(--teal); color:var(--teal); }

/* Keywords table */
.kw-word { font-size:13px; font-weight:600; color:var(--text); }
.kw-vol { font-size:12px; color:var(--text-2); font-weight:600; white-space:nowrap; }
.kw-type { font-size: 11px; font-weight:700; padding:3px 9px; border-radius:10px; display:inline-block; white-space:nowrap; }
.type-long { background:#F3F4F6; color: #1d1d1b; }
.type-mid { background:var(--success-bg); color:#1A8C50; }
.type-short { background:var(--warning-bg); color:#9B7C0A; }
.kw-bar-wrap { display:flex; align-items:center; gap:8px; min-width:120px; }
.kw-bar { flex:1; height:5px; background:#F3F4F6; border-radius:3px; overflow:hidden; }
.kw-bar-fill { height:5px; background:linear-gradient(90deg, var(--teal), var(--success)); border-radius:3px; }
.kw-score { font-size:13px; font-weight:800; color:var(--teal); width:30px; text-align:right; flex-shrink:0; }
.kw-opp { font-size: 11px; font-weight:700; padding:3px 9px; border-radius:6px; white-space:nowrap; }
.kw-opp-cell { display: inline-flex; align-items: center; gap: 6px; }
.kw-verify-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border-radius: 5px;
  border: 1px solid #DDE4ED; background: #FFFFFF; color: var(--text-3);
  cursor: pointer; flex-shrink: 0;
}
.kw-verify-btn:hover { border-color: var(--teal); color: var(--teal); }
.kw-verify-btn svg { width: 11px; height: 11px; }
.kw-verify-btn:disabled { opacity: .5; cursor: default; }
.opp-high { background:var(--success-bg); color:#1A8C50; }
.opp-med { background:var(--warning-bg); color:#9B7C0A; }
.opp-low { background:#F3F4F6; color: #1d1d1b; }
.kw-action { color:var(--teal); font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap; }
.kw-action:hover { text-decoration:underline; }

/* Categories */
.cat2-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.cat2-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:20px; box-shadow:var(--shadow-sm); transition:all 0.2s; cursor:pointer; }
.cat2-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.cat2-card.best { border-color:var(--teal); border-width:2px; }
.cat2-badge { display:inline-flex; align-items:center; gap:5px; font-size: 11px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; padding:4px 10px; border-radius:6px; margin-bottom:10px; }
.badge-best { background:var(--teal); color:#fff; }
.badge-alt { background:var(--teal-light); color:var(--teal); }
.badge-real { background:#2FBF71; color:#fff; }
.cat-real-section { margin-bottom: 8px; }
.cat-section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.cat-section-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 14px;
  line-height: 1.5;
}
.cat-real-card { border-color: rgba(47,191,113,.35); }
.cat2-name { font-size:18px; font-weight:800; color:var(--text); margin-bottom:4px; line-height:1.2; }
.cat2-path { font-size:11px; color:var(--teal); font-weight:600; margin-bottom:12px; }
.cat2-top-row { display:flex; justify-content:space-between; align-items:flex-start; }
.cat2-left { flex:1; }
.cat2-score-wrap { display:flex; flex-direction:column; align-items:center; gap:4px; }
.cat2-ring { position:relative; width:72px; height:72px; }
.cat2-ring svg { transform:rotate(-90deg); }
.cat2-ring-bg { fill:none; stroke:#F3F4F6; stroke-width:6; }
.cat2-ring-fill { fill:none; stroke-linecap:round; stroke-dasharray:201; }
.cat2-ring-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.cat2-score-num { font-size:20px; font-weight:800; line-height:1; }
.cat2-score-label { font-size: 10px; font-weight:700; }
.cat2-why { margin:12px 0; }
.cat2-why-title { font-size:11px; font-weight:700; color:var(--teal); margin-bottom:6px; }
.cat2-why-item { display:flex; align-items:flex-start; gap:6px; font-size:11px; color:var(--text-2); padding:3px 0; }
.cat2-stats-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; background:var(--page-bg); border-radius:var(--r-md); padding:12px; margin:12px 0; }
.cat2-stat { }
.cat2-stat-icon { display:flex; align-items:center; gap:5px; font-size: 11px; color:var(--text-3); font-weight:600; margin-bottom:4px; }
.cat2-stat-icon svg { width:13px; height:13px; }
.cat2-bar { height:4px; background:#E5E7EB; border-radius:2px; margin:4px 0; overflow:hidden; }
.cat2-bar-fill { height:4px; border-radius:2px; }
.cat2-stat-val { font-size:14px; font-weight:800; color:var(--text); }
.cat2-stat-sub { font-size: 11px; color:var(--text-3); }
.cat2-footer { display:flex; align-items:center; justify-content:space-between; padding-top:12px; border-top:1px solid var(--border); flex-wrap:wrap; gap:8px; }
.cat2-tags { display:flex; gap:6px; flex-wrap:wrap; }
.cat2-tag { display:flex; align-items:center; gap:5px; font-size: 11px; font-weight:700; padding:4px 10px; border-radius:20px; }
.cat2-tag svg { width:12px; height:12px; }
.cat2-link { display:flex; align-items:center; gap:5px; font-size:11px; font-weight:700; color:var(--teal); border:1.5px solid var(--teal); border-radius:var(--r-sm); padding:6px 14px; white-space:nowrap; transition:all 0.15s; text-decoration:none; }
.cat2-link:hover { background:var(--teal); color:#fff; }
.cat2-link svg { width:12px; height:12px; }
.cat-hint { background:var(--teal-light); border-radius:var(--r-md); padding:14px 18px; display:flex; align-items:flex-start; gap:12px; }
.cat-hint svg { width:18px; height:18px; color:var(--teal); flex-shrink:0; margin-top:1px; }
.cat-hint-title { font-size:12px; font-weight:700; color:var(--teal); margin-bottom:3px; }
.cat-hint-text { font-size:11px; color:#2D6E6F; line-height:1.6; }

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

/* ════════════════════════════════════════════════════════
   PHASE 3b — Reverse ASIN + URL Analysis
   ════════════════════════════════════════════════════════ */

/* ASIN search card */
.asin-search-card { background:var(--white); border-radius:var(--r-lg); padding:24px 28px; box-shadow:var(--shadow-sm); margin-bottom:20px; }
.asin-search-label { font-size:11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:1px; margin-bottom:10px; }
.asin-search-row { display:flex; gap:10px; align-items:center; }
.asin-input-wrap { flex:1; display:flex; align-items:center; gap:10px; border:1.5px solid var(--border); border-radius:var(--r-md); padding:11px 16px; background:var(--page-bg); transition:all 0.15s; }
.asin-input-wrap:focus-within { border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(22,173,175,0.1); }
.asin-input-wrap svg { color:var(--text-3); width:16px; height:16px; flex-shrink:0; }
.asin-input { border:none; outline:none; background:transparent; font-family:var(--font); font-size:14px; font-weight:600; color:var(--text); width:100%; letter-spacing:0.5px; }
.asin-input::placeholder { color:#C4C8CC; font-weight:400; letter-spacing:0; }
.asin-hint { display:flex; align-items:center; gap:12px; margin-top:12px; flex-wrap:wrap; }
.asin-hint-text { font-size:11px; color:var(--text-3); line-height:1.6; }
.asin-hint-text strong { color:var(--text-2); }
.asin-hint-text code { background:var(--page-bg); border:1px solid var(--border); border-radius:4px; padding:1px 5px; font-family:monospace; color:var(--teal); font-size:10.5px; }
.asin-chip { background:var(--page-bg); border:1px solid var(--border); border-radius:6px; padding:3px 10px; font-size:11px; font-weight:700; color:var(--text-2); cursor:pointer; font-family:monospace; letter-spacing:0.5px; transition:all 0.15s; }
.asin-chip:hover { border-color:var(--teal); color:var(--teal); }

/* ASIN product card */
.asin-product-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:18px 20px; margin-bottom:20px; display:flex; gap:16px; align-items:flex-start; box-shadow:var(--shadow-sm); }
.asin-product-cover { width:56px; height:84px; border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:26px; box-shadow:var(--shadow-md); overflow:hidden; }
.asin-product-cover img { width:100%; height:100%; object-fit:cover; }
.asin-product-info { flex:1; }
.asin-product-title { font-size:15px; font-weight:800; color:var(--text); margin-bottom:4px; line-height:1.3; }
.asin-product-author { font-size:12px; color:var(--text-3); margin-bottom:10px; }
.asin-product-stats { display:flex; gap:10px; flex-wrap:wrap; }
.asin-product-stat { background:var(--page-bg); border-radius:var(--r-sm); padding:6px 12px; display:flex; flex-direction:column; align-items:center; }
.asin-product-stat-val { font-size:14px; font-weight:800; color:var(--text); line-height:1; }
.asin-product-stat-label { font-size: 10px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:0.5px; margin-top:2px; }
.asin-badge { background:var(--teal-light); color:var(--teal); font-size: 11px; font-weight:700; padding:3px 8px; border-radius:6px; }

/* ASIN keyword panel */
.kw-panel { background:var(--white); border-radius:var(--r-lg); padding:20px; box-shadow:var(--shadow-sm); }
.kw-panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.kw-panel-title { font-size:11px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:0.8px; display:flex; align-items:center; gap:7px; }
.kw-panel-title svg { color:var(--teal); width:15px; height:15px; }
.kw-count { font-size:12px; color:var(--text-3); }
.kw-insight { background:var(--teal-light); border-left:3px solid var(--teal); border-radius:0 var(--r-sm) var(--r-sm) 0; padding:10px 14px; margin-bottom:16px; font-size:12px; color:#2D6E6F; line-height:1.6; }

/* kw2 table (ASIN view) */
.kw2-table { width:100%; border-collapse:collapse; }
.kw2-table th { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:0.8px; padding:8px 12px; text-align:left; border-bottom:2px solid var(--border); }
.kw2-table td { padding:11px 12px; border-bottom:1px solid #F9FAFB; vertical-align:middle; }
.kw2-table tr:last-child td { border-bottom:none; }
.kw2-table tr:hover td { background:#FAFBFC; }
.kw2-word { font-size:13px; font-weight:700; color:var(--text); }
.kw2-sugg-tag { display:inline-block; margin-left:8px; font-size:9.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--text-3); background:var(--page-bg); border:1px solid var(--border); border-radius:10px; padding:1px 7px; vertical-align:middle; }
.kw2-vol { font-size:12px; color:var(--text-2); font-weight:600; white-space:nowrap; }
.kw2-type { font-size: 11px; font-weight:700; padding:3px 9px; border-radius:10px; display:inline-block; white-space:nowrap; }
.kw2-bar-wrap { display:flex; align-items:center; gap:8px; min-width:120px; }
.kw2-bar { flex:1; height:5px; background:#F3F4F6; border-radius:3px; overflow:hidden; }
.kw2-bar-fill { height:5px; background:linear-gradient(90deg, var(--teal), var(--success)); border-radius:3px; }
.kw2-score { font-size:13px; font-weight:800; color:var(--teal); width:30px; text-align:right; flex-shrink:0; }
.kw2-action { display:flex; align-items:center; gap:5px; color:var(--teal); font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap; }
.kw2-action svg { width:13px; height:13px; }
.kw2-action:hover { text-decoration:underline; }

/* URL Analysis */
.url-card { background:var(--white); border-radius:var(--r-lg); padding:20px 24px; box-shadow:var(--shadow-sm); margin-bottom:20px; }
.url-row { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.url-iw { flex:1; display:flex; align-items:center; gap:10px; border:1.5px solid var(--border); border-radius:var(--r-md); padding:11px 16px; background:var(--page-bg); transition:all 0.15s; }
.url-iw:focus-within { border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(22,173,175,0.1); }
.url-iw svg { color:var(--text-3); width:15px; height:15px; flex-shrink:0; }
.url-iw input { border:none; outline:none; background:transparent; font-family:var(--font); font-size:13px; color:var(--text); width:100%; }
.url-iw input::placeholder { color:#C4C8CC; }
.url-chips-row { display:flex; align-items:center; gap:8px; }
.url-chips-label { font-size:11px; color:var(--text-3); font-weight:600; }
.url-chip { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--text-2); background:var(--page-bg); border:1px solid var(--border); border-radius:20px; padding:4px 12px; cursor:pointer; transition:all 0.15s; }
.url-chip svg { width:11px; height:11px; color:var(--text-3); }
.url-chip:hover { border-color:var(--teal); color:var(--teal); }
.url-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.url-stat { background:var(--white); border-radius:var(--r-lg); padding:16px 20px; box-shadow:var(--shadow-sm); display:flex; align-items:center; gap:14px; }
.url-stat-icon { width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.url-stat-icon svg { width:20px; height:20px; }
.url-stat-val { font-size:22px; font-weight:800; color:var(--text); line-height:1; margin-bottom:3px; }
.url-stat-name { font-size:11px; font-weight:700; color:var(--text-2); }
.url-stat-sub { font-size: 11px; color:var(--text-3); margin-top:2px; }
.url-ai { background:var(--white); border-radius:var(--r-lg); padding:20px 24px; box-shadow:var(--shadow-sm); margin-bottom:20px; border-left:3px solid var(--teal); }
.url-ai-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.url-ai-icon { width:32px; height:32px; background:var(--teal-light); border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.url-ai-icon svg { width:16px; height:16px; color:var(--teal); }
.url-ai-title { font-size:13px; font-weight:800; color:var(--text); flex:1; }
.url-ai-meta { display:flex; align-items:center; gap:8px; }
.url-ai-tag { font-size:11px; font-weight:700; color:var(--teal); }
.url-ai-dot { width:4px; height:4px; background:var(--teal-mid); border-radius:50%; }
.url-ai-summary { font-size:13px; color:var(--text-2); line-height:1.65; margin-bottom:14px; }
.url-ai-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.url-ai-sub { background:var(--page-bg); border-radius:var(--r-md); padding:12px 16px; }
.url-ai-sub-label { font-size:11px; font-weight:700; color:var(--teal); display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.url-ai-sub-label svg { width:13px; height:13px; }
.url-ai-sub-text { font-size:12px; color:var(--text-2); line-height:1.6; }
.url-mid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
.url-panel { background:var(--white); border-radius:var(--r-lg); padding:18px 20px; box-shadow:var(--shadow-sm); }
.url-panel-title { font-size:12px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:7px; margin-bottom:4px; }
.url-panel-title svg { width:16px; height:16px; color:var(--teal); }
.url-panel-sub { font-size: 11px; color:var(--text-3); font-style:italic; margin-bottom:12px; }
.theme-chips2 { display:flex; gap:7px; flex-wrap:wrap; }
.theme-chip2 { background:var(--page-bg); border:1px solid var(--border); border-radius:20px; padding:5px 13px; font-size:12px; font-weight:600; color:var(--text-2); }
.url-gap-item { display:flex; gap:10px; align-items:flex-start; padding:7px 0; border-bottom:1px solid #F9FAFB; font-size:12px; color:var(--text-2); line-height:1.5; }
.url-gap-item:last-child { border-bottom:none; }
.url-gap-icon { width:18px; height:18px; background:var(--warning-bg); border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }
.url-gap-icon svg { width:10px; height:10px; color:#9B7C0A; }
.url-books { background:var(--white); border-radius:var(--r-lg); padding:20px; box-shadow:var(--shadow-sm); }
.url-books-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.url-books-title { font-size:12px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:7px; }
.url-books-title svg { width:15px; height:15px; color:var(--teal); }
.url-books-cols { display:grid; grid-template-columns:1fr 76px 76px 84px 66px 74px; gap:8px; padding:8px 12px; border-bottom:2px solid var(--border); }
.url-books-col-label { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:0.8px; text-align:right; }
.url-books-col-label:first-child { text-align:left; }
.url-book-row2 { display:grid; grid-template-columns:1fr 76px 76px 84px 66px 74px; gap:8px; padding:12px; border-bottom:1px solid #F9FAFB; align-items:center; border-radius:var(--r-sm); transition:background 0.15s; }
.url-book-row2:hover { background:#FAFBFC; }
.url-book-row2:last-child { border-bottom:none; }
.url-book-left { display:flex; gap:10px; align-items:flex-start; min-width:0; }
.url-book-num { font-size:12px; font-weight:700; color:#D1D5DB; width:16px; flex-shrink:0; padding-top:2px; }
.url-book-thumb { width:44px; height:62px; border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:22px; box-shadow:var(--shadow-sm); overflow:hidden; }
.url-book-thumb img { width:100%; height:100%; object-fit:cover; }
.url-book-info { flex:1; min-width:0; }
.url-book-name { font-size:13px; font-weight:700; color:var(--text); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.url-book-auth { font-size:11px; color:var(--text-3); margin-bottom:5px; }
.url-book-badges { display:flex; gap:6px; align-items:center; }
.url-bsr2 { background:var(--teal-light); color:var(--teal); font-size: 10px; font-weight:700; padding:2px 7px; border-radius:4px; }
.url-rat { font-size: 11px; font-weight:700; color:#D4A017; }
.url-revs { font-size: 11px; color:var(--text-3); }
.url-book-price { font-size:14px; font-weight:800; color:var(--text); text-align:right; }
.url-book-reviews { font-size:13px; font-weight:700; color:var(--text-2); text-align:right; }
.url-book-rating { font-size:13px; font-weight:700; color:#D4A017; text-align:right; display:flex; align-items:center; justify-content:flex-end; gap:4px; }

/* ════════════════════════════════════════════════════════
   PHASE 5 — Monitor views (merged into index.html)
   ════════════════════════════════════════════════════════ */
.mon-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.mon-title { font-size:20px; font-weight:800; color:var(--text); display:flex; align-items:center; gap:10px; }
.mon-sub { font-size:13px; color:var(--text-3); margin-top:4px; }
.add-book-form { background:var(--white); border:1.5px dashed var(--teal-mid); border-radius:var(--r-lg); padding:20px 24px; margin-bottom:20px; }
.add-book-label { font-size:11px; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:1px; margin-bottom:10px; }
.add-book-row { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.add-book-input { flex:1; border:1.5px solid var(--border); border-radius:var(--r-md); padding:11px 16px; background:var(--page-bg); font-family:var(--font); font-size:14px; font-weight:500; color:var(--text); outline:none; transition:all 0.15s; }
.add-book-input:focus { border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(22,173,175,0.1); }
.add-book-hint { font-size:12px; color:var(--text-3); }
.plan-limit { background:var(--white); border-radius:var(--r-md); padding:12px 16px; margin-bottom:20px; display:flex; align-items:center; gap:12px; box-shadow:var(--shadow-sm); }
.plan-limit-label { font-size:12px; font-weight:600; color:var(--text-2); }
.plan-limit-bar { flex:1; height:6px; background:#F3F4F6; border-radius:3px; overflow:hidden; }
.plan-limit-fill { height:6px; background:var(--teal); border-radius:3px; transition:width 0.3s; }
.plan-limit-count { font-size:12px; font-weight:700; color:var(--text); white-space:nowrap; }
.plan-limit-upgrade { font-size:11px; font-weight:700; color:var(--teal); white-space:nowrap; cursor:pointer; }
.mbook-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:18px 20px; margin-bottom:12px; box-shadow:var(--shadow-sm); transition:all 0.2s; }
.mbook-card:hover { border-color:var(--teal-mid); box-shadow:var(--shadow-md); }
.mbook-top { display:flex; gap:14px; align-items:flex-start; margin-bottom:14px; }
.mbook-cover { width:52px; height:76px; border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:24px; box-shadow:var(--shadow-md); overflow:hidden; }
.mbook-cover img { width:100%; height:100%; object-fit:cover; }
.mbook-info { flex:1; min-width:0; }
.mbook-title { font-size:14px; font-weight:700; color:var(--text); line-height:1.3; margin-bottom:3px; }
.mbook-author { font-size:11px; color:var(--text-3); margin-bottom:6px; }
.mbook-tags { display:flex; gap:6px; flex-wrap:wrap; }
.mbook-tag { font-size: 11px; font-weight:700; padding:2px 8px; border-radius:6px; }
.mbook-actions { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.mbook-last-checked { font-size: 11px; color:var(--text-3); text-align:right; white-space:nowrap; }
.mbook-stats { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:14px; }
.mbook-stat { background:var(--page-bg); border-radius:var(--r-sm); padding:10px 12px; text-align:center; }
.mbook-stat-val { font-size:16px; font-weight:800; color:var(--text); line-height:1; margin-bottom:3px; display:flex; align-items:center; justify-content:center; gap:4px; flex-wrap:wrap; }
.mbook-stat-label { font-size: 10px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:0.5px; }
.trend-up2 { font-size: 11px; font-weight:700; color:var(--success); }
.trend-down2 { font-size: 11px; font-weight:700; color:var(--danger); }
.mbook-sparkline { height:40px; background:linear-gradient(90deg, var(--teal-light) 0%, rgba(22,173,175,0.05) 100%); border-radius:var(--r-sm); margin-bottom:14px; overflow:hidden; }
.mbook-sparkline svg { width:100%; height:40px; }
.mbook-footer { display:flex; align-items:center; gap:8px; border-top:1px solid #F9FAFB; padding-top:12px; flex-wrap:wrap; }
.mbook-btn { display:inline-flex; align-items:center; gap:5px; padding:6px 12px; font-size:11px; font-weight:700; border-radius:var(--r-sm); border:1px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; font-family:var(--font); transition:all 0.15s; }
.mbook-btn:hover { border-color:var(--teal); color:var(--teal); }
.mbook-btn svg { width:12px; height:12px; }
.mbook-btn.danger { color:var(--danger); }
.mbook-btn.danger:hover { border-color:var(--danger); background:var(--danger-bg); }
.mbook-btn.primary { background:var(--teal); color:#fff; border-color:var(--teal); }
.mbook-next-check { font-size: 11px; color:var(--text-3); margin-left:auto; display:flex; align-items:center; gap:4px; white-space:nowrap; }
.mbook-next-check svg { width:11px; height:11px; }
.breakout-badge { display:inline-flex; align-items:center; gap:5px; background:#EAFAF2; border:1px solid #9FE1CB; color:#1A8C50; font-size: 11px; font-weight:700; padding:3px 9px; border-radius:20px; }
.breakout-badge svg { width:11px; height:11px; }
.auth-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:20px; margin-bottom:12px; box-shadow:var(--shadow-sm); transition:all 0.2s; }
.auth-card:hover { border-color:var(--teal-mid); box-shadow:var(--shadow-md); }
.auth-top { display:flex; gap:14px; align-items:flex-start; margin-bottom:16px; }
.auth-avatar { width:52px; height:52px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:800; color:#fff; box-shadow:var(--shadow-md); }
.auth-info { flex:1; min-width:0; }
.auth-name { font-size:15px; font-weight:800; color:var(--text); margin-bottom:3px; }
.auth-meta { font-size:11px; color:var(--text-3); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.auth-status { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.auth-last-checked { font-size: 11px; color:var(--text-3); }
.auth-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; }
.auth-stat { background:var(--page-bg); border-radius:var(--r-sm); padding:10px 12px; text-align:center; }
.auth-stat-val { font-size:16px; font-weight:800; color:var(--text); line-height:1; margin-bottom:3px; }
.auth-stat-label { font-size: 10px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:0.5px; }
/* Author latest-books strip */
.auth-books-head { display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:800; color:var(--text-2); text-transform:uppercase; letter-spacing:.5px; margin:4px 0 10px; }
.auth-books-all { font-size:11px; font-weight:700; color:var(--teal); text-decoration:none; text-transform:none; letter-spacing:0; }
.auth-books-all:hover { text-decoration:underline; }
.auth-books-strip { display:flex; gap:10px; overflow-x:auto; padding:2px 0 10px; margin-bottom:4px; }
.auth-book { flex:0 0 auto; display:block; line-height:0; border-radius:5px; overflow:hidden; box-shadow:0 1px 5px rgba(15,23,42,.14); transition:transform .15s, box-shadow .15s; }
.auth-book:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(15,23,42,.2); }
.auth-book img { width:48px; height:72px; object-fit:cover; display:block; }
.auth-footer { display:flex; align-items:center; gap:8px; border-top:1px solid #F9FAFB; padding-top:12px; flex-wrap:wrap; }
.auth-btn { display:inline-flex; align-items:center; gap:5px; padding:6px 12px; font-size:11px; font-weight:700; border-radius:var(--r-sm); border:1px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; font-family:var(--font); transition:all 0.15s; }
.auth-btn:hover { border-color:var(--teal); color:var(--teal); }
.auth-btn svg { width:12px; height:12px; }
.auth-btn.danger { color:var(--danger); }
.auth-btn.danger:hover { border-color:var(--danger); background:var(--danger-bg); }
.auth-next { font-size: 11px; color:var(--text-3); margin-left:auto; display:flex; align-items:center; gap:4px; }
.auth-next svg { width:11px; height:11px; }
.auth-disclaimer { font-size: 11px; color:var(--text-3); font-style:italic; margin-bottom:8px; }
.alerts-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:20px; }
.alerts-sum-card { background:var(--white); border-radius:var(--r-md); padding:12px 14px; box-shadow:var(--shadow-sm); display:flex; align-items:center; gap:10px; }
.alerts-sum-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.alerts-sum-icon svg { width:15px; height:15px; }
.alerts-sum-val { font-size:18px; font-weight:800; color:var(--text); line-height:1; }
.alerts-sum-label { font-size: 11px; color:var(--text-3); font-weight:600; }
.alerts-filters { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.alert-filter-btn { padding:5px 12px; font-size:11px; font-weight:600; border-radius:20px; border:1px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; font-family:var(--font); transition:all 0.15s; display:flex; align-items:center; gap:5px; }
.alert-filter-btn.active { background:var(--text); color:#fff; border-color:var(--text); }
.alert-filter-btn:hover:not(.active) { border-color:var(--teal); color:var(--teal); }
.alert-filter-btn .dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.alert-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:16px 18px; margin-bottom:8px; display:flex; gap:14px; align-items:flex-start; transition:all 0.2s; cursor:pointer; position:relative; overflow:hidden; }
.alert-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }

/* Grouped niche alerts (many updates in one niche on one day) */
.alert-group { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); margin-bottom:8px; overflow:hidden; }
.alert-group.unread { border-left-width:3px; border-left-color:var(--teal); }
.alert-group-head { display:flex; gap:14px; align-items:flex-start; padding:16px 18px; cursor:pointer; transition:background .15s; }
.alert-group-head:hover { background:var(--page-bg); }
.alert-group-chev { color:var(--text-3); transition:transform .2s; margin-top:2px; }
.alert-group.expanded .alert-group-chev { transform:rotate(180deg); }
.alert-group-body { max-height:0; overflow:hidden; transition:max-height .3s ease; padding:0 12px; }
.alert-group-body.open { max-height:4000px; padding:0 12px 10px; }
.alert-group-body .alert-card { margin-bottom:6px; background:var(--page-bg); }
.alert-card.unread { border-left-width:3px; }
.alert-card.unread::before { content:''; position:absolute; top:0; right:0; width:8px; height:8px; border-radius:50%; margin:10px; }
.alert-card.type-breakout { border-left-color:var(--success); }
.alert-card.type-breakout::before { background:var(--success); }
.alert-card.type-review { border-left-color:#7C3AED; }
.alert-card.type-review::before { background:#7C3AED; }
.alert-card.type-price { border-left-color:var(--warning); }
.alert-card.type-price::before { background:var(--warning); }
.alert-card.type-newbook { border-left-color:var(--teal); }
.alert-card.type-newbook::before { background:var(--teal); }
.alert-card.type-drop { border-left-color:var(--danger); }
.alert-card.type-drop::before { background:var(--danger); }
.alert-card.read { opacity:0.7; }
.alert-icon-wrap { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.alert-icon-wrap svg { width:18px; height:18px; }
.alert-body { flex:1; min-width:0; }
.alert-title { font-size:13px; font-weight:700; color:var(--text); margin-bottom:3px; line-height:1.35; }
.alert-title.read { font-weight:500; }
.alert-book { font-size:11px; color:var(--text-3); margin-bottom:6px; }
.alert-view-link { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; color:var(--teal); cursor:pointer; width:fit-content; }
.alert-view-link:hover { text-decoration:underline; }
.alert-meta { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.alert-time { font-size: 11px; color:var(--text-3); white-space:nowrap; }
.alert-mark-read { font-size: 11px; color:var(--teal); font-weight:600; cursor:pointer; white-space:nowrap; }
.alerts-date-group { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:1px; padding:12px 0 6px; display:flex; align-items:center; gap:8px; }
.alerts-date-group::after { content:''; flex:1; height:1px; background:var(--border); }
.mark-all-btn { font-size:11px; color:var(--text-3); font-weight:600; cursor:pointer; display:flex; align-items:center; gap:5px; padding:5px 10px; border-radius:var(--r-sm); border:1px solid var(--border); background:var(--white); font-family:var(--font); transition:all 0.15s; }
.mark-all-btn:hover { color:var(--teal); border-color:var(--teal); }
.mark-all-btn svg { width:12px; height:12px; }
.hm-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.4); backdrop-filter:blur(4px); z-index:200; display:none; align-items:center; justify-content:center; padding:24px; }
.hm-overlay.open { display:flex; }
.hm-box { background:var(--white); border-radius:var(--r-lg); width:100%; max-width:860px; max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,0.2); }
.hm-header { display:flex; align-items:flex-start; justify-content:space-between; padding:24px 28px 0; margin-bottom:20px; }
.hm-title { font-size:16px; font-weight:800; color:var(--text); line-height:1.3; max-width:520px; }
.hm-author { font-size:12px; color:var(--text-3); margin-top:3px; }
.hm-close { width:32px; height:32px; border-radius:50%; background:var(--page-bg); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; color:var(--text-3); transition:all 0.15s; }
.hm-close:hover { background:var(--danger-bg); border-color:var(--danger); color:var(--danger); }
.hm-close svg { width:14px; height:14px; }
.hm-stat-row { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; padding:0 28px; margin-bottom:24px; }
.hm-stat { background:var(--page-bg); border-radius:var(--r-md); padding:12px 14px; text-align:center; }
.hm-stat-val { font-size:18px; font-weight:800; color:var(--text); line-height:1; margin-bottom:3px; }
.hm-stat-change { font-size:11px; font-weight:700; }
.hm-stat-label { font-size: 10px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:0.6px; margin-top:2px; }
.hm-stat-change.up { color:var(--success); }
.hm-stat-change.down { color:var(--danger); }
.hm-stat-change.flat { color:var(--text-3); }
.hm-charts-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; padding:0 28px; margin-bottom:20px; }
.hm-chart-title { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }
.hm-chart-box { background:var(--page-bg); border-radius:var(--r-md); padding:8px 8px 24px; position:relative; height:120px; overflow:hidden; }
.hm-table-section { padding:0 28px 24px; }
.hm-table { width:100%; border-collapse:collapse; }
.hm-table th { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:0.8px; padding:8px 10px; text-align:left; border-bottom:2px solid var(--border); }
.hm-table td { padding:10px; border-bottom:1px solid #F9FAFB; font-size:12px; color:var(--text-2); vertical-align:middle; }
.hm-table tr:last-child td { border-bottom:none; }
.hm-table tr:hover td { background:#FAFBFC; }
.hm-date { font-weight:600; color:var(--text); }
.hm-bsr { font-weight:700; color:var(--teal); }
.hm-change-up { color:var(--success); font-weight:700; font-size:11px; }
.hm-change-down { color:var(--danger); font-weight:700; font-size:11px; }
.hm-period-badge { font-size: 10px; font-weight:700; padding:2px 7px; border-radius:10px; background:var(--teal-light); color:var(--teal); }
.hm-footer { display:flex; align-items:center; gap:8px; padding:16px 28px; border-top:1px solid var(--border); }

/* ════════════════════════════════════════════════════════
   PHASE 5b — Settings view
   ════════════════════════════════════════════════════════ */
.settings-grid { display:grid; grid-template-columns:200px 1fr; gap:24px; align-items:start; }
.settings-nav { background:var(--white); border-radius:var(--r-lg); padding:8px; box-shadow:var(--shadow-sm); position:sticky; top:calc(var(--nav-h) + 20px); }
.settings-nav-item { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:var(--r-sm); font-size:12px; font-weight:600; color:var(--text-2); cursor:pointer; transition:all 0.15s; }
.settings-nav-item:hover { background:var(--page-bg); color:var(--text); }
.settings-nav-item.active { background:var(--teal-light); color:var(--teal); }
.settings-nav-item svg { width:15px; height:15px; flex-shrink:0; }
.settings-nav-divider { height:1px; background:var(--border); margin:6px 0; }
.settings-panel { background:var(--white); border-radius:var(--r-lg); padding:24px 28px; box-shadow:var(--shadow-sm); margin-bottom:16px; }
.settings-panel-title { font-size:13px; font-weight:800; color:var(--text); margin-bottom:4px; display:flex; align-items:center; gap:8px; }
.settings-panel-title svg { width:16px; height:16px; color:var(--teal); }
.settings-panel-sub { font-size:12px; color:var(--text-3); margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.settings-field { margin-bottom:18px; }
.settings-field:last-child { margin-bottom:0; }
.settings-label { font-size:11px; font-weight:700; color:var(--text); margin-bottom:5px; display:flex; align-items:center; gap:6px; }
.settings-label-hint { font-size: 11px; font-weight:500; color:var(--text-3); }
.settings-badge-soon {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #8B5CF6;
  background: #F3EEFF;
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: 4px;
}
.settings-input:disabled {
  background: var(--page-bg);
  color: var(--text-3);
  cursor: not-allowed;
  opacity: .75;
}
.settings-input { width:100%; padding:10px 14px; border:1.5px solid var(--border); border-radius:var(--r-sm); font-family:var(--font); font-size:13px; color:var(--text); background:var(--page-bg); outline:none; transition:all 0.15s; }
.settings-input:focus { border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(22,173,175,0.1); }
.settings-input:disabled { color:var(--text-3); cursor:not-allowed; }
.settings-input-row { display:flex; gap:10px; align-items:center; }
.settings-hint { font-size:11px; color:var(--text-3); margin-top:5px; }
.toggle-row { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid #F9FAFB; }
.toggle-row:last-child { border-bottom:none; padding-bottom:0; }
.toggle-label { font-size:13px; font-weight:600; color:var(--text); margin-bottom:2px; }
.toggle-sub { font-size:11px; color:var(--text-3); line-height:1.5; }
.toggle { position:relative; width:40px; height:22px; flex-shrink:0; margin-top:2px; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:#E5E7EB; border-radius:11px; cursor:pointer; transition:all 0.2s; }
.toggle-slider::after { content:''; position:absolute; width:18px; height:18px; left:2px; top:2px; background:#fff; border-radius:50%; transition:all 0.2s; box-shadow:0 1px 3px rgba(0,0,0,0.15); }
.toggle input:checked + .toggle-slider { background:var(--teal); }
.toggle input:checked + .toggle-slider::after { transform:translateX(18px); }
.plan-current { background:linear-gradient(135deg, #0F1013, #1B1D21); border-radius:var(--r-lg); padding:20px 24px; margin-bottom:16px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.plan-current-name { font-size:11px; font-weight:700; color: #9AA3AE; text-transform:uppercase; letter-spacing:1px; margin-bottom:4px; }
.plan-current-title { font-size:20px; font-weight:800; color:#fff; margin-bottom:6px; }
.plan-current-features { display:flex; gap:12px; flex-wrap:wrap; }
.plan-feature { font-size:11px; color: #D6DBE1; display:flex; align-items:center; gap:4px; }
.plan-feature svg { width:12px; height:12px; color:var(--teal); }
.plan-upgrade-btn { display:inline-block; text-decoration:none; background:var(--teal); color:#fff; border:none; border-radius:var(--r-md); padding:12px 24px; font-family:var(--font); font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; box-shadow:0 4px 14px rgba(22,173,175,0.4); transition:all 0.15s; }
.plan-upgrade-btn:hover { opacity:0.9; transform:translateY(-1px); }
.credits-row { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid #F9FAFB; }
.cost-table { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.cost-row { display:flex; align-items:center; justify-content:space-between; padding:11px 16px; border-bottom:1px solid #F3F4F6; }
.cost-row:last-child { border-bottom:none; }
.cost-row:nth-child(even) { background:#FAFBFC; }
.cost-name { font-size:13px; font-weight:600; color:var(--text); display:flex; flex-direction:column; gap:1px; }
.cost-desc { font-size:11px; font-weight:400; color:var(--text-3); }
.cost-val { font-size:14px; font-weight:800; color:var(--teal); min-width:56px; text-align:right; }
.cost-val::after { content:' cr'; font-size: 11px; font-weight:600; color:var(--text-3); }
.cost-row-free .cost-val-free { color:#2FBF71; }
.cost-val-free::after { content:''; }
.credits-row:last-child { border-bottom:none; }
.credits-icon { width:36px; height:36px; border-radius:var(--r-sm); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.credits-icon svg { width:16px; height:16px; }
.credits-info { flex:1; }
.credits-title { font-size:13px; font-weight:700; color:var(--text); }
.credits-sub { font-size:11px; color:var(--text-3); }
.credits-price { font-size:14px; font-weight:800; color:var(--text); white-space:nowrap; }
.credits-buy { display:inline-block; text-decoration:none; padding:7px 16px; font-size:12px; font-weight:700; border-radius:20px; border:1.5px solid var(--teal); color:var(--teal); background:var(--white); cursor:pointer; font-family:var(--font); transition:all 0.15s; white-space:nowrap; }
.credits-buy:hover { background:var(--teal); color:#fff; }
.danger-zone { border:1.5px solid var(--danger-bg); border-radius:var(--r-lg); padding:20px 24px; }
.danger-zone-title { font-size:12px; font-weight:700; color:var(--danger); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:12px; display:flex; align-items:center; gap:6px; }
.danger-zone-title svg { width:14px; height:14px; }
.danger-action { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--danger-bg); }
.danger-action:last-child { border-bottom:none; padding-bottom:0; }
.danger-action-label { font-size:13px; font-weight:600; color:var(--text); }
.danger-action-sub { font-size:11px; color:var(--text-3); margin-top:2px; }
.danger-btn { padding:7px 16px; font-size:12px; font-weight:700; border-radius:var(--r-sm); border:1.5px solid var(--danger); color:var(--danger); background:var(--white); cursor:pointer; font-family:var(--font); white-space:nowrap; transition:all 0.15s; }
.danger-btn:hover { background:var(--danger); color:#fff; }

/* ════════════════════════════════════════════════════════
   Projects — improved design
   ════════════════════════════════════════════════════════ */
.proj-search-wrap { display:flex; align-items:center; gap:8px; border:1.5px solid var(--border); border-radius:var(--r-sm); padding:8px 12px; background:var(--white); }
.proj-search-wrap svg { width:14px; height:14px; color:var(--text-3); flex-shrink:0; }
.proj-search-wrap input { border:none; outline:none; font-family:var(--font); font-size:12px; color:var(--text); background:transparent; width:160px; }
.proj-sort { border:1.5px solid var(--border); border-radius:var(--r-sm); padding:8px 12px; font-family:var(--font); font-size:12px; font-weight:600; color:var(--text-2); background:var(--white); cursor:pointer; outline:none; }
.proj-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.proj-card { background:var(--white); border:1.5px solid var(--border); border-left-width:4px; border-radius:var(--r-lg); padding:18px 20px; box-shadow:var(--shadow-sm); cursor:pointer; transition:all 0.2s; display:flex; flex-direction:column; gap:12px; }
.proj-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.proj-card-top { display:flex; gap:12px; align-items:flex-start; }
.proj-card-info { flex:1; min-width:0; }
.proj-keyword { font-size:15px; font-weight:800; color:var(--text); line-height:1.3; margin-bottom:3px; }
.proj-verdict { font-size:11px; font-weight:700; }
.proj-stats { display:flex; gap:6px; flex-wrap:wrap; }
.proj-stat-pill { background:var(--page-bg); border:1px solid var(--border); border-radius:20px; padding:3px 10px; font-size: 11px; font-weight:600; color:var(--text-2); }
.proj-status-dots { display:flex; align-items:center; gap:5px; }
.proj-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.proj-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; border-top:1px solid var(--border); padding-top:12px; margin-top:auto; }
.proj-date { font-size:11px; color:var(--text-3); }
.proj-actions { display:flex; gap:6px; align-items:center; }
.proj-btn { display:inline-flex; align-items:center; gap:5px; padding:6px 12px; font-size:11px; font-weight:700; border-radius:var(--r-sm); border:1px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; font-family:var(--font); transition:all 0.15s; white-space:nowrap; }
.proj-btn:hover { border-color:var(--teal); color:var(--teal); }
.proj-btn.primary { background:var(--teal); color:#fff; border-color:var(--teal); }
.proj-btn.primary:hover { opacity:0.9; }
.proj-btn.danger { color:var(--danger); padding:6px 8px; }
.proj-btn.danger:hover { border-color:var(--danger); background:var(--danger-bg); }
.proj-btn.danger svg { width:13px; height:13px; }

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

/* ════════════════════════════════════════════════════════
   Project type tabs (Niche / URL / ASIN)
   ════════════════════════════════════════════════════════ */
.proj-type-tabs { display:flex; gap:6px; margin-bottom:18px; }
.proj-type-tab { display:flex; align-items:center; gap:7px; padding:8px 16px; font-size:12px; font-weight:700; color:var(--text-2); background:var(--white); border:1.5px solid var(--border); border-radius:20px; cursor:pointer; font-family:var(--font); transition:all 0.15s; }
.proj-type-tab svg { width:14px; height:14px; }
.proj-type-tab:hover:not(.active) { border-color:var(--teal); color:var(--teal); }
.proj-type-tab.active { background:var(--teal); color:#fff; border-color:var(--teal); box-shadow:0 4px 10px rgba(22,173,175,0.25); }

/* URL project card */
.proj-card.url-type { }
.proj-url-source { font-size:11px; color:var(--text-3); word-break:break-all; margin-top:4px; line-height:1.5; }
.proj-url-summary { font-size:12px; color:var(--text-2); line-height:1.6; margin-top:8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.proj-covers { display:flex; gap:6px; }
.proj-cover-thumb { width:36px; height:50px; border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:18px; box-shadow:var(--shadow-sm); overflow:hidden; }
.proj-cover-thumb img { width:100%; height:100%; object-fit:cover; }
.proj-tag { font-size: 11px; padding:3px 9px; }

/* ASIN project card */
.proj-asin-badge { font-family:monospace; font-size:11px; font-weight:700; background:var(--teal-light); color:var(--teal); padding:3px 9px; border-radius:6px; letter-spacing:0.5px; }
.proj-asin-cover { width:44px; height:60px; border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:20px; box-shadow:var(--shadow-sm); overflow:hidden; }
.proj-asin-cover img { width:100%; height:100%; object-fit:cover; }

/* ════════════════════════════════════════════════════════
   LANDING PAGE — pre-login marketing page (all classes
   namespaced with lp- to avoid collisions with app UI classes)
   ════════════════════════════════════════════════════════ */

.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* Marketing nav links — sit inside the existing dark .nav bar */
.lp-nav-links { display: flex; align-items: center; gap: 26px; margin-left: 8px; }
.lp-nav-item { position: relative; }
.lp-nav-link {
  display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  color: #1d1d1b; cursor: pointer; transition: color 0.15s; text-decoration: none;
}
.lp-nav-link:hover { color: #D1D5DB; }
.lp-nav-link svg { width: 10px; height: 10px; }
.lp-nav-dropdown { display: none; position: absolute; top: 100%; left: -12px; padding-top: 14px; z-index: 110; }
.lp-nav-item:hover .lp-nav-dropdown { display: block; }
.lp-nav-dropdown-inner {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 8px; min-width: 200px;
}
.lp-nav-dropdown a { display: block; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border-radius: 7px; }
.lp-nav-dropdown a:hover { background: var(--page-bg); color: var(--teal); }
.lp-nd-sub { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); margin-top: 1px; }
@media (max-width: 900px) {
  /* Marketing links hide from the bar on mobile; the hamburger reveals them as a
     drop-down panel (.mobile-open), with the hover dropdowns shown expanded inline. */
  .lp-nav-links { display: none; }
  .lp-nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 96;
    background: #fff; border-bottom: 1px solid #E5E7EB; box-shadow: 0 10px 30px rgba(0,0,0,.14);
    padding: 6px 0; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .lp-nav-links.mobile-open .lp-nav-item { position: static; width: 100%; }
  .lp-nav-links.mobile-open .lp-nav-link { display: flex; justify-content: space-between; padding: 13px 22px; font-size: 15px; color: #1d1d1b; }
  .lp-nav-links.mobile-open > .lp-nav-link { border-top: 1px solid #F3F4F6; }
  .lp-nav-links.mobile-open .lp-nav-item + .lp-nav-item,
  .lp-nav-links.mobile-open .lp-nav-item { border-top: 1px solid #F3F4F6; }
  .lp-nav-links.mobile-open .lp-nav-link svg { width: 13px; height: 13px; }
  /* Show nested dropdowns expanded inline (no hover on touch) */
  .lp-nav-links.mobile-open .lp-nav-dropdown { display: block; position: static; padding: 0 0 6px; }
  .lp-nav-links.mobile-open .lp-nav-dropdown-inner { border: none; box-shadow: none; padding: 0; min-width: 0; background: transparent; }
  .lp-nav-links.mobile-open .lp-nav-dropdown a { padding: 9px 22px 9px 34px; font-size: 13.5px; }
  .lp-nav-links.mobile-open .lp-nd-sub { font-size: 11px; }
  /* Features and Pricing point at on-page anchors that aren't useful in the mobile
     menu — hide them here (they still show in the desktop bar). */
  .lp-nav-links.mobile-open .hide-in-mobile-menu { display: none; }
}

/* Hero */
.lp-hero { background: radial-gradient(120% 100% at 50% -10%, #EAFBFB 0%, #FFFFFF 55%); padding: 72px 0 56px; }
.lp-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; color: var(--teal); background: var(--teal-light); border-radius: 20px;
  padding: 5px 13px; margin-bottom: 20px; text-transform: uppercase;
}
.lp-hero-title { font-size: 44px; font-weight: 800; line-height: 1.14; letter-spacing: -1.3px; margin-bottom: 18px; }
.lp-hero-title em { font-style: normal; color: var(--teal); }
.lp-hero-sub { font-size: 16px; color: var(--text-2); line-height: 1.7; margin-bottom: 28px; max-width: 480px; }
.lp-hero-ctas { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.lp-hero-note { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.lp-btn-lg { padding: 15px 28px !important; font-size: 14px !important; border-radius: 12px !important; }

/* Hero Chrome-extension strip — sits next to the primary CTA. */
.lp-ext-strip {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #E3E9EE; border-radius: 12px;
  padding: 10px 15px; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lp-ext-strip:hover { border-color: var(--teal, #16ADAF); box-shadow: 0 3px 12px rgba(22,173,175,.14); }
.lp-ext-gc { flex: 0 0 44px; width: 44px !important; height: 44px !important; }
.lp-ext-txt { display: flex; flex-direction: column; line-height: 1.25; }
.lp-ext-t1 { font-size: 13.5px; font-weight: 700; color: var(--navy, #0D2B3E); }
.lp-ext-t2 { font-size: 12px; font-weight: 600; color: var(--teal, #16ADAF); }

/* Hero visual — illustrative product UI */
.lp-hero-visual { position: relative; }
.lp-hv-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 16px 40px rgba(17,24,39,.12); padding: 22px; }
.lp-hv-ring { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.lp-hv-ring svg { flex-shrink: 0; }
.lp-hv-ring-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; }
.lp-hv-ring-verdict { font-size: 14px; font-weight: 800; color: var(--success); }
.lp-hv-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.lp-hv-thumb { width: 30px; height: 42px; border-radius: 4px; flex-shrink: 0; }
.lp-hv-row-info { flex: 1; min-width: 0; }
.lp-hv-row-title { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-hv-bar-bg { height: 5px; border-radius: 3px; background: #F3F4F6; margin-top: 5px; overflow: hidden; }
.lp-hv-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--teal-mid)); }
.lp-hv-pct { font-size: 11px; font-weight: 800; color: var(--text-2); flex-shrink: 0; }
.lp-hv-float { position: absolute; background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 13px 16px; border: 1px solid var(--border); }
.lp-hv-float-1 { top: -24px; right: -28px; }
.lp-hv-float-2 { bottom: -22px; left: -30px; }
.lp-hv-float-label { font-size: 9.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.lp-hv-float-val { font-size: 17px; font-weight: 800; color: var(--text); }
.lp-hv-float-val.teal { color: var(--teal); }

/* Section shell */
.lp-section { padding: 76px 0; }
.lp-section-head { text-align: center; max-width: 560px; margin: 0 auto 52px; }
.lp-section-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--teal); text-transform: uppercase; margin-bottom: 12px; }
.lp-section-title { font-size: 30px; font-weight: 800; letter-spacing: -.7px; line-height: 1.25; }
.lp-section-sub { font-size: 14.5px; color: var(--text-2); margin-top: 12px; line-height: 1.7; }

/* Feature blocks (alternating) */
.lp-feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 50px 0; }
/* Offset in-page anchor jumps for the fixed top nav */
.lp-feature-block, #pricing, #features, [id^="feature-"] { scroll-margin-top: calc(var(--nav-h) + 20px); }
.lp-feature-block:not(:last-child) { border-bottom: 1px solid var(--border); }
.lp-feature-block.lp-reverse { direction: rtl; }
.lp-feature-block.lp-reverse > * { direction: ltr; }
.lp-fb-eyebrow { font-size: 11px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.lp-fb-title { font-size: 23px; font-weight: 800; letter-spacing: -.5px; line-height: 1.3; margin-bottom: 12px; }
.lp-fb-text { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.lp-fb-list { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; list-style: none; }
.lp-fb-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-2); align-items: flex-start; }
.lp-fb-check { width: 18px; height: 18px; border-radius: 50%; background: var(--teal-light); color: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.lp-fb-check svg { width: 11px; height: 11px; }
.lp-fb-visual { background: var(--page-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }

/* mini illustrative panels reused across feature blocks + showcase */
.lp-mini-kw-row { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; margin-bottom: 8px; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.lp-mini-kw-row:hover { border-color: var(--teal-mid); box-shadow: var(--shadow-sm); }
.lp-mini-kw-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-mini-kw-row > span:first-child:not(.lp-mini-kw-text) { flex: 1; min-width: 0; }
.lp-mini-kw-bar { width: 64px; height: 5px; border-radius: 3px; background: #F0F1F3; overflow: hidden; flex-shrink: 0; }
.lp-mini-kw-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--teal-mid)); }
.lp-mini-pill { background: var(--teal-light); color: var(--teal); font-weight: 700; font-size: 10.5px; padding: 3px 10px; border-radius: 12px; flex-shrink: 0; }
.lp-mini-url-bar { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.lp-mini-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-mini-stat { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px; transition: box-shadow .15s, border-color .15s; }
.lp-mini-stat:hover { box-shadow: var(--shadow-sm); border-color: var(--teal-mid); }
.lp-mini-stat-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 9px; }
.lp-mini-stat-icon svg { width: 13px; height: 13px; }
.lp-mini-stat-val { font-size: 18px; font-weight: 800; }
.lp-mini-stat-label { font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.lp-mini-spark { display: flex; align-items: flex-end; gap: 3px; height: 36px; margin-top: 8px; }
.lp-mini-spark div { flex: 1; background: var(--teal-mid); border-radius: 2px 2px 0 0; }

/* Tabbed showcase */
.lp-showcase { background: var(--page-bg); }
.lp-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.lp-tab { font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--white); border: 1.5px solid var(--border); border-radius: 24px; padding: 9px 18px; cursor: pointer; transition: all .15s; }
.lp-tab:hover { border-color: var(--teal); color: var(--teal); }
.lp-tab.active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 10px rgba(22,173,175,.25); }
.lp-showcase-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 34px; max-width: 880px; margin: 0 auto; min-height: 260px; }
.lp-showcase-pane { display: none; }
.lp-showcase-pane.active { display: block; }
.lp-sp-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.lp-sp-title svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; }
.lp-panel-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; display: flex; align-items: center; gap: 7px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.lp-panel-title svg { width: 15px; height: 15px; color: var(--teal); flex-shrink: 0; }
.lp-sp-sub { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }

/* Pricing teaser */
.lp-pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.lp-price-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 26px; text-align: center; }
.lp-price-card.lp-featured { border-color: var(--teal); box-shadow: 0 8px 24px rgba(22,173,175,.14); position: relative; }
.lp-price-card.lp-featured::before {
  content: 'POPULAR'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .6px;
  padding: 4px 12px; border-radius: 20px;
}
.lp-price-name { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.lp-price-val { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.lp-price-val span { font-size: 13px; font-weight: 600; color: var(--text-3); }
.lp-price-credits { font-size: 12px; color: var(--text-3); margin: 8px 0 18px; }
.lp-price-card { text-align: left; display: flex; flex-direction: column; }
.lp-price-name, .lp-price-val, .lp-price-credits { text-align: left; }
.lp-price-note { font-size: 11px; color: var(--text-3); line-height: 1.5; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.lp-price-feats { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.lp-price-feats li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 9px; }
.lp-price-feats li.lp-feat-off { color: var(--text-3); }
.lp-feat-check { width: 14px; height: 14px; color: var(--teal); flex-shrink: 0; margin-top: 1px; }
.lp-feat-x { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; margin-top: 1px; }
.lp-price-btn { margin-top: auto; }
.lp-compare-cta { text-align: center; margin-top: 32px; }
.lp-compare-btn { display: inline-block; padding: 12px 28px; }
.lp-price-btn { width: 100%; }

/* Final CTA */
.lp-final-cta { background: var(--sidebar-bg); padding: 72px 0; text-align: center; }
.lp-final-cta-title { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.6px; margin-bottom: 12px; }
.lp-final-cta-sub { font-size: 14px; color: #9CA3AF; margin-bottom: 28px; }

/* Footer */
.lp-footer { background: var(--sidebar-bg); border-top: 1px solid #2A2D33; padding: 52px 0 26px; }
.lp-footer-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding-bottom: 36px; border-bottom: 1px solid #2A2D33; }
.lp-footer-logo-img { height: 24px; width: auto; margin-bottom: 14px; }
.lp-footer-blurb { font-size: 12.5px; color: #8B919A; line-height: 1.7; max-width: 240px; }
.lp-footer-col-title { font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.lp-footer-col a { display: block; font-size: 12.5px; color: #9CA3AF; margin-bottom: 11px; }
.lp-footer-col a:hover { color: #fff; }
.lp-footer-bottom { padding-top: 20px; font-size: 12px; color: #1d1d1b; }

/* Responsive */
@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; margin: 0 auto 20px; max-width: 420px; }
  .lp-feature-block, .lp-feature-block.lp-reverse { grid-template-columns: 1fr; direction: ltr; }
  .lp-pricing-grid { grid-template-columns: 1fr; }
  .lp-footer-top { grid-template-columns: 1fr 1fr; }
  /* Tighter side gutters on phones (feature-block internals are handled in the later
     landing media block so they win over the desktop title clamp). */
  .lp-wrap { padding: 0 18px; }
}
@media (max-width: 600px) {
  .lp-hero-title { font-size: 30px; }
  .lp-section-title { font-size: 23px; }
  .lp-footer-top { grid-template-columns: 1fr; }
}
/* Global guard: nothing on the landing page may cause horizontal scroll. */
html, body { overflow-x: hidden; max-width: 100%; }

/* ════════════════════════════════════════════════════════════
   TITLE GENERATOR
   ════════════════════════════════════════════════════════════ */

/* Page header */
.tg-page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:24px 0 20px; flex-wrap:wrap; }
.tg-page-header-left { flex:1; min-width:0; }
.tg-info-card { display:flex; align-items:flex-start; gap:12px; background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); padding:16px 18px; max-width:320px; flex-shrink:0; }
.tg-info-icon { width:36px; height:36px; background:var(--teal-light); border-radius:var(--r-sm); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--teal); }
.tg-info-icon svg { width:16px; height:16px; }
.tg-info-title { font-size:13px; font-weight:700; margin-bottom:3px; }
.tg-info-sub { font-size:12px; color:var(--text-3); line-height:1.5; }

/* Progress steps */
.tg-steps { display:flex; align-items:center; gap:0; background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); padding:14px 20px; margin-bottom:22px; }
.tg-step { display:flex; align-items:center; gap:10px; }
.tg-step-num { width:28px; height:28px; border-radius:50%; background:var(--border); color:var(--text-3); font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .2s; }
.tg-step.active .tg-step-num { background:var(--teal); color:#fff; }
.tg-step.done .tg-step-num { background:var(--success); color:#fff; }
.tg-step-label { font-size:12px; font-weight:700; color:var(--text-3); }
.tg-step.active .tg-step-label { color:var(--text); }
.tg-step-label span { display:block; font-size:11px; font-weight:500; color:var(--text-3); }
.tg-step-arrow { color:var(--border); margin:0 12px; flex-shrink:0; }
.tg-step-arrow svg { width:14px; height:14px; }

/* Two-column layout */
.tg-layout { display:grid; grid-template-columns:1fr 320px; gap:20px; align-items:start; }
.tg-form-col { min-width:0; }
.tg-preview-col { position:sticky; top:80px; }

/* Form field label */
.tg-field-label { font-size:11px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }

/* Book type toggle */
.tg-type-btn { display:flex; align-items:center; gap:7px; font-family:var(--font); font-size:13px; font-weight:700; padding:10px 18px; border-radius:var(--r-sm); border:1.5px solid var(--border); background:var(--white); color:var(--text-2); cursor:pointer; transition:all .15s; }
.tg-type-btn svg { width:14px; height:14px; }
.tg-type-btn:hover { border-color:var(--teal); color:var(--teal); }
.tg-type-btn.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.tg-type-btn.active svg { stroke:#fff; }

/* Genre chips */
.tg-genre-chips { display:grid; grid-template-columns:repeat(auto-fit, minmax(96px, 1fr)); gap:8px; }
.tg-genre-chip { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:14px 10px; border-radius:var(--r-md); border:1.5px solid var(--border); background:var(--white); color:var(--text-2); font-size:13px; font-weight:700; line-height:1.25; cursor:pointer; transition:all .15s; white-space:nowrap; }
.tg-genre-chip svg { width:22px; height:22px; color:var(--text-3); transition:color .15s; }
.tg-genre-chip:hover { border-color:var(--teal); color:var(--teal); }
.tg-genre-chip:hover svg { color:var(--teal); }
.tg-genre-chip.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.tg-genre-chip.active svg { color:#fff; }

/* Popular topic chips */
.tg-popular-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.tg-popular-label { font-size:11px; color:var(--text-3); margin-bottom:6px; }
.tg-popular-chip { font-size:11.5px; font-weight:600; color:var(--teal); background:var(--teal-light); border:1px solid transparent; border-radius:20px; padding:4px 12px; cursor:pointer; transition:all .15s; }
.tg-popular-chip:hover { background:var(--teal); color:#fff; }

/* Advanced options toggle */
.tg-advanced-toggle { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:var(--page-bg); border-radius:var(--r-sm); cursor:pointer; border:1px solid var(--border); margin-top:16px; transition:background .15s; }
.tg-advanced-toggle:hover { background:#F0F1F3; }
.tg-pro-tip { display:flex; gap:10px; background:var(--teal-light); border-radius:var(--r-sm); padding:12px 14px; margin-top:12px; font-size:12px; line-height:1.5; }

/* CTA bar */
.tg-cta-bar { background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); padding:20px 24px; margin-top:16px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.tg-cta-checklist { flex:1; min-width:200px; }
.tg-check-item { display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-2); margin-top:5px; }
.tg-check-item svg { width:13px; height:13px; flex-shrink:0; }
.tg-generate-btn { display:flex; flex-direction:column; align-items:center; gap:3px; background:var(--teal); color:#fff; border:none; border-radius:var(--r-md); padding:16px 28px; font-family:var(--font); font-size:15px; font-weight:800; cursor:pointer; transition:all .15s; box-shadow:0 4px 14px rgba(22,173,175,.28); min-width:240px; }
.tg-generate-btn:hover { background:#149596; transform:translateY(-1px); box-shadow:0 6px 18px rgba(22,173,175,.35); }

/* Preview panel */
.tg-section-label { font-size:11px; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:.8px; margin-bottom:8px; }
.tg-preview-card { background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); padding:18px; margin-bottom:12px; }
.tg-preview-header { display:flex; align-items:center; gap:6px; font-size: 11px; font-weight:800; color:var(--teal); letter-spacing:.8px; text-transform:uppercase; margin-bottom:6px; }
.tg-preview-sub { font-size:12px; color:var(--text-3); margin-bottom:14px; line-height:1.5; }
.tg-preview-item { border-left:3px solid var(--teal); padding:8px 12px; margin-bottom:8px; }
.tg-preview-item:last-child { margin-bottom:0; }
.tg-preview-item-title { font-size:13px; font-weight:800; line-height:1.3; color:var(--text); }
.tg-preview-item-sub { font-size:11px; color:var(--text-3); margin-top:2px; }
.tg-preview-note { font-size:11px; color:var(--text-3); margin-top:12px; font-style:italic; }
.tg-preview-placeholder { font-size:12px; color:var(--text-3); text-align:center; padding:20px 0; }
.tg-formulas-card { background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); padding:18px; }
.tg-formulas-label { font-size: 11px; font-weight:800; color:var(--teal); letter-spacing:.8px; text-transform:uppercase; margin-bottom:12px; }
.tg-formula-list-item { display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--text-2); margin-bottom:9px; }
.tg-formula-list-item:last-child { margin-bottom:0; }
.tg-formula-list-item svg { width:14px; height:14px; color:var(--success); flex-shrink:0; }

/* Results */
.tg-results-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:12px; }

/* Formula blocks */
.tg-formula-block { background:var(--white); border:1px solid var(--border); border-radius:var(--r-lg); margin-bottom:14px; overflow:hidden; animation:fadeup .35s ease both; }
.tg-formula-block:nth-child(1){animation-delay:.04s} .tg-formula-block:nth-child(2){animation-delay:.09s} .tg-formula-block:nth-child(3){animation-delay:.14s} .tg-formula-block:nth-child(4){animation-delay:.19s} .tg-formula-block:nth-child(5){animation-delay:.24s}
.tg-formula-header { padding:11px 18px; background:var(--teal-light); border-bottom:1px solid var(--border); display:flex; align-items:center; gap:8px; }
.tg-formula-tag { font-size:11px; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:.5px; flex:1; }

/* Title items */
.tg-title-item { padding:16px 18px; border-bottom:1px solid var(--border); transition:background .12s; cursor:pointer; }
.tg-title-item:last-child { border-bottom:none; }
.tg-title-item:hover { background:var(--page-bg); }
.tg-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.tg-title-text { font-size:15px; font-weight:800; line-height:1.35; flex:1; color:var(--text); }
.tg-title-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.tg-score-badge { display:flex; align-items:baseline; gap:4px; font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; border:1.5px solid var(--border); color:var(--text-2); white-space:nowrap; }
.tg-copy-btn { width:28px; height:28px; border-radius:var(--r-sm); border:1.5px solid var(--border); background:var(--white); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all .15s; color:var(--text-3); }
.tg-copy-btn:hover { border-color:var(--teal); color:var(--teal); }
.tg-copy-btn svg { width:13px; height:13px; }

/* Score bars */
.tg-bars { display:grid; gap:6px; margin-bottom:10px; }
.tg-bar-row { display:grid; grid-template-columns:105px 1fr 38px; gap:10px; align-items:center; }
.tg-bar-name { font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.3px; }
.tg-bar-track { height:4px; background:var(--border); border-radius:2px; overflow:hidden; }
.tg-bar-fill { height:100%; border-radius:2px; }
.tg-bar-val { font-size:11px; font-weight:700; color:var(--text-2); text-align:right; }

/* Insight chips */
.tg-chips { display:flex; gap:6px; flex-wrap:wrap; }
.tg-chip { font-size:11px; color:var(--text-2); background:var(--page-bg); border:1px solid var(--border); border-radius:20px; padding:3px 10px; display:flex; align-items:center; gap:4px; }
.tg-chip-arrow { color:var(--teal); font-size: 11px; }

@media (max-width:900px) {
  .tg-layout { grid-template-columns:1fr; }
  .tg-preview-col { position:static; order:-1; }
  .tg-info-card { display:none; }
  .tg-steps { overflow-x:auto; }
}
/* ── Project Drawer ────────────────────────────────────────────────── */
.drawer-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:200; }
.drawer-overlay.open { display:block; }
.proj-drawer { position:fixed; right:0; top:0; bottom:0; width:520px; background:#fff; z-index:201; box-shadow:-4px 0 32px rgba(0,0,0,.12); transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; }
.proj-drawer.open { transform:translateX(0); }
.proj-drawer-header { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-shrink:0; }
.proj-drawer-title { font-size:16px; font-weight:800; color:var(--text); }
.proj-drawer-sub { font-size:12px; color:var(--text-3); margin-top:3px; }
.proj-drawer-close { width:32px; height:32px; border-radius:6px; border:1.5px solid var(--border); background:none; cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--text-3); flex-shrink:0; }
.proj-drawer-close:hover { border-color:var(--teal); color:var(--teal); }
.proj-drawer-body { flex:1; overflow-y:auto; padding:20px 24px; }
.proj-drawer-footer { padding:16px 24px; border-top:1px solid var(--border); display:flex; gap:10px; flex-shrink:0; }
.proj-drawer-section { margin-bottom:20px; }
.proj-drawer-section-title { font-size:11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; }
.proj-drawer-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px; }
.proj-drawer-stat { background:var(--bg); border-radius:8px; padding:10px 12px; }
.proj-drawer-stat-val { font-size:18px; font-weight:800; color:var(--text); }
.proj-drawer-stat-label { font-size: 11px; color:var(--text-3); font-weight:600; text-transform:uppercase; margin-top:2px; }
.proj-drawer-kw-row { display:flex; align-items:center; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--border); font-size:12.5px; }
.proj-drawer-kw-row:last-child { border-bottom:none; }
.proj-drawer-cat-item { padding:10px 12px; border:1px solid var(--border); border-radius:8px; margin-bottom:8px; border-left:3px solid var(--teal); }
.proj-drawer-cat-name { font-size:13px; font-weight:700; }
.proj-drawer-cat-path { font-size:11px; color:var(--text-3); margin-top:2px; }

/* On phones the fixed 520px drawer was wider than the screen, pushing its whole
   contents off the left edge. Cap it to the viewport and shrink the padding. */
@media (max-width: 560px) {
  .proj-drawer { width: 100vw; max-width: 100vw; }
  .proj-drawer-header, .proj-drawer-body, .proj-drawer-footer { padding-left: 16px; padding-right: 16px; }
  .proj-drawer-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .proj-drawer-stat-val { font-size: 16px; }
  /* Keyword rows: keep the term and its volume on opposite ends without overflow. */
  .proj-drawer-kw-row { gap: 10px; }
  .proj-drawer-kw-row > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Sidebar data badges & summary bar ───────────────────────────── */
.sidebar-data-badge { display:inline-flex; align-items:center; justify-content:center; background:var(--teal); color:#fff; font-size: 11px; font-weight:700; min-width:18px; height:18px; border-radius:9px; padding:0 5px; margin-left:6px; }
.sidebar-data-badge.hidden { display:none; }
.data-bar-chip { display:inline-flex; align-items:center; gap:5px; font-family:var(--font); font-size:11px; font-weight:700; color:var(--teal); background:var(--teal-light); border:1.5px solid var(--teal); border-radius:20px; padding:4px 10px; cursor:pointer; transition:all .15s; }
.data-bar-chip:hover { background:var(--teal); color:#fff; }
.data-bar-chip.hidden { display:none; }

/* ── Grouped stat sections ───────────────────────────────────────── */
#opp-stats { display:flex !important; flex-direction:row !important; width:100%; min-height:80px; }
.opp-stat-group { display:flex; flex-direction:column; flex:1; padding:14px 20px; border-left:1px solid var(--border); }
.opp-stat-group:first-child { border-left:none; }
.opp-stat-group-label { font-size: 10px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.6px; margin-bottom:10px; white-space:nowrap; }
.opp-stat-group-cells { display:grid; grid-template-columns:1fr 1fr; gap:10px 20px; }
.opp-stat2 { background:none !important; border-radius:0 !important; padding:0 !important; border:none !important; }
.opp-stat-val2 { font-size:17px; font-weight:800; color:var(--text); line-height:1; margin-bottom:3px; }
.opp-stat-label2 { font-size: 11px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:.5px; }

/* ── Book list column headers ────────────────────────────────────── */
.book-list-header { display:flex; align-items:center; gap:10px; padding:6px 8px; border-bottom:1px solid var(--border); margin-bottom:4px; font-size: 11px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.5px; }

/* ── Book three-dot menu ─────────────────────────────────────────── */
.book-menu-btn:hover { background:var(--bg) !important; border-color:var(--teal) !important; color:var(--teal) !important; }
.book-menu-item { display:flex; align-items:center; gap:8px; width:100%; padding:8px 14px; font-family:var(--font); font-size:12px; font-weight:600; color:var(--text-2); background:none; border:none; cursor:pointer; text-align:left; transition:background .1s; }
.book-menu-item:hover { background:var(--teal-light); color:var(--teal); }

/* ════════════════════════════════════════════════════════
   BOOKTRENDR MOCKUP ALIGNMENT OVERRIDES
   Applied from niche-research-mockup.html visual direction.
   ════════════════════════════════════════════════════════ */
:root {
  --page-bg: #F7F8FA;
  --border: #E5E7EB;
  --text: #1d1d1b;
  /* Contrast raised to meet WCAG AA (was #4B5563 / #9CA3AF). */
  --text-2: #1d1d1b;
  --text-3: #1d1d1b;
  --shadow-sm: none;
  --shadow-md: none;
  --r-md: 10px;
  --r-lg: 12px;
}

body { background: var(--page-bg); }
.nav { background:#fff; border-bottom:1px solid #E5E7EB; }
.nav-logo-img { height: 28px; }
.nav-app { color: #1d1d1b; font-weight:500; letter-spacing:.2px; }
.sidebar { background: linear-gradient(180deg, #0D2B3E 0%, #0A2333 100%); border-right:0.5px solid rgba(255,255,255,0.06); }
/* Mobile sidebar drawer */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #1d1d1b;
  cursor: pointer;
  margin-right: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: #F3F4F6; }
.sidebar-toggle-btn svg { width: 20px; height: 20px; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: rgba(15,23,42,.45);
  z-index: 90;
}
@media (max-width: 900px) {
  .sidebar-toggle-btn { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 95;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0,0,0,.25);
  }
  .sidebar-overlay:not(.hidden) { display: block; }
  .main { margin-left: 0 !important; }

  /* The header has four items competing for a phone-width row. Tighten spacing and
     let the credits pill shrink so nothing overlaps or gets cut off. */
  .nav { padding: 0 12px; gap: 8px; }
  .nav-right { gap: 8px; min-width: 0; }
  .nav-logo-img { height: 22px; }
  .nav-credits { padding: 4px 9px; min-width: 0; flex-shrink: 1; }
  .nav-credits-text { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-avatar { width: 26px; height: 26px; font-size: 11px; flex-shrink: 0; }
  /* The username is already shown inside the account menu, so drop it here rather
     than squeezing the sign-out control off screen. */
  .nav-app { display: none; }
  .nav-auth button { padding: 5px 10px !important; font-size: 11px !important; white-space: nowrap; }
  .nav-divider { display: none; }
}

@media (max-width: 480px) {
  /* On the narrowest screens the credits pill is the least critical item — the
     balance is also shown in the sidebar plan card. */
  .nav-credits { display: none; }
  .nav-logo-img { height: 20px; }
}
.sidebar-label { color:#8CA6B6; font-size: 12px; letter-spacing:1.2px; }
.s-btn, .side-btn { color:#C4D2DB; font-weight:500; border-radius:8px; }
.s-btn:hover, .side-btn:hover { background:rgba(255,255,255,.06); color:#E5EDF2; }
.main { background:#F7F8FA; }

/* Search block — flatter, cleaner, closer to mockup */
.search-hero {
  background:#fff;
  border:0.5px solid #E5E7EB;
  border-radius:12px;
  box-shadow:none;
  padding:22px 24px;
}
.search-eyebrow { color: #1d1d1b; font-size: 10px; font-weight:600; letter-spacing:.8px; margin-bottom:5px; }
.search-title { font-size:24px; font-weight:500; letter-spacing:-.03em; margin-bottom:4px; color: #1d1d1b; }
.search-subtitle { font-size:13px; line-height:1.6; color: #1d1d1b; margin-bottom:16px; max-width:760px; }
.search-iw { background:#fff; border:0.5px solid #D1D5DB; border-radius:12px; padding:12px 15px; }
.search-iw:focus-within { border-color:var(--teal); box-shadow:0 0 0 3px rgba(22,173,175,.08); }
.search-iw input { font-size:14px; font-weight:400; }
.search-go { border-radius:20px; padding:12px 22px; box-shadow:none; font-weight:600; }
.chip2 { background:#fff; border:.5px solid #D1D5DB; font-weight:500; }
.chip2:hover { background:var(--teal-light); }

/* Results summary */
.opp-hero2 {
  border:0.5px solid #E5E7EB;
  border-radius:12px;
  box-shadow:none;
  overflow:hidden;
  background:#fff;
}
.opp-ring-bg2 { stroke:#F3F4F6; stroke-width:7; }
.opp-ring-fill2 { stroke-width:7; }
.opp-num2 { font-size:30px; font-weight:600; }
.opp-verdict2 { font-weight:600; background:#EBF8F8; border:0.5px solid rgba(22,173,175,.28); }
.opp-kw2 { color: #1d1d1b; font-size: 10px; font-weight:600; letter-spacing:.7px; }
.opp-title2 { font-size:22px; font-weight:500; letter-spacing:-.02em; }
.opp-desc2 { font-size:13px; line-height:1.7; color: #1d1d1b; }
.pill2 { font-weight:500; border-radius:20px; }
#opp-stats > div { background:#fff !important; border-color:#E5E7EB !important; }
#opp-stats [style*="font-size:18px"] { font-weight:500 !important; }
#opp-stats [style*="font-size:22px"] { font-weight:500 !important; }
#opp-enhanced { background:#fff; border:0.5px solid #E5E7EB; border-radius:12px; overflow:hidden; }

.ai-sum { background:#fff; border:0.5px solid #E5E7EB; border-left:3px solid var(--teal); box-shadow:none; }
.ai-sum-icon { border-radius:50%; }
.ai-sum-label { color: #1d1d1b; font-size: 10px; font-weight:600; }
.ai-sum-text { color: #1d1d1b; }

/* Mockup-like tabs */
.tab-bar2 { gap:8px; margin:18px 0 12px; }
.tab2 { box-shadow:none; border:.5px solid #D1D5DB; background:#fff; font-size:13px; font-weight:500; padding:8px 16px; }
.tab2.active { box-shadow:none; background:var(--teal); border-color:var(--teal); }
.tab2-generate { background:#111827; border-radius:20px; font-size:13px; font-weight:600; padding:9px 18px; }

/* Main content split — wider list, compact right column */
.two-col2 { grid-template-columns: minmax(0, 1fr) 360px; gap:16px; align-items:start; }
.panel2 { border:0.5px solid #E5E7EB; border-radius:12px; box-shadow:none; padding:0; overflow:hidden; }
.panel2-header { padding:14px 20px 10px; border-bottom:0.5px solid #E5E7EB; margin-bottom:0; }
.panel2-title { font-size:13px; font-weight:600; color: #1d1d1b; text-transform:none; letter-spacing:0; }
.panel2-title svg { width:15px; height:15px; }
.panel2-count, .panel2-action { font-weight:500; }
#bestsellers-list, #newreleases-list, #review-content, #concepts-list { padding:0 20px; }
#right-concepts-panel #concepts-list { padding:16px 20px 4px; }

.book-item2 { padding:12px 0; border-bottom:0.5px solid #E5E7EB; border-radius:0; }
.book-item2:hover { background:#FAFBFC; padding-left:0; }
.book-rank2b { color: #1d1d1b; font-weight:500; }
.book-title2b { font-size:13px; font-weight:500; color: #1d1d1b; }
.book-author2b, .cat2b { color: #1d1d1b; }
.bsr2b, .rating2b, .reviews2b, .price2b, .sales2b, .revenue2b { font-weight:600; }
.bsr2b { background:#EBF8F8; color:#0F6E56; }
.price2b { color: #1d1d1b; }

.concept-card2 { border:0; border-bottom:0.5px solid #E5E7EB; border-radius:0; box-shadow:none; padding:0 0 14px; margin-bottom:14px; }
.concept-card2:hover { transform:none; border-color:#E5E7EB; box-shadow:none; }
.concept-num2 { font-weight:600; }
.concept-title2 { font-weight:500 !important; }

.sticky-bar { background:rgba(255,255,255,.94); border:0.5px solid #E5E7EB; box-shadow:none; }
.action-btn2 { border:.5px solid #D1D5DB; font-weight:600; border-radius:20px; }

@media (max-width: 1100px) {
  .two-col2 { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .search-row { flex-direction:column; align-items:stretch; }
  .search-go { justify-content:center; }
  .search-title { font-size:21px; }
}


/* Research dashboard redesign */
:root {
  --surface: #ffffff;
  --surface-soft: #F7FAFB;
  --line-soft: rgba(17, 24, 39, 0.08);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 18px 44px rgba(15, 23, 42, 0.11), 0 3px 10px rgba(15, 23, 42, 0.05);
}

.main { background: linear-gradient(180deg, #F8FAFB 0%, #F3F6F7 100%); }
#research-results { padding: 18px 32px 34px; max-width: 1480px; margin: 0 auto; }
.search-hero {
  margin: 22px 32px 10px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 12px 34px rgba(13, 43, 62, .10);
  /* A soft teal wash tying the hero to the brand, with a subtle glow top-left so the
     first screen reads as a designed surface rather than an empty white card. */
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(22,173,175,.14), transparent 42%),
    radial-gradient(90% 120% at 100% 0%, rgba(13,43,62,.06), transparent 46%),
    linear-gradient(180deg, #FBFEFE 0%, #FFFFFF 60%);
  padding: 34px 34px 30px;
}
.search-title {
  font-size: 30px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(120deg, #0D2B3E 0%, #16ADAF 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #0D2B3E;
}
.search-eyebrow { color: var(--teal); font-weight: 700; letter-spacing: 1.4px; }
.search-go, .action-btn2, .tab2, .tab2-generate, .ai-sum-action, .copy-btn { min-height: 38px; border-radius: 999px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease; }
.search-go:hover, .action-btn2:hover, .tab2-generate:hover, .ai-sum-action:hover, .copy-btn:hover { transform: translateY(-1px); }

.sidebar-section { padding-top: 18px; }
.s-btn, .side-btn { min-height: 34px; padding: 9px 11px; border-radius: 10px; }
.s-btn svg, .side-btn svg { width: 16px; height: 16px; }
.s-btn:hover, .side-btn:hover { background: rgba(255,255,255,.07); color: #F9FAFB; }
.s-btn.active, .side-btn.active { background: linear-gradient(90deg, rgba(22,173,175,.22), rgba(22,173,175,.10)); color: #22D3D6; box-shadow: inset 3px 0 0 var(--teal); }

.sticky-bar { position: sticky; top: var(--nav-h); z-index: 20; margin: 0; padding: 12px 24px; border-left: 0; border-right: 0; border-radius: 0; backdrop-filter: blur(14px); }
.sticky-kw { font-size: 14px; font-weight: 700; }
.action-btn2 { height: 38px; padding: 0 17px; background: #fff; color: #1d1d1b; }
.action-btn2.primary2 { background: linear-gradient(135deg, var(--teal), #11C7B4); color: #fff; border-color: transparent; box-shadow: 0 9px 22px rgba(22,173,175,.24); }

.opp-hero2 { margin: 0 0 20px; padding: 0; border-radius: 16px; border: 1px solid var(--line-soft); box-shadow: var(--shadow-card); background: radial-gradient(circle at 12% 8%, rgba(22,173,175,.10), transparent 28%), #fff; }
.opp-hero2-main { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 30px; align-items: center; padding: 28px 30px 24px; }
.opp-score-panel2 { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-right: 28px; border-right: 1px solid var(--line-soft); }
.opp-ring2 svg { width: 136px; height: 136px; overflow: visible; }
.opp-ring-bg2 { stroke: #EEF2F4; stroke-width: 8; fill: none; }
.opp-ring-fill2 { stroke: url(#tealGrad2); stroke-width: 8; fill: none; stroke-linecap: round; stroke-dasharray: 283; transform: rotate(-90deg); transform-origin: center; }
.opp-num2 { font-size: 36px; font-weight: 800; color: var(--teal); letter-spacing: 0; }
.opp-denom2 { color: #64748B; font-size: 13px; font-weight: 700; }
.opp-score-caption2 { margin-top: 13px; font-size: 12px; font-weight: 800; color: #0F172A; }
.opp-verdict2 { margin-top: 8px; padding: 7px 16px; border-radius: 999px; color: #0F766E; background: #E8FAF8; border: 1px solid rgba(22,173,175,.24); font-size: 12px; font-weight: 800; }
.opp-kw2 { margin-bottom: 8px; color: #64748B; font-size: 11px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.opp-title2 { max-width: 860px; font-size: 25px; line-height: 1.22; font-weight: 800; color: #1d1d1b; letter-spacing: 0; }
.opp-desc2 { max-width: 900px; margin-top: 8px; font-size: 14px; line-height: 1.7; color: #1d1d1b; }
.opp-pills2 { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.pill2 { min-height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill-red2 { background: var(--danger-bg); color: #B4232D; }

.opp-kpi-grid2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 30px 28px; }
.opp-sources2 { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; margin-top: 2px; padding: 12px 15px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(248,250,251,.7); font-size: 11.5px; line-height: 1.55; color: #6B7684; }
.opp-sources2 svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: #9AA3AE; }
.opp-sources2 strong { color: #475262; font-weight: 700; }
/* KPI cards are informational, not interactive — no hover lift */
.opp-kpi-icon2 { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.opp-kpi-icon2 svg { width: 16px; height: 16px; }
.opp-kpi-icon2.sales { background: #E8FAF8; color: var(--teal); }
.opp-kpi-icon2.reviews { background: #EEF2FF; color: #6366F1; }
.opp-kpi-icon2.price { background: #FFF7E6; color: #C47A00; }
.opp-kpi-icon2.revenue { background: #ECFDF3; color: #16A34A; }
.opp-kpi-label2 { position: absolute; top: 20px; left: 58px; right: 16px; font-size: 11px; font-weight: 800; color: #7C8594; text-transform: uppercase; letter-spacing: .7px; }
.opp-kpi-value2 { font-size: 25px; font-weight: 800; line-height: 1.05; color: #1d1d1b; }
.opp-kpi-value2.teal { color: var(--teal); }
.opp-kpi-sub2 { margin-top: 8px; font-size: 12px; color: #1d1d1b; line-height: 1.45; }
.opp-kpi-split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opp-kpi-split2 strong { display: block; font-size: 22px; line-height: 1.05; color: #1d1d1b; }
.opp-kpi-split2 span { display: block; margin-top: 7px; font-size: 11px; font-weight: 800; color: #8A94A3; text-transform: uppercase; letter-spacing: .55px; }

.ai-sum { margin: 0 0 18px; padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(22,173,175,.18); background: linear-gradient(135deg, #F4FEFD, #FFFFFF); box-shadow: var(--shadow-card); border-left: 1px solid rgba(22,173,175,.18); }
.ai-sum-icon { width: 38px; height: 38px; border-radius: 13px; background: linear-gradient(135deg, var(--teal), #11C7B4); box-shadow: 0 10px 24px rgba(22,173,175,.22); }
.ai-sum-label { font-size: 11px; color: #0F766E; letter-spacing: .8px; }
.ai-sum-text { max-width: 980px; font-size: 13px; line-height: 1.65; color: #334155; }
.ai-sum-action { margin-top: 12px; padding: 0 16px; border: 0; background: #111827; color: #fff; font: 800 12px var(--font); cursor: pointer; }

.tab-bar2 { margin: 16px 0 16px; padding: 4px; gap: 4px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255,255,255,.72); width: fit-content; min-width: min(100%, 520px); box-shadow: 0 5px 18px rgba(15, 23, 42, .045); }
.tab2 { height: 36px; padding: 0 18px; border: 0; background: transparent; box-shadow: none; color: #64748B; font-weight: 800; }
.tab2:hover { background: #F1F5F6; color: #0F766E; }
.tab2.active { background: var(--teal); color: #fff; border: 0; box-shadow: 0 8px 18px rgba(22,173,175,.23); }
.tab2-generate { margin-left: 8px; height: 40px; padding: 0 18px; background: #080B0F; box-shadow: 0 10px 22px rgba(15,23,42,.20); }

.two-col2 { grid-template-columns: minmax(0, 1fr) 370px; gap: 18px; align-items: start; }
.panel2 { border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow-card); background: #fff; }
.panel2-header { padding: 18px 20px 14px; border-bottom: 1px solid rgba(17,24,39,.06); }
.panel2-title { font-size: 14px; font-weight: 800; color: #1d1d1b; }
.panel2-action { font-size: 12px; font-weight: 800; }
#bestsellers-list, #newreleases-list, #review-content { padding: 2px 20px 18px; }
#right-concepts-panel #concepts-list { padding: 18px 18px 8px; }

#bestsellers-list > div:first-child, #newreleases-list > div:first-child { grid-template-columns: 28px 58px minmax(220px,1fr) 112px 72px 100px 34px !important; padding: 10px 0 9px !important; }
.book-item2 { grid-template-columns: 28px 58px minmax(220px,1fr) 112px 72px 100px 34px !important; min-height: 84px; gap: 12px !important; padding: 12px 0 !important; border-bottom: 1px solid rgba(17,24,39,.06) !important; }
.book-item2:hover { background: #F8FBFC; border-radius: 12px; padding-left: 10px !important; padding-right: 10px !important; }
.book-cover2b { width: 52px; height: 72px; border-radius: 7px; box-shadow: 0 9px 18px rgba(15,23,42,.14); }
.book-title2b { font-size: 13.5px; line-height: 1.35; font-weight: 800; }
.book-author2b { margin-top: 3px; font-size: 11px; }
.bsr2b, .rating2b, .reviews2b, .sales2b, .revenue2b { border-radius: 999px; padding: 3px 8px; background: #F4F7F8; }
.book-menu-btn:hover { border-color: var(--teal) !important; color: var(--teal) !important; background: #F4FEFD !important; }

#right-concepts-panel { background: linear-gradient(180deg, #FFFFFF 0%, #FAFEFE 100%); }
.concept-card2 { padding: 16px 0 18px; border-bottom: 1px solid rgba(17,24,39,.07); gap: 12px; }
.concept-card2:hover { background: transparent; transform: none; }
.concept-num2 { width: 28px; height: 28px; background: linear-gradient(135deg, var(--teal), #11C7B4); font-weight: 800; }
.concept-title2 { font-size: 13px; line-height: 1.45; font-weight: 800 !important; }
.concept-tag2 { background: #F1F5F6; border: 0; padding: 4px 9px; }
.copy-btn { height: 34px; padding: 0 13px; border: 1px solid #E5B53D; background: #FFFCF2; color: #9A6500; font-weight: 800; }

#opp-enhanced { margin: 0 0 18px !important; border-radius: 16px !important; border: 1px solid var(--line-soft) !important; box-shadow: var(--shadow-card); }
.data-bar-chip { border-radius: 999px; }

@media (max-width: 1100px) {
  #research-results { padding: 16px 18px 28px; }
  .search-hero { margin: 18px; }
  .opp-hero2-main { grid-template-columns: 1fr; }
  .opp-score-panel2 { border-right: 0; border-bottom: 1px solid var(--line-soft); padding-right: 0; padding-bottom: 22px; }
  .opp-kpi-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  #research-results { padding: 12px; }
  .search-hero { margin: 12px; padding: 20px; }
  .sticky-bar { top: var(--nav-h); padding: 10px 12px; gap: 8px; }
  .opp-hero2-main { padding: 22px 18px; }
  .opp-kpi-grid2 { grid-template-columns: 1fr; padding: 0 18px 20px; }
  .tab-bar2 { width: 100%; min-width: 0; border-radius: 16px; }
  .tab2-spacer { display: none; }
  .tab2-generate { width: 100%; justify-content: center; margin-left: 0; }
  #bestsellers-list > div:first-child, #newreleases-list > div:first-child { display: none !important; }
  .book-item2 { grid-template-columns: 22px 54px 1fr 34px !important; }
  .book-item2 > div:nth-child(4), .book-item2 > div:nth-child(5), .book-item2 > div:nth-child(6) { display: none; }
}


/* Research dashboard cleanup: remove duplicated legacy analysis surface */
#opp-enhanced { display: none !important; }
.ai-sum-action { display: none !important; }
.opp-verdict2 { max-width: 170px; text-align: center; line-height: 1.25; }
.opp-ring-center2 { text-align: center; }
.opp-num2 { line-height: .9; }
.opp-denom2 { margin-top: 4px; }
@media (min-width: 1280px) {
  #research-results { max-width: 1600px; }
  .opp-hero2-main { grid-template-columns: 220px minmax(0, 1fr); }
}


/* Research dashboard refinement: keep difficulty explanation, improve score card */
#opp-enhanced:not(.hidden) {
  display: block !important;
  margin: 0 0 18px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
#opp-enhanced > div:nth-child(1),
#opp-enhanced > div:nth-child(2) {
  display: none !important;
}
#opp-enhanced > div:nth-child(3) {
  display: block !important;
  padding: 20px 24px !important;
  border: 0 !important;
}
#opp-enhanced > div:nth-child(3) > div:first-child {
  margin-bottom: 10px !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .7px !important;
}
#opp-difficulty-explain {
  max-width: 980px;
  color: #334155;
}
#opp-difficulty-explain [style*="font-size:15px"] {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--danger-bg);
  margin-bottom: 10px !important;
}

.opp-hero2-main {
  grid-template-columns: 190px minmax(0, 1fr) !important;
  gap: 28px !important;
  padding: 26px 30px 22px !important;
}
.opp-score-panel2 {
  align-self: stretch;
  padding: 20px 22px !important;
  border-right: 1px solid var(--line-soft) !important;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22,173,175,.10), rgba(255,255,255,.72));
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.08);
}
.opp-ring2 {
  width: 126px !important;
  height: 126px !important;
  margin: 0 auto;
}
.opp-ring2 svg {
  width: 126px !important;
  height: 126px !important;
  transform: none !important;
  overflow: visible;
}
.opp-ring-bg2 { stroke-width: 8 !important; }
.opp-ring-fill2 {
  stroke-width: 8 !important;
  transform: rotate(-90deg) !important;
  transform-origin: center !important;
}
.opp-ring-center2 { inset: 0 !important; }
.opp-num2 {
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}
.opp-denom2 {
  font-size: 12px !important;
  line-height: 1.1 !important;
  margin-top: 2px !important;
  color: #64748B !important;
}
.opp-score-caption2 {
  margin-top: 10px !important;
  font-size: 11px !important;
  color: #334155 !important;
  white-space: nowrap;
}
/* Opportunity Score info tooltip */
.opp-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  color: #94A3B8;
  cursor: help;
  vertical-align: middle;
  outline: none;
}
.opp-info svg { width: 13px; height: 13px; display: block; }
.opp-info:hover, .opp-info:focus { color: var(--teal); }
.opp-tip {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: 230px;
  max-width: 76vw;
  background: #1B1D21;
  color: #E8EBEF;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 80;
  pointer-events: none;
}
.opp-tip strong { color: #fff; font-weight: 800; }
.opp-tip-note {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: #A9B2BD;
  font-size: 10px;
}
.opp-tip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #1B1D21;
}
.opp-info:hover .opp-tip, .opp-info:focus .opp-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 640px) {
  .opp-tip { width: 200px; left: 0; transform: translateX(0) translateY(-4px); }
  .opp-tip::after { left: 16px; }
  .opp-info:hover .opp-tip, .opp-info:focus .opp-tip { transform: translateX(0) translateY(0); }
}
.opp-verdict2 {
  display: block !important;
  width: 100%;
  max-width: 150px !important;
  margin-top: 10px !important;
  padding: 7px 10px !important;
  text-align: center;
  white-space: normal;
}
@media (max-width: 1100px) {
  .opp-hero2-main { grid-template-columns: 1fr !important; }
  .opp-score-panel2 { border-right: 0 !important; border-bottom: 1px solid var(--line-soft) !important; }
}


/* Research dashboard block order */
.research-insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 18px;
  align-items: stretch;
  margin: 0 0 16px;
}
.research-insight-row #opp-enhanced:not(.hidden),
.research-insight-row .ai-sum:not(.hidden) {
  margin: 0 !important;
  min-height: 154px;
}
.research-insight-row .ai-sum {
  align-items: flex-start;
}
.research-insight-row .ai-sum > div:last-child {
  min-width: 0;
}
#research-data-bar:not(.hidden) {
  display: flex !important;
  margin: 2px 0 12px !important;
  padding: 0 !important;
}
.tab-bar2 {
  margin-top: 0 !important;
}
@media (max-width: 980px) {
  .research-insight-row { grid-template-columns: 1fr; }
  .research-insight-row #opp-enhanced:not(.hidden),
  .research-insight-row .ai-sum:not(.hidden) { min-height: 0; }
}


/* Right-column theme focus card */
.right-themes-panel {
  background: #fff;
}
.themes-panel-header {
  align-items: center;
}
.themes-panel-header .panel2-title {
  color: #7C8594;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.themes-action {
  border: 0;
  background: transparent;
  font-family: var(--font);
  color: var(--teal);
  cursor: pointer;
  padding: 0;
}
.theme-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}
.theme-focus-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #E8FAF8;
  color: #087D7F;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(22,173,175,.18);
}
.theme-empty {
  color: var(--text-3);
  font-size: 12px;
}


/* Align search and sticky result actions with result cards */
.search-hero,
.sticky-bar,
.research-ghost {
  width: min(calc(100% - 64px), 1536px) !important;
  max-width: 1536px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.search-hero {
  margin-top: 22px !important;
  margin-bottom: 10px !important;
}
.sticky-bar {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: 16px !important;
}
.search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
}
.search-go,
.action-btn2.primary2 {
  white-space: nowrap;
}
@media (min-width: 1544px) {
  .search-hero,
  .sticky-bar,
  .research-ghost {
    width: 1536px !important;
  }
}
@media (max-width: 900px) {
  .search-hero,
  .sticky-bar,
  .research-ghost {
    width: calc(100% - 36px) !important;
  }
}
@media (max-width: 720px) {
  .search-hero,
  .sticky-bar,
  .research-ghost {
    width: calc(100% - 24px) !important;
  }
  .search-row {
    grid-template-columns: 1fr !important;
  }
}


/* Branded book format price icons */
.price-line,
.price2b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.price-line {
  width: 100%;
  font-weight: 800;
  color: #1d1d1b;
}
.price-line-kindle { font-size: 12px; }
.price-line-print { margin-top: 4px; font-size: 11px; color: #64748B; font-weight: 700; }
.price-format-icon {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
}
.price-format-icon svg {
  width: 11px;
  height: 11px;
}
.price-format-icon.ebook {
  color: var(--teal);
  background: #E8FAF8;
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.18);
}
.price-format-icon.print {
  color: #64748B;
  background: #F1F5F9;
  box-shadow: inset 0 0 0 1px rgba(100,116,139,.16);
}
.price2b.print-price {
  color: #64748B;
}


/* Revenue KPI estimate disclaimer */
.opp-kpi-note2 {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(17,24,39,.06);
  color: #8A94A3;
  font-size: 10.5px;
  line-height: 1.45;
}


/* Keyword table score help */
.kw-table th {
  overflow: visible;
}
.kw-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  border-radius: 999px;
  background: #E8FAF8;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.18);
}
.kw-help::after {
  content: attr(aria-label);
  position: absolute;
  left: auto;
  right: -12px;
  top: calc(100% + 9px);
  width: 320px;
  max-width: min(320px, 78vw);
  min-height: max-content;
  padding: 11px 13px;
  border-radius: 10px;
  background: #101418;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  box-sizing: border-box;
  box-shadow: 0 14px 36px rgba(15,23,42,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .16s ease, transform .16s ease;
  z-index: 1000;
}
.kw-help::before {
  content: '';
  position: absolute;
  right: 2px;
  top: calc(100% + 4px);
  border: 5px solid transparent;
  border-bottom-color: #101418;
  opacity: 0;
  transition: opacity .16s ease;
  z-index: 1001;
}
.kw-help:hover::after,
.kw-help:focus::after,
.kw-help:hover::before,
.kw-help:focus::before {
  opacity: 1;
}
.kw-help:hover::after,
.kw-help:focus::after {
  transform: translateY(0);
}


/* Premium Keywords view */
.keywords-view {
  background: radial-gradient(circle at 18% 0%, rgba(22,173,175,.055), transparent 34%), #F6F8FA;
  min-height: calc(100vh - 56px);
}
.keywords-view .view-header {
  width: min(1536px, calc(100% - 64px));
  margin: 0 auto;
  padding: 34px 0 22px;
}
.keywords-view .view-title {
  font-size: 24px;
  letter-spacing: 0;
}
.keywords-view .view-title svg {
  width: 28px !important;
  height: 28px !important;
  padding: 5px;
  border-radius: 10px;
  background: #E8FAF8;
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.16);
}
.keywords-view .view-sub {
  font-size: 14px;
  color: #7B8494;
}
.keyword-page-shell {
  width: min(1536px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 48px;
}
.keyword-search-hero,
.keyword-results-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.075);
}
.keyword-search-hero {
  padding: 24px;
  margin-bottom: 18px;
}
.keyword-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 11px;
}
.keyword-search-input {
  height: 52px;
  border: 1px solid #D7DEE8 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  color: var(--text) !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.keyword-search-input:focus {
  border-color: rgba(22,173,175,.58) !important;
  box-shadow: 0 0 0 4px rgba(22,173,175,.11) !important;
}
.keyword-search-btn {
  height: 52px;
  min-width: 144px;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(22,173,175,.20);
}
.keyword-search-note {
  color: #7B8494;
  font-size: 12px;
}
.keyword-results-card {
  padding: 18px 18px 10px;
  overflow: visible;
}
.keyword-results-card #keywords-table,
.keyword-results-card #kwtool-table {
  overflow: visible;
}
.keywords-view .kw-table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.keywords-view .kw-table tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }
.keyword-results-card #keywords-table > p,
.keyword-results-card #kwtool-table > p {
  margin: 0;
  padding: 28px 10px;
  color: #7B8494 !important;
}
/* Reverse ASIN view — match Keywords design */
#view-asin .asin-search-card,
#view-asin .asin-product-card,
#view-asin .kw-panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.075);
}
#view-asin .asin-search-card {
  padding: 24px;
  margin-bottom: 18px;
}
#view-asin .asin-input-wrap {
  height: 52px;
  border: 1px solid #D7DEE8;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 0 18px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
#view-asin .asin-input-wrap:focus-within {
  border-color: rgba(22,173,175,.58);
  box-shadow: 0 0 0 4px rgba(22,173,175,.11);
}
#view-asin .asin-search-row .btn.primary {
  height: 52px;
  min-width: 144px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(22,173,175,.20);
}
#view-asin .asin-product-card {
  padding: 18px 24px;
  margin-bottom: 18px;
}
#view-asin .kw-panel {
  padding: 18px 18px 12px;
}
@media (max-width: 900px) {
  #view-asin .asin-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  #view-asin .asin-search-row .btn.primary {
    width: 100%;
    justify-content: center;
  }
}
/* URL Analysis view — match Keywords design */
#view-urlanalysis .url-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.075);
  padding: 24px;
  margin-bottom: 18px;
}
#view-urlanalysis .url-iw {
  height: 52px;
  border: 1px solid #D7DEE8;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 0 18px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
#view-urlanalysis .url-iw:focus-within {
  border-color: rgba(22,173,175,.58);
  box-shadow: 0 0 0 4px rgba(22,173,175,.11);
}
#view-urlanalysis .url-row .btn.primary {
  height: 52px;
  min-width: 144px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(22,173,175,.20);
}
@media (max-width: 900px) {
  #view-urlanalysis .url-row {
    flex-direction: column;
    align-items: stretch;
  }
  #view-urlanalysis .url-row .btn.primary {
    width: 100%;
    justify-content: center;
  }
}
/* Shared header treatment for views using mon-header (Projects, Settings, Monitor) */
.keywords-view .mon-header {
  padding-top: 34px;
}
.keywords-view .mon-title {
  font-size: 24px;
}
.keywords-view .mon-title svg {
  width: 28px !important;
  height: 28px !important;
  padding: 5px;
  border-radius: 10px;
  background: #E8FAF8;
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.16);
}
.keywords-view .mon-sub {
  font-size: 14px;
  color: #7B8494;
}
/* Monitor views — match Keywords design */
.keywords-view .plan-limit,
.keywords-view .alerts-sum-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
.keywords-view .mbook-card,
.keywords-view .auth-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
.keywords-view .mbook-card:hover,
.keywords-view .auth-card:hover {
  box-shadow: 0 14px 34px rgba(15,23,42,.09);
}
.keywords-view .alert-card {
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
.keywords-view .alert-card:hover {
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}
.keywords-view .add-book-form {
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
.keywords-view .add-book-input {
  height: 52px;
  border: 1px solid #D7DEE8;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 0 18px;
}
.keywords-view .add-book-input:focus {
  border-color: rgba(22,173,175,.58);
  box-shadow: 0 0 0 4px rgba(22,173,175,.11);
}
.keywords-view .alert-filter-btn:not(.active) {
  border-color: #DDE4ED;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
.keywords-view .alert-filter-btn.active {
  background: linear-gradient(135deg, var(--teal), #10B8B1);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(22,173,175,.20);
}
/* Loading overlay progress bar */
.loading-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.loading-progress-track {
  width: 260px;
  height: 6px;
  border-radius: 6px;
  background: #E6EBF2;
  overflow: hidden;
}
.loading-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--teal), #10B8B1);
  transition: width .25s ease;
}
.loading-progress-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 32px;
}
.loading-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: #7B8494;
}
/* Title Generator blocks — match Keywords card shadows */
#view-titlegenerator .panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.075);
}
#view-titlegenerator .tg-preview-card,
#view-titlegenerator .tg-formula-block {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
#view-titlegenerator .tg-steps,
#view-titlegenerator .tg-info-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
#view-settings .settings-nav,
#view-settings .settings-panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
#view-settings .settings-nav {
  padding: 10px;
}
#view-settings .settings-nav-item {
  border-radius: 10px;
  padding: 10px 12px;
}
#view-settings .settings-nav-item.active {
  background: linear-gradient(135deg, var(--teal), #10B8B1);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(22,173,175,.20);
}
#view-projects .proj-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-left-width: 4px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
#view-projects .proj-card:hover {
  box-shadow: 0 14px 34px rgba(15,23,42,.09);
  transform: translateY(-2px);
}
#view-projects .proj-type-tab:not(.active) {
  border-color: #DDE4ED;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
#view-projects .proj-type-tab.active {
  background: linear-gradient(135deg, var(--teal), #10B8B1);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(22,173,175,.20);
}
.keywords-view .kw-filters {
  gap: 10px;
  margin-bottom: 18px;
}
.keywords-view .kw-search {
  height: 42px;
  min-width: 260px;
  padding: 0 13px;
  border: 1px solid #DDE4ED;
  border-radius: 12px;
  background: #F8FAFC;
}
.keywords-view .kw-search:focus-within {
  border-color: rgba(22,173,175,.58);
  box-shadow: 0 0 0 4px rgba(22,173,175,.10);
  background: #FFFFFF;
}
.keywords-view .kw-search input {
  font-size: 13px;
}
.keywords-view .filter-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: #DDE4ED;
  background: #FFFFFF;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
.keywords-view .filter-pill.active {
  background: linear-gradient(135deg, var(--teal), #10B8B1);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(22,173,175,.20);
}
.keywords-view .kw-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.keywords-view .kw-table th {
  padding: 12px 14px;
  border-bottom: 1px solid #E6EBF2;
  color: #8B95A5;
  background: #FBFCFD;
}
.keywords-view .kw-table th:first-child { border-top-left-radius: 12px; }
.keywords-view .kw-table th:last-child { border-top-right-radius: 12px; }
.keywords-view .kw-table td {
  padding: 15px 14px;
  border-bottom: 1px solid #EEF2F6;
  background: #FFFFFF;
}
.keywords-view .kw-table tbody tr:hover td {
  background: #F9FCFC;
}
.keywords-view .kw-word {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}
.keywords-view .kw-vol {
  color: #334155;
  font-size: 13px;
}
.keywords-view .kw-type,
.keywords-view .kw-opp {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
}
.keywords-view .kw-bar-wrap {
  min-width: 150px;
}
.keywords-view .kw-bar {
  height: 6px;
  background: #EDF1F5;
}
.keywords-view .kw-bar-fill {
  height: 6px;
  background: linear-gradient(90deg, #16ADAF, #31C48D);
}
.keywords-view .kw-score {
  font-size: 14px;
  color: #00A8AB;
}
.keywords-view .kw-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #E8FAF8;
  color: var(--teal);
  font-size: 12px;
  text-decoration: none !important;
  transition: all .16s ease;
}
.keywords-view .kw-action:hover {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(22,173,175,.18);
}
@media (max-width: 900px) {
  .keywords-view .view-header,
  .keyword-page-shell {
    width: calc(100% - 36px);
  }
  .keyword-search-row {
    grid-template-columns: 1fr;
  }
  .keyword-search-btn {
    width: 100%;
  }
  .keyword-results-card {
    overflow-x: auto;
  }
  .keywords-view .kw-table {
    min-width: 760px;
  }
}
@media (max-width: 720px) {
  .keywords-view .view-header,
  .keyword-page-shell {
    width: calc(100% - 24px);
  }
  .keyword-search-hero,
  .keyword-results-card {
    border-radius: 14px;
    padding: 16px;
  }
}


/* Honest category fit cards */
.cat2-fit-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: #F6F8FA;
  border: 1px solid #EEF2F6;
}
.cat2-fit-item {
  min-width: 0;
}
.cat2-fit-item span {
  display: block;
  margin-bottom: 5px;
  color: #8B95A5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}
.cat2-fit-item strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}
.cat2-fit-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px !important;
}
.cat2-fit-badge.fit-strong { background: var(--teal-light); color: var(--teal); }
.cat2-fit-badge.fit-good { background: var(--success-bg); color: #1A8C50; }
.cat2-fit-badge.fit-loose { background: var(--warning-bg); color: #9B7C0A; }
.cat2-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1.5px solid #D7DEE8;
  background: #FFFFFF;
  color: #64748B;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
}
.cat2-copy:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: #F4FCFB;
}
.cat2-copy svg {
  width: 12px;
  height: 12px;
}
.cat2-score-label {
  text-transform: uppercase;
  letter-spacing: .25px;
}
@media (max-width: 620px) {
  .cat2-fit-panel {
    grid-template-columns: 1fr;
  }
  .cat2-footer {
    align-items: stretch;
  }
  .cat2-copy,
  .cat2-link {
    width: 100%;
    justify-content: center;
  }
}


/* Compact category fit cards */
.cat2-card.cat2-compact {
  padding: 16px 18px;
  min-height: 0;
  cursor: default;
}
.cat2-card.cat2-compact:hover {
  transform: translateY(-1px);
}
.cat2-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cat2-card-head .cat2-badge {
  margin-bottom: 0;
}
.cat2-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 62px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.055);
  white-space: nowrap;
}
.cat2-card.cat2-compact .cat2-name {
  margin-bottom: 5px;
}
.cat2-card.cat2-compact .cat2-path {
  margin-bottom: 12px;
  line-height: 1.45;
}
.cat2-fit-line {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.cat2-card.cat2-compact .cat2-fit-badge {
  min-height: 26px;
  padding: 5px 11px;
  font-size: 11.5px !important;
  font-weight: 850;
}
.cat2-card.cat2-compact .cat2-footer {
  padding-top: 12px;
  gap: 10px;
}
.cat2-card.cat2-compact .cat2-copy {
  height: 34px;
  padding: 0 15px;
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), #10B8B1);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(22,173,175,.16);
}
.cat2-card.cat2-compact .cat2-copy:hover {
  background: #0F9B9D;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.cat2-card.cat2-compact .cat2-link {
  height: 34px;
  border-radius: 999px;
  padding: 0 15px;
}


/* Research topic context chips */
.research-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #E8FAF8;
  color: var(--teal);
  border: 1px solid rgba(22,173,175,.18);
  box-shadow: 0 5px 16px rgba(15,23,42,.035);
  font-size: 12px;
  line-height: 1.2;
}
.research-topic-chip span {
  color: #5F6F83;
  font-weight: 750;
}
.research-topic-chip strong {
  color: var(--teal);
  font-weight: 900;
  max-width: min(460px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ideas-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 32px;
  margin: -8px 0 18px;
  flex-wrap: wrap;
}
.ideas-topic-row .view-desc {
  margin: 0;
  padding: 0;
}
.ideas-topic-row .research-topic-chip {
  margin-top: 0;
}
@media (max-width: 720px) {
  .ideas-topic-row {
    padding: 0 18px;
  }
  .research-topic-chip strong {
    max-width: 58vw;
  }
}


/* Premium Categories view */
.categories-view {
  background: radial-gradient(circle at 18% 0%, rgba(22,173,175,.055), transparent 34%), #F6F8FA;
  min-height: calc(100vh - 56px);
}
.categories-view .view-header {
  width: min(1536px, calc(100% - 64px));
  margin: 0 auto;
  padding: 34px 0 22px;
}
.categories-view .view-title {
  font-size: 24px;
  letter-spacing: 0;
}
.categories-view .view-title svg {
  width: 28px !important;
  height: 28px !important;
  padding: 5px;
  border-radius: 10px;
  background: #E8FAF8;
  box-shadow: inset 0 0 0 1px rgba(22,173,175,.16);
}
.categories-view .view-sub {
  font-size: 14px;
  color: #7B8494;
}
.category-page-shell {
  width: min(1536px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 48px;
}
.category-search-hero,
.category-results-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.075);
}
.category-search-hero {
  padding: 24px;
  margin-bottom: 18px;
}
.category-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 11px;
}
.category-search-input {
  height: 52px;
  border: 1px solid #D7DEE8 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  color: var(--text) !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.category-search-input:focus {
  border-color: rgba(22,173,175,.58) !important;
  box-shadow: 0 0 0 4px rgba(22,173,175,.11) !important;
}
.category-search-btn {
  height: 52px;
  min-width: 150px;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(22,173,175,.20);
}
.category-search-note {
  color: #7B8494;
  font-size: 12px;
}
.category-results-card {
  padding: 18px;
  overflow: visible;
}
.category-results-card #categories-content > p,
.category-results-card #cattool-content > p {
  margin: 0;
  padding: 28px 10px;
  color: #7B8494 !important;
}
.categories-view .cat2-grid {
  gap: 14px;
  margin-bottom: 16px;
}
.categories-view .cat2-card {
  border: 1px solid #DDE4ED;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
}
.categories-view .cat2-card.best {
  border-color: var(--teal);
  box-shadow: 0 14px 34px rgba(22,173,175,.09);
}
.categories-view .cat2-card-head {
  margin-bottom: 11px;
}
.categories-view .cat2-name {
  font-size: 17px;
  letter-spacing: 0;
}
.categories-view .cat2-path {
  color: #008E91;
  font-size: 11.5px;
}
.categories-view .cat-hint {
  border: 1px solid rgba(22,173,175,.16);
  border-radius: 16px;
  background: linear-gradient(135deg, #EFFFFD, #F6FFFF);
  box-shadow: 0 10px 26px rgba(15,23,42,.04);
}
@media (max-width: 900px) {
  .categories-view .view-header,
  .category-page-shell {
    width: calc(100% - 36px);
  }
  .category-search-row {
    grid-template-columns: 1fr;
  }
  .category-search-btn {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .categories-view .view-header,
  .category-page-shell {
    width: calc(100% - 24px);
  }
  .category-search-hero,
  .category-results-card {
    border-radius: 14px;
    padding: 16px;
  }
}

/* Structured opportunity insight cards */
.insight-mini-title {
  font-size: 11px;
  font-weight: 800;
  color: #0F766E;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
}
.insight-main {
  font-size: 14px;
  line-height: 1.45;
  color: #0F172A;
  margin-bottom: 8px;
}
.insight-copy {
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 12px;
}
.insight-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.insight-fact {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(22, 173, 175, .10);
  color: #0F766E;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}
.insight-bridge {
  padding: 10px 12px;
  border-radius: 10px;
  background: #F8FAFC;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}
.difficulty-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}
.difficulty-meaning {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 12px;
}
.difficulty-driver-list {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}
.difficulty-driver {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}
.difficulty-driver::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.difficulty-note {
  font-size: 12px;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 8px;
}
.difficulty-source {
  font-size: 11px;
  color: #94A3B8;
}

.difficulty-best-path {
  padding: 10px 12px;
  border-radius: 10px;
  background: #F8FAFC;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.difficulty-caveat {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFF7ED;
  color: #7C2D12;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
}


/* Difficulty + market pattern insight row */
.research-insight-row #opp-enhanced:not(.hidden),
.research-insight-row #right-themes-panel:not(.hidden) {
  display: block !important;
  margin: 0 !important;
  min-height: 0 !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.research-insight-row #opp-enhanced > div:nth-child(1) {
  display: flex !important;
  padding: 18px 20px 12px !important;
  border-bottom: 0 !important;
}
.research-insight-row #opp-enhanced > div:nth-child(2) {
  display: block !important;
  padding: 0 20px 20px !important;
  border: 0 !important;
}
.difficulty-panel .panel2-title,
.right-themes-panel .panel2-title {
  color: #64748B !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.difficulty-facts {
  margin: 12px 0 10px !important;
}
.research-insight-row #right-themes-panel .theme-chip-cloud {
  padding: 0 20px 20px;
}


/* Insight row polish */
.research-insight-row {
  align-items: start !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
}
.research-insight-row #opp-enhanced:not(.hidden),
.research-insight-row #right-themes-panel:not(.hidden) {
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08) !important;
}
.research-insight-row #opp-enhanced > div:nth-child(1),
.research-insight-row #right-themes-panel .panel2-header {
  padding: 16px 20px 8px !important;
}
.research-insight-row #opp-enhanced > div:nth-child(2) {
  padding: 0 20px 18px !important;
}
.theme-card-subtitle {
  margin-top: 4px;
  color: #94A3B8;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.research-insight-row #right-themes-panel .theme-chip-cloud {
  padding: 4px 20px 10px !important;
  gap: 7px !important;
}
.research-insight-row #right-themes-panel .theme-focus-chip {
  min-height: 24px;
  padding: 0 10px;
  font-size: 11px;
  line-height: 1.2;
}
.theme-card-note {
  margin: 0 20px 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F8FAFC;
  color: #64748B;
  font-size: 12px;
  line-height: 1.5;
}
.audience-segments-panel {
  margin-top: 18px;
}
.audience-segments-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}
.audience-segment-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #EBF8F8;
  color: #007F82;
  border: 1px solid #B9EEEE;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.published-load-btn {
  border: 0;
  background: #EBF8F8;
  color: #007F82;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.published-load-btn:hover {
  background: #D8F3F4;
}
.difficulty-meaning {
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  color: #334155 !important;
  margin-bottom: 10px !important;
}
.difficulty-driver-list {
  gap: 6px !important;
  margin-bottom: 10px !important;
}
.difficulty-driver {
  font-size: 12.5px !important;
  color: #475569 !important;
}
.difficulty-driver strong {
  color: #0F172A;
  font-weight: 800;
}
.difficulty-caveat {
  background: #FFFBEB !important;
  color: #92400E !important;
  border: 1px solid rgba(245, 158, 11, .16);
  padding: 9px 11px !important;
  margin-bottom: 10px !important;
}
.evidence-label {
  margin: 2px 0 7px;
  color: #64748B;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.difficulty-facts {
  margin: 0 0 10px !important;
}
.difficulty-source {
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #64748B !important;
}


/* Final research column alignment */
#opp-stats.opp-kpi-grid2 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
}
#opp-stats.opp-kpi-grid2 > .opp-kpi-card2 {
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
}
#opp-stats.opp-kpi-grid2 .opp-kpi-note2 {
  font-size: 11px;
  line-height: 1.35;
  max-width: 100%;
}
#opp-stats.opp-kpi-grid2 .opp-kpi-card2:nth-child(4) .opp-kpi-note2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.two-col2 > div:first-child > #opp-enhanced:not(.hidden),
.two-col2 > div:nth-child(2) > #right-themes-panel:not(.hidden) {
  display: block !important;
  margin: 0 0 18px !important;
  min-height: 0 !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.two-col2 > div:first-child > #opp-enhanced > div:nth-child(1) {
  display: flex !important;
  padding: 16px 20px 8px !important;
  border-bottom: 0 !important;
}
.two-col2 > div:first-child > #opp-enhanced > div:nth-child(2) {
  display: block !important;
  padding: 0 20px 18px !important;
  border: 0 !important;
}
.two-col2 > div:nth-child(2) > #right-themes-panel .panel2-header {
  padding: 16px 20px 8px !important;
}
.two-col2 > div:nth-child(2) > #right-themes-panel .theme-chip-cloud {
  padding: 4px 20px 10px !important;
  gap: 7px !important;
}
.two-col2 > div:nth-child(2) > #right-themes-panel .theme-focus-chip {
  min-height: 24px;
  padding: 0 10px;
  font-size: 11px;
  line-height: 1.2;
}
@media (max-width: 1100px) {
  #opp-stats.opp-kpi-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  #opp-stats.opp-kpi-grid2 { grid-template-columns: 1fr !important; }
}


/* Match top insight card heights */
.two-col2 > div:nth-child(2) > #right-themes-panel:not(.hidden) {
  display: flex !important;
  flex-direction: column;
}
.two-col2 > div:nth-child(2) > #right-themes-panel .theme-chip-cloud {
  flex: 0 0 auto;
}
.two-col2 > div:nth-child(2) > #right-themes-panel .theme-card-note {
  margin-top: auto;
}
@media (max-width: 1100px) {
  #right-themes-panel { min-height: 0 !important; }
}


/* Tabs and loaded chips now live under the difficulty card */
.two-col2 > div:first-child > #research-data-bar:not(.hidden) {
  margin: -4px 0 10px !important;
  padding: 0 !important;
}
.two-col2 > div:first-child > .tab-bar2 {
  margin: 0 0 16px !important;
}


/* Book table sales/day column */
.sales-day2b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #E8FAF8;
  color: #0F766E;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.sales-day2b.muted {
  background: #F1F5F9;
  color: #94A3B8;
}


/* More readable book category path */
.book-item2 .cat2b {
  margin-top: 5px !important;
  font-size: 10.5px !important;
  line-height: 1.45 !important;
  color: #64748B !important;
}
.book-item2 .cat2b a {
  color: #64748B !important;
  text-decoration: none;
}
.book-item2 .cat2b a:hover {
  color: var(--teal) !important;
  text-decoration: underline;
}


/* Latest Published match quality and published date */
.match-quality2b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}
.match-direct { background: #E8FAF8; color: #0F766E; }
.match-related { background: #EFF6FF; color: #1D4ED8; }
.match-broad { background: #F8FAFC; color: #64748B; }
.published-cell2b {
  text-align: right;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}


/* Latest Published date column */
.date-filter-note {
  padding: 0 20px 8px;
  color: #94A3B8;
  font-size: 11px;
  line-height: 1.4;
}
#newreleases-list > div:first-child {
  grid-template-columns: 28px 58px minmax(220px,1fr) 92px 112px 72px 90px 34px !important;
}
#newreleases-list .book-item2 {
  grid-template-columns: 28px 58px minmax(220px,1fr) 92px 112px 72px 90px 34px !important;
}
@media (max-width: 720px) {
  #newreleases-list .book-item2 {
    grid-template-columns: 22px 54px 1fr 34px !important;
  }
}

/* ── Emphasized headings for Topic Frequency and Audience Segments ── */
#right-topics-panel .panel2-title,
#niche-audience-segments-wrap .panel2-title-audience {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.1px;
}

/* ── Ideas & Strategy section design ────────────────────────────── */
#view-ideas { background: linear-gradient(180deg, #F8FAFB 0%, #F3F6F7 100%); min-height: 100vh; }
#view-ideas .view-header { padding: 28px 32px 0; }
#view-ideas .ideas-topic-row { padding: 6px 32px 16px; }
#view-ideas > div > .panel { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow-card); }
#view-ideas .panel2 { border-radius: 16px; box-shadow: var(--shadow-card); }
#view-ideas .panel2-header { padding: 20px 24px 16px; border-bottom: 1px solid rgba(17,24,39,.06); }
#view-ideas .panel2-title { font-size: 14px; font-weight: 800; color: #1d1d1b; }

/* Concept cards inside Ideas & Strategy */
#ideas-content .concept-card2 {
  padding: 20px 24px;
  border: 1px solid rgba(17,24,39,.07);
  border-radius: 14px;
  margin: 0 20px 12px;
  gap: 16px;
}
#ideas-content .concept-card2:last-child { margin-bottom: 20px; }
#ideas-content .concept-num2 {
  width: 30px; height: 30px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), #11C7B4);
  font-weight: 800;
}
#ideas-content .concept-title2 { font-size: 14px; font-weight: 800 !important; margin-bottom: 8px; }
#ideas-content .concept-footer2 {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}
#ideas-content .copy-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

/* Landing engagement refresh — keeps product/app functionality intact */
.landing { background: linear-gradient(180deg, #F4FEFE 0%, #FFFFFF 42%, #F8FBFC 100%); }
.lp-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 12% 10%, rgba(22,173,175,.13), transparent 30%), radial-gradient(circle at 88% 18%, rgba(22,173,175,.12), transparent 28%), linear-gradient(180deg, #F0FCFC 0%, #FFFFFF 78%); padding: 86px 0 70px; }
.lp-hero::after { content:""; position:absolute; inset:auto -8% -160px -8%; height:260px; background: radial-gradient(closest-side, rgba(22,173,175,.09), transparent 70%); pointer-events:none; }
.lp-hero-inner { position: relative; z-index: 1; }
.lp-hero-title { font-size: clamp(38px, 5vw, 64px); line-height: 1.03; letter-spacing: -2.2px; color: #07142E; }
.lp-hero-title em { background: linear-gradient(90deg, #16ADAF, #0E8F92); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero-sub { font-size: 17px; max-width: 560px; color: #344154; }
.lp-btn-lg, .lp-soft-btn { box-shadow: 0 18px 35px rgba(22,173,175,.24); }
.lp-hero-note { display:flex; gap:14px; align-items:center; }
.lp-hero-note::before { content:"✓"; width:18px; height:18px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:#E7F8F8; color:var(--teal); font-weight:800; font-size:11px; }
.lp-hero-proof { margin-top: 22px; display:flex; align-items:center; gap:14px; }
.lp-proof-avatars { display:flex; }
.lp-proof-avatars span { width:30px; height:30px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#DDF7F7,#F8EEC8); border:2px solid #fff; margin-left:-8px; color:#07142E; font-size:11px; font-weight:800; box-shadow:0 8px 18px rgba(7,20,46,.1); }
.lp-proof-avatars span:first-child { margin-left:0; }
.lp-proof-stars { letter-spacing:2px; color:#E8A317; font-size:13px; line-height:1; }
.lp-proof-text { color:var(--text-2); font-size:12px; font-weight:700; margin-top:4px; }
.lp-hero-visual { min-height: 360px; }
.lp-orbit-dots { position:absolute; left:-46px; bottom:22px; width:150px; height:120px; opacity:.5; background-image: radial-gradient(#16ADAF 1.5px, transparent 1.5px); background-size:16px 16px; transform: rotate(-8deg); }
.lp-hv-card { transform: rotate(.35deg); border-color: rgba(22,173,175,.18); box-shadow: 0 34px 80px rgba(7,20,46,.14), 0 2px 0 rgba(255,255,255,.9) inset; }
.lp-hv-card::before { content:""; position:absolute; inset:0; border-radius:inherit; background: linear-gradient(135deg, rgba(22,173,175,.08), transparent 45%); pointer-events:none; }
.lp-hv-row { position:relative; }
.lp-hv-thumb { border-radius:6px; background-image: linear-gradient(135deg, rgba(255,255,255,.25), rgba(0,0,0,.03)); }
.lp-hv-float { border:1px solid rgba(22,173,175,.18); box-shadow:0 18px 45px rgba(7,20,46,.12); }
.lp-section { padding: 76px 0; }
.lp-section-title { color:#07142E; font-size: clamp(28px, 3vw, 40px); letter-spacing:-1.1px; }
.lp-section-eyebrow, .lp-fb-eyebrow { color:#0E8F92; letter-spacing:.08em; }
.lp-workflow { display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; align-items:center; gap:20px; max-width:1040px; margin: 26px auto 34px; padding:20px 24px; background:rgba(255,255,255,.76); border:1px solid rgba(22,173,175,.13); border-radius:24px; box-shadow:0 18px 50px rgba(7,20,46,.06); }
.lp-workflow-step { display:grid; grid-template-columns:44px 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; }
.lp-workflow-step span { grid-row:1/3; width:44px; height:44px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#16ADAF,#0E8F92); color:#fff; font-weight:800; font-size:12px; box-shadow:0 12px 24px rgba(22,173,175,.22); }
.lp-workflow-step strong { color:#07142E; font-size:14px; }
.lp-workflow-step small { color:var(--text-3); font-size:12px; margin-top:2px; }
.lp-workflow-arrow { color:#9AA8BA; font-size:24px; }
.lp-feature-block { position:relative; padding: 66px 0; gap: 76px; }
.lp-feature-block::before { content:""; position:absolute; left:50%; top:0; width:1px; height:100%; transform:translateX(-50%); background:linear-gradient(#E7F1F1, transparent); opacity:.55; }
.lp-fb-title { font-size: clamp(24px, 2.2vw, 34px); line-height:1.12; letter-spacing:-.8px; color:#07142E; }
.lp-fb-text { color:#344154; font-size:15px; line-height:1.7; }
.lp-fb-list li { margin-bottom:12px; }
.lp-fb-check { background:#E7F8F8; border:1px solid rgba(22,173,175,.2); }
.lp-fb-visual { border:1px solid rgba(7,20,46,.12); border-radius:20px; background: rgba(255,255,255,.88); box-shadow:0 26px 70px rgba(7,20,46,.08); padding:22px; transform: translateY(0); transition: transform .2s ease, box-shadow .2s ease; }
.lp-fb-visual:hover { transform: translateY(-3px); box-shadow:0 34px 80px rgba(7,20,46,.12); }
.lp-panel-title { background:#FBFEFE; margin:-22px -22px 18px; padding:14px 18px; border-bottom:1px solid rgba(7,20,46,.08); border-radius:20px 20px 0 0; }
.lp-mini-kw-row, .lp-mini-stat, .lp-mini-url-bar { border-color: rgba(7,20,46,.08); box-shadow:0 8px 24px rgba(7,20,46,.035); }
.lp-mini-kw-fill, .lp-mini-spark div { background:linear-gradient(90deg,#16ADAF,#78D6D3); }
.lp-mini-pill { background:#E7F8F8; color:#0E8F92; border:1px solid rgba(22,173,175,.16); }
.lp-showcase { background: linear-gradient(180deg, #FFFFFF, #F5FCFC); }
.lp-soft-cta { padding: 28px 0 70px; }
.lp-soft-cta-inner { display:grid; grid-template-columns:72px 1fr auto; align-items:center; gap:22px; padding:34px 44px; border-radius:28px; background:linear-gradient(120deg,#E7FAFA 0%, #F8FFFF 58%, #EFFBFA 100%); border:1px solid rgba(22,173,175,.14); box-shadow:0 24px 70px rgba(7,20,46,.07); }
.lp-soft-icon { width:72px; height:72px; border-radius:22px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#16ADAF,#0E8F92); color:#fff; font-size:34px; font-weight:800; box-shadow:0 18px 36px rgba(22,173,175,.25); }
.lp-soft-title { font-size:28px; line-height:1.15; font-weight:800; color:#07142E; letter-spacing:-.7px; }
.lp-soft-sub { margin-top:6px; color:var(--text-2); font-size:14px; }
.lp-pricing-grid { align-items:stretch; }
.lp-price-card { transition: transform .2s ease, box-shadow .2s ease; }
.lp-price-card:hover { transform: translateY(-4px); box-shadow:0 30px 70px rgba(7,20,46,.1); }
@media (max-width: 900px) {
  .lp-hero { padding-top:56px; }
  .lp-hero-visual { min-height:0; }
  .lp-workflow { grid-template-columns:1fr; }
  .lp-workflow-arrow { display:none; }
  .lp-feature-block::before { display:none; }
  .lp-soft-cta-inner { grid-template-columns:1fr; text-align:center; justify-items:center; padding:28px 22px; }
  .lp-hero-proof { justify-content:flex-start; }
  /* Phone: keep feature blocks inside the viewport (this block wins the cascade over
     the desktop .lp-fb-title clamp above). */
  .lp-feature-block { padding: 40px 0; gap: 28px; }
  .lp-feature-block > * { min-width: 0; }
  .lp-fb-title { font-size: clamp(21px, 6vw, 26px); letter-spacing:-.4px; overflow-wrap: anywhere; }
  .lp-fb-visual { max-width: 100%; overflow: hidden; }
  .lp-mini-kw-row { flex-wrap: wrap; }
  .lp-mini-kw-text { white-space: normal; }
}

/* ── App footer (internal) ─────────────────────────────────────── */
.app-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px 24px 24px; margin-top: 24px;
  font-size: 11.5px; color: var(--text-3);
  border-top: 1px solid var(--border);
}
.app-footer a { color: var(--text-3); text-decoration: none; }
.app-footer a:hover { color: var(--teal); }
.app-footer-sep { color: var(--border); }
.app-footer-disclaimer { color: #94A0B0; }
.app-footer-disclaimer a { color: #94A0B0; text-decoration: underline; }
.app-footer-disclaimer a:hover { color: var(--teal); }
@media (max-width: 640px) {
  .app-footer { flex-wrap: wrap; row-gap: 4px; }
  /* On narrow screens keep only the disclaimer + legal links; drop the extra separator */
  .app-footer-sep-hideable { display: none; }
}

/* Internal app footer visibility override */
#app .main {
  padding-bottom: 44px;
}
#app .app-footer {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 60;
  margin-top: 0;
  padding: 10px 24px 12px;
  color: #7C8594;
  background: rgba(248, 250, 251, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(17, 24, 39, .08);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .04);
}
#app .app-footer a { color: #64748B; }
#app .app-footer a:hover { color: var(--teal); }
#app .app-footer-sep { color: #CBD5E1; }
@media (max-width: 900px) {
  #app .app-footer {
    left: 0;
  }
}

/* Internal sidebar fit override */
#app .sidebar {
  overflow: hidden;
}
#app .sidebar-section {
  padding: 12px 12px 4px;
}
#app .sidebar-label {
  margin-bottom: 4px;
}
#app .s-divider {
  margin: 5px 12px;
}
#app .s-btn,
#app .side-btn {
  min-height: 30px;
  padding: 7px 10px;
  gap: 8px;
  font-size: 12px;
}
#app .sidebar-spacer {
  flex: 1 1 auto;
  min-height: 4px;
}
#app .sidebar-bottom {
  flex-shrink: 0;
  padding: 8px 12px 10px;
}
#app .plan-card {
  padding: 10px 12px 12px;
  overflow: hidden;
}
#app .plan-name {
  margin-bottom: 4px;
}
#app .plan-credits {
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}
#app .plan-credits span {
  font-size: 11px;
}
#app .plan-bar {
  margin: 6px 0;
  width: 100%;
}
#app .plan-bar-fill {
  max-width: 100%;
}
#app .plan-upgrade {
  margin-top: 8px;
  padding: 7px;
  min-height: 32px;
}

/* ── Keyword audience tags (audience coherence gate) ───────────── */
.kw-aud {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 1px;
  white-space: nowrap;
}
.kw-aud-broad { background: var(--page-bg); color: var(--text-3); border: 1px solid var(--border); }
.kw-aud-suggest { background: var(--teal-light); color: var(--teal-d); border: 1px solid rgba(22,173,175,.3); }
.kw-vol-nodata { color: var(--text-3); font-style: italic; font-weight: 500; }
.kw-aud-other { background: #FDF3E7; color: #A05A1C; border: 1px solid #F3DCC0; }
.kw-row-other { opacity: .55; }
.kw-row-other:hover { opacity: 1; }

/* ── Deep Scan ─────────────────────────────────────────────────── */
.deepscan-cta { margin-top: 18px; padding: 20px; border: 1px solid var(--teal-light); border-radius: 14px; background: linear-gradient(180deg, var(--teal-light) 0%, #fff 60%); }
.deepscan-cta-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.deepscan-cta p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 14px; }
.deepscan-cost { background: rgba(255,255,255,.35); border-radius: 10px; padding: 1px 8px; font-size: 11px; margin-left: 6px; }

.deepscan-modal-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.deepscan-modal-overlay.hidden { display: none; }
.deepscan-modal-box { background: #fff; border-radius: 18px; max-width: 520px; width: 100%; padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.25); max-height: 90vh; overflow-y: auto; }
.deepscan-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.deepscan-modal-title { font-size: 17px; font-weight: 800; }
.deepscan-modal-close { background: none; border: none; font-size: 16px; color: var(--text-3); cursor: pointer; }
.deepscan-modal-sub { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 18px; }
.ds-author-note { font-size: 12.5px; color: var(--text-2); background: var(--teal-light); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.ds-seed-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; min-height: 20px; }
.ds-seed-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--teal); color: #fff; border-radius: 16px; padding: 5px 10px 5px 12px; font-size: 12.5px; font-weight: 600; }
.ds-seed-x { cursor: pointer; opacity: .8; font-size: 11px; }
.ds-seed-x:hover { opacity: 1; }
.ds-add-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ds-seed-input { flex: 1; border: 1.5px solid var(--border); border-radius: 8px; padding: 9px 12px; font-family: var(--font); font-size: 13px; outline: none; }
.ds-seed-input:focus { border-color: var(--teal); }
.ds-suggest-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); margin-bottom: 8px; }
.ds-suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ds-suggest-chip { cursor: pointer; background: var(--page-bg); border: 1px solid var(--border); border-radius: 14px; padding: 4px 10px; font-size: 12px; color: var(--text-2); }
.ds-suggest-chip:hover { border-color: var(--teal); color: var(--teal); }
.ds-count-note { font-size: 11.5px; color: var(--text-3); }
.deepscan-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.ds-results-note { font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }
.ds-table td { vertical-align: middle; }
.ds-rank { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.ds-rank-found { background: var(--teal-light); color: var(--teal-d); }
.ds-rank-gap { background: var(--page-bg); color: var(--text-3); }
.ds-row-gap { opacity: .72; }
.ds-author-tag { font-size: 11px; font-weight: 700; color: var(--teal-d); background: var(--teal-light); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }


/* ── URL Analysis: enrichment + print price + category badges ──── */
.url-books-col-label { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-3); text-align:right; }
.url-books-col-label:first-child { text-align:left; }
.url-book-print { color:var(--text-2); font-weight:700; }
.url-book-action { justify-self:end; }
.url-amazon-link { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; color:var(--teal); text-decoration:none; border:1.5px solid var(--teal); padding:4px 8px; border-radius:6px; white-space:nowrap; }
.url-amazon-link:hover { background:var(--teal-light); }
.url-cat2 { display:inline-block; font-size: 11px; font-weight:600; color:var(--text-2); background:var(--page-bg); border:1px solid var(--border); border-radius:8px; padding:1px 7px; margin-left:5px; }
.url-bsr-none { color:var(--text-3) !important; background:var(--page-bg) !important; }
.url-enrich-btn { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--teal-d); background:var(--teal-light); border:1px solid var(--teal-mid); border-radius:8px; padding:7px 12px; cursor:pointer; font-family:var(--font); }
.url-enrich-btn:hover:not(:disabled) { background:#DDF3F3; }
.url-enrich-btn:disabled { cursor:default; }
.url-enrich-btn.url-enrich-done { color:var(--success); background:var(--success-bg); border-color:#B8E6CC; }
.url-enrich-cost { background:rgba(255,255,255,.5); border-radius:9px; padding:1px 7px; font-size:10.5px; }

/* Niche research: ranked subcategory badges */
.cat2b-ranked { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
.niche-cat-badge { font-size: 11px; font-weight:600; color:var(--teal-d); background:var(--teal-light); border:1px solid var(--teal-mid); border-radius:8px; padding:1px 7px; white-space:nowrap; }

/* No-rank label (new releases without BSR yet) */
.book-bsr-none { background:var(--page-bg) !important; color:var(--text-3) !important; border:1px solid var(--border); }

/* ── Monitor: category (niche) cards ──────────────────────────── */
.niche-card { border:1px solid var(--border); border-radius:14px; padding:16px 18px; margin-bottom:12px; background:#fff; }
.niche-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.niche-card-name { font-size:15px; font-weight:800; color:var(--text); }
.niche-card-meta { font-size:12px; color:var(--text-3); margin-top:3px; }
.niche-remove { background:none; border:none; color:var(--text-3); cursor:pointer; padding:4px; border-radius:6px; }
.niche-remove:hover { color:var(--danger); background:var(--danger-bg); }
.niche-books { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; display:flex; flex-direction:column; gap:6px; }
.niche-book-row { display:grid; grid-template-columns:44px 1fr 64px; gap:8px; align-items:center; font-size:12.5px; }
.niche-book-pos { color:var(--text-3); font-weight:700; }
.niche-book-title { color:var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.niche-book-price { text-align:right; font-weight:700; color:var(--text); }
.niche-new-tag { font-size: 10px; font-weight:800; color:#fff; background:var(--teal); border-radius:6px; padding:1px 5px; margin-left:4px; vertical-align:middle; }

.niche-book-new { background:var(--teal-light); border-radius:6px; margin:0 -6px; padding-left:6px; padding-right:6px; }

/* Niche card links */
.niche-card-link { color:var(--text); text-decoration:none; }
.niche-card-link:hover { color:var(--teal); }
.niche-book-link { color:var(--text-2); text-decoration:none; }
.niche-book-link:hover { color:var(--teal); text-decoration:underline; }

/* Niche book list column header */
.niche-books-header { display:grid; grid-template-columns:44px 1fr 64px; gap:8px; align-items:center; font-size: 11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-3); padding-bottom:6px; margin-bottom:2px; border-bottom:1px solid var(--border); }
.niche-books-header .niche-book-pos { color:var(--text-3); cursor:help; }

/* Niche book list show-all toggle */
.niche-book-hidden { display:none; }
.niche-book-hidden.niche-book-shown { display:grid; }
.niche-toggle { display:inline-flex; align-items:center; gap:5px; margin-top:8px; background:none; border:none; color:var(--teal); font-size:12px; font-weight:700; cursor:pointer; font-family:var(--font); padding:4px 0; }
.niche-toggle:hover { text-decoration:underline; }

/* Inline credit-cost badge on action buttons */
.btn-cost { display:inline-block; font-size: 11px; font-weight:700; padding:1px 6px; margin-left:6px; border-radius:20px; background:rgba(255,255,255,.22); color:inherit; vertical-align:middle; letter-spacing:.2px; }
.btn-outline .btn-cost, .btn-sm .btn-cost { background:var(--teal-light); color:var(--teal-d); }

/* Niche history modal */
.niche-history-btn { background:none; border:none; cursor:pointer; color:var(--text-3); padding:4px; border-radius:6px; display:inline-flex; transition:.15s; }
.niche-history-btn:hover { color:var(--teal); background:var(--teal-light); }
.nhm-overlay { display:none; position:fixed; inset:0; background:rgba(15,23,25,.5); z-index:1000; align-items:center; justify-content:center; padding:20px; }
.nhm-overlay.show { display:flex; }
.nhm-panel { background:#fff; border-radius:16px; width:100%; max-width:560px; max-height:85vh; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.nhm-body { overflow-y:auto; padding:22px 24px; }
.nhm-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.nhm-title { font-size:17px; font-weight:800; color:var(--text); }
.nhm-close { background:none; border:none; cursor:pointer; color:var(--text-3); padding:4px; border-radius:6px; display:inline-flex; }
.nhm-close:hover { background:var(--page-bg); color:var(--text); }
.nhm-controls { display:flex; gap:8px; align-items:center; margin-bottom:18px; flex-wrap:wrap; }
.nhm-controls select { padding:6px 10px; border:1px solid var(--border); border-radius:8px; font-family:var(--font); font-size:13px; font-weight:600; color:var(--text); background:#fff; cursor:pointer; }
.nhm-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.nhm-metric { background:var(--page-bg); border-radius:10px; padding:12px 14px; }
.nhm-metric-label { font-size:12px; color:var(--text-3); margin-bottom:3px; }
.nhm-metric-val { font-size:22px; font-weight:800; color:var(--text); }
.nhm-section-label { font-size:13px; font-weight:700; color:var(--text); margin-bottom:10px; }
.nhm-rows { display:flex; flex-direction:column; gap:2px; }
.nhm-row { display:grid; grid-template-columns:88px 1fr 92px; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; }
.nhm-row-new { background:var(--teal-light); }
.nhm-row-gone { opacity:.6; }
.nhm-tag { font-size:11px; font-weight:700; white-space:nowrap; }
.nhm-tag-new { color:var(--teal-d); }
.nhm-tag-up { color:#2FBF71; }
.nhm-tag-down { color:#E24B4A; }
.nhm-tag-same { color:var(--text-3); }
.nhm-tag-gone { color:#E24B4A; }
.nhm-book { font-size:13px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nhm-book-link { color:var(--text); text-decoration:none; }
.nhm-book-link:hover { color:var(--teal); text-decoration:underline; }
.nhm-price { font-size:13px; font-weight:600; text-align:right; color:var(--text); }
.nhm-price-old { text-decoration:line-through; color:var(--text-3); font-weight:400; margin-right:2px; }
.kw-score-na, .kw-opp-na { color: var(--text-3); font-weight: 600; }

/* Next-step note under the opportunity summary when volume data is missing. */
.opp-next-step {
  margin: 12px 0 0; padding: 10px 14px;
  background: var(--teal-light); border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  font-size: 13px; line-height: 1.55; color: var(--text-2);
}

/* Cost badge on text-style links (teal text on a light background) needs a tinted
   pill rather than the translucent white used on solid teal buttons. */
.kw-action .btn-cost, .kw2-action .btn-cost {
  background: var(--teal-light); color: var(--teal-d); font-size: 10px; padding: 1px 5px;
}

/* ── Mobile overflow fixes ────────────────────────────────────────────────────
   Wide tables (keyword lists, reverse-ASIN results, snapshot history) and the
   settings cards ran off the right edge on phones. Wrapping tables in a scroll
   container lets them scroll horizontally instead of overflowing the page, and
   stacking the settings grid keeps the account fields on screen. */
@media (max-width: 640px) {
  /* Any table in a result container scrolls sideways rather than pushing the page wide. */
  #kwtool-table, #asin-results, #keywords-table, .asin-kw-wrap,
  .ds-table-wrap, .hm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .kw-table, .kw2-table, .hm-table, .ds-table {
    min-width: 560px;   /* keep columns readable; container scrolls */
  }

  /* Reverse-ASIN header: title and search icon were colliding. */
  .keywords-view .view-head, .asin-head {
    flex-wrap: wrap;
  }

  /* Settings: the two-column account layout was wider than the screen. Stack it. */
  .settings-grid, .set-grid, .settings-row {
    grid-template-columns: 1fr !important;
    display: block !important;
  }
  .set-field, .settings-field { width: 100% !important; }

  /* Snapshot modal: charts row and history table were cut off. */
  .snapshot-modal, .book-detail-modal { max-width: 96vw; }
  .snapshot-charts, .snap-charts { flex-wrap: wrap; overflow-x: auto; }
}

/* Belt-and-braces: never let any element force the whole page to scroll sideways.
   `clip` rather than `hidden` because hidden on the body can disable position:sticky
   in some browsers, and this page has sticky bars. */
html, body { max-width: 100%; overflow-x: clip; }

/* ── Comprehensive mobile layout collapse ─────────────────────────────────────
   Every multi-column grid that summed wider than a phone screen gets stacked to a
   single column here, in one place, so nothing is pushed off-screen. Kept separate
   from the scattered per-component media queries so the intent is legible. */
@media (max-width: 640px) {
  /* Two-column content layouts → stacked. */
  .two-col2,
  .tg-layout,
  .opp-hero2-main,
  .research-insight-row,
  .settings-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* The opportunity ring panel had a right border as a column divider; once stacked
     that becomes a bottom border. */
  .opp-score-panel2 {
    border-right: none !important;
    border-bottom: 1px solid var(--line-soft);
    padding-right: 0 !important;
    padding-bottom: 20px;
  }

  /* Table containers scroll sideways; the tables inside keep their normal table
     layout so columns stay aligned. Making a real <table> display:block would break
     column alignment, so only the wrapper scrolls. */
  #kwtool-table, #asin-results, #keywords-table,
  .ds-table-wrap, .hm-table-wrap, .kw-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .kw-table, .kw2-table, .hm-table, .ds-table { min-width: 520px; }

  /* Sticky bars: on desktop they hold Save / Export / New Research in a row that ran
     off-screen. Let them wrap. */
  .sticky-bar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .sticky-bar .action-btn2 { flex: 0 0 auto; }

  /* Opportunity metric pills row wraps instead of overflowing. */
  .opp-factors, .opp-stats2 { flex-wrap: wrap; }
}

/* ── See it in action (video section) ─────────────────────── */
.lp-video{padding:70px 0 40px;background:linear-gradient(180deg,#FFFFFF,#F5FCFC)}
.lp-video-head{text-align:center;max-width:640px;margin:0 auto 40px}
.lp-video-head .lp-section-title{margin-top:4px}
.lp-video-head .lp-section-sub{font-size:15px;color:var(--text-2);margin-top:14px;line-height:1.7}
.lp-vfeatured{position:relative;display:block;border-radius:20px;overflow:hidden;cursor:pointer;
  box-shadow:0 30px 80px rgba(7,20,46,.14);border:1px solid rgba(7,20,46,.08);
  background:#0D2B3E;aspect-ratio:16/9;max-width:900px;margin:0 auto 20px;text-decoration:none}
.lp-vfeatured img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.lp-vfeatured:hover img{transform:scale(1.03)}
.lp-vshade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,20,46,0) 40%,rgba(7,20,46,.72) 100%)}
.lp-vplay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:78px;height:78px;border-radius:50%;background:rgba(22,173,175,.95);
  display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px rgba(22,173,175,.5);
  transition:transform .2s ease,background .2s ease}
.lp-vfeatured:hover .lp-vplay{transform:translate(-50%,-50%) scale(1.08);background:var(--teal)}
.lp-vplay svg{width:30px;height:30px;fill:#fff;margin-left:4px}
.lp-vmeta{position:absolute;left:0;right:0;bottom:0;padding:22px 26px;color:#fff}
.lp-vmeta .t{font-size:19px;font-weight:800;letter-spacing:-.3px}
.lp-vmeta .s{font-size:13px;color:#B9C6CF;margin-top:3px}
.lp-vgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;max-width:900px;margin:0 auto}
.lp-vcard{position:relative;display:block;border-radius:14px;overflow:hidden;cursor:pointer;aspect-ratio:16/10;
  background:#0D2B3E;border:1px solid rgba(7,20,46,.08);box-shadow:0 10px 30px rgba(7,20,46,.06);
  transition:transform .2s ease,box-shadow .2s ease;text-decoration:none}
.lp-vcard:hover{transform:translateY(-4px);box-shadow:0 20px 44px rgba(7,20,46,.12)}
.lp-vcard img{width:100%;height:100%;object-fit:cover;display:block}
.lp-vcard .lp-vplay{width:48px;height:48px}
.lp-vcard .lp-vplay svg{width:18px;height:18px}
.lp-vcard-title{position:absolute;left:0;right:0;bottom:0;padding:12px 14px;color:#fff;
  font-size:13px;font-weight:700;line-height:1.3}
@media(max-width:820px){.lp-vgrid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.lp-vgrid{grid-template-columns:1fr}.lp-video{padding:48px 0 28px}.lp-vmeta .t{font-size:16px}}

/* ── Product tour (onboarding walkthrough) ─────────────────────────────────
 * Frontend-only. A dimmed backdrop with a cut-out "spotlight" over the target
 * element, a tooltip card with brand styling, an arrow, and step controls.
 * Shown once per user (localStorage bt_tour_done); replayable from Settings. */
#bt-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
}
/* The spotlight is a transparent box with a huge soft shadow that dims
 * everything around it — so the target stays bright while the rest darkens. */
#bt-tour-spot {
  position: fixed;
  z-index: 9001;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(13, 43, 62, 0.62);
  transition: all .28s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
#bt-tour-card {
  position: fixed;
  z-index: 9002;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--teal-mid, #9FE0E1);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(13, 43, 62, 0.28);
  padding: 16px 18px 14px;
  font-family: inherit;
  transition: top .28s cubic-bezier(.4,0,.2,1), left .28s cubic-bezier(.4,0,.2,1);
}
.bt-tour-step-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--teal, #16ADAF);
  margin-bottom: 6px;
}
.bt-tour-title {
  font-size: 16px;
  font-weight: 800;
  color: #0D2B3E;
  margin: 0 0 6px;
  line-height: 1.25;
}
.bt-tour-text {
  font-size: 13px;
  line-height: 1.5;
  color: #41505C;
  margin: 0 0 14px;
}
.bt-tour-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.bt-tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D6E4E4;
  transition: background .2s, transform .2s;
}
.bt-tour-dot.active {
  background: var(--teal, #16ADAF);
  transform: scale(1.25);
}
.bt-tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.bt-tour-btns { display: flex; gap: 8px; align-items: center; }
.bt-tour-skip {
  background: none;
  border: none;
  color: #8A98A3;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}
.bt-tour-skip:hover { color: #41505C; }
.bt-tour-next {
  background: var(--teal, #16ADAF);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 142, 144, 0.28);
}
.bt-tour-next:hover { background: var(--teal-d, #0F6E56); }
/* Arrow pointing from the card toward the spotlight. Positioned per-step by JS. */
#bt-tour-arrow {
  position: fixed;
  z-index: 9002;
  width: 0;
  height: 0;
  transition: all .28s cubic-bezier(.4,0,.2,1);
}
#bt-tour-arrow.point-left {
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 11px solid #fff;
  filter: drop-shadow(-2px 0 1px rgba(13,43,62,0.10));
}
#bt-tour-arrow.point-up {
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 11px solid #fff;
  filter: drop-shadow(0 -2px 1px rgba(13,43,62,0.10));
}
/* Keep the highlighted sidebar button visually "lifted" above the dim layer. */
.bt-tour-lift { position: relative; z-index: 9001 !important; }

@media (max-width: 560px) {
  #bt-tour-card { width: calc(100vw - 32px); }
}

/* ── Niche Research ghost preview (pre-search empty state) ──────────────────
 * Static placeholder blocks shown before any search so the area isn't blank
 * and the user can sense what the results will look like. No shimmer — the
 * spinner already signals loading once a search runs. Hidden via .hidden. */
.research-ghost { margin-top: 18px; }
.research-ghost.hidden { display: none; }
.rg-label {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin: 2px 0 16px; color: #AEB8C0; font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
}
.rg-label svg { width: 15px; height: 15px; stroke: #C4CED5; }
.rg-card {
  background: #fff; border: 1px solid var(--border, #EDEEF0);
  border-radius: 16px; padding: 22px; margin-bottom: 16px;
}
.rg-opp { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.rg-ring {
  width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0;
  background:
    radial-gradient(closest-side, #fff 76%, transparent 77% 100%),
    conic-gradient(var(--teal-mid, #9FE0E1) 0 62%, #EDF1F3 0);
  display: flex; align-items: center; justify-content: center;
}
.rg-ring-inner { width: 62px; height: 16px; border-radius: 6px; background: #E4E9ED; }
.rg-opp-body { flex: 1; min-width: 220px; padding-top: 6px; }
.rg-line { height: 13px; border-radius: 6px; background: #E9EDF0; margin-bottom: 10px; }
.rg-line.sm { height: 10px; background: #EEF1F4; }
.rg-pills { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.rg-pill { height: 26px; width: 96px; border-radius: 999px; background: #EEF4F4; border: 1px solid #E1EBEB; }
.rg-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.rg-kpi { background: var(--bg-grey, #F3F4F6); border-radius: 12px; padding: 14px; }
.rg-kpi .rg-line { margin-bottom: 8px; }
.rg-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.rg-dot { width: 18px; height: 18px; border-radius: 5px; background: #E4E9ED; }
.rg-book { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border, #EDEEF0); }
.rg-book:last-child { border-bottom: none; }
.rg-cover { width: 44px; height: 62px; border-radius: 5px; background: #E4E9ED; flex-shrink: 0; }
.rg-book-body { flex: 1; }
.rg-badge { width: 60px; height: 22px; border-radius: 5px; background: #EAF5F5; border: 1px solid #DCECEC; flex-shrink: 0; }
.rg-kws { display: flex; flex-wrap: wrap; gap: 9px; }
.rg-kw { height: 30px; border-radius: 8px; background: #EEF4F4; border: 1px solid #E1EBEB; }

@media (max-width: 620px) {
  .rg-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ── Shared ghost placeholders for the standalone tools (pre-search) ────────
 * Same visual language as .research-ghost: static light blocks, teal accents,
 * no shimmer. Each tool renders results by overwriting its result container's
 * innerHTML, so the ghost lives inside that container and disappears on run. */
.tool-ghost { padding: 4px 0; }
.tg-label {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 16px; color: #AEB8C0; font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
}
.tg-label svg { width: 15px; height: 15px; stroke: #C4CED5; }
.tg-line { height: 13px; border-radius: 6px; background: #E9EDF0; }
.tg-line.sm { height: 10px; background: #EEF1F4; }

/* Keyword-table ghost: a header strip + rows of (keyword | volume | score). */
.tg-table { border: 1px solid var(--border, #EDEEF0); border-radius: 12px; overflow: hidden; }
.tg-trow {
  display: grid; grid-template-columns: 1fr 90px 80px; gap: 16px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border, #EDEEF0);
}
.tg-trow:last-child { border-bottom: none; }
.tg-trow.head { background: var(--bg-grey, #F3F4F6); }
.tg-chip { height: 22px; border-radius: 6px; background: #EAF5F5; border: 1px solid #DCECEC; }

/* Category-cards ghost grid. */
.tg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tg-ccard { border: 1px solid var(--border, #EDEEF0); border-radius: 12px; padding: 16px; }
.tg-cbar { height: 8px; border-radius: 999px; background: #EDF1F3; margin-top: 12px; overflow: hidden; }
.tg-cbar > div { height: 100%; width: 55%; background: var(--teal-mid, #9FE0E1); border-radius: 999px; }

/* ASIN product-card ghost. */
.tg-prod { display: flex; gap: 16px; align-items: center; background: #fff;
  border: 1px solid var(--border, #EDEEF0); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.tg-prod-cover { width: 54px; height: 76px; border-radius: 6px; background: #E4E9ED; flex-shrink: 0; }
.tg-prod-body { flex: 1; }

/* URL analysis: stat tiles + book list. */
.tg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tg-stat { background: var(--bg-grey, #F3F4F6); border-radius: 12px; padding: 16px; }
.tg-book { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border, #EDEEF0); }
.tg-book:last-child { border-bottom: none; }
.tg-bcover { width: 40px; height: 56px; border-radius: 5px; background: #E4E9ED; flex-shrink: 0; }
.tg-bbody { flex: 1; }

@media (max-width: 620px) {
  .tg-stats { grid-template-columns: repeat(2, 1fr); }
  .tg-trow { grid-template-columns: 1fr 70px; }
  .tg-trow .tg-col3 { display: none; }
}

/* ── Always-on teal glow on the main search bars ───────────────────────────
 * The teal border + soft glow used to appear only on focus. These rules make
 * it the resting state for every primary search input, with a slightly
 * stronger glow kept for focus so the active field still stands out. */
.search-iw,
.asin-input-wrap,
.url-iw {
  border-color: rgba(22,173,175,.55) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(22,173,175,0.10) !important;
}
.search-iw:focus-within,
.asin-input-wrap:focus-within,
.url-iw:focus-within {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 4px rgba(22,173,175,0.16) !important;
}
.keyword-search-input,
.category-search-input {
  border-color: rgba(22,173,175,.55) !important;
  box-shadow: 0 0 0 3px rgba(22,173,175,0.10) !important;
}
.keyword-search-input:focus,
.category-search-input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 4px rgba(22,173,175,0.16) !important;
}

/* ── Reverse ASIN & URL Analysis search bars: lock the 52px height so they
 * match the Keywords/Categories bars on mobile (where the flex wrapper was
 * collapsing to the text line height). min-height holds it; the inner input
 * fills the box so the whole field is the same height everywhere. */
.asin-input-wrap,
.url-iw {
  min-height: 52px !important;
  box-sizing: border-box !important;
}
.asin-input,
.url-iw input {
  align-self: stretch;
  height: auto;
}

/* Info glyph next to "Last snapshot" — native title tooltip on hover/focus. */
.niche-snap-info {
  color: #AEB8C0;
  cursor: help;
  font-size: 12px;
  margin-left: 2px;
  vertical-align: baseline;
}
.niche-snap-info:hover { color: var(--teal, #16ADAF); }
