/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

/* ─── DARK THEME ─── */
body.dark {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --bg4: #22222e;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #f0f0f8;
  --text2: #a0a0b8;
  --text3: #606080;
  --accent: #7c6fff;
  --accent2: #5e52e0;
  --accent-glow: rgba(124,111,255,0.15);
  --card-bg: #13131c;
  --card-border: rgba(255,255,255,0.06);
  --card-hover: rgba(255,255,255,0.03);
  --positive: #4ade80;
  --negative: #f87171;
  --warn: #fbbf24;
  background: var(--bg);
  color: var(--text);
}

/* ─── LIGHT THEME ─── */
body.light {
  --bg: #f4f4f8;
  --bg2: #ffffff;
  --bg3: #efeff5;
  --bg4: #e5e5ee;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.14);
  --text: #111118;
  --text2: #4a4a60;
  --text3: #9090aa;
  --accent: #5c4fff;
  --accent2: #4038d0;
  --accent-glow: rgba(92,79,255,0.1);
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.07);
  --card-hover: rgba(0,0,0,0.02);
  --positive: #16a34a;
  --negative: #dc2626;
  --warn: #d97706;
  background: var(--bg);
  color: var(--text);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ─── HEADER ─── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.header-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.header-sub { font-size: 11px; color: var(--text3); font-weight: 500; letter-spacing: 0.4px; text-transform: uppercase; margin-top: 1px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.data-tag {
  font-size: 11px; font-weight: 500; color: var(--text3);
  background: var(--bg3); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 20px;
  font-family: 'Geist Mono', monospace;
}
.theme-toggle {
  width: 34px; height: 34px;
  border: 1px solid var(--border2); border-radius: 8px;
  background: var(--bg3); color: var(--text2); cursor: pointer;
  font-size: 14px; transition: all 0.2s;
}
.theme-toggle:hover { background: var(--bg4); color: var(--accent); }

/* ─── NAV TABS ─── */
.nav-tabs {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; gap: 2px;
  overflow-x: auto;
}
.tab {
  padding: 12px 18px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text3); cursor: pointer;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.tab:hover { color: var(--text2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── MAIN LAYOUT ─── */
.main {
  max-width: 1600px; margin: 0 auto;
  padding: 24px;
}

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
}
.section-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ─── GRID SYSTEMS ─── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-retailer { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ─── CARDS ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s, background 0.2s;
}
.card:hover { border-color: var(--border2); background: var(--card-hover); }
.card-sm { padding: 14px 16px; }
.card-flat { border-radius: 8px; }

/* ─── KPI CARDS ─── */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 20px;
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; line-height: 1; }
.kpi-sub { font-size: 11px; color: var(--text3); margin-top: 5px; }
.kpi-badge {
  display: inline-block; font-size: 10px; font-weight: 600; 
  padding: 2px 7px; border-radius: 4px; margin-top: 4px;
}
.badge-pos { background: rgba(74,222,128,0.12); color: var(--positive); }
.badge-neg { background: rgba(248,113,113,0.12); color: var(--negative); }

/* ─── RETAILER OVERVIEW CARDS ─── */
.retailer-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.retailer-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--retailer-color, var(--accent));
}
.retailer-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.rc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-name { font-size: 14px; font-weight: 700; }
.rc-ticker {
  font-size: 10px; font-weight: 700;
  font-family: 'Geist Mono', monospace;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg3); color: var(--text3);
}
.rc-category {
  font-size: 10px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 12px;
}
.rc-rev { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 2px; }
.rc-rev-sub { font-size: 11px; color: var(--text3); }
.rc-apparel-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.rc-apparel-label { font-size: 11px; color: var(--text3); }
.rc-apparel-val { font-size: 13px; font-weight: 700; }
.rc-bar-container { margin-top: 10px; }
.rc-bar-bg {
  height: 4px; background: var(--bg3); border-radius: 2px;
  overflow: hidden; margin-top: 4px;
}
.rc-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.sparkline-wrapper { height: 40px; margin-top: 12px; }

/* ─── CHARTS ─── */
.chart-container { position: relative; }
.chart-wrap { position: relative; width: 100%; }

/* ─── TABS ROW (within panels) ─── */
.mini-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.mini-tab {
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text3);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.mini-tab:hover { background: var(--bg3); color: var(--text2); }
.mini-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── FILTER ROW ─── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text3);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { background: var(--bg3); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  padding: 10px 14px; text-align: right;
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody td {
  padding: 10px 14px; text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
tbody td:first-child { text-align: left; font-weight: 600; color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--card-hover); }
.cell-highlight { color: var(--accent) !important; font-weight: 700; }
.cell-proj { color: var(--text3) !important; font-style: italic; }

/* ─── SEGMENT HEATMAP ─── */
.heatmap-grid {
  display: grid;
  overflow-x: auto;
}
.heatmap-row { display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.heatmap-label { font-size: 11px; color: var(--text2); width: 130px; flex-shrink: 0; font-weight: 500; }
.heatmap-cell {
  height: 28px; flex: 1;
  border-radius: 4px; min-width: 60px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  transition: transform 0.15s;
  cursor: default;
}
.heatmap-cell:hover { transform: scale(1.05); }
.heatmap-cell.active { background: var(--accent) !important; color: #fff !important; }
.heatmap-cell.inactive { background: var(--bg3) !important; color: var(--text3) !important; }
.heatmap-col-header {
  font-size: 10px; font-weight: 700; color: var(--text3);
  padding: 3px 4px; text-align: center; min-width: 60px;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}

/* ─── PRICE POINTS ─── */
.price-tier {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  font-family: 'Geist Mono', monospace;
}
.tier-entry { background: rgba(74,222,128,0.1); color: var(--positive); }
.tier-mid { background: rgba(251,191,36,0.1); color: var(--warn); }
.tier-premium { background: rgba(124,111,255,0.1); color: var(--accent); }

/* ─── DEMOGRAPHIC BARS ─── */
.demo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.demo-label { font-size: 12px; color: var(--text2); width: 100px; flex-shrink: 0; }
.demo-bar-bg {
  flex: 1; height: 6px; background: var(--bg3);
  border-radius: 3px; overflow: hidden;
}
.demo-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s; }
.demo-val { font-size: 12px; font-weight: 700; color: var(--text); width: 42px; text-align: right; }

/* ─── DEEP DIVE ─── */
.deep-retailer-select {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  margin-bottom: 24px;
}
.dr-btn {
  padding: 10px 8px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.dr-btn:hover { border-color: var(--border2); color: var(--text); }
.dr-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ─── STAT ROW ─── */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-pill {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 16px;
}
.stat-pill-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-pill-val { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; margin-top: 2px; }

/* ─── REGION BARS ─── */
.region-row { margin-bottom: 10px; }
.region-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.region-name { font-size: 12px; font-weight: 500; color: var(--text2); }
.region-pct { font-size: 12px; font-weight: 700; color: var(--text); font-family: 'Geist Mono', monospace; }
.region-bar-bg { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.region-bar-fill { height: 100%; border-radius: 3px; }

/* ─── SECTION DIVIDER ─── */
.section-gap { margin-bottom: 32px; }

/* ─── LEGEND ─── */
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text3); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── TOOLTIP ─── */
.tooltip-custom {
  background: var(--bg2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
}

/* ─── EDUCATION DOTS ─── */
.edu-dots { display: flex; gap: 3px; margin-top: 4px; }
.edu-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ─── INCOME BADGE ─── */
.income-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.income-low { background: rgba(248,113,113,0.12); color: var(--negative); }
.income-mid { background: rgba(251,191,36,0.1); color: var(--warn); }
.income-high { background: rgba(74,222,128,0.12); color: var(--positive); }
.income-very-high { background: rgba(124,111,255,0.12); color: var(--accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .deep-retailer-select { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .main { padding: 14px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .deep-retailer-select { grid-template-columns: repeat(2, 1fr); }
}

.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.text-mono { font-family: 'Geist Mono', monospace; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text3); }
.text-accent { color: var(--accent); }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ─── BLIP INDEX TAB ─── */
.section-header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.blip-meta-right { display:flex; align-items:center; gap:8px; }
.blip-last-updated { font-size:11px; font-weight:500; color:var(--text3); letter-spacing:0.3px; }

/* Signal summary strip */
.blip-summary-strip {
  display:flex; flex-wrap:wrap; gap:8px 24px;
  padding:12px 18px; border-radius:10px;
  background:var(--card-bg); border:1px solid var(--border);
}
.blip-strip-item { display:flex; align-items:center; gap:6px; }
.blip-strip-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.blip-strip-count { font-size:18px; font-weight:800; font-family:'Geist Mono',monospace; }
.blip-strip-label { font-size:11px; font-weight:500; color:var(--text3); }

/* Filter sections */
.blip-filter-section { display:flex; flex-direction:column; gap:8px; }
.blip-filter-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; color:var(--text3); }
.blip-pills { display:flex; flex-wrap:wrap; gap:6px; }
.blip-pill {
  padding:4px 12px; border-radius:20px; font-size:11px; font-weight:600;
  border:1px solid var(--border); background:transparent; color:var(--text3);
  cursor:pointer; transition:all 0.15s ease;
}
.blip-pill:hover { border-color:var(--accent); color:var(--accent); }
.blip-pill.active { border-color:var(--accent); color:var(--accent); background:var(--accent-glow); }

/* Feed grid — 3 columns on wide, 2 on mid, 1 on narrow */
.blip-feed {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
@media(max-width:1100px) { .blip-feed { grid-template-columns:repeat(2,1fr); } }
@media(max-width:680px)  { .blip-feed { grid-template-columns:1fr; } }

/* News card */
.blip-card {
  background:var(--card-bg); border:1px solid var(--border);
  border-radius:12px; padding:16px 18px;
  display:flex; flex-direction:column; gap:10px;
  transition:border-color 0.15s ease, transform 0.15s ease;
}
.blip-card:hover { border-color:var(--accent); transform:translateY(-2px); }

.blip-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.blip-card-retailer { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; letter-spacing:0.3px; text-transform:uppercase; flex-wrap:wrap; }
.blip-retailer-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.blip-retailer-name { font-size:10px; font-weight:400; opacity:0.7; text-transform:none; letter-spacing:0; }

.blip-card-meta { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.blip-date { font-size:10px; font-weight:500; color:var(--text3); white-space:nowrap; }
.blip-sentiment { font-size:11px; font-weight:700; }
.sent-pos { color:#4ade80; }
.sent-neu { color:#94a3b8; }
.sent-neg { color:#f87171; }

.blip-headline { font-size:13px; font-weight:700; line-height:1.45; color:var(--text); }
.blip-summary { font-size:12px; line-height:1.6; color:var(--text3); }

.blip-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:auto; }
.blip-tags { display:flex; flex-wrap:wrap; gap:5px; }
.blip-tag {
  font-size:10px; font-weight:600; padding:2px 8px; border-radius:4px;
  white-space:nowrap; letter-spacing:0.2px;
}
.blip-source {
  font-size:10px; font-weight:600; color:var(--text3);
  text-decoration:none; white-space:nowrap;
}
.blip-source:hover { color:var(--accent); }

.blip-empty {
  grid-column:1/-1; padding:48px; text-align:center;
  color:var(--text3); font-size:14px; font-weight:500;
}

/* Pill count badge */
.blip-pill-count {
  display:inline-flex; align-items:center; justify-content:center;
  margin-left:5px;
  min-width:16px; height:16px; padding:0 4px;
  border-radius:8px;
  font-size:9px; font-weight:700; font-family:'Geist Mono',monospace;
  background:rgba(255,255,255,0.10);
  color:var(--text3);
  vertical-align:middle;
  line-height:1;
}
.blip-pill.active .blip-pill-count {
  background:rgba(255,255,255,0.18);
  color:inherit;
}
.blip-pill-count:empty,
.blip-pill-count[data-zero="true"] {
  opacity:0.4;
}

/* ─── QUARTER WINDOW SELECTOR ─── */
.blip-quarter-row {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.blip-quarter-selector-wrap {
  display:inline-flex; align-items:center; gap:8px;
  padding:5px 14px; border-radius:20px;
  border:1px solid var(--border2); background:var(--card-bg);
}

/* Live dot */
.blip-live-dot {
  display:inline-block;
  width:7px; height:7px; border-radius:50%;
  background:#4ade80;
  box-shadow:0 0 6px #4ade8088;
  animation:blink-live 2s ease-in-out infinite;
}
@keyframes blink-live {
  0%,100% { opacity:1; } 50% { opacity:0.4; }
}
.blip-quarter-live-label {
  font-size:11px; font-weight:700; letter-spacing:0.3px;
  color:#4ade80;
}
.blip-quarter-sep {
  color:var(--border2); font-size:12px; margin:0 2px;
}

/* Dropdown */
.blip-quarter-dropdown-wrap {
  position:relative; display:inline-flex; align-items:center;
}
.blip-quarter-select {
  appearance:none; -webkit-appearance:none;
  background:transparent;
  border:none; outline:none;
  font-size:11px; font-weight:600;
  color:var(--text3);
  cursor:pointer;
  padding-right:14px;
  font-family:inherit;
}
.blip-quarter-select option {
  background:var(--bg2, #1a1a2e);
  color:var(--text);
}
.blip-quarter-select:hover { color:var(--text); }
.blip-quarter-select-arrow {
  position:absolute; right:0; top:50%; transform:translateY(-50%);
  font-size:10px; color:var(--text3); pointer-events:none;
}

/* Archive banner */
.blip-archive-banner {
  width:100%; margin-top:8px;
  padding:8px 14px; border-radius:8px;
  background:rgba(96,165,250,0.08); border:1px solid rgba(96,165,250,0.2);
  font-size:11px; font-weight:500; color:#93c5fd;
  letter-spacing:0.1px;
}

/* ─── BLIP VIZ PANEL ─────────────────────────────────────────────────────── */
.blip-viz-panel {
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
}
.blip-viz-tabs {
  display:flex; gap:0;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,0.02);
}
.blip-viz-tab {
  padding:11px 22px;
  font-size:12px; font-weight:600; letter-spacing:0.3px;
  color:var(--text3); background:none; border:none;
  border-bottom:2px solid transparent;
  cursor:pointer; transition:color 0.15s, border-color 0.15s;
  white-space:nowrap;
}
.blip-viz-tab:hover { color:var(--text); }
.blip-viz-tab.active { color:var(--accent); border-bottom-color:var(--accent); }

.blip-viz-content { padding:24px 24px 20px; }

.blip-viz-header { margin-bottom:18px; }
.blip-viz-title { font-size:14px; font-weight:700; color:var(--text); letter-spacing:0.2px; }
.blip-viz-sub   { font-size:11px; color:var(--text3); margin-top:3px; }

/* Group totals row */
.blip-group-totals {
  display:flex; gap:16px; flex-wrap:wrap;
}
.blip-group-stat {
  flex:1; min-width:110px;
  padding:12px 16px; border-radius:10px;
  background:rgba(255,255,255,0.03);
  border:1px solid var(--border2);
}
.blip-group-stat-count { font-size:26px; font-weight:700; line-height:1; }
.blip-group-stat-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; color:var(--text3); margin:4px 0 2px; }
.blip-group-stat-pct   { font-size:11px; font-weight:600; opacity:0.8; }

/* Chart */
.blip-chart-wrap { position:relative; }

/* Signal rank */
.blip-rank-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text3); }
.blip-rank-grid  { display:flex; flex-direction:column; gap:5px; }
.blip-rank-row   { display:grid; grid-template-columns:24px 160px 1fr 40px; align-items:center; gap:8px; }
.blip-rank-num   { font-size:10px; color:var(--text3); text-align:right; font-weight:600; }
.blip-rank-tag   { font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blip-rank-bar-wrap { height:8px; background:rgba(255,255,255,0.05); border-radius:4px; overflow:hidden; }
.blip-rank-bar   { height:100%; border-radius:4px; transition:width 0.3s; }
.blip-rank-count { font-size:11px; font-weight:700; text-align:right; }

/* ─── WORD CLOUD ──────────────────────────────────────────────────────────── */
.wc-layout   { display:flex; gap:24px; align-items:flex-start; }
.wc-sidebar  { width:220px; flex-shrink:0; }
.wc-main     { flex:1; min-width:0; }

.wc-group-block  { margin-bottom:16px; }
.wc-group-label  { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:0.6px; margin-bottom:6px; }
.wc-tag-pills    { display:flex; flex-direction:column; gap:4px; }
.wc-tag-btn {
  display:flex; align-items:center; justify-content:space-between;
  padding:5px 10px; border-radius:6px; font-size:11px; font-weight:500;
  color:var(--text3); background:rgba(255,255,255,0.03);
  border:1px solid var(--border2); cursor:pointer;
  transition:color 0.12s, background 0.12s, border-color 0.12s;
  text-align:left;
}
.wc-tag-btn:hover { color:var(--text); background:rgba(255,255,255,0.06); }
.wc-tag-btn.active { font-weight:700; }
.wc-tag-count {
  font-size:9px; font-weight:600;
  background:rgba(255,255,255,0.08); border-radius:4px;
  padding:1px 5px; margin-left:6px; flex-shrink:0;
}

.wc-cloud {
  display:flex; flex-wrap:wrap; align-items:center;
  gap:6px 10px; padding:20px;
  background:rgba(255,255,255,0.02);
  border:1px solid var(--border2); border-radius:10px;
  min-height:140px; line-height:1.4;
}
.wc-word { cursor:default; transition:opacity 0.15s; }
.wc-word:hover { opacity:1 !important; }

.wc-stats {
  display:flex; flex-wrap:wrap; gap:12px; margin-top:14px;
  align-items:center;
}
.wc-stat     { display:flex; align-items:center; gap:6px; }
.wc-stat-val { font-size:14px; font-weight:700; }
.wc-stat-lbl { font-size:11px; color:var(--text3); }

.wc-stat-retailers { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.wc-retailer-chip {
  font-size:10px; font-weight:600; padding:2px 7px; border-radius:4px;
  border:1px solid; background:rgba(255,255,255,0.04);
}
.wc-empty { padding:30px; color:var(--text3); font-size:12px; text-align:center; }

@media(max-width:700px) {
  .wc-layout { flex-direction:column; }
  .wc-sidebar { width:100%; }
  .blip-rank-row { grid-template-columns:24px 1fr 40px; }
  .blip-rank-tag { display:none; }
}

/* ─── VIZ PANEL COLLAPSE + NEW CONTROLS ─────────────────────────────────── */
.blip-viz-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px; cursor:pointer; user-select:none;
  border-bottom:1px solid transparent;
  transition:background 0.12s;
  border-radius:14px; /* rounded when collapsed */
}
.blip-viz-panel-header:hover { background:rgba(255,255,255,0.03); }
.blip-viz-panel[data-open="true"] .blip-viz-panel-header,
.blip-viz-panel .blip-viz-panel-header {
  border-radius:14px 14px 0 0;
}

.blip-viz-panel-title {
  display:flex; align-items:center; gap:8px;
  font-size:12px; font-weight:700; color:var(--text3); letter-spacing:0.3px;
  text-transform:uppercase;
}
.blip-viz-chevron {
  display:inline-block; font-size:14px; line-height:1;
  color:var(--text3); transform:rotate(0deg);
  transition:transform 0.2s ease;
}
.blip-viz-chevron.open { transform:rotate(90deg); }

.blip-viz-active-word {
  font-size:11px; font-weight:500; color:var(--accent);
  text-transform:none; letter-spacing:0;
}

.blip-viz-panel-tabs {
  display:flex; gap:0; align-items:center;
}

/* Group filter pills inside cumulative */
.blip-viz-title-row {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px; flex-wrap:wrap; margin-bottom:16px;
}
.blip-viz-group-pills { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.blip-viz-group-pill {
  padding:4px 11px; border-radius:20px; font-size:11px; font-weight:600;
  color:var(--text3); background:rgba(255,255,255,0.04);
  border:1px solid var(--border2); cursor:pointer;
  transition:color 0.12s, background 0.12s, border-color 0.12s;
}
.blip-viz-group-pill:hover { color:var(--text); background:rgba(255,255,255,0.08); }
.blip-viz-group-pill.active { font-weight:700; }

/* Stat cards clickable */
.blip-group-stat { cursor:pointer; transition:background 0.12s; }
.blip-group-stat:hover { background:rgba(255,255,255,0.05) !important; }
.blip-group-stat.active { box-shadow:0 0 0 1px currentColor; }

/* Rank rows hover */
.blip-rank-row { transition:background 0.1s; border-radius:4px; padding:2px 4px; }
.blip-rank-row:hover { background:rgba(255,255,255,0.05); }

/* Word cloud clickable words */
.wc-word { cursor:pointer; transition:opacity 0.12s; }
.wc-word:hover { opacity:1 !important; }
.wc-word-active { cursor:pointer; }

/* Active filter banner */
.blip-active-filter-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:9px 14px; border-radius:8px;
  background:rgba(124,111,255,0.08); border:1px solid rgba(124,111,255,0.25);
}
.blip-active-filter-label { font-size:11px; font-weight:600; color:var(--text3); }
.blip-active-filter-word  { font-size:12px; font-weight:700; color:#7c6fff; }
.blip-active-filter-scope { font-size:11px; color:var(--text3); }
.blip-active-filter-clear {
  margin-left:auto; padding:3px 10px; border-radius:6px;
  font-size:11px; font-weight:600; color:#7c6fff;
  background:rgba(124,111,255,0.12); border:1px solid rgba(124,111,255,0.3);
  cursor:pointer; transition:background 0.12s;
}
.blip-active-filter-clear:hover { background:rgba(124,111,255,0.22); }

/* ─── COMBINED REVENUE TABLE ─────────────────────────────────────────────── */
.rev-combined-table tbody tr.rev-combined-total td {
  padding-bottom: 2px;
  border-bottom: none;
}
.rev-combined-table tbody tr.rev-combined-apparel td {
  padding-top: 2px;
  border-bottom: 1px solid var(--border2);
  font-size: 11px;
  opacity: 0.85;
}
.rev-combined-table tbody tr.rev-combined-total .rev-retailer-cell {
  vertical-align: middle;
  border-bottom: 1px solid var(--border2);
}
.rev-type-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text3);
  white-space: nowrap;
}
.rev-combined-table tbody tr.rev-combined-total:hover td,
.rev-combined-table tbody tr.rev-combined-apparel:hover td {
  background: rgba(255,255,255,0.03);
}

/* ─── REVENUE SORT CONTROLS ─────────────────────────────────────────────── */
.rev-table-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.rev-sort-controls {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.rev-sort-label {
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.4px; margin-right: 2px;
}
.rev-sort-btn {
  padding: 4px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  color: var(--text3); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2); cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.rev-sort-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.rev-sort-btn.active {
  color: var(--accent); border-color: var(--accent);
  background: rgba(var(--accent-rgb, 124,111,255), 0.1);
  font-weight: 700;
}

/* ─── DEEP DIVE CORPORATE LINK ───────────────────────────────────────────── */
.dd-website-link {
  font-size: 11px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding: 2px 8px; border-radius: 5px;
  border: 1px solid var(--accent);
  opacity: 0.8;
  transition: opacity 0.12s, background 0.12s;
}
.dd-website-link:hover { opacity: 1; background: rgba(124,111,255,0.1); }

/* ─── APPAREL TREND FILTER ───────────────────────────────────────────────── */
.app-trend-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.app-trend-controls { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.app-trend-meta-btn {
  padding: 3px 10px; border-radius: 5px; font-size: 11px; font-weight: 600;
  color: var(--text3); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2); cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.app-trend-meta-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.app-trend-pills {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.app-trend-pill {
  padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 600;
  cursor: pointer; transition: all 0.12s; border: 1px solid var(--border2);
  white-space: nowrap;
}
.app-trend-pill.off {
  color: var(--text3); background: rgba(255,255,255,0.03);
}
.app-trend-pill.off:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.app-trend-pill.on { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 1 PREMIUM — HOME TAB, CONFIDENCE BADGES, METHODOLOGY PANELS
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── HEADER BADGES ─────────────────────────────────────────────────────── */
.header-badges {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.data-tag-live {
  background: rgba(74,222,128,0.12) !important;
  color: #4ade80 !important;
  border-color: rgba(74,222,128,0.3) !important;
}

/* ─── CONFIDENCE BADGES ──────────────────────────────────────────────────── */
.conf-badge {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; border: 1px solid transparent;
  line-height: 1.4; white-space: nowrap; vertical-align: middle;
  margin-left: 4px;
}
.conf-reported {
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.25);
}
.conf-estimated {
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.25);
}
.conf-inferred {
  color: #94a3b8;
  background: rgba(148,163,184,0.1);
  border-color: rgba(148,163,184,0.2);
}

/* Revenue table Type cell — hold badge below label */
.rev-type-label {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  white-space: nowrap;
}
.rev-type-label .conf-badge { margin-left: 0; }

/* ─── METHODOLOGY PANEL ──────────────────────────────────────────────────── */
.methodo-panel {
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.methodo-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 12px; font-weight: 600;
  text-align: left; transition: color 0.12s, background 0.12s;
}
.methodo-toggle:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.methodo-icon { font-size: 14px; opacity: 0.7; }
.methodo-label { flex: 1; }
.methodo-arrow {
  font-size: 10px; transition: transform 0.2s;
  display: inline-block;
}
.methodo-panel.open .methodo-arrow { transform: rotate(90deg); }
.methodo-body {
  display: none; padding: 12px 16px 14px; border-top: 1px solid var(--border2);
}
.methodo-panel.open .methodo-body { display: block; }
.methodo-grid {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px;
}
.methodo-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text2); line-height: 1.5;
  flex: 1 1 200px;
}
.methodo-item .conf-badge { flex-shrink: 0; margin-top: 1px; margin-left: 0; }
.methodo-note {
  font-size: 11px; color: var(--text3); line-height: 1.5;
  padding-top: 8px; border-top: 1px solid var(--border2); margin-top: 4px;
}

/* ─── HOME TAB HERO ──────────────────────────────────────────────────────── */
.home-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; margin-bottom: 28px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(124,111,255,0.08) 0%, rgba(79,70,229,0.04) 100%);
  border: 1px solid rgba(124,111,255,0.15);
  border-radius: 14px;
  flex-wrap: wrap;
}
.home-hero-text { flex: 1; min-width: 200px; }
.home-hero-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #a5b4fc, #7c6fff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 6px;
}
.home-hero-sub {
  font-size: 13px; color: var(--text2); line-height: 1.55; max-width: 440px;
}

/* ─── HOME KPI STRIP ─────────────────────────────────────────────────────── */
.home-kpi-strip {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.home-kpi {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 20px; text-align: center;
}
.home-kpi-val {
  font-size: 26px; font-weight: 800; font-family: 'Geist Mono', monospace;
  letter-spacing: -0.5px; color: var(--text); line-height: 1;
}
.home-kpi-lbl {
  font-size: 10px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.home-kpi-badge {
  font-size: 10px; color: var(--accent); font-weight: 600; margin-top: 3px;
}
.home-kpi-div {
  width: 1px; height: 44px; background: var(--border2); flex-shrink: 0;
}

/* ─── HOME MODULE QUICK-NAV ──────────────────────────────────────────────── */
.home-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.mb-32 { margin-bottom: 32px; }
.home-module-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 12px; border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.02);
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.home-module-card:hover {
  border-color: var(--accent);
  background: rgba(124,111,255,0.06);
  transform: translateY(-2px);
}
.home-module-icon {
  font-size: 22px; margin-bottom: 8px; color: var(--accent); opacity: 0.8;
}
.home-module-label {
  font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px;
}
.home-module-sub {
  font-size: 10px; color: var(--text3); line-height: 1.4;
}

/* ─── HOME CONTENT GRID ──────────────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
}

/* ─── HOME PANELS ────────────────────────────────────────────────────────── */
.home-panel {
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface1);
  padding: 20px;
}
.home-panel-wide { /* full-width panel on left */ }
.home-panel-col {
  display: flex; flex-direction: column; gap: 20px;
}
.home-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.home-panel-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.home-panel-sub {
  font-size: 11px; color: var(--text3); margin-top: 2px;
}
.home-panel-link {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: none; border: none; cursor: pointer; padding: 0;
  white-space: nowrap; flex-shrink: 0;
  transition: opacity 0.12s;
}
.home-panel-link:hover { opacity: 0.75; }
.mb-20 { margin-bottom: 20px; }

/* ─── HOME BLIP GRID ─────────────────────────────────────────────────────── */
.home-blip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.home-blip-card {
  padding: 12px 14px; border-radius: 9px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.02);
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.home-blip-card:hover {
  border-color: var(--accent); background: rgba(124,111,255,0.05);
}
.home-blip-top {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.home-blip-retailer {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.home-blip-date {
  font-size: 10px; color: var(--text3); margin-left: auto;
}
.home-blip-headline {
  font-size: 12px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 7px;
}
.home-blip-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.home-blip-tag {
  font-size: 9px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; border: 1px solid; letter-spacing: 0.3px;
}

/* ─── HOME SIGNAL PULSE TAGS ─────────────────────────────────────────────── */
.home-tag-grid { display: flex; flex-direction: column; gap: 6px; }
.home-tag-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 7px;
  border: 1px solid; cursor: pointer;
  transition: opacity 0.12s;
}
.home-tag-pill:hover { opacity: 0.8; }
.home-tag-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.home-tag-name {
  font-size: 11px; font-weight: 600; flex: 1;
}
.home-tag-count {
  font-size: 11px; font-weight: 700; color: var(--text3);
  font-family: 'Geist Mono', monospace;
}

/* ─── HOME TOP MOVERS ────────────────────────────────────────────────────── */
.home-movers { display: flex; flex-direction: column; gap: 8px; }
.home-mover-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 7px; cursor: pointer;
  transition: background 0.12s;
}
.home-mover-row:hover { background: rgba(255,255,255,0.04); }
.home-mover-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.home-mover-name {
  font-size: 12px; font-weight: 600; color: var(--text); flex: 1;
}
.home-mover-cat {
  font-size: 10px; color: var(--text3); flex-shrink: 0;
}
.home-mover-cagr {
  font-size: 12px; font-weight: 700; font-family: 'Geist Mono', monospace;
  flex-shrink: 0;
}

/* ─── SENTIMENT INDICATORS ───────────────────────────────────────────────── */
.sent-neu { color: #94a3b8; font-size: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2 — BETTER INTELLIGENCE LAYER
   NEW Badges · Latest Signals · Who's Active · Signal Activity
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── NEW BADGE ──────────────────────────────────────────────────────────── */
.new-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 4px; padding: 1px 5px;
  text-transform: uppercase; vertical-align: middle;
  margin-left: 4px; flex-shrink: 0;
}
.new-badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80;
  animation: pulse-new 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-new {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ─── NEW COUNT BADGE (panel title) ─────────────────────────────────────── */
.new-count-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  color: #4ade80; background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 5px; padding: 1px 7px;
  margin-left: 8px; vertical-align: middle;
}

/* ─── HOME BLIP CARD FRESH STATE ─────────────────────────────────────────── */
.home-blip-card-new {
  border-color: rgba(74,222,128,0.2) !important;
  background: rgba(74,222,128,0.03) !important;
}

/* ─── BLIP CARD FRESH STATE ──────────────────────────────────────────────── */
.blip-card-fresh {
  border-color: rgba(74,222,128,0.18) !important;
  background: rgba(74,222,128,0.025) !important;
}

/* ─── RETAILER CARD SIGNAL BADGE ─────────────────────────────────────────── */
.rc-signal-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.2px;
  padding: 2px 6px; border-radius: 4px; border: 1px solid;
  white-space: nowrap; flex-shrink: 0;
}
.rc-signal-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}

/* ─── LATEST SIGNALS PANEL (Deep Dive) ──────────────────────────────────── */
.latest-signals-panel {
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface1);
  overflow: hidden;
}
.latest-sig-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--border2);
  gap: 12px;
}
.latest-sig-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.latest-sig-sub {
  font-size: 11px; color: var(--text3); margin-top: 2px;
}
.latest-sig-viewall {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: none; border: none; cursor: pointer; padding: 0;
  white-space: nowrap; flex-shrink: 0;
  transition: opacity 0.12s;
}
.latest-sig-viewall:hover { opacity: 0.7; }
.latest-sig-list { padding: 4px 0; }
.latest-sig-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--border2);
  transition: background 0.1s;
}
.latest-sig-row:last-child { border-bottom: none; }
.latest-sig-row:hover { background: rgba(255,255,255,0.03); }
.latest-sig-left { flex: 1; min-width: 0; }
.latest-sig-headline {
  font-size: 12px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 5px;
}
.latest-sig-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
}
.latest-sig-tag {
  font-size: 9px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; letter-spacing: 0.3px;
}
.latest-sig-quarter {
  font-size: 9px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; color: var(--text3);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border2);
}
.latest-sig-source {
  font-size: 10px; color: var(--text3); text-decoration: none;
  transition: color 0.12s;
}
a.latest-sig-source:hover { color: var(--accent); }
.latest-sig-date {
  font-size: 10px; color: var(--text3); font-family: 'Geist Mono', monospace;
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}

/* ─── WHO'S ACTIVE STRIP (Blip Index) ───────────────────────────────────── */
.whos-active-strip {
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
  padding: 12px 16px;
}
.whos-active-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  flex-wrap: wrap;
}
.whos-active-title {
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.whos-active-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 5px; border: 1px solid;
}
.whos-active-hint {
  font-size: 10px; color: var(--text3);
}
.whos-active-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.whos-active-row {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.03);
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.whos-active-row:hover {
  background: rgba(255,255,255,0.07);
}
.whos-active-row.selected {
  border-color: var(--accent);
  background: rgba(124,111,255,0.08);
}
.whos-active-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.whos-active-name {
  font-size: 11px; font-weight: 600; color: var(--text);
}
.whos-active-count {
  font-size: 11px; font-weight: 800;
  font-family: 'Geist Mono', monospace; margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════
   TECH RADAR TAB
   ═══════════════════════════════════════════════════════ */

/* Header meta pills row */
.tr-header-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── RING KEY ─── */
.tr-stage-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tr-stage-key-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tr-stage-key-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tr-stage-key-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tr-stage-key-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── QUADRANT GRID ─── */
.tr-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .tr-quad-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .tr-quad-grid { grid-template-columns: 1fr; }
}

.tr-quad-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: center;
  user-select: none;
}
.tr-quad-card:hover {
  border-color: var(--quad-color, #888);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--quad-color, #888) 20%, transparent);
}
.tr-quad-card.active {
  border-color: var(--quad-color, #888);
  background: color-mix(in srgb, var(--quad-color, #888) 8%, var(--card-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--quad-color, #888) 18%, transparent);
}
.tr-quad-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.tr-quad-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--quad-color, var(--text));
  margin-bottom: 4px;
}
.tr-quad-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.tr-quad-stages {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.tr-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ─── RING FILTER PILLS ─── */
.tr-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tr-stage-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tr-stage-pill:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.tr-stage-pill.active {
  font-weight: 700;
}

/* ─── BLIP COUNT ROW ─── */
.tr-blip-count {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.tr-clear-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.12s;
}
.tr-clear-btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ─── BLIP GRID ─── */
.tr-blip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
@media (max-width: 700px) {
  .tr-blip-grid { grid-template-columns: 1fr; }
}

/* ─── BLIP CARD ─── */
.tr-blip-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tr-blip-card:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.tr-blip-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tr-blip-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tr-blip-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.tr-stage-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.tr-blip-quad {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}
.tr-blip-signal {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.tr-blip-rationale {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.tr-blip-reg {
  font-size: 11px;
  color: #f59e0b;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
  padding: 6px 8px;
  background: rgba(245,158,11,0.06);
  border-radius: 6px;
  border: 1px solid rgba(245,158,11,0.18);
}
.tr-reg-icon {
  flex-shrink: 0;
}
.tr-blip-adopters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tr-adopter {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tr-blip-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.tr-blip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tr-blip-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tr-blip-tag:hover { opacity: 0.75; }
.tr-tag-cnt {
  font-size: 9px;
  font-weight: 800;
  opacity: 0.85;
}
.tr-blip-updated {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── MARKET TABLE ─── */
.tr-mkt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.tr-mkt-table th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 2px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tr-mkt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tr-mkt-table tr:last-child td { border-bottom: none; }
.tr-mkt-label {
  font-weight: 600;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   MARKET SNAPSHOT CARDS (Tech Radar — bottom section)
   ═══════════════════════════════════════════════════════ */

.tr-mkt-section {
  margin-top: 32px;
}

/* ─── AGGREGATE KPI STRIP ─── */
.tr-mkt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .tr-mkt-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
.tr-mkt-strip-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.tr-mkt-strip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tr-mkt-strip-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.tr-mkt-strip-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── SECTOR CARDS GRID ─── */
.tr-mkt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .tr-mkt-grid { grid-template-columns: 1fr; }
}

.tr-mkt-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tr-mkt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tr-mkt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.tr-mkt-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.tr-mkt-snaps {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── KPI ROW ─── */
.tr-mkt-kpi-row {
  display: flex;
  gap: 20px;
}
.tr-mkt-kpi {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 70px;
}
.tr-mkt-kpi-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.tr-mkt-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.tr-mkt-median {
  font-size: 11px;
  color: var(--text-muted);
}
.tr-mkt-delta {
  font-size: 11px;
  font-weight: 700;
}
.tr-mkt-delta.pos  { color: #4ade80; }
.tr-mkt-delta.neg  { color: #f87171; }
.tr-mkt-delta.neutral { color: var(--text-muted); }

/* ─── SPARKLINE CANVAS ─── */
.tr-mkt-chart-wrap {
  position: relative;
  height: 90px;
  width: 100%;
}
.tr-mkt-chart-wrap canvas {
  width: 100% !important;
}

/* ─── FOOTER ─── */
.tr-mkt-card-footer {
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.tr-mkt-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

/* ═══════════════════════════════════════════════════════
   TECH RADAR ICE BOX
   ═══════════════════════════════════════════════════════ */

.tr-ice-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.tr-ice-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  transition: background 0.12s;
}
.tr-ice-toggle:hover {
  background: color-mix(in srgb, #38bdf8 5%, var(--card-bg));
}

.tr-ice-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.tr-ice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px;
  background: color-mix(in srgb, #38bdf8 3%, var(--bg));
}

.tr-ice-card {
  background: var(--card-bg);
  border: 1px dashed color-mix(in srgb, var(--border) 80%, #38bdf8 20%);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0.85;
  transition: opacity 0.15s, border-color 0.15s;
}
.tr-ice-card:hover {
  opacity: 1;
  border-color: #38bdf855;
}

.tr-ice-reason {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  padding: 6px 8px;
  background: rgba(56, 189, 248, 0.04);
  border-left: 2px solid #38bdf840;
  border-radius: 0 4px 4px 0;
}

/* ═══════════════════════════════════════════════════════
   QUARTER SELECTOR (header badge dropdown)
   ═══════════════════════════════════════════════════════ */

.qsel-wrap {
  position: relative;
  display: inline-flex;
}

/* Override data-tag to allow button behavior */
button.data-tag {
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: inherit;
}
button.data-tag:hover {
  opacity: 0.85;
}

/* Historical quarter badge variant */
.data-tag-hist {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

.qsel-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9999;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  min-width: 220px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.qsel-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.1s;
  width: 100%;
}
.qsel-opt:hover {
  background: var(--bg);
}
.qsel-opt-active {
  background: color-mix(in srgb, var(--accent) 10%, var(--card-bg));
}

.qsel-opt-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.qsel-live-dot {
  font-size: 10px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.04em;
}
.qsel-opt-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   HISTORICAL MODE BANNER
   ═══════════════════════════════════════════════════════ */

.hist-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: color-mix(in srgb, #fbbf24 10%, var(--bg));
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
}

.hist-banner-reset {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  cursor: pointer;
  transition: background 0.12s;
  font-family: inherit;
  white-space: nowrap;
}
.hist-banner-reset:hover {
  background: rgba(251, 191, 36, 0.2);
}
