/* Finch — Business Intelligence Dashboard v2 */

:root {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface-2:    #21253a;
  --border:       #2a2d3e;
  --text:         #e8eaf0;
  --text-muted:   #7a7f99;
  --accent:       #4f9cf9;
  --accent-glow:  rgba(79, 156, 249, 0.12);
  --success:      #3dd68c;
  --warning:      #f0a429;
  --danger:       #e05c5c;
  --card-radius:  14px;
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-finch {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.logo-divider { color: var(--border); font-size: 18px; }

.logo-client {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Client logo image (replaces logo-lockup text) */
.client-logo {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Finch badge — top-right, mirrors Scout */
.header-badge {
  background: var(--accent);
  color: #fff;
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.back-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* ── Header Nav ──────────────────────────────────────────────────────────── */

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  font-size: 13px;
  color: #eef0f8;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

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

.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

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

/* Legacy unused — kept for compat */
.btn-refresh {
  display: none;
}

/* ── Smart Refresh Button ────────────────────────────────────────────────── */

.btn-refresh-smart {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-refresh-smart:hover {
  color: var(--text);
  border-color: var(--accent);
}
.btn-refresh-smart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.refresh-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.6s linear;
}
.btn-refresh-smart.loading .refresh-icon {
  animation: spin 0.7s linear infinite;
}
.btn-refresh-smart.loading .refresh-label::after {
  content: '…';
}

/* ── Homepage Layout ─────────────────────────────────────────────────────── */

.home-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 40px 0 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.home-welcome {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.home-intro-text {
  flex: 1;
}

.home-tagline {
  font-size: 15px;
  color: var(--text-muted);
}

.home-intro-meta {
  text-align: right;
}

.last-updated-home {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Homepage Tiles ──────────────────────────────────────────────────────── */

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.home-grid-5 {
  grid-template-columns: repeat(4, 1fr);
}

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

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

/* ── Priorities Section ──────────────────────────────────────────────────── */

.priorities-section {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.priorities-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}

.priorities-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

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

.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.priority-item:last-child { border-bottom: none; }
.priority-item:hover { background: var(--surface-2); }

.priority-item.urgent {
  border-left: 3px solid var(--danger);
}

.priority-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
  line-height: 1.3;
}

.priority-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.priority-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.priority-detail {
  font-size: 13px;
  color: var(--text-muted);
}

.priority-impact {
  font-size: 12px;
  color: var(--success);
  margin-top: 2px;
}

.priority-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  padding-top: 2px;
  flex-shrink: 0;
}
.priority-link:hover { text-decoration: underline; }

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 240px;
}

.tile:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 156, 249, 0.1);
}

.tile-icon {
  font-size: 32px;
  line-height: 1;
}

.tile-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.tile-loading {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.tile-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.tile-stat-row {
  font-size: 14px;
  color: var(--text-muted);
}

.tile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tile-badge {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--text);
}

.tile-cta {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-top: auto;
}

/* ── Page Layout ─────────────────────────────────────────────────────────── */

.page-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.section-subtext {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: -10px;
}

/* ── Summary Cards (Business page) ──────────────────────────────────────── */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

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

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.summary-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-change {
  font-size: 12px;
  margin-top: 4px;
}
.summary-change.up      { color: var(--success); }
.summary-change.down    { color: var(--danger); }
.summary-change.neutral { color: var(--text-muted); }

/* ── Insight Pills ───────────────────────────────────────────────────────── */

.insights-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.insight-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text);
}

.insight-pill.warning { border-color: var(--warning); color: var(--warning); }
.insight-pill.danger  { border-color: var(--danger);  color: var(--danger); }

/* ── Breakdown Bars ──────────────────────────────────────────────────────── */

.breakdown-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child { border-bottom: none; }

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

.breakdown-bar-wrap {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.4s ease;
}

.breakdown-right {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.breakdown-count { font-size: 14px; font-weight: 600; }
.breakdown-pct   { font-size: 12px; color: var(--text-muted); }

/* ── Traffic Chart ───────────────────────────────────────────────────────── */

/* Legacy sparkline kept for compat */
.sparkline {
  width: 100%;
  height: 120px;
  display: block;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* New proper chart */
#traffic-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 8px 8px;
  overflow: hidden;
}

.traffic-svg {
  width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
}

.traffic-stats {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.traffic-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.traffic-val {
  font-size: 22px;
  font-weight: 700;
}

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

/* ── Intelligence Cards (Search page) ───────────────────────────────────── */

.intel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.intel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.intel-keyword {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.intel-trend {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intel-trend.up      { color: var(--success); }
.intel-trend.down    { color: var(--danger); }
.intel-trend.neutral { color: var(--text-muted); }

.intel-volume {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.intel-volume.high   { background: rgba(61,214,140,0.15); color: var(--success); }
.intel-volume.medium { background: rgba(240,164,41,0.15); color: var(--warning); }
.intel-volume.low    { background: var(--surface-2); color: var(--text-muted); }

.intel-action {
  font-size: 13px;
  color: var(--text);
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}

.action-label {
  font-weight: 600;
  color: var(--accent);
}

.intel-related {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.related-tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--text);
  font-size: 12px;
}

/* ── PAA Cards ───────────────────────────────────────────────────────────── */

.paa-question {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* ── Autocomplete ────────────────────────────────────────────────────────── */

.autocomplete-group {
  margin-bottom: 20px;
}

.autocomplete-seed {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.autocomplete-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.autocomplete-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
}

/* ── Issue Summary Bar (Website page) ───────────────────────────────────── */

.website-stats-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.issue-summary {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.issue-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.issue-num {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.issue-lbl {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.issue-count.critical .issue-num { color: var(--danger); }
.issue-count.medium   .issue-num { color: var(--warning); }
.issue-count.good     .issue-num { color: var(--success); }

/* ── Issue Cards ─────────────────────────────────────────────────────────── */

.issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.issue-card.critical { border-left: 4px solid var(--danger); }
.issue-card.medium   { border-left: 4px solid var(--warning); }

.issue-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.issue-severity {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.issue-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.issue-problem {
  font-size: 14px;
  color: var(--text-muted);
}

.issue-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.example-tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.issue-action {
  font-size: 13px;
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  color: var(--text);
}

.issue-impact {
  font-size: 13px;
  color: var(--success);
}

/* ── Good items ──────────────────────────────────────────────────────────── */

.good-item {
  font-size: 14px;
  color: var(--text);
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  margin-bottom: 8px;
}

/* ── Loader ──────────────────────────────────────────────────────────────── */

.loader-inline {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ───────────────────────────────────────────────────────────── */

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  padding: 12px 0;
}

.hidden { display: none !important; }

/* ── Page Intro ──────────────────────────────────────────────────────────── */

.page-intro {
  margin-bottom: 8px;
}

.page-intro-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.page-intro-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Post Cards (Search Intel) ───────────────────────────────────────────── */

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  margin-bottom: 12px;
  overflow: hidden;
}

/* Collapsed state — no bottom border on header since body is hidden */
.post-card-collapsed .post-card-header {
  border-bottom: none;
}

.post-card-toggle {
  cursor: pointer;
  user-select: none;
}
.post-card-toggle:hover {
  background: var(--surface-2);
}

.post-card-chevron {
  font-size: 11px;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.post-card-content {
  border-top: 1px solid var(--border);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-2);
  transition: background 0.1s;
}

.post-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-keyword {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.trend-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.trend-badge.rising  { background: rgba(61,214,140,0.15); color: var(--success); }
.trend-badge.stable  { background: var(--surface);        color: var(--text-muted); border: 1px solid var(--border); }
.trend-badge.falling { background: rgba(224,92,92,0.1);   color: var(--danger); }

.post-urgency-label {
  font-size: 12px;
  color: var(--text-muted);
}

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-preview-label,
.post-visual-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.post-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: var(--font);
  user-select: text;
}

.post-visual {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

.post-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.btn-copy {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  font-family: var(--font);
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }

.btn-share {
  background: #1877f2;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-share:hover { opacity: 0.88; }

.copy-confirm {
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
  margin-left: 4px;
}

.post-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── PAA Cards (Search Intel) ────────────────────────────────────────────── */

.paa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paa-q {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.paa-action {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Empty card ──────────────────────────────────────────────────────────── */

.empty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-hint {
  font-size: 12px;
  margin-top: 8px;
  font-style: italic;
}

/* ── Coming Soon card (Local Search / Google Business Profile) ──────────── */

.coming-soon-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--card-radius);
  padding: 20px 24px;
  opacity: 0.8;
}

.coming-soon-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.coming-soon-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.coming-soon-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Fix Progress Bar (Website Review) ──────────────────────────────────── */

.fix-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 20px;
}

.fix-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

#fix-progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.fix-progress-impact {
  font-size: 12px;
  color: var(--success);
}

.fix-progress-bar-wrap {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.fix-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 0;
}

/* ── Issue Footer + Tick-off ─────────────────────────────────────────────── */

.issue-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-mark-fixed {
  background: transparent;
  border: 1px solid var(--success);
  color: var(--success);
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.15s;
}
.btn-mark-fixed:hover {
  background: rgba(61, 214, 140, 0.1);
}

.issue-card.fixed {
  border-left: 4px solid var(--success);
  opacity: 0.65;
}

.issue-fixed-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: rgba(61, 214, 140, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
}

.issue-title-fixed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.btn-unfix {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  margin-left: auto;
  padding: 2px 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-unfix:hover { color: var(--text); }

/* ── All Done Banner ─────────────────────────────────────────────────────── */

.all-done-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(61, 214, 140, 0.08);
  border: 1px solid rgba(61, 214, 140, 0.3);
  border-radius: var(--card-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.all-done-icon {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}

.all-done-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.all-done-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Content Idea Cards ──────────────────────────────────────────────────── */

.content-idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-idea-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.content-idea-type {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.content-idea-type.blog     { background: rgba(79,156,249,0.15); color: var(--accent); }
.content-idea-type.promo    { background: rgba(240,164,41,0.15); color: var(--warning); }
.content-idea-type.content  { background: rgba(61,214,140,0.15); color: var(--success); }
.content-idea-type.seo      { background: rgba(224,92,92,0.1);   color: var(--danger); }
.content-idea-type.seasonal { background: rgba(240,164,41,0.15); color: var(--warning); }

.content-idea-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.content-idea-urgent {
  font-size: 12px;
  color: var(--warning);
  font-weight: 600;
  white-space: nowrap;
}

.content-idea-body {
  font-size: 14px;
  color: var(--text-muted);
}

.content-idea-action {
  font-size: 13px;
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  color: var(--text);
}

/* ── Rewrite button + variant hint ──────────────────────────────────────── */

.btn-rewrite {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  font-family: var(--font);
}
.btn-rewrite:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.variant-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  align-self: center;
}

/* ── Ask Finch about a topic section ────────────────────────────────────── */

.topic-request-section {
  background: var(--surface-2);
  border: 1px solid rgba(79, 156, 249, 0.22);
  border-radius: var(--card-radius);
  padding: 24px;
  margin-bottom: 32px;
}

.topic-request-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.topic-request-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.topic-input-row {
  display: flex;
  gap: 10px;
}

.topic-field {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.topic-field::placeholder { color: var(--text-muted); }
.topic-field:focus { border-color: var(--accent); }

.btn-topic-submit {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  white-space: nowrap;
  transition: opacity 0.15s;
}
.btn-topic-submit:hover { opacity: 0.88; }

.topic-result-card {
  border-color: var(--accent);
}

.btn-topic-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.15s;
  font-family: var(--font);
  line-height: 1;
}
.btn-topic-dismiss:hover { color: var(--danger); }

/* ── Custom keyword tracking ──────────────────────────────────────────────── */

.kw-settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
}

.kw-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.kw-field {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.kw-field::placeholder { color: var(--text-muted); }
.kw-field:focus { border-color: var(--accent); }

.btn-kw-add {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-kw-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.kw-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.kw-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px 5px 14px;
  font-size: 13px;
  color: var(--text);
}

.kw-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  font-family: var(--font);
  transition: color 0.15s;
}
.kw-remove:hover { color: var(--danger); }

.kw-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   ANALYTICS & SEO PAGES — Dark theme overrides for Scout-originated classes
   ═══════════════════════════════════════════════════════════════════════════ */

.page-title-section {
  background: var(--surface);
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.page-title-inner { max-width: 1200px; margin: 0 auto; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.page-subtitle { font-size: 14px; color: var(--text-muted); }

/* Loading & Error */
.analytics-loading { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.analytics-error { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.analytics-error p { background: rgba(224,92,92,0.08); color: var(--danger); padding: 16px 20px; border-radius: 8px; font-size: 14px; border: 1px solid rgba(224,92,92,0.2); }

/* Stats bar */
.stats-bar { padding: 20px 24px 16px; }
.stats-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 900px) { .stats-inner { grid-template-columns: repeat(2,1fr); } }

.stat-card {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-explain { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Verdict */
.verdict-section { padding: 0 24px 16px; }
.verdict-inner { max-width: 1200px; margin: 0 auto; }
.verdict-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px; border-radius: var(--card-radius); border: 1px solid var(--border); background: var(--surface); }
.verdict-strong { border-color: var(--success); background: rgba(61,214,140,0.06); }
.verdict-good    { border-color: var(--success); background: rgba(61,214,140,0.06); }
.verdict-moderate{ border-color: var(--warning); background: rgba(240,164,41,0.06); }
.verdict-low     { border-color: var(--danger);  background: rgba(224,92,92,0.06); }
.verdict-icon  { font-size: 28px; flex-shrink: 0; line-height: 1; }
.verdict-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.verdict-detail{ font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Section headings */
.section-heading    { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.section-subheading { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* Insights grid */
.insights-section { padding: 0 24px 24px; }
.insights-inner { max-width: 1200px; margin: 0 auto; }
.insights-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .insights-grid { grid-template-columns: 1fr; } }

.insight-card { background: var(--surface); border-radius: var(--card-radius); padding: 20px; border: 1px solid var(--border); }
.insight-card-highlight { border-color: var(--success); background: rgba(61,214,140,0.06); }
.insight-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.insight-icon  { font-size: 20px; line-height: 1; }
.insight-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.insight-value { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.insight-explain { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* Explainer grid */
.explainer-section { padding: 0 24px 24px; }
.explainer-inner { max-width: 1200px; margin: 0 auto; }
.explainer-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .explainer-grid { grid-template-columns: 1fr; } }
.explainer-card { background: var(--surface); border-radius: var(--card-radius); padding: 20px; border: 1px solid var(--border); }
.explainer-card h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.explainer-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.explainer-card p strong { color: var(--text); }

/* Date range footer */
.date-range-section { padding: 0 24px 40px; }
.date-range-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); }
.date-range-label { font-size: 13px; color: var(--text-muted); }
.date-range-label span { color: var(--text); font-weight: 500; }
.date-range-source { font-size: 12px; color: var(--text-muted); }

/* Keywords table */
.keywords-section { padding: 0 24px 24px; }
.keywords-inner { max-width: 1200px; margin: 0 auto; }
.keywords-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border); }
.keywords-table thead th { background: var(--surface-2); padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); text-align: left; border-bottom: 2px solid var(--border); }
.keywords-table tbody tr { border-bottom: 1px solid var(--border); }
.keywords-table tbody tr:hover { background: var(--surface-2); }
.keywords-table tbody td { padding: 12px 16px; font-size: 13px; vertical-align: middle; color: var(--text); }
.kw-keyword { font-weight: 600; color: var(--text); }
.kw-clicks, .kw-impressions { color: var(--text-muted); }

/* Position & opportunity badges */
.pos-badge  { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pos-top    { background: rgba(61,214,140,0.12); color: var(--success); }
.pos-page1  { background: rgba(79,156,249,0.12); color: var(--accent); }
.pos-page2  { background: rgba(240,164,41,0.12); color: var(--warning); }
.pos-deep   { background: var(--surface-2); color: var(--text-muted); }
.opp-badge  { font-size: 12px; font-weight: 500; white-space: nowrap; }
.opp-strong  { color: var(--success); }
.opp-good    { color: var(--accent); }
.opp-quickwin{ color: var(--warning); font-weight: 600; }
.opp-potential{ color: #c084fc; }
.opp-monitor { color: var(--text-muted); }

/* Top pages */
.top-pages-section { padding: 0 24px 24px; }
.top-pages-inner { max-width: 1200px; margin: 0 auto; }
.top-pages-loading { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.top-pages-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.top-pages-error-msg { background: rgba(224,92,92,0.08); color: var(--danger); padding: 12px 16px; border-radius: 8px; font-size: 13px; border: 1px solid rgba(224,92,92,0.2); }

.tp-card { background: var(--surface); border-radius: var(--card-radius); margin-bottom: 12px; border: 1px solid var(--border); transition: border-color 0.2s; overflow: hidden; }
.tp-card:hover { border-color: var(--accent); }
.tp-card-header { display: flex; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; user-select: none; transition: background 0.1s; }
.tp-card-header:hover { background: var(--surface-2); }
.tp-card-body { padding: 16px 20px; border-top: 1px solid var(--border); }
.tp-chevron { font-size: 11px; color: var(--text-muted); flex-shrink: 0; width: 14px; }
.tp-rank { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.tp-page-info { flex-grow: 1; min-width: 0; }
.tp-page-title { font-size: 15px; font-weight: 600; color: var(--text); }
.tp-page-path { font-size: 12px; color: var(--text-muted); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-views { font-size: 22px; font-weight: 700; color: var(--accent); flex-shrink: 0; text-align: right; }
.tp-views-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

.tp-metrics-row { display: flex; gap: 24px; padding: 12px 16px; background: var(--surface-2); border-radius: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tp-metric { display: flex; flex-direction: column; gap: 2px; }
.tp-metric-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.tp-metric-value { font-size: 14px; font-weight: 600; color: var(--text); }
.tp-metric-good { color: var(--success); }
.tp-metric-bad  { color: var(--danger); }

.tp-keywords-section { margin-bottom: 12px; }
.tp-keywords-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 8px; }
.tp-keywords-list { display: flex; flex-direction: column; gap: 6px; }
.tp-keyword { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--surface-2); border-radius: 6px; font-size: 13px; flex-wrap: wrap; }
.tp-kw-query { font-weight: 600; color: var(--text); flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-kw-stats { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.tp-no-keywords { font-size: 12px; color: var(--text-muted); font-style: italic; padding: 4px 0; }
.tp-insight { padding: 10px 14px; background: var(--accent-glow); border-radius: 6px; border-left: 3px solid var(--accent); font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.tp-insight-icon { margin-right: 4px; }

/* Easi Finch Home */
.home-hero { text-align: center; padding: 40px 24px 8px; }
.home-hero h1 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.home-hero p { font-size: 14px; color: var(--text-muted); }
.home-tiles-section { padding: 20px 24px 48px; max-width: 1200px; margin: 0 auto; }
.home-tiles-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
@media (max-width: 1100px) { .home-tiles-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px)  { .home-tiles-grid { grid-template-columns: 1fr; } }

.home-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.home-tile:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.home-tile-icon { font-size: 28px; line-height: 1; }
.home-tile-title { font-size: 15px; font-weight: 700; color: var(--text); }
.home-tile-stats { display: flex; flex-direction: column; gap: 4px; }
.home-tile-stat { font-size: 13px; color: var(--text-muted); }
.home-tile-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.tile-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.tile-badge.good { background: rgba(61,214,140,0.12); color: var(--success); }
.tile-badge.warn { background: rgba(240,164,41,0.12); color: var(--warning); }
.tile-badge.info { background: var(--accent-glow); color: var(--accent); }
.tile-loader { font-size: 12px; color: var(--text-muted); }


/* ── Search page buttons & inputs ──────────────────────────────────────── */
.topic-request-wrap {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.topic-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.topic-input::placeholder { color: var(--text-muted); }
.topic-input:focus { border-color: var(--accent); }

.btn-topic-go {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  white-space: nowrap;
  transition: opacity 0.15s;
}
.btn-topic-go:hover { opacity: 0.85; }

.add-keyword-wrap {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.topic-result {
  margin-top: 16px;
}
.topic-result.hidden { display: none; }

/* ── Blog post idea (inside post cards) ────────────────────────────────── */

.blog-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-intro {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
}

.btn-copy-blog {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-copy-blog:hover { border-color: var(--accent); color: var(--accent); }

/* ── Events — month accordion ───────────────────────────────────────────── */

.event-month-group {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.event-month-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.event-month-header:hover,
.event-month-header.open {
  background: var(--surface-2);
}

.event-month-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.event-month-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.event-month-chevron {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.event-month-body {
  padding: 12px 16px 4px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── Events cards ───────────────────────────────────────────────────────── */

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.event-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.event-date-badge {
  font-size: 12px;
  font-weight: 600;
  background: rgba(240, 164, 41, 0.15);
  color: var(--warning);
  border: 1px solid rgba(240, 164, 41, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-location {
  font-size: 13px;
  color: var(--text-muted);
}

.event-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.event-relevance {
  font-size: 13px;
  color: var(--success);
  background: rgba(61, 214, 140, 0.08);
  border-left: 3px solid var(--success);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  line-height: 1.55;
}

.event-link {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: 2px;
}
.event-link:hover { text-decoration: underline; }

/* ── New Topic section (Search Intel) ───────────────────────────────────── */

.new-topic-section {
  background: var(--surface-2);
  border: 1px solid rgba(79, 156, 249, 0.22);
  border-radius: var(--card-radius);
  padding: 24px;
}

/* ── Homepage Events ─────────────────────────────────────────────────────── */

.home-events-section {
  margin-top: 32px;
  margin-bottom: 40px;
}

.home-events-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.home-events-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.home-events-link:hover { text-decoration: underline; }

.home-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .home-events-grid { grid-template-columns: 1fr; }
}

.home-event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}
.home-event-card:hover { border-color: var(--accent); }

.home-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-event-date {
  font-size: 12px;
  font-weight: 600;
  background: rgba(240, 164, 41, 0.15);
  color: var(--warning);
  border: 1px solid rgba(240, 164, 41, 0.3);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.home-event-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.home-event-more:hover { text-decoration: underline; }

.home-event-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.home-event-location {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Nav logo separator ────────────────────────────────────────────────── */
.header-nav {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  margin-left: 8px;
}

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px 0;
    gap: 0;
  }
  .header-left {
    flex: 1;
    gap: 10px;
  }
  .header-right {
    gap: 10px;
  }
  .last-updated {
    display: none;
  }
  .header-nav {
    order: 3;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 6px 0 2px;
    margin: 8px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    flex-wrap: nowrap;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .nav-link {
    font-size: 12px;
    padding: 5px 10px;
    flex-shrink: 0;
  }
}

