:root {
  --bg: #0a0a0d;
  --surface: #141419;
  --surface2: #1e1e28;
  --border: #26263a;
  --text: #e8e8f0;
  --text2: #9898b0;
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #3b82f6;
  --card: #141419;
  --glass: rgba(10, 10, 13, 0.92);
  --sidebar-bg: #000;
  --sidebar-w: 225px;
  --shadow: rgba(0, 0, 0, 0.35);
}
/* Light mode (v12) — toggled via <html data-theme="light">, persisted per device */
:root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface2: #eceef3;
  --border: #d9dce4;
  --text: #15171d;
  --text2: #5c6170;
  --accent: #7c3aed;
  --accent2: #6d28d9;
  --card: #ffffff;
  --green: #15803d;
  --red: #b91c1c;
  --yellow: #a16207;
  --blue: #1d4ed8;
  --glass: rgba(244, 245, 247, 0.92);
  --sidebar-bg: #0d0d10; /* sidebar stays black in both themes — the anchor of the look */
  --shadow: rgba(30, 30, 60, 0.12);
}
/* flatpickr ships its dark theme unconditionally; in light mode the calendar surface goes
   white while dark.css keeps day numbers white — restore readable day text */
:root[data-theme="light"] .flatpickr-day { color: #15171d; }
:root[data-theme="light"] .flatpickr-day.flatpickr-disabled,
:root[data-theme="light"] .flatpickr-day.prevMonthDay,
:root[data-theme="light"] .flatpickr-day.nextMonthDay { color: rgba(0, 0, 0, 0.3); }
:root[data-theme="light"] .flatpickr-day:hover { background: #ece9fd; color: #15171d; }
:root[data-theme="light"] .flatpickr-day.selected,
:root[data-theme="light"] .flatpickr-day.startRange,
:root[data-theme="light"] .flatpickr-day.endRange,
:root[data-theme="light"] .flatpickr-day.inRange { color: #fff; }
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50; background: var(--glass);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 1.1em;
  background: linear-gradient(135deg,#a78bfa,#6366f1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; cursor: pointer;
  white-space: nowrap;
}
.topbar-spacer { flex: 1; }
.icon-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 0.9em;
  display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent2); }
.icon-btn .badge { background: var(--accent); color: #fff; font-size: 0.75em;
  padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.version-tag, .last-update-tag {
  font-size: 0.72em;
  padding: 4px 10px; border-radius: 8px;
  cursor: help; user-select: none; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface2);
}
.version-tag {
  color: var(--accent2); margin-left: 6px;
  font-weight: 700;
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.12);
  cursor: pointer;
}
.version-tag:hover { background: rgba(139, 92, 246, 0.22); transform: translateY(-1px); }
.last-update-tag {
  color: var(--text2); margin-left: 4px;
  cursor: pointer;
}
.last-update-tag:hover { color: var(--text); border-color: var(--accent); }

/* Changelog modal — modal stays fixed, only its body scrolls */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 40px 20px; z-index: 500;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
}
.modal-header h3 { font-size: 1.15em; font-weight: 700; }
.modal-body {
  padding: 16px 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
/* Lock background page scroll while modal is open */
body.modal-open { overflow: hidden; }

.changelog-entry {
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.changelog-entry:last-child { border-bottom: 0; }
.changelog-entry-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.changelog-version {
  font-weight: 800; font-size: 1.05em; color: var(--accent2);
  background: rgba(139, 92, 246, 0.15); padding: 2px 10px; border-radius: 8px;
}
.changelog-date { color: var(--text2); font-size: 0.85em; }
.changelog-tag {
  font-size: 0.7em; background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.changelog-list {
  list-style: none; padding: 0; margin: 0;
}
.changelog-list li {
  padding: 5px 0 5px 18px; position: relative; line-height: 1.5;
  font-size: 0.93em; color: var(--text);
}
.changelog-list li::before {
  content: '•'; position: absolute; left: 0; color: var(--accent2); font-weight: 700;
}
.changelog-entry.latest .changelog-list li { color: var(--text); }

/* About modal content */
.about-body { font-size: 0.95em; line-height: 1.65; color: var(--text); }
.about-body p { margin-bottom: 14px; }
.about-h4 {
  font-size: 1em; font-weight: 700; color: var(--accent2);
  margin: 22px 0 8px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.about-h4:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.about-list { list-style: none; padding: 0; margin: 0 0 14px 0; }
.about-list li {
  padding: 6px 0 6px 22px; position: relative; line-height: 1.55;
}
.about-list li::before {
  content: '•'; position: absolute; left: 4px; color: var(--accent2); font-weight: 700;
}
.about-body code {
  background: var(--surface2); padding: 2px 7px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  color: var(--accent2); border: 1px solid var(--border);
}
.about-body strong { color: var(--text); }
.about-body em { color: var(--text2); }

/* Update banner — shows when a newer deploy is live */
.update-banner {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  color: #fff; font-size: 0.92em; font-weight: 500;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  flex-wrap: wrap;
}
.update-banner-text { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.update-banner-meta { opacity: 0.85; font-size: 0.85em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.update-banner-btn {
  background: #fff; color: var(--accent); border: 0; padding: 7px 16px; border-radius: 8px;
  font-weight: 700; cursor: pointer; font-size: 0.9em; transition: transform 0.15s;
}
.update-banner-btn:hover { transform: scale(1.04); }
.update-banner-dismiss {
  background: transparent; color: #fff; border: 0; font-size: 1.4em; line-height: 1;
  cursor: pointer; padding: 0 6px; opacity: 0.75;
}
.update-banner-dismiss:hover { opacity: 1; }

/* Search bars */
/* Sticky search zone — follows the user as they scroll, sits under the topbar.
   --topbar-h is set by JS on init from the topbar's actual offsetHeight. */
.search-zone {
  padding: 24px 0 12px;
  position: sticky;
  /* Tuck 4px UNDER the topbar: --topbar-h is a rounded JS measurement, and the topbar can
     rewrap when the async version/update tags fill in — any 1px mismatch opened a slit where
     scrolling content peeked through. Overlapping kills the crack regardless of rounding. */
  top: calc(var(--topbar-h, 60px) - 4px);
  z-index: 49;  /* 1 below topbar */
  /* CONSTANT translucent background — rgba(15,15,19,.92) over the #0f0f13 page bg is
     pixel-identical to opaque, so nothing changes visually at the top. Animating the
     background on an element with backdrop-filter invalidated the blur's backdrop every
     frame for 180ms — re-rasterizing the charts right below it and flickering them. */
  background: var(--glass);
  /* Transparent border in BOTH states: adding a border only when scrolled made the width
     jump 0→1px while border-color transitioned from currentColor (near-white) — the white
     line that flashed at the bottom of the panel and stayed. */
  border-bottom: 1px solid transparent;
  /* Blur always on (invisible over the opaque base bg): toggling backdrop-filter mid-scroll
     forces compositor layer promotion, which flickers at the element's edges in Chrome. */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.18s ease;
}
/* When scrolled past the search zone's natural position, match the topbar's translucent
   frosted-glass look. The ONLY thing that changes on the threshold is the shadow —
   background/blur stay constant so the compositor never re-rasterizes the backdrop
   (the dashboard charts) mid-scroll.
   No padding change between states — keeping the bar at consistent height prevents the
   blocky double-shrink that happens when the sticky transition collides with a size change.
   Separation comes from the shadow alone — no bottom border line. */
body.is-scrolled .search-zone {
  box-shadow: 0 6px 24px var(--shadow);
}
/* User toggled visibility off — hide the sticky bar entirely while scrolled. */
body.is-scrolled.search-hidden .search-zone { display: none; }

/* Floating show/hide toggle — only visible when scrolled (sticky bar is engaged).
   At the very top of the page the original search bar is right there, so no toggle needed. */
.search-toggle-btn {
  display: none;
  position: fixed;
  /* Sit just below the topbar so we don't overlap the Logout / About / Saved buttons. */
  top: calc(var(--topbar-h, 60px) + 10px);
  right: 24px;
  z-index: 60;  /* above topbar (50) + sticky search (49) */
  /* Translucent frosted-glass look — matches the topbar + sticky search bar */
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.search-toggle-btn:hover { background: var(--surface2); border-color: var(--accent); }
body.is-scrolled .search-toggle-btn { display: inline-flex; align-items: center; gap: 6px; }
body:not(.search-hidden) .search-toggle-btn .t-show { display: none; }
body.search-hidden .search-toggle-btn .t-hide { display: none; }
.search-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.search-box {
  flex: 1; min-width: 280px; position: relative;
  background: var(--surface); border: 2px solid var(--border); border-radius: 14px;
  padding: 14px 18px 14px 46px; transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 30px rgba(139,92,246,0.15); }
.search-box .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.1em; color: var(--text2); pointer-events: none;
}
.search-box input {
  width: 100%; background: transparent; border: 0; color: var(--text);
  font-size: 1em; outline: none;
}
.search-box input::placeholder { color: var(--text2); }
.search-box .label-tag {
  position: absolute; top: -10px; left: 14px; background: var(--bg);
  padding: 0 8px; font-size: 0.72em; color: var(--accent2); font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.search-tips { color: var(--text2); font-size: 0.82em; margin-top: 8px; }
.search-tips span {
  background: var(--surface2); padding: 4px 10px; border-radius: 12px;
  margin-right: 4px; cursor: pointer; transition: all 0.15s; display: inline-block;
  margin-bottom: 4px;
}
.search-tips span:hover { background: var(--accent); color: #fff; }

.scope-pill {
  background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 12px;
  font-size: 0.78em; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.scope-pill .x { cursor: pointer; opacity: 0.8; }
.scope-pill .x:hover { opacity: 1; }

/* Filter row */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.filter-select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 8px; font-size: 0.85em; cursor: pointer; outline: none;
}
.filter-select:focus { border-color: var(--accent); }
.filter-checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85em; color: var(--text2); cursor: pointer; }
.active-filter {
  background: var(--surface2); padding: 4px 10px; border-radius: 12px;
  font-size: 0.8em; display: inline-flex; align-items: center; gap: 6px;
}
.active-filter .x { cursor: pointer; color: var(--red); font-weight: 700; }

/* When the user filters from the home dashboard, the detailView (review list) appears below
   the homeView. Without a separator, sub-themes grid bleeds into the persona-breakdown chips.
   This divider makes the boundary explicit. */
.filtered-section-divider {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  margin-bottom: 16px;
}
.filtered-section-title {
  font-size: 1.3em;
  margin: 0;
  color: var(--text);
  /* When auto-scrolled to (via scrollIntoView in scrollToResults), land 16px below the sticky
     topbar (--topbar-h) + the sticky search bar (~135px). Without this, the title would land
     at viewport y=0 — hidden behind the sticky stack. */
  scroll-margin-top: calc(var(--topbar-h, 60px) + 145px);
}

/* Dashboard insights grid (Top Keywords / Topics / Pain Points across all reviews) */
.dashboard-insights {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.dashboard-insights .insight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.dashboard-insights .insight-box h4 {
  font-size: 0.95em;
  margin-bottom: 12px;
  color: var(--text);
}
@media (max-width: 1100px) {
  .dashboard-insights { grid-template-columns: 1fr; }
}

/* Stat bar */
.stat-bar { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.stat { text-align: left; position: relative; }
.stat-num { font-size: 1.4em; font-weight: 800; color: var(--accent2); }
.stat-label { font-size: 0.8em; color: var(--text2); }

/* Clickable date-range stat — opens flatpickr range picker */
.date-range-stat { cursor: pointer; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; transition: background 0.15s; }
.date-range-stat:hover { background: rgba(139, 92, 246, 0.08); }
.date-range-stat.filtered { background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.3); }
.date-range-stat.filtered .stat-num { color: var(--accent); }

/* Flatpickr dark theme overrides to match our palette */
.flatpickr-calendar { background: var(--surface) !important; border: 1px solid var(--border) !important; }
.flatpickr-day.inRange, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.selected { background: var(--accent) !important; border-color: var(--accent) !important; }
.flatpickr-day:hover { background: rgba(139, 92, 246, 0.2) !important; }

/* Home dashboard */
.dashboard-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 8px;
}
.dash-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
}
.dash-box h4 { font-size: 0.92em; color: var(--text2); margin-bottom: 12px; font-weight: 600; }
.dash-box canvas { max-height: 220px; }
/* Chart canvases get their own compositor layer. Without this, Chrome re-rasterizes an
   un-layered canvas whenever it scrolls under the frosted (backdrop-filter) sticky bar,
   and the donuts flicker in and out for a frame — intermittent, scroll-speed dependent. */
canvas { transform: translateZ(0); }

/* Loved / Complaint pills for product detail */
.loved-row { display: flex; flex-wrap: wrap; gap: 8px; }
.loved-pill, .complaint-pill {
  padding: 8px 14px; border-radius: 14px;
  font-size: 1em; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.loved-pill {
  background: rgba(34, 197, 94, 0.15); color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
}
.loved-pill:hover { background: rgba(34, 197, 94, 0.28); transform: translateY(-2px); }
.loved-pill .count { color: var(--green); opacity: 0.8; font-size: 0.78em; font-weight: 600; }
.complaint-pill {
  background: rgba(239, 68, 68, 0.15); color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
}
.complaint-pill:hover { background: rgba(239, 68, 68, 0.28); transform: translateY(-2px); }
.complaint-pill .count { color: var(--red); opacity: 0.8; font-size: 0.78em; font-weight: 600; }

/* Product chart + grid */
.product-chart-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
  display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: stretch;
}
.product-chart-canvas-wrap { min-width: 0; height: 380px; position: relative; }
.product-chart-canvas-wrap canvas { width: 100% !important; height: 100% !important; }

/* Side legend mirrors the pie-chart legend we briefly had — colors stay keyed to chart bars */
.product-legend { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.product-legend::-webkit-scrollbar { width: 6px; }
.product-legend::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
.product-legend-row {
  display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px;
  align-items: center; padding: 5px 8px; border-radius: 6px; cursor: pointer;
  font-size: 0.82em; transition: background 0.15s;
}
.product-legend-row:hover { background: rgba(139, 92, 246, 0.08); }
.product-legend-swatch { width: 12px; height: 12px; border-radius: 3px; }
.product-legend-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-legend-count { color: var(--accent2); font-weight: 600; font-variant-numeric: tabular-nums; }
.product-legend-pct { color: var(--text2); font-size: 0.9em; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .product-chart-box { grid-template-columns: 1fr; }
  .product-legend { max-height: none; }
}
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px;
  margin-bottom: 8px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 4px;
}
.product-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface2); }
.product-card .pc-emoji { font-size: 1.3em; }
.product-card .pc-name { font-weight: 600; font-size: 0.9em; }
.product-card .pc-count { color: var(--accent2); font-weight: 700; font-size: 1.05em; }
.product-card .pc-label { color: var(--text2); font-size: 0.74em; }

/* Sub-theme grid */
.subtheme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.subtheme-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  cursor: pointer; transition: all 0.15s;
}
.subtheme-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface2); }
.subtheme-card .st-name { font-weight: 600; font-size: 0.95em; margin-bottom: 4px; }
.subtheme-card .st-count { color: var(--accent2); font-weight: 700; font-size: 1.1em; }
.subtheme-card .st-label { color: var(--text2); font-size: 0.78em; }

/* Gender pill (used on persona cards & detail) */
.gender-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.gender-pill {
  padding: 3px 9px; border-radius: 10px; font-size: 0.74em; font-weight: 600;
  background: var(--surface2); border: 1px solid var(--border);
}
.gender-pill.female { color: #ec4899; border-color: rgba(236, 72, 153, 0.3); background: rgba(236, 72, 153, 0.08); }
.gender-pill.male { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.08); }
.gender-pill.unknown { color: var(--text2); }

/* Persona grid */
.persona-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px; margin-top: 22px;
}
.persona-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
}
.persona-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.persona-card .emoji { font-size: 2.2em; margin-bottom: 8px; }
.persona-card h3 { font-size: 1.2em; margin-bottom: 4px; }
.persona-card .trigger { color: var(--text2); font-size: 0.88em; margin-bottom: 14px; line-height: 1.5; }

/* "aka [Official Persona Name]" subtitle — bridges our review-derived personas with MUD\WTR's official Persona Library */
.persona-aka {
  font-size: 0.78em; color: var(--accent2); font-weight: 600;
  margin-bottom: 10px; letter-spacing: 0.2px;
  display: inline-flex; align-items: center; gap: 5px;
}
.persona-aka.detail-aka {
  font-size: 0.92em; margin-bottom: 12px;
  background: rgba(139, 92, 246, 0.12); padding: 4px 12px; border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.aka-tooltip {
  color: var(--text2); cursor: help; font-size: 0.9em;
}
.aka-tooltip:hover { color: var(--accent2); }
.persona-card .card-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.persona-card .card-stat-num { font-size: 1.2em; font-weight: 700; }
.persona-card .card-stat-label { font-size: 0.7em; color: var(--text2); }
.persona-card .age-badge {
  position: absolute; top: 14px; right: 14px; background: var(--surface2);
  padding: 3px 10px; border-radius: 12px; font-size: 0.72em; color: var(--text2);
}
.persona-card .accent-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }

/* Detail view */
.detail-header { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin-bottom: 20px; }
.detail-header h2 { font-size: 1.7em; margin-bottom: 6px; }
.detail-header .trigger-text { color: var(--text2); margin-bottom: 18px; }
.detail-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.detail-stat { background: var(--surface2); padding: 12px 18px; border-radius: 10px; text-align: center; min-width: 100px; }
.detail-stat-num { font-size: 1.4em; font-weight: 800; }
.detail-stat-label { font-size: 0.74em; color: var(--text2); margin-top: 2px; }

/* Charts */
.charts-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.chart-box h4 { font-size: 0.9em; color: var(--text2); margin-bottom: 10px; }
.chart-box canvas { max-height: 200px; }

/* Insights */
/* auto-fit so the three insight boxes (keywords / pains / products) flow to fewer columns
   gracefully on narrower viewports instead of being crammed into a fixed grid */
.insight-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-bottom: 20px; }
.insight-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.insight-box h4 { font-size: 0.95em; color: var(--text2); margin-bottom: 14px; }
.keyword-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-pill {
  background: var(--surface2); padding: 5px 12px; border-radius: 16px; font-size: 0.82em;
  cursor: pointer; transition: all 0.15s; border: 1px solid transparent;
}
.keyword-pill:hover { background: var(--accent); color: #fff; }
.keyword-pill .count { color: var(--accent2); margin-left: 5px; font-weight: 600; }
.keyword-pill:hover .count { color: #fff; }
.pain-list { list-style: none; }
.pain-list li {
  padding: 6px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.pain-list li:last-child { border: 0; }
.pain-label { white-space: nowrap; min-width: 110px; font-size: 0.85em; cursor: pointer; }
.pain-label:hover { color: var(--accent2); text-decoration: underline; }
.pain-bar { flex: 1; background: var(--surface2); border-radius: 4px; height: 5px; position: relative; }
.pain-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--red), #f97316);
}
.pain-count { color: var(--red); font-weight: 600; font-size: 0.82em; min-width: 50px; text-align: right; }

/* Sub-tabs */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-tab {
  background: var(--surface); border: 1px solid var(--border); color: var(--text2);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 0.85em;
  transition: all 0.15s;
}
.sub-tab:hover { border-color: var(--accent); color: var(--text); }
.sub-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.sub-tab .tab-count { font-size: 0.78em; opacity: 0.75; margin-left: 4px; }

/* Persona breakdown chips */
.persona-breakdown { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.persona-breakdown .label { color: var(--text2); font-size: 0.85em; align-self: center; margin-right: 4px; }
.pb-chip { background: var(--surface2); padding: 4px 10px; border-radius: 12px; font-size: 0.8em; cursor: pointer; }
.pb-chip:hover { background: var(--accent); color: #fff; }
.pb-chip .pb-count { color: var(--accent2); font-weight: 600; margin-left: 4px; }
.pb-chip:hover .pb-count { color: #fff; }

/* Results header */
.results-header { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 12px; flex-wrap: wrap; gap: 8px; }
.results-count { font-size: 1.05em; font-weight: 600; }
.results-count strong { color: var(--accent2); }

/* Review cards — mudwtr.com-inspired 3-column layout:
   LEFT (reviewer info) | CENTER (review body) | RIGHT (metrics) */
.review-list { display: grid; gap: 14px; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: border-color 0.2s; position: relative; }
.review-card:hover { border-color: var(--accent); }
.review-card-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) minmax(320px, max-content);
  gap: 28px;
  align-items: stretch;
}
.review-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.review-left .review-name { font-weight: 700; font-size: 0.95em; color: var(--text); word-break: break-word; }
.review-left .review-email { font-size: 0.76em; color: var(--accent2); word-break: break-all; margin: 1px 0; }
.review-left .review-age { font-size: 0.78em; color: var(--text2); font-weight: 600; }
.review-left .review-date { font-size: 0.82em; color: var(--text2); }
.review-center { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.review-stars-row { color: #eab308; letter-spacing: 1px; font-size: 1em; line-height: 1; margin-bottom: 6px; }
.review-title { font-weight: 700; font-size: 1.02em; color: var(--text); line-height: 1.3; }
.review-right {
  display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end;
  gap: 10px; text-align: right;
}
.review-meta { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; white-space: nowrap; line-height: 1; }
.review-emotion { color: var(--accent2); font-size: 0.78em; font-weight: 600; }
.review-stars { color: #eab308; letter-spacing: 1px; font-size: 0.9em; }
.review-sentiment { font-size: 0.74em; padding: 2px 9px; border-radius: 10px; text-transform: capitalize; }
.review-sentiment.positive { background: rgba(34,197,94,0.15); color: var(--green); }
.review-sentiment.negative { background: rgba(239,68,68,0.15); color: var(--red); }
.review-sentiment.mixed { background: rgba(234,179,8,0.15); color: var(--yellow); }
.review-sentiment.neutral { background: rgba(148,163,184,0.15); color: #94a3b8; }
.review-product { font-size: 0.74em; color: var(--text2); background: var(--surface2); padding: 2px 9px; border-radius: 10px; }

/* Source pill — neutral "Source" label by default; reveals platform name on hover.
   Hidden by design so screenshots don't leak which review services we use. */
/* Source pill styles removed in v8.6 — UI was stripped because new team members found the
   Bazaarvoice/Okendo distinction confusing without context. The full rationale + technical
   details live in the Developer Notes (footer modal). */

/* Site footer — links to About / Dev Notes / Changelog. Sits below all content. */
.site-footer {
  margin-top: 60px;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--border);
  background: rgba(15, 15, 19, 0.5);
}
.footer-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1400px; margin: 0 auto;
  font-size: 0.85em; color: var(--text2);
}
.footer-brand {
  font-weight: 800; color: transparent;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  -webkit-background-clip: text; background-clip: text;
}
.footer-dot { color: var(--border); }
.footer-link {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.9em; cursor: pointer; transition: all 0.15s;
}
.footer-link:hover { background: var(--surface2); border-color: var(--accent); }
.footer-spacer { flex: 1; }
.footer-meta { color: var(--text2); font-size: 0.85em; }

/* Code block inside the Developer Notes modal */
.dev-code {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em; color: var(--accent2);
  white-space: pre-wrap; margin: 8px 0 14px;
  overflow-x: auto;
}
.about-body code {
  background: var(--surface2); color: var(--accent2);
  padding: 1px 6px; border-radius: 4px; font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.review-body {
  line-height: 1.65; color: var(--text); font-size: 0.93em;
  max-height: 200px; overflow-y: auto; padding-right: 10px;
  cursor: pointer; transition: max-height 0.25s ease;
}
.review-body.expanded { max-height: none; overflow-y: visible; }
.review-body mark { background: rgba(139,92,246,0.3); color: var(--accent2); padding: 1px 3px; border-radius: 3px; }
/* Custom scrollbar — only visible when content overflows, matches dark theme */
.review-body::-webkit-scrollbar { width: 6px; }
.review-body::-webkit-scrollbar-track { background: transparent; }
.review-body::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
.review-body::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }
.review-body { scrollbar-width: thin; scrollbar-color: var(--surface2) transparent; }

/* Stack to single column on narrow screens */
@media (max-width: 880px) {
  .review-card-grid { grid-template-columns: 1fr; gap: 14px; }
  .review-right { align-items: flex-start; text-align: left; }
  .review-meta { justify-content: flex-start; flex-wrap: wrap; white-space: normal; }
}

/* Saved drawer is narrow (420px) — force review cards to single-column regardless of viewport.
   Without this, the 3-column grid (~536px min) crushes the body into one-character lines. */
.drawer-body .review-card-grid { grid-template-columns: 1fr; gap: 14px; }
.drawer-body .review-right { align-items: flex-start; text-align: left; }
.drawer-body .review-meta { justify-content: flex-start; flex-wrap: wrap; white-space: normal; }

.review-personas { display: flex; gap: 4px; flex-wrap: wrap; }
.review-persona-tag { font-size: 0.7em; background: var(--surface2); color: var(--text2); padding: 2px 8px; border-radius: 10px; cursor: pointer; }
.review-persona-tag:hover { color: var(--text); }

.save-btn {
  background: transparent; border: 0; cursor: pointer; color: var(--text2);
  font-size: 1em; padding: 0; line-height: 1; transition: color 0.15s;
}
.save-btn:hover { color: var(--accent2); }
.save-btn.saved { color: var(--accent2); }

/* Pagination row — mudwtr.com-style "Showing X–Y of Z" + Prev/Next */
.pagination {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 0 8px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.page-info { color: var(--text2); font-size: 0.92em; }
.page-info strong { color: var(--accent2); font-weight: 700; }
.page-controls { display: flex; align-items: center; gap: 12px; }
.page-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 0.88em; font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover:not(:disabled) { background: var(--surface2); border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-num { color: var(--text2); font-size: 0.88em; }
.page-num strong { color: var(--text); font-weight: 700; }
@media (max-width: 700px) {
  .pagination { flex-direction: column; align-items: stretch; }
  .page-controls { justify-content: space-between; }
}

.load-more {
  display: block; width: 100%; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--accent2); cursor: pointer; font-size: 0.95em; margin-top: 14px;
  text-align: center; transition: all 0.2s;
}
.load-more:hover { background: var(--surface2); border-color: var(--accent); }

/* Empty / Loading */
.state-msg { text-align: center; padding: 60px 20px; color: var(--text2); }
.state-msg .icon { font-size: 2.5em; margin-bottom: 12px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Saved drawer */
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--border); z-index: 100; transform: translateX(100%); transition: transform 0.25s; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drawer-header h3 { font-size: 1.1em; }
.drawer-body { padding: 16px 20px; }
.drawer-body .empty { text-align: center; color: var(--text2); padding: 40px 0; }
.close-btn { background: var(--surface2); border: 0; color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; }

/* Persona Finder */
.finder-header { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin: 20px 0; }
.finder-header h2 { font-size: 1.5em; margin-bottom: 6px; }
.finder-sub { color: var(--text2); font-size: 0.9em; margin-bottom: 14px; line-height: 1.5; }
.finder-input-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.finder-input-row input { flex: 1; min-width: 240px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 11px 16px; border-radius: 10px; font-size: 1em; outline: none; }
.finder-input-row input:focus { border-color: var(--accent); }
.finder-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.finder-chip { background: var(--accent); color: #fff; padding: 5px 12px; border-radius: 14px; font-size: 0.88em; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.finder-chip .x { cursor: pointer; opacity: 0.85; font-weight: 700; }
.finder-chip .x:hover { opacity: 1; }

.finder-profile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 20px; }
.finder-profile h3 { font-size: 1.2em; margin-bottom: 4px; }
.finder-profile h4 { font-size: 0.85em; color: var(--text2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.profile-block { background: var(--surface2); padding: 14px 16px; border-radius: 10px; }
.profile-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.finder-nav {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 16px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  position: sticky; top: calc(var(--topbar-h, 60px) + 4px); z-index: 30;
}
.finder-nav-label { color: var(--text2); font-size: 0.85em; font-weight: 600; }
.finder-nav-chip {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 18px; font-size: 0.88em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; cursor: pointer;
}
.finder-nav-chip:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: translateY(-1px); }
.finder-nav-chip strong { color: var(--accent2); font-weight: 700; }
.finder-nav-chip:hover strong { color: #fff; }
.finder-nav-chip.overlap { border-color: var(--accent); }
.finder-nav-chip.overlap strong { color: var(--accent2); }

.finder-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 18px; transition: box-shadow 0.3s, border-color 0.3s; scroll-margin-top: 130px; }
.finder-section.overlap { border-color: var(--accent); box-shadow: 0 0 24px rgba(139, 92, 246, 0.12); }
.finder-section.flash { box-shadow: 0 0 0 3px var(--accent2), 0 0 30px rgba(139, 92, 246, 0.4); border-color: var(--accent2); }
.finder-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.finder-section-header h3 { font-size: 1.05em; font-weight: 600; }
.finder-section-header h3 strong { color: var(--accent2); font-size: 1.2em; }
.finder-section.overlap .finder-section-header h3 strong { color: #fff; background: var(--accent); padding: 2px 10px; border-radius: 8px; font-size: 1em; }

/* Responsive */
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .insight-row { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .profile-grid { grid-template-columns: 1fr; }
  .dashboard-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stat-bar { gap: 16px; }
  .detail-stat { min-width: 80px; padding: 10px 14px; }
}

/* ── Customers & Revenue section (v9.2) ── */
.cust-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cust-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.ct-big { font-size: 1.45em; font-weight: 800; color: var(--accent2); }
.ct-label { font-size: 0.85em; font-weight: 700; color: var(--text); margin-top: 2px; }
.ct-sub { font-size: 0.74em; color: var(--text2); margin-top: 3px; }
.pe-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.pe-table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.pe-table th { text-align: left; padding: 9px 12px; background: var(--surface2); color: var(--text2); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; }
.pe-table td { padding: 9px 12px; border-top: 1px solid var(--border); }
.pe-table tr:hover td { background: var(--surface2); }
.pe-name { font-weight: 700; color: var(--accent2); }
.pe-prod { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Person profile modal (v9.2) ── */
.person-modal { max-width: 820px; width: 92%; max-height: 86vh; max-height: 86dvh; overflow-y: auto; }
.review-name.has-profile { cursor: pointer; }
.review-name.has-profile:hover { color: var(--accent2); text-decoration: underline; }
.profile-hint { font-size: 0.75em; opacity: 0.6; }
.person-badges { margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.person-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78em; font-weight: 700; }
.person-badge.sub { background: rgba(46,204,113,0.15); color: #2ECC71; border: 1px solid rgba(46,204,113,0.4); }
.person-badge.vip { background: rgba(243,156,18,0.15); color: #F39C12; border: 1px solid rgba(243,156,18,0.4); }
.person-contact p { color: var(--text2); font-size: 0.92em; line-height: 1.5; }

/* ── Survey cards in person modal (v9.3) ── */
.survey-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.survey-head { font-size: 0.8em; color: var(--text2); margin-bottom: 8px; }
.survey-nps { color: var(--accent2); font-weight: 700; }
.survey-purpose { font-style: italic; }
.survey-qa { margin-bottom: 7px; }
.survey-q { font-size: 0.78em; color: var(--text2); }
.survey-a { font-size: 0.9em; color: var(--text); white-space: pre-wrap; }

/* ── v10 persona brief + criteria ── */
.persona-brief { margin-top: 14px; }
.pb-trigger { color: var(--text2); font-size: 0.95em; line-height: 1.5; }
.pb-narrative { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.pb-nar-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 0.9em; color: var(--text); line-height: 1.5; }
.pb-k { display: block; font-weight: 800; color: var(--accent2); margin-bottom: 5px; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; }
.pb-hook { margin: 8px 0; padding: 10px 16px; border-left: 3px solid var(--accent2); background: var(--surface); border-radius: 0 10px 10px 0; font-style: italic; color: var(--text); cursor: pointer; }
.pb-hook:hover { background: var(--surface2); }
.pb-criteria { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.pb-criteria summary { cursor: pointer; font-weight: 700; color: var(--accent2); }
.pb-crit-line { font-size: 0.88em; color: var(--text2); margin: 8px 0; line-height: 1.7; }
.kw-chip { display: inline-block; background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 1px 9px; font-size: 0.92em; color: var(--text); margin: 1px; }
.kw-chip em { color: var(--accent2); font-style: normal; font-weight: 700; }
.kw-chip.dim { opacity: 0.75; }
.pb-guards { font-size: 0.85em; color: var(--text2); margin: 4px 0 8px 18px; }
.pb-guards li { margin-bottom: 4px; }

/* ═══════ Influencers (v11) ═══════ */
.inf-controls { background: var(--card, #16181d); border: 1px solid var(--border, #2a2d34); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.inf-pill-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inf-pill-row .label-tag { min-width: 72px; opacity: 0.7; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; }
.inf-pill { background: transparent; border: 1px solid var(--border, #2a2d34); color: var(--text2, #aaa); border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 0.88em; transition: all 0.15s; }
.inf-pill:hover { border-color: var(--accent, #c9a86a); color: var(--text, #eee); }
.inf-pill.active { background: var(--accent, #c9a86a); border-color: var(--accent, #c9a86a); color: #141414; font-weight: 600; }
.inf-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.inf-search-row input { flex: 1; min-width: 220px; background: var(--bg, #0e0f12); border: 1px solid var(--border, #2a2d34); border-radius: 8px; color: var(--text, #eee); padding: 8px 12px; font-size: 0.95em; }

.inf-card { background: var(--card, #16181d); border: 1px solid var(--border, #2a2d34); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.inf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inf-name { font-weight: 700; font-size: 1.05em; }
.inf-spacer { flex: 1; }
.inf-email { color: var(--accent, #c9a86a); font-size: 0.88em; text-decoration: none; }
.inf-email:hover { text-decoration: underline; }
.inf-size { background: #2b3a55; color: #9ec1ff; border-radius: 999px; padding: 2px 10px; font-size: 0.78em; font-weight: 600; }
.inf-status { border-radius: 999px; padding: 2px 10px; font-size: 0.78em; font-weight: 600; }
.inf-st-customer { background: #1d3a2a; color: #7fd8a0; }
.inf-st-contact { background: #3a331d; color: #d8c57f; }
.inf-st-applicant { background: #2a2d34; color: #aab; }
.inf-st-unknown { background: #2a2d34; color: #888; }
.inf-tag { background: #3a1d1d; color: #d87f7f; border-radius: 999px; padding: 2px 10px; font-size: 0.78em; }
.inf-cats { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.inf-cat { background: var(--bg, #0e0f12); border: 1px solid var(--border, #2a2d34); color: var(--text2, #aaa); border-radius: 6px; padding: 2px 8px; font-size: 0.78em; }
.inf-links { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.inf-link { background: var(--bg, #0e0f12); border: 1px solid var(--border, #2a2d34); border-radius: 8px; padding: 5px 12px; font-size: 0.85em; color: var(--text, #eee); text-decoration: none; transition: border-color 0.15s; }
.inf-link:hover { border-color: var(--accent, #c9a86a); }
.inf-raw { margin-top: 8px; font-size: 0.85em; color: var(--text2, #aaa); white-space: pre-wrap; }
.inf-plats { margin-top: 6px; font-size: 0.8em; color: var(--text2, #888); }
.inf-shop { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88em; color: var(--text2, #bbb); background: rgba(127, 216, 160, 0.05); border: 1px solid rgba(127, 216, 160, 0.15); border-radius: 8px; padding: 8px 12px; }
.inf-shop strong { color: var(--text, #eee); }
.inf-sub { color: #7fd8a0; font-weight: 600; }
.inf-actions { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inf-mini { font-size: 0.82em; padding: 4px 10px; }
.inf-survey { font-size: 0.82em; color: var(--text2, #aaa); }
.inf-why { margin-top: 8px; font-size: 0.88em; }
.inf-why summary { cursor: pointer; color: var(--text2, #999); }
.inf-why p { margin: 6px 0 0 12px; color: var(--text2, #bbb); white-space: pre-wrap; }
.inf-meta { margin-top: 10px; font-size: 0.78em; color: var(--text2, #777); border-top: 1px solid var(--border, #2a2d34); padding-top: 8px; }

/* ═══════ Sidebar (v12) ═══════ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 70;
  transition: width 0.18s ease, transform 0.18s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.07); }
.sb-logo {
  min-width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#a78bfa,#6366f1); color: #fff; font-weight: 800; font-size: 0.8em; letter-spacing: -0.5px;
}
.sb-title { color: #fff; font-weight: 700; font-size: 0.92em; line-height: 1.25; }
.sb-title em { font-style: normal; font-weight: 400; font-size: 0.78em; color: #8a8a9a; }
.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.sidebar-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; gap: 3px; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0; color: #b9b9c8; font-size: 0.93em; font-weight: 500;
  padding: 10px 12px; border-radius: 9px; cursor: pointer; text-align: left;
  transition: background 0.12s, color 0.12s; white-space: nowrap;
}
.sb-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sb-item.active { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; font-weight: 700; }
.sb-ico { min-width: 20px; text-align: center; font-size: 1.05em; }

/* Collapsed rail — icons only */
body.sidebar-collapsed .sidebar { width: 64px; }
body.sidebar-collapsed .sb-label { display: none; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 8px; padding-right: 8px; }
body.sidebar-collapsed .sb-item { justify-content: center; padding-left: 8px; padding-right: 8px; }

/* Content shifts right of the sidebar */
.topbar { margin-left: var(--sidebar-w); transition: margin-left 0.18s ease; }
.container { transition: margin-left 0.18s ease; margin-left: calc(var(--sidebar-w) + max(20px, (100vw - var(--sidebar-w) - 1400px) / 2)); margin-right: auto; max-width: 1400px; }
body.sidebar-collapsed .topbar { margin-left: 64px; }
body.sidebar-collapsed .container { margin-left: calc(64px + max(20px, (100vw - 64px - 1400px) / 2)); }
.sidebar-hamburger { display: none; }

/* Mobile: sidebar becomes an overlay, hamburger shows */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,0.5); }
  body.sidebar-open .sb-label { display: inline; }
  .topbar, body.sidebar-collapsed .topbar { margin-left: 0; }
  .container, body.sidebar-collapsed .container { margin-left: auto; padding: 20px; }
  .sidebar-hamburger { display: inline-flex; }
}

/* ═══════ Surveys section (v12) ═══════ */
.svy-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.svy-text { font-size: 0.98em; line-height: 1.55; white-space: pre-wrap; }
.svy-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 0.8em; color: var(--text2); }
.svy-chip { background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.svy-chip.pos { background: rgba(34,197,94,0.12); color: var(--green); border-color: rgba(34,197,94,0.3); }
.svy-chip.neg { background: rgba(239,68,68,0.12); color: var(--red); border-color: rgba(239,68,68,0.3); }
.svy-chip.mix { background: rgba(234,179,8,0.12); color: var(--yellow); border-color: rgba(234,179,8,0.3); }
.svy-chip.nps-hi { color: var(--green); }
.svy-chip.nps-lo { color: var(--red); }
.svy-chip.persona { background: rgba(139,92,246,0.12); color: var(--accent2); border-color: rgba(139,92,246,0.3); cursor: pointer; }
.svy-purpose { font-size: 0.78em; color: var(--text2); margin-top: 6px; font-style: italic; }

/* ═══════ Profile modal v12 additions ═══════ */
.pm-area {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px;
  background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.2); border-radius: 10px; padding: 10px 14px; font-size: 0.88em;
}
.pm-area strong { color: var(--text); font-size: 1.15em; }
.pm-area .pm-area-label { color: var(--text2); font-size: 0.8em; display: block; }
.pm-orders { margin-top: 10px; }
.pm-order-row { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.88em; flex-wrap: wrap; }
.pm-order-row:last-child { border-bottom: 0; }
.pm-order-row a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.pm-order-row a:hover { text-decoration: underline; }
.pm-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pm-links a { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 0.85em; color: var(--text); text-decoration: none; }
.pm-links a:hover { border-color: var(--accent); }
.fav-btn { background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text2); padding: 5px 12px; cursor: pointer; font-size: 0.9em; }
.fav-btn.on { color: var(--yellow); border-color: var(--yellow); }

/* ═══════ Area wealth card (v12-C) ═══════ */
.aw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 860px) { .aw-grid { grid-template-columns: 1fr; } }
.aw-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.aw-head { display: flex; gap: 24px; align-items: baseline; margin-bottom: 12px; }
.aw-big { font-size: 1.5em; font-weight: 800; color: var(--accent2); }
.aw-sub { color: var(--text2); font-size: 0.8em; display: block; }
.aw-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 0.85em; }
.aw-row .aw-label { min-width: 95px; color: var(--text2); }
.aw-row .aw-pct { min-width: 52px; text-align: right; font-weight: 600; }
.aw-bar { flex: 1; height: 7px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.aw-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; }
.aw-note { font-size: 0.75em; color: var(--text2); margin-top: 10px; }

/* ═══════ Persona wealth (v13) ═══════ */
.pw-line { margin-top: 8px; font-size: 0.78em; color: var(--text2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pw-conf { border-radius: 999px; padding: 1px 8px; font-size: 0.9em; font-weight: 700; }
.pw-high { background: rgba(34,197,94,0.14); color: var(--green); }
.pw-med { background: rgba(234,179,8,0.14); color: var(--yellow); }
.pw-low { background: rgba(239,68,68,0.14); color: var(--red); }
.pw-n { opacity: 0.65; }
.pw-brief { display: flex; gap: 22px; flex-wrap: wrap; margin: 12px 0; background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.2); border-radius: 10px; padding: 12px 16px; }
.pw-brief strong { font-size: 1.25em; display: block; }
.pw-brief em { font-style: normal; font-size: 0.75em; color: var(--text2); display: block; max-width: 220px; }
.pw-brief .pw-note { align-self: center; font-size: 0.75em; color: var(--text2); max-width: 240px; }

/* who-bought-what highlight rows (v13.1) */
.ps-hi .aw-label { color: var(--accent2); font-weight: 700; }

/* ═══════ VIP Review Queue (v14) ═══════ */
.vip-banner { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); border-radius: 10px; padding: 10px 14px; font-size: 0.85em; margin-bottom: 12px; }
.vip-banner.warn { background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.3); }
.vip-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; padding-top: 12px; font-size: 0.88em; }
.vip-set-grid label { display: flex; align-items: center; gap: 8px; color: var(--text2); }
.vip-set-grid input[type=number] { width: 110px; }
.vip-set-grid input { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 6px 9px; }
.vip-set-grid input#vsPriority { flex: 1; }
.vip-table-wrap { overflow-x: auto; background: var(--card, var(--surface)); border: 1px solid var(--border); border-radius: 12px; }
.vip-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.vip-table th { text-align: left; padding: 10px 12px; color: var(--text2); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vip-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.vip-table tbody tr { cursor: pointer; }
.vip-table tbody tr:hover { background: rgba(139,92,246,0.06); }
.vip-tag { display: inline-block; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 0.82em; margin: 1px 0; white-space: nowrap; }
.vip-tag.vip-emp { background: rgba(255, 170, 60, 0.12); border-color: rgba(255, 170, 60, 0.45); color: #e8a33d; font-weight: 600; }

/* v18 — persona deep profile */
.persona-deep { margin-top: 14px; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; margin: 10px 0 6px; }
.pd-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pd-card h5 { margin: 0 0 8px; font-size: 0.95em; }
.pd-n { display: inline-block; font-size: 0.72em; font-weight: 400; color: var(--text2); }
.pd-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-big { margin: 4px 0; font-size: 1.05em; font-weight: 700; }
.pd-big em { display: block; font-size: 0.72em; font-weight: 400; color: var(--text2); font-style: normal; }
.pd-details summary { cursor: pointer; font-size: 0.8em; color: var(--text2); margin-top: 8px; }
.pd-q { font-size: 0.88em; }
.pd-core-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.pd-core-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s; }
.pd-core-card:hover { border-color: var(--accent, #8b5cf6); }
.pd-core-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pd-core-head span { color: var(--text2); font-size: 0.8em; }
.pd-core-stats { font-size: 0.8em; color: var(--text2); margin: 3px 0 6px; }
.pd-sub { color: var(--green); font-style: normal; }
.pd-why { font-size: 0.8em; color: var(--text2); margin: 4px 0 0; }
.vip-sub { font-size: 0.8em; color: var(--text2); }
.vip-status { border-radius: 999px; padding: 2px 10px; font-size: 0.82em; font-weight: 600; white-space: nowrap; }
.vs-New { background: rgba(59,130,246,0.14); color: var(--blue); }
.vs-Reviewing { background: rgba(234,179,8,0.14); color: var(--yellow); }
.vs-ReachOut { background: rgba(34,197,94,0.14); color: var(--green); }
.vs-NotaFit { background: var(--surface2); color: var(--text2); }
.vip-status-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.vip-notes { width: 100%; min-height: 70px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px 10px; font-size: 0.9em; margin-top: 6px; }

/* ═══════ Source flip-cards (v16.2) ═══════ */
/* v19.7/19.8: deeper perspective = far less corner-warp on tall cards. The flip
   never resizes the card (resizing gapped the grid row); long backs scroll. */
.srcflip { perspective: 2400px; cursor: pointer; }
.srcflip .flip-inner { position: relative; transform-style: preserve-3d; transition: transform 0.45s ease; }
.srcflip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow-y: auto; padding: 4px 2px; font-size: 0.82em; line-height: 1.5;
}
.flip-back h5 { font-size: 0.95em; margin-bottom: 6px; color: var(--accent2); }
.flip-back .fb-method { color: var(--text); margin-bottom: 8px; }
.flip-back .fb-src { margin: 4px 0; color: var(--text2); }
.flip-back .fb-src a { color: var(--accent2); }
.flip-back .fb-caveat { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border); color: var(--text2); font-size: 0.92em; }
.src-hint { float: right; font-size: 0.7em; color: var(--text2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-weight: 400; }
.srcflip:hover .src-hint { color: var(--accent2); border-color: var(--accent); }
.inf-name-link { cursor: pointer; }
.inf-name-link:hover { color: var(--accent2); text-decoration: underline; }

/* ═══════ v18.1 — Mobile usability layer (phones ≤ 640px) ═══════
   The 860px rules above already turn the sidebar into a hamburger drawer.
   This layer compresses the chrome so content starts near the top of a phone
   screen, keeps iOS from zooming into inputs, and makes wide tables honest
   about their horizontal scroll. */
@media (max-width: 640px) {
  /* Compact topbar: icon-only buttons, one tight row, notch-safe */
  .topbar { padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); gap: 6px; }
  .tb-label { display: none; }
  .last-update-tag { display: none; }
  .brand { font-size: 0.92em; }
  .topbar .icon-btn { padding: 7px 9px; font-size: 0.9em; }

  .container, body.sidebar-collapsed .container { padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px)); }

  /* iOS Safari zooms into any focused input with font-size < 16px */
  .search-zone input, .search-zone select, .search-zone textarea,
  .filter-select, .vip-notes, #vipSearch, #infSearch, #svySearch { font-size: 16px; }

  .search-zone { padding: 10px; }
  .filter-row { gap: 6px; }
  .filter-select { min-height: 38px; }
  .search-tips span, .keyword-pill { padding: 5px 11px; }   /* comfortable touch targets */

  /* Modals: use the whole phone */
  .person-modal { width: calc(100% - 12px); max-width: none; max-height: 94vh; padding: 14px; }

  /* Wide data tables (VIP queue 11 cols, Admin): keep horizontal scroll but
     say so, and give iOS momentum scrolling */
  .vip-table-wrap { -webkit-overflow-scrolling: touch; }
  .vip-table-wrap::before {
    content: '← swipe sideways for all columns →';
    display: block; padding: 6px 12px; font-size: 0.72em; color: var(--text2);
    border-bottom: 1px solid var(--border);
  }
  /* First column (score / email) stays visible while swiping */
  .vip-table th:first-child, .vip-table td:first-child {
    position: sticky; left: 0; background: var(--card, var(--surface)); z-index: 1;
  }

  /* Charts: full-width, slightly shorter */
  .chart-box { min-width: 0; }
  .chart-box canvas { max-height: 240px; }

  /* Stat tiles + detail stats wrap tighter */
  .stat-bar { gap: 10px; }
  .detail-stats { gap: 8px; }
  .detail-stat { min-width: 70px; padding: 8px 10px; }

  /* Persona deep grid + core cards: single column */
  .pd-grid, .pd-core-grid { grid-template-columns: 1fr; }

  /* Floating "show/hide filters" pill: keep it reachable above the thumb */
  .search-toggle-btn { right: 10px; }
}

/* ═══════ v18.1 mobile layer, part 2 — audit findings ═══════ */

/* Fixed-min bar rows (Who Bought What, geo over-index): keep desktop alignment
   via classes (was inline), release on phones so bars get real width */
.aw-label-fixed { min-width: 150px; }
.aw-pct-fixed { min-width: 120px; }
.aw-pct-wide { min-width: 160px; }
@media (max-width: 480px) {
  .aw-row { flex-wrap: wrap; }
  .aw-label-fixed { min-width: 0; }
  .aw-pct-fixed, .aw-pct-wide { min-width: 0; }
  .aw-row .aw-bar { flex-basis: 100%; order: 3; }
}

@media (max-width: 700px) {
  /* Phones: the filter zone scrolls away with the page instead of pinning —
     the pinned topbar+filters stack was eating half the viewport (JS scroll
     handler is also skipped at this width) */
  .search-zone { position: static; }

  /* Sticky offsets that assumed the desktop chrome height */
  #reviewList, .filtered-section-title, .finder-section { scroll-margin-top: calc(var(--topbar-h, 60px) + 12px); }

  /* Wide tables: hide the columns that matter least on a phone.
     VIP (11 cols): 5=ZIP, 6=ZIP home value, 9=first order.
     Admin (8 cols): 6=joined, 7=last login (both visible in the row editor). */
  #vipTable th:nth-child(5), #vipTable td:nth-child(5),
  #vipTable th:nth-child(6), #vipTable td:nth-child(6),
  #vipTable th:nth-child(9), #vipTable td:nth-child(9) { display: none; }
  #adminView th:nth-child(6), #adminView td:nth-child(6),
  #adminView th:nth-child(7), #adminView td:nth-child(7) { display: none; }

  /* Persona-economics table gets the same sticky identity column as VIP */
  .pe-table th:first-child, .pe-table td:first-child {
    position: sticky; left: 0; background: var(--card, var(--surface)); z-index: 1;
  }
  .pe-wrap { -webkit-overflow-scrolling: touch; }
}

/* Mobile drawer scrim: dim + lock the page while the sidebar overlay is open
   (tap-outside close handled in app.js initSidebar) */
@media (max-width: 860px) {
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 69;
  }
  .sidebar { z-index: 70; }
  .sidebar-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 640px) {
  /* iOS input-zoom guard, round 2 (audit): every remaining sub-16px control */
  .vip-set-grid input, .inf-search-row input, .finder-input-row input,
  #qInput, input[type="date"], .modal input, .modal select { font-size: 16px; }

  /* product bar chart: fixed 380px height wastes a phone screen */
  .product-chart-canvas-wrap { height: min(380px, 55vh); }

  /* clickable pills that were under 44px touch targets */
  .pb-chip { padding: 8px 12px; }
  .review-persona-tag { padding: 6px 10px; }
}

/* v19.9 — big cards show the source as a corner popover instead of flipping */
.src-pop {
  display: none; position: absolute; top: 36px; right: 12px; z-index: 6;
  width: min(460px, calc(100% - 24px)); max-height: min(420px, 80%);
  overflow-y: auto; background: var(--surface2); border: 1px solid var(--accent, #8b5cf6);
  border-radius: 12px; padding: 14px 16px; font-size: 0.82em; line-height: 1.5;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5); cursor: auto;
}
.src-pop.open { display: block; }
.src-pop h5 { font-size: 0.95em; margin-bottom: 6px; color: var(--accent2); padding-right: 22px; }
.src-pop .fb-method { color: var(--text); margin-bottom: 8px; }
.src-pop .fb-src { margin: 4px 0; color: var(--text2); }
.src-pop .fb-src a { color: var(--accent2); }
.src-pop .fb-caveat { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border); color: var(--text2); font-size: 0.92em; }
.src-pop-x {
  position: absolute; top: 8px; right: 8px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px; padding: 2px 7px; cursor: pointer; font-size: 0.85em;
}
.src-pop-x:hover { color: var(--text); border-color: var(--accent); }
