/* Spectrum Sans — local VF (weights 300–800; UI uses 300–700) */
@font-face {
  font-family: "Spectrum Sans";
  src: url("../fonts/SpectrumSansVF-Wght.woff2") format("woff2-variations"),
       url("../fonts/SpectrumSansVF-Wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectrum Sans";
  src: url("../fonts/SpectrumSansVF-Italics-Wght.woff2") format("woff2-variations"),
       url("../fonts/SpectrumSansVF-Italics-Wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* Spectrum Listen — official Spectrum brand tokens (see assets/brand/BRAND_TOKENS.md) */
:root {
  /* Primary */
  --midnight: #002139;
  --near-black: #001018;
  --white: #ffffff;
  --light-gray: #d5d5d5;

  /* Surfaces derived from Midnight Blue */
  --bg: #001018;
  --bg-elev: #002139;
  --bg-card: #001a2c;
  --bg-card-hover: #002845;
  --line: rgba(213, 213, 213, 0.14);
  --line-strong: rgba(213, 213, 213, 0.28);

  /* Accents (≤20%) — Electric slightly bolder/brighter than guidelines #0271eb */
  --electric: #0a7dff;
  --electric-rgb: 10, 125, 255;
  --electric-bright: #4da3ff;
  --electric-deep: #0066d6;
  --electric-soft: rgba(10, 125, 255, 0.16);
  --electric-mid: rgba(10, 125, 255, 0.32);
  --electric-strong: rgba(10, 125, 255, 0.55);
  --electric-glow: 0 0 20px rgba(10, 125, 255, 0.32);
  --green: #03c252;
  --purple: #887dff;
  --yellow: #ffcb3e;
  --orange: #ff8331;

  /* Semantic maps — on-palette only */
  --accent: var(--electric);
  --pos: var(--green);
  --pos-bg: rgba(3, 194, 82, 0.14);
  --neu: var(--light-gray);
  --neu-bg: rgba(213, 213, 213, 0.12);
  --neg: var(--orange);
  --neg-bg: rgba(255, 131, 49, 0.14);
  --risk: var(--orange);
  --risk-bg: rgba(255, 131, 49, 0.16);
  --caution: var(--yellow);

  --muted: rgba(213, 213, 213, 0.78);
  --charcoal: rgba(0, 33, 57, 0.85);

  /* Type: Spectrum Sans local VF (assets/fonts/). Fallback: Inter / system-ui / Calibri. */
  --font-ui: "Spectrum Sans", "Inter", system-ui, "Calibri", -apple-system, sans-serif;
  --font-display: "Spectrum Sans", "Inter", system-ui, "Calibri", -apple-system, sans-serif;
  --r: 10px;
  --max: 1440px;
}

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

html { background: var(--bg); color: var(--white); }
body {
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.45;
  background:
    radial-gradient(1100px 620px at 8% -18%, rgba(10, 125, 255, 0.14), transparent 58%),
    radial-gradient(900px 520px at 92% -8%, rgba(0, 33, 57, 0.95), transparent 52%),
    radial-gradient(700px 480px at 50% 110%, rgba(0, 33, 57, 0.55), transparent 60%),
    linear-gradient(180deg, #001018 0%, #000c14 48%, #001018 100%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.is-hidden { display: none !important; }

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 40px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px 0 16px;
  border-bottom: 1px solid rgba(213, 213, 213, 0.1);
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 33, 57, 0.92);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(10, 125, 255, 0.08);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-center { text-align: center; }

.count-on-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #d5d5d5c7);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
  /* Clearspace ≈ height of lowercase "p" in Spectrum — do not stretch/recolor */
  object-fit: contain;
}
.product-name {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  padding: 4px 0 0;
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  line-height: 1;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--white);
  background: rgba(10, 125, 255, 0.28);
  border: 1px solid rgba(10, 125, 255, 0.65);
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(10, 125, 255, 0.12), 0 0 18px rgba(10, 125, 255, 0.28);
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 0 0 rgba(10, 125, 255, 0.7);
  animation: pulse 1.8s ease-out infinite;
}
.live-pill.is-stale {
  border-color: rgba(255, 131, 49, 0.55);
  background: rgba(255, 131, 49, 0.14);
}
.live-pill.is-stale .live-dot {
  background: var(--orange);
  animation: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(10, 125, 255, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(10, 125, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 125, 255, 0); }
}

.count-on {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: rgba(213, 213, 213, 0.72);
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.count-on::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric), transparent);
  opacity: 0.55;
}

.refresh-meta { text-align: right; }
.refresh-meta .label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.refresh-meta time {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  font-weight: 500;
}

.seed-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--yellow);
  background: rgba(255, 203, 62, 0.12);
  border: 1px solid rgba(255, 203, 62, 0.4);
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
}


/* ——— Market strip (CHTR ticker) ——— */
.market-strip {
  margin: 14px 0 0;
  padding: 0;
}
.market-strip[hidden] { display: none !important; }

.market-strip-inner {
  display: grid;
  grid-template-columns: auto auto auto minmax(72px, 96px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0, 40, 69, 0.72) 0%, rgba(0, 26, 44, 0.92) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 18px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
}
.market-strip-inner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--electric), rgba(10, 125, 255, 0.2));
  border-radius: 12px 0 0 12px;
}

.market-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.market-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 0 0 rgba(10, 125, 255, 0.55);
  animation: pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
.market-live-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.market-symbol {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
  background: rgba(10, 125, 255, 0.22);
  border: 1px solid rgba(10, 125, 255, 0.55);
  padding: 4px 9px;
  border-radius: 6px;
  line-height: 1;
}

.market-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.market-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1;
  transition: text-shadow 0.4s ease, color 0.3s ease;
}
.market-price.is-shimmer {
  text-shadow: 0 0 18px rgba(10, 125, 255, 0.55);
}
.market-change {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.market-change.is-up { color: var(--pos); }
.market-change.is-down { color: var(--neg); }
.market-change.is-flat { color: var(--muted); }

.market-spark-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}
.market-spark-wrap svg {
  display: block;
  width: 100%;
  height: 28px;
}
.market-range {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-commentary {
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(213, 213, 213, 0.88);
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  flex-shrink: 0;
}
.market-asof {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.market-session {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(213, 213, 213, 0.7);
  background: rgba(213, 213, 213, 0.08);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 999px;
}
.market-session.is-regular {
  color: var(--pos);
  background: var(--pos-bg);
  border-color: rgba(3, 194, 82, 0.35);
}
.market-session.is-after-hours {
  color: var(--caution);
  background: rgba(255, 203, 62, 0.12);
  border-color: rgba(255, 203, 62, 0.35);
}
.market-rel {
  font-size: 10px;
  color: rgba(213, 213, 213, 0.55);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .market-strip-inner {
    grid-template-columns: auto auto auto minmax(64px, 88px) auto;
    grid-template-areas:
      "live symbol price spark meta"
      "comment comment comment comment comment";
  }
  .market-live { grid-area: live; }
  .market-symbol { grid-area: symbol; }
  .market-price-block { grid-area: price; }
  .market-spark-wrap { grid-area: spark; }
  .market-commentary { grid-area: comment; -webkit-line-clamp: 3; }
  .market-meta { grid-area: meta; }
}

@media (max-width: 800px) {
  .market-strip-inner {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "live symbol meta"
      "price price spark"
      "comment comment comment";
    gap: 10px 12px;
    padding: 12px 14px;
  }
  .market-price { font-size: 20px; }
  .market-meta { align-items: flex-end; }
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 22px 0 10px;
}

.kpi {
  background: linear-gradient(180deg, rgba(0,40,69,0.55) 0%, var(--bg-card) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px 14px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 18px rgba(0,0,0,0.16);
}
.kpi:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.22);
}
.kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  margin-top: 8px;
}
.kpi-sub {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.sent-bars {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
  background: rgba(213, 213, 213, 0.12);
}
.sent-bars span { display: block; height: 100%; }
.sent-bars .pos { background: var(--pos); }
.sent-bars .neu { background: var(--neu); }
.sent-bars .neg { background: var(--neg); }
.sent-legend {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sent-legend i {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.heat-meter {
  margin-top: 10px;
  height: 5px;
  border-radius: 3px;
  background: rgba(213, 213, 213, 0.12);
  overflow: hidden;
}
.heat-meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--midnight), var(--electric), var(--orange));
  border-radius: 3px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.feed-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.filters {
  display: flex;
  gap: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.filter {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.filter:hover { color: var(--white); }
.filter.is-active {
  background: var(--electric);
  color: var(--white);
  box-shadow: 0 0 14px rgba(10, 125, 255, 0.35);
}
.feed-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 18px 16px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(0,0,0,0.18);
}
.card:hover {
  border-color: rgba(10, 125, 255, 0.5);
  background: var(--bg-card-hover);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 14px 36px rgba(0,0,0,0.28), 0 0 0 1px rgba(10,125,255,0.08);
  transform: translateY(-1px);
}
.card.is-risk { border-left: 2px solid var(--risk); }
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.badge.type-news { color: var(--electric); border-color: rgba(10, 125, 255, 0.35); }
.badge.type-trade { color: var(--purple); border-color: rgba(136, 125, 255, 0.35); }
.badge.type-social { color: var(--purple); border-color: rgba(136, 125, 255, 0.35); }
.badge.type-review { color: var(--green); border-color: rgba(3, 194, 82, 0.35); }
.badge.type-forum { color: var(--yellow); border-color: rgba(255, 203, 62, 0.35); }
.badge.sent-positive { color: var(--pos); background: var(--pos-bg); border-color: transparent; }
.badge.sent-neutral { color: var(--neu); background: var(--neu-bg); border-color: transparent; }
.badge.sent-negative { color: var(--neg); background: var(--neg-bg); border-color: transparent; }
.badge.risk {
  color: var(--risk);
  background: var(--risk-bg);
  border-color: transparent;
}
.meta-src, .meta-date {
  font-size: 11.5px;
  color: var(--muted);
}
.meta-src { font-weight: 500; color: rgba(255, 255, 255, 0.82); }
.meta-sep { color: rgba(213, 213, 213, 0.35); }

.card-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 6px;
}
.card-title a {
  color: inherit;
  text-decoration: none;
}
.card-title a:hover { color: var(--electric); }

.card-excerpt {
  color: rgba(213, 213, 213, 0.82);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.card-why {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 2px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 12.5px;
}
.why-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--electric);
  padding-top: 2px;
}
.why-text { color: rgba(255, 255, 255, 0.86); }

.theme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.theme-pill {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
}


.card {
  cursor: pointer;
  outline: none;
}
.card:focus-visible {
  border-color: rgba(10, 125, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(10, 125, 255, 0.35);
}
.card.is-selected {
  border-color: rgba(10, 125, 255, 0.7);
  background: var(--bg-card-hover);
  box-shadow: inset 2px 0 0 var(--electric);
}
.card-hint {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card:hover .card-hint,
.card:focus-visible .card-hint,
.card.is-selected .card-hint {
  opacity: 1;
}
.card-title {
  /* no longer a link — whole card opens detail */
  pointer-events: none;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 88px;
}
.rail-card {
  background: linear-gradient(180deg, rgba(0,40,69,0.4) 0%, var(--bg-card) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 8px 20px rgba(0,0,0,0.14);
}
.rail-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.theme-list, .comp-list { list-style: none; }
.theme-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.theme-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.theme-name { font-size: 12.5px; font-weight: 500; }
.theme-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
.trend {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 28px;
  text-align: right;
}
.trend.up { color: var(--pos); }
.trend.down { color: var(--neg); }
.trend.flat { color: var(--muted); }

.comp-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comp-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.comp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.comp-name { font-weight: 600; font-size: 13px; }
.comp-heat {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--electric);
}
.comp-note { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-bottom: 7px; }
.comp-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(213, 213, 213, 0.12);
  overflow: hidden;
}
.comp-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--midnight), var(--electric));
}

.watch-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-tag {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line-strong);
  background: rgba(10, 125, 255, 0.16);
  padding: 4px 9px;
  border-radius: 999px;
}

.empty-state, .error-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 48px 24px;
  text-align: center;
  background: rgba(0, 26, 44, 0.55);
}
.empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-body { color: var(--muted); font-size: 13px; }
.empty-body code {
  font-size: 11.5px;
  color: var(--electric);
  background: rgba(10, 125, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}
.retry-btn {
  margin-top: 14px;
  appearance: none;
  border: 1px solid rgba(10, 125, 255, 0.55);
  background: var(--electric);
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
}
.retry-btn:hover { filter: brightness(1.08); }

.skeleton-stack { display: flex; flex-direction: column; gap: 10px; }
.skel-card {
  height: 118px;
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--bg-card) 0%, #002845 50%, var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border: 1px solid var(--line);
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.trust-line { font-size: 11.5px; color: var(--muted); }
.internal-line {
  font-size: 11px;
  color: rgba(213, 213, 213, 0.65);
  letter-spacing: 0.02em;
}
.alignment-note {
  font-size: 10.5px;
  color: rgba(213, 213, 213, 0.5);
}
.footer-right { display: flex; align-items: center; gap: 10px; }
.tz-note {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* ——— Signal detail drawer ——— */
body.drawer-open {
  overflow: hidden;
}

.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.drawer-root:not(.is-hidden) {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 8, 14, 0.25) 0%, rgba(0, 16, 24, 0.7) 48%, rgba(0, 33, 57, 0.92) 100%);
  backdrop-filter: blur(6px) saturate(1.05);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.drawer-root:not(.is-hidden) .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #003052 0%, var(--midnight) 26%, #001018 100%);
  border-left: 1px solid rgba(10, 125, 255, 0.42);
  box-shadow: -32px 0 80px rgba(0, 0, 0, 0.55), inset 1px 0 0 rgba(255,255,255,0.04);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer-root:not(.is-hidden) .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 33, 57, 0.55);
}
.drawer-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.drawer-kicker-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--electric);
}
.drawer-close {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s;
}
.drawer-close:hover,
.drawer-close:focus-visible {
  border-color: rgba(10, 125, 255, 0.7);
  background: rgba(10, 125, 255, 0.18);
  outline: none;
}

.drawer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.drawer-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--white);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.drawer-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.drawer-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(213, 213, 213, 0.92);
}
.drawer-why {
  padding: 14px 14px 13px;
  border-radius: 8px;
  border: 1px solid rgba(10, 125, 255, 0.28);
  background: rgba(10, 125, 255, 0.08);
}
.drawer-why .drawer-section-label {
  color: var(--electric);
}
.drawer-why-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.drawer-foot {
  display: flex;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0, 16, 24, 0.65);
}
.drawer-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  background: var(--electric);
  border: 1px solid rgba(10, 125, 255, 0.85);
  border-radius: 8px;
  padding: 11px 14px;
  transition: filter 0.12s, transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 0 0 1px rgba(10,125,255,0.2), 0 0 22px rgba(10,125,255,0.35);
}
.drawer-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(10,125,255,0.28), 0 0 28px rgba(10,125,255,0.48);
}
.drawer-cta.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.drawer-dismiss {
  appearance: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.drawer-dismiss:hover {
  color: var(--white);
  border-color: rgba(213, 213, 213, 0.45);
}

@media (max-width: 560px) {
  .drawer-panel { width: 100vw; }
}

@media (max-width: 1100px) {
  .signal-strip { grid-template-columns: repeat(3, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  
.card {
  cursor: pointer;
  outline: none;
}
.card:focus-visible {
  border-color: rgba(10, 125, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(10, 125, 255, 0.35);
}
.card.is-selected {
  border-color: rgba(10, 125, 255, 0.7);
  background: var(--bg-card-hover);
  box-shadow: inset 2px 0 0 var(--electric);
}
.card-hint {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card:hover .card-hint,
.card:focus-visible .card-hint,
.card.is-selected .card-hint {
  opacity: 1;
}
.card-title {
  /* no longer a link — whole card opens detail */
  pointer-events: none;
}

.side-rail { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .topbar { grid-template-columns: 1fr; gap: 10px; }
  .topbar-right { justify-content: flex-start; }
  .signal-strip { grid-template-columns: 1fr 1fr; }
  
.card {
  cursor: pointer;
  outline: none;
}
.card:focus-visible {
  border-color: rgba(10, 125, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(10, 125, 255, 0.35);
}
.card.is-selected {
  border-color: rgba(10, 125, 255, 0.7);
  background: var(--bg-card-hover);
  box-shadow: inset 2px 0 0 var(--electric);
}
.card-hint {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card:hover .card-hint,
.card:focus-visible .card-hint,
.card.is-selected .card-hint {
  opacity: 1;
}
.card-title {
  /* no longer a link — whole card opens detail */
  pointer-events: none;
}

.side-rail { grid-template-columns: 1fr; }
  .app { padding: 0 16px 32px; }
  .brand-logo { height: 24px; }
}

/* ——— v2: Sentiment brief + enriched KPIs / cards / rail ——— */

.signal-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-value-sm {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 10px;
}
.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.kpi-sentiment .sent-dominant {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sent-dominant-pos { color: var(--pos); }
.sent-dominant-neu { color: var(--neu); }
.sent-dominant-neg { color: var(--neg); }

.sent-nums {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.sent-num {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sent-num strong {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.sent-num em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sent-num i {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sent-num.pos strong { color: var(--pos); }
.sent-num.neg strong { color: var(--neg); }
.sent-num.neu strong { color: var(--white); }

.sent-bars-lg {
  height: 7px;
  margin-top: 10px;
}

/* Sentiment section */
.sentiment-section {
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 18px 20px 20px;
  background:
    linear-gradient(145deg, rgba(10, 125, 255, 0.09) 0%, rgba(0, 33, 57, 0.62) 40%, rgba(0, 16, 24, 0.92) 100%);
  border: 1px solid rgba(10, 125, 255, 0.32);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.22);
  position: relative;
}
.sentiment-section::before {
  content: "";
  position: absolute;
  left: 20px; right: 20px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10,125,255,0.55), transparent);
  opacity: 0.7;
}
.sentiment-section.is-loading {
  border-style: dashed;
  border-color: rgba(213, 213, 213, 0.22);
}
.sentiment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sentiment-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
}
.sentiment-sub {
  font-size: 11.5px;
  color: var(--muted);
}
.sentiment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sentiment-col {
  background: rgba(0, 16, 24, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 15px 15px;
  min-height: 140px;
}
.sentiment-col.is-empty {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.sentiment-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sentiment-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}
.tone-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.tone-badge.tone-positive {
  color: var(--pos);
  background: var(--pos-bg);
  border-color: rgba(3, 194, 82, 0.35);
}
.tone-badge.tone-negative {
  color: var(--neg);
  background: var(--neg-bg);
  border-color: rgba(255, 131, 49, 0.4);
}
.tone-badge.tone-neutral {
  color: var(--neu);
  background: var(--neu-bg);
}
.tone-badge.tone-mixed {
  color: var(--yellow);
  background: rgba(255, 203, 62, 0.12);
  border-color: rgba(255, 203, 62, 0.4);
}
.sentiment-summary {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}
.sentiment-drivers-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 7px;
}
.driver-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.driver-chip {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 125, 255, 0.16);
  border: 1px solid rgba(10, 125, 255, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}
.sentiment-placeholder {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
  margin-top: 4px;
}
.sentiment-muted {
  font-size: 12px;
  color: var(--muted);
}

.sentiment-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.ro-panel {
  border-radius: 10px;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  background: rgba(0, 16, 24, 0.4);
}
.ro-risks {
  border-color: rgba(255, 131, 49, 0.32);
  background: linear-gradient(180deg, rgba(255, 131, 49, 0.08), rgba(0, 16, 24, 0.35));
}
.ro-opps {
  border-color: rgba(3, 194, 82, 0.28);
  background: linear-gradient(180deg, rgba(3, 194, 82, 0.07), rgba(0, 16, 24, 0.35));
}
.ro-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ro-risks .ro-title { color: var(--neg); }
.ro-opps .ro-title { color: var(--pos); }
.ro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ro-list li {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  padding-left: 12px;
  position: relative;
}
.ro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--electric);
}
.ro-risks .ro-list li::before { background: var(--neg); }
.ro-opps .ro-list li::before { background: var(--pos); }
.ro-list li strong {
  color: var(--white);
  font-weight: 600;
  margin-right: 4px;
}

/* Pop source-type badges */
.badge.type-social.is-pop-badge,
.badge.type-forum.is-pop-badge,
.badge.type-review.is-pop-badge {
  font-size: 10px;
  padding: 4px 9px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.badge.type-social.is-pop-badge {
  color: #c9c2ff;
  background: rgba(136, 125, 255, 0.22);
  border-color: rgba(136, 125, 255, 0.65);
}
.badge.type-forum.is-pop-badge {
  color: #ffe29a;
  background: rgba(255, 203, 62, 0.18);
  border-color: rgba(255, 203, 62, 0.55);
}
.badge.type-review.is-pop-badge {
  color: #8ef0b3;
  background: rgba(3, 194, 82, 0.18);
  border-color: rgba(3, 194, 82, 0.5);
}

.card.is-pop {
  background: linear-gradient(180deg, rgba(10, 125, 255, 0.07) 0%, var(--bg-card) 55%);
}
.card-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.32;
  margin-bottom: 8px;
}
.card-excerpt {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(213, 213, 213, 0.88);
}
.card-meta {
  margin-bottom: 10px;
}

.signal-weight {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--electric);
  background: rgba(10, 125, 255, 0.14);
  border: 1px solid rgba(10, 125, 255, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

/* Theme heat bars */
.theme-list li {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.theme-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-heat {
  height: 4px;
  border-radius: 2px;
  background: rgba(213, 213, 213, 0.1);
  overflow: hidden;
}
.theme-heat > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--midnight), var(--electric));
  border-radius: 2px;
}

/* Editorial competitor cards */
.comp-list li.comp-card {
  padding: 12px 0;
}
.comp-lede {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(213, 213, 213, 0.88);
  margin-bottom: 9px;
  font-style: italic;
}
.comp-heat-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  background: rgba(10, 125, 255, 0.28);
  border: 1px solid rgba(10, 125, 255, 0.5);
  padding: 3px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.comp-heat-pill.heat-critical {
  background: rgba(255, 131, 49, 0.22);
  border-color: rgba(255, 131, 49, 0.55);
  color: #ffc49a;
}
.comp-heat-pill.heat-elevated {
  background: rgba(255, 203, 62, 0.16);
  border-color: rgba(255, 203, 62, 0.45);
  color: var(--yellow);
}
.comp-heat-pill.heat-active {
  background: rgba(10, 125, 255, 0.28);
  border-color: rgba(10, 125, 255, 0.5);
}
.comp-heat-pill.heat-watch {
  background: rgba(213, 213, 213, 0.08);
  border-color: var(--line-strong);
  color: var(--muted);
}
.comp-bar {
  height: 5px;
}

/* Brand pulse — under sentiment */
.brand-pulse-section {
  margin-top: 14px;
  margin-bottom: 10px;
  padding: 18px 20px 20px;
  background:
    linear-gradient(155deg, rgba(10, 125, 255, 0.07) 0%, rgba(0, 33, 57, 0.6) 36%, rgba(0, 16, 24, 0.94) 100%);
  border: 1px solid rgba(10, 125, 255, 0.3);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.2);
  position: relative;
}
.brand-pulse-section::before {
  content: "";
  position: absolute;
  left: 20px; right: 20px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(213,213,213,0.28), transparent);
  opacity: 0.55;
}
.brand-pulse-section.is-loading {
  border-style: dashed;
  border-color: rgba(213, 213, 213, 0.22);
}
.brand-pulse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.brand-pulse-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
}
.brand-pulse-sub {
  font-size: 11.5px;
  color: var(--muted);
}
.brand-pulse-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 12px;
}
.bp-panel {
  background: rgba(0, 16, 24, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 15px 15px;
  min-height: 160px;
}
.bp-pressure {
  border-color: rgba(255, 131, 49, 0.35);
  background: linear-gradient(180deg, rgba(255, 131, 49, 0.09), rgba(0, 16, 24, 0.4));
}
.bp-lenses {
  border-color: rgba(10, 125, 255, 0.3);
}
.bp-sparks {
  border-color: rgba(136, 125, 255, 0.35);
  background: linear-gradient(180deg, rgba(136, 125, 255, 0.08), rgba(0, 16, 24, 0.4));
}
.bp-panel-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 10px;
}
.pp-score-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.pp-score-num {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.pp-score-max {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.pp-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  align-self: center;
}
.pp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(213, 213, 213, 0.18);
  border: 1px solid rgba(213, 213, 213, 0.28);
}
.pp-dot.is-on {
  background: var(--orange);
  border-color: rgba(255, 131, 49, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 131, 49, 0.18);
}
.bp-headline {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 8px;
}
.bp-summary {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(213, 213, 213, 0.88);
  margin-bottom: 12px;
}
.bp-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.bp-evidence-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}
.bp-evidence-chip {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 125, 255, 0.18);
  border: 1px solid rgba(10, 125, 255, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.bp-evidence-chip:hover {
  background: rgba(10, 125, 255, 0.32);
}
.bp-lens-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bp-lens-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.bp-lens-name { color: rgba(255, 255, 255, 0.92); }
.bp-lens-count {
  color: var(--electric);
  font-variant-numeric: tabular-nums;
}
.bp-lens-bar {
  height: 3px;
  background: rgba(213, 213, 213, 0.1);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}
.bp-lens-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--electric), var(--purple));
  border-radius: 2px;
}
.bp-lens-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 5px;
}
.bp-spark-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bp-spark {
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(136, 125, 255, 0.28);
  background: rgba(0, 16, 24, 0.35);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.bp-spark:hover,
.bp-spark:focus-visible {
  border-color: rgba(136, 125, 255, 0.55);
  background: rgba(136, 125, 255, 0.1);
  outline: none;
}
.bp-spark-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.35;
}
.bp-spark-why {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(213, 213, 213, 0.88);
}
.bp-spark-id {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple);
}

.card-brand {
  border-top: 1px solid rgba(136, 125, 255, 0.22);
  padding-top: 10px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 12.5px;
}
.brand-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  padding-top: 2px;
}
.brand-teaser {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.4;
}

.drawer-brand {
  padding: 14px 14px 13px;
  border-radius: 8px;
  border: 1px solid rgba(136, 125, 255, 0.32);
  background: rgba(136, 125, 255, 0.08);
}
.drawer-brand .drawer-section-label {
  color: var(--purple);
}
.drawer-brand-meta {
  margin-bottom: 8px;
}
.drawer-brand-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.lens-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(136, 125, 255, 0.14);
  border: 1px solid rgba(136, 125, 255, 0.4);
}

@media (max-width: 1100px) {
  .sentiment-grid,
  .sentiment-strip,
  .brand-pulse-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .sent-nums { gap: 8px; }
  .sentiment-section,
  .brand-pulse-section { padding: 14px; }
}


/* ——— v3 design elevation ——— */
.product-name {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0.2em;
}
.count-on {
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.005em;
}
.pp-score-num,
.kpi-value,
.kpi-value-sm {
  font-family: var(--font-display);
}
.sentiment-col,
.bp-panel,
.ro-panel {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  border-radius: 12px;
}
.filters {
  border-radius: 10px;
  padding: 4px;
  background: rgba(0, 33, 57, 0.85);
}
.feed-list {
  gap: 12px;
}
.drawer-title {
  font-weight: 650;
  font-size: 21px;
}
.drawer-head {
  padding: 22px 24px 18px;
  background: linear-gradient(180deg, rgba(0,48,82,0.7) 0%, rgba(0,33,57,0.45) 100%);
  border-bottom: 1px solid rgba(213,213,213,0.1);
}
.drawer-body {
  padding: 20px 24px 28px;
  gap: 20px;
}
.drawer-foot {
  padding: 16px 24px 20px;
  background: rgba(0, 10, 16, 0.72);
}
.app {
  padding: 0 32px 48px;
}
@media (max-width: 800px) {
  .app { padding: 0 16px 32px; }
}

/* =============================================
   v4 — Agency-premium elevation
   Editorial / cinematic · Spectrum Midnight + Electric
   ============================================= */

:root {
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --elev-0: none;
  --elev-1: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.22);
  --elev-2: 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 40px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(10, 125, 255, 0.06);
  --elev-3: 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 56px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(10, 125, 255, 0.12);
  --glass: rgba(0, 33, 57, 0.78);
  --glass-strong: rgba(0, 33, 57, 0.92);
  --hairline: rgba(213, 213, 213, 0.1);
  --hairline-strong: rgba(213, 213, 213, 0.22);
  --type-xs: 10px;
  --type-sm: 11.5px;
  --type-md: 13.5px;
  --type-lg: 15.5px;
  --type-xl: 20px;
  --type-2xl: 28px;
  --type-3xl: 34px;
  --tracking-label: 0.14em;
  --tracking-tight: -0.028em;
}

body {
  font-size: var(--type-md);
  letter-spacing: -0.005em;
  background:
    radial-gradient(1200px 680px at 6% -22%, rgba(10, 125, 255, 0.16), transparent 56%),
    radial-gradient(900px 520px at 96% -12%, rgba(0, 33, 57, 0.98), transparent 50%),
    radial-gradient(780px 520px at 48% 118%, rgba(10, 125, 255, 0.05), transparent 58%),
    linear-gradient(180deg, #000c14 0%, #001018 42%, #000d15 100%),
    var(--bg);
}

.app {
  padding: 0 36px 56px;
  max-width: 1480px;
}

/* ——— Topbar lockup ——— */
.topbar {
  padding: 16px 0 14px;
  gap: 24px;
  border-bottom: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(0, 33, 57, 0.96) 0%, rgba(0, 24, 42, 0.88) 100%);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  box-shadow:
    0 1px 0 rgba(10, 125, 255, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.28);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(10, 125, 255, 0.45) 22%,
    rgba(213, 213, 213, 0.18) 50%,
    rgba(10, 125, 255, 0.35) 78%,
    transparent 100%);
  pointer-events: none;
}

.brand-lockup {
  gap: 14px;
  align-items: center;
}

.brand-logo {
  height: 30px;
}

.product-name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  border-left: 1px solid rgba(213, 213, 213, 0.28);
  padding: 0 0 0 14px;
  line-height: 1.05;
}

.product-kicker {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(213, 213, 213, 0.62);
}

.product-mark {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 0 24px rgba(10, 125, 255, 0.25);
}

.live-pill {
  gap: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(10, 125, 255, 0.42) 0%, rgba(10, 125, 255, 0.22) 100%);
  border: 1px solid rgba(10, 125, 255, 0.75);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(10, 125, 255, 0.12),
    0 0 22px rgba(10, 125, 255, 0.38);
  position: relative;
  overflow: hidden;
}

.live-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: liveSheen 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes liveSheen {
  0%, 55% { transform: translateX(-120%); }
  75% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #7ec4ff;
  box-shadow: 0 0 0 0 rgba(126, 196, 255, 0.65);
  animation: pulseLive 1.6s ease-out infinite;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(126, 196, 255, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(126, 196, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 196, 255, 0); }
}

.live-text {
  position: relative;
  z-index: 1;
}

.count-on {
  font-size: 15px;
  font-weight: 500;
  color: rgba(213, 213, 213, 0.78);
  font-style: italic;
}

.count-on::after {
  opacity: 0.7;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.85), transparent);
}

.count-on-sub {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(213, 213, 213, 0.5);
}

.refresh-meta .label {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(213, 213, 213, 0.55);
}

.refresh-meta time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ——— Market strip — live terminal / editorial ticker ——— */
.market-strip {
  margin: 16px 0 0;
}

.market-strip-inner {
  grid-template-columns: auto auto auto minmax(88px, 110px) minmax(0, 1fr) auto;
  gap: 10px 16px;
  padding: 10px 16px 10px 18px;
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(0, 28, 48, 0.95) 0%, rgba(0, 18, 32, 0.98) 100%);
  border: 1px solid rgba(10, 125, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.market-strip-inner::before {
  width: 2px;
  background: linear-gradient(180deg, #7ec4ff 0%, var(--electric) 40%, rgba(10, 125, 255, 0.15) 100%);
  box-shadow: 0 0 12px rgba(10, 125, 255, 0.55);
}

.market-strip-inner::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 125, 255, 0.03) 48%,
    transparent 52%,
    transparent 100%
  );
  background-size: 100% 8px;
  opacity: 0.35;
  pointer-events: none;
  animation: terminalScan 7s linear infinite;
}

@keyframes terminalScan {
  0% { background-position: 0 0; opacity: 0.2; }
  50% { opacity: 0.4; }
  100% { background-position: 0 8px; opacity: 0.2; }
}

.market-live {
  gap: 6px;
  padding-right: 4px;
}

.market-live-dot {
  width: 6px;
  height: 6px;
  background: #7ec4ff;
  animation: pulseLive 1.6s ease-out infinite;
}

.market-live-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(213, 213, 213, 0.55);
}

.market-symbol {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 5px 9px 4px;
  border-radius: 5px;
  background: rgba(10, 125, 255, 0.28);
  border: 1px solid rgba(10, 125, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(10, 125, 255, 0.2);
}

.market-price-block {
  gap: 8px;
  align-items: baseline;
}

.market-price {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.market-change {
  font-size: 12px;
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: -0.01em;
}

.market-change.is-up {
  color: var(--pos);
  background: rgba(3, 194, 82, 0.12);
}

.market-change.is-down {
  color: var(--neg);
  background: rgba(255, 131, 49, 0.12);
}

.market-spark-wrap {
  min-width: 88px;
  gap: 2px;
  padding: 2px 0;
}

.market-spark-wrap svg {
  height: 32px;
  filter: drop-shadow(0 0 4px rgba(10, 125, 255, 0.35));
}

.market-range {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(213, 213, 213, 0.48);
  font-feature-settings: "tnum" 1;
}

.market-commentary {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(213, 213, 213, 0.82);
  font-style: italic;
  border-left: 1px solid rgba(10, 125, 255, 0.28);
  padding-left: 12px;
}

.market-meta {
  gap: 4px;
}

.market-asof {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(213, 213, 213, 0.55);
}

.market-session {
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
}

.market-rel {
  font-size: 9.5px;
  color: rgba(213, 213, 213, 0.42);
}

/* ——— KPI strip ——— */
.signal-strip {
  gap: 12px;
  padding: 20px 0 8px;
}

.kpi {
  border-radius: var(--r-md);
  padding: 14px 15px 13px;
  min-height: 102px;
  background:
    linear-gradient(165deg, rgba(0, 48, 82, 0.45) 0%, rgba(0, 26, 44, 0.92) 55%, rgba(0, 18, 32, 0.98) 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--elev-1);
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.35), transparent);
  opacity: 0.7;
}

.kpi:hover {
  border-color: rgba(10, 125, 255, 0.4);
  background:
    linear-gradient(165deg, rgba(0, 55, 95, 0.5) 0%, var(--bg-card-hover) 60%);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}

.kpi-label {
  font-size: 9.5px;
  letter-spacing: var(--tracking-label);
  color: rgba(213, 213, 213, 0.58);
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-top: 6px;
}

.kpi-sub {
  font-size: 11px;
  color: rgba(213, 213, 213, 0.55);
  margin-top: 6px;
}

.kpi-sentiment .sent-dominant {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.sent-bars,
.sent-bars-lg,
.heat-meter {
  border-radius: 999px;
  height: 4px;
  background: rgba(213, 213, 213, 0.1);
}

.sent-bars-lg { height: 6px; }

/* ——— Sentiment — magazine brief ——— */
.sentiment-section {
  margin-top: 14px;
  margin-bottom: 8px;
  padding: 22px 24px 24px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(152deg, rgba(10, 125, 255, 0.1) 0%, rgba(0, 33, 57, 0.35) 28%, rgba(0, 14, 22, 0.55) 100%);
  border: 1px solid rgba(10, 125, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.sentiment-section::before {
  left: 24px; right: 24px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.65), transparent);
}

.sentiment-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  align-items: flex-end;
}

.sentiment-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
  position: relative;
  padding-left: 12px;
}

.sentiment-title::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em; bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: var(--electric);
  box-shadow: 0 0 10px rgba(10, 125, 255, 0.55);
}

.sentiment-sub {
  font-size: 11px;
  color: rgba(213, 213, 213, 0.52);
  font-style: italic;
  max-width: 420px;
  text-align: right;
}

.sentiment-grid {
  gap: 14px;
}

.sentiment-col {
  padding: 18px 18px 16px;
  border-radius: var(--r-md);
  background: rgba(0, 12, 20, 0.42);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  min-height: 152px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sentiment-col:hover {
  border-color: rgba(10, 125, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 28px rgba(0, 0, 0, 0.2);
}

.sentiment-col-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.sentiment-summary {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
}

.sentiment-drivers-label {
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.driver-chip {
  font-size: 10.5px;
  padding: 5px 11px;
  background: rgba(10, 125, 255, 0.12);
  border-color: rgba(10, 125, 255, 0.38);
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.driver-chip:hover {
  background: rgba(10, 125, 255, 0.22);
  border-color: rgba(10, 125, 255, 0.6);
}

.sentiment-strip {
  gap: 14px;
  margin-top: 14px;
}

.ro-panel {
  padding: 16px 16px 15px;
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ro-title {
  letter-spacing: 0.16em;
  margin-bottom: 10px;
  font-size: 10px;
}

.ro-list {
  gap: 9px;
}

.ro-list li {
  font-size: 12.5px;
  line-height: 1.45;
  padding-left: 14px;
}

.ro-list li::before {
  width: 5px;
  height: 5px;
  top: 6px;
}

.ro-why {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(213, 213, 213, 0.7);
  font-weight: 400;
}

/* ——— Brand pulse — editorial ——— */
.brand-pulse-section {
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 22px 24px 24px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(158deg, rgba(136, 125, 255, 0.07) 0%, rgba(0, 33, 57, 0.4) 32%, rgba(0, 14, 22, 0.58) 100%);
  border: 1px solid rgba(10, 125, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.22);
}

.brand-pulse-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  align-items: flex-end;
}

.brand-pulse-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  padding-left: 12px;
  position: relative;
}

.brand-pulse-title::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em; bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: var(--purple);
  box-shadow: 0 0 10px rgba(136, 125, 255, 0.45);
}

.brand-pulse-sub {
  font-size: 11px;
  color: rgba(213, 213, 213, 0.52);
  font-style: italic;
  text-align: right;
}

.brand-pulse-grid {
  gap: 14px;
}

.bp-panel {
  padding: 16px 16px 15px;
  border-radius: var(--r-md);
  background: rgba(0, 12, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  min-height: 172px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bp-panel:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.bp-panel-kicker {
  letter-spacing: 0.16em;
  margin-bottom: 12px;
  font-size: 9.5px;
}

.pp-score-num {
  font-size: 36px;
  letter-spacing: var(--tracking-tight);
}

.bp-headline {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.bp-summary {
  font-size: 12.5px;
  line-height: 1.55;
}

.bp-spark {
  padding: 12px 12px;
  border-radius: var(--r-sm);
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.bp-spark:hover,
.bp-spark:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.bp-spark-title {
  font-size: 13px;
  letter-spacing: -0.01em;
}

/* ——— Workspace / feed cards ——— */
.workspace {
  gap: 28px;
  margin-top: 22px;
}

.feed-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.feed-toolbar {
  margin-bottom: 16px;
  gap: 14px;
}

.filters {
  border-radius: 999px;
  padding: 4px;
  background: rgba(0, 26, 44, 0.85);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter {
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.filter.is-active {
  box-shadow: 0 0 0 1px rgba(10, 125, 255, 0.35), 0 0 18px rgba(10, 125, 255, 0.4);
}

.feed-list {
  gap: 14px;
}

.card {
  border-radius: var(--r-md);
  padding: 18px 20px 16px;
  background:
    linear-gradient(180deg, rgba(0, 40, 69, 0.28) 0%, var(--bg-card) 42%);
  border: 1px solid var(--hairline);
  box-shadow: var(--elev-1);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.card::after {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(10, 125, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(10, 125, 255, 0.1) 0%, var(--bg-card-hover) 48%);
  box-shadow: var(--elev-2);
  transform: translateY(-2px);
}

.card:hover::after,
.card.is-selected::after {
  background: var(--electric);
  box-shadow: 0 0 12px rgba(10, 125, 255, 0.55);
}

.card.is-risk {
  border-left: 1px solid rgba(255, 131, 49, 0.45);
}

.card.is-risk::after {
  background: var(--risk);
}

.card.is-pop {
  background: linear-gradient(180deg, rgba(10, 125, 255, 0.09) 0%, var(--bg-card) 58%);
}

.card-meta {
  margin-bottom: 12px;
  gap: 7px;
}

.badge {
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 5px;
}

.card-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.card-excerpt {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(213, 213, 213, 0.84);
  margin-bottom: 12px;
}

.card-why {
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  margin-top: 4px;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  font-size: 12.5px;
}

.why-label {
  letter-spacing: 0.14em;
  color: var(--electric);
  font-size: 9px;
}

.why-text {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.card-brand {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(136, 125, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(136, 125, 255, 0.12) 0%, rgba(10, 125, 255, 0.06) 50%, rgba(0, 16, 24, 0.35) 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: start;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #c9c2ff;
  background: rgba(136, 125, 255, 0.16);
  border: 1px solid rgba(136, 125, 255, 0.4);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
}

.brand-teaser {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
  font-size: 12.5px;
}

.theme-pills {
  margin-top: 12px;
  gap: 6px;
}

.theme-pill {
  font-size: 10px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--hairline-strong);
  transition: border-color 0.12s, color 0.12s;
}

.card:hover .theme-pill {
  border-color: rgba(10, 125, 255, 0.35);
  color: rgba(213, 213, 213, 0.9);
}

.card-hint {
  margin-top: 14px;
  letter-spacing: 0.16em;
  font-size: 9.5px;
}

.signal-weight {
  letter-spacing: 0.1em;
  border-radius: 5px;
}

/* ——— Side rail ——— */
.side-rail {
  gap: 14px;
  top: 92px;
}

.rail-card {
  border-radius: var(--r-md);
  padding: 16px 16px 16px;
  background:
    linear-gradient(180deg, rgba(0, 40, 69, 0.42) 0%, var(--bg-card) 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--elev-1);
}

.rail-title {
  letter-spacing: 0.16em;
  font-size: 9.5px;
  margin-bottom: 14px;
  color: rgba(213, 213, 213, 0.58);
}

.watch-tag {
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.watch-tag:hover {
  background: rgba(10, 125, 255, 0.28);
  border-color: rgba(10, 125, 255, 0.55);
  transform: translateY(-1px);
}

.comp-heat-pill {
  letter-spacing: 0.06em;
}

/* ——— Drawer polish ——— */
.drawer-panel {
  border-left: 1px solid rgba(10, 125, 255, 0.48);
  box-shadow: -40px 0 90px rgba(0, 0, 0, 0.58), inset 1px 0 0 rgba(255, 255, 255, 0.05);
}

.drawer-why {
  border-radius: var(--r-sm);
  border-color: rgba(10, 125, 255, 0.35);
  background: linear-gradient(135deg, rgba(10, 125, 255, 0.12), rgba(10, 125, 255, 0.05));
}

.drawer-brand {
  border-radius: var(--r-sm);
  border-color: rgba(136, 125, 255, 0.38);
  background: linear-gradient(135deg, rgba(136, 125, 255, 0.12), rgba(136, 125, 255, 0.04));
}

.drawer-cta {
  border-radius: var(--r-sm);
  letter-spacing: 0.06em;
}

/* ——— Footer ——— */
.footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 1100px) {
  .market-strip-inner {
    gap: 10px 12px;
  }
  .app { padding: 0 24px 40px; }
}

@media (max-width: 800px) {
  .app { padding: 0 16px 32px; }
  .product-mark { font-size: 13px; }
  .market-price { font-size: 20px; }
  .market-commentary {
    border-left: 0;
    padding-left: 0;
    font-style: normal;
  }
  .card-brand {
    grid-template-columns: 1fr;
  }
  .sentiment-section,
  .brand-pulse-section {
    padding: 16px;
  }
}


/* =============================================
   v5 — Overnight design wave (Purpose Listen)
   Electric uplift · Media highlights rail · House polish
   ============================================= */

:root {
  /* Reinforce electric uplift if cascade order matters for late overrides */
  --electric: #0a7dff;
  --electric-rgb: 10, 125, 255;
  --electric-bright: #4da3ff;
  --electric-deep: #0066d6;
  --electric-soft: rgba(10, 125, 255, 0.16);
  --electric-mid: rgba(10, 125, 255, 0.32);
  --electric-strong: rgba(10, 125, 255, 0.55);
  --electric-glow: 0 0 20px rgba(10, 125, 255, 0.32);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(10, 125, 255, 0.55);
}

/* Ambient glow — electric, not neon */
body {
  background:
    radial-gradient(1180px 660px at 7% -20%, rgba(10, 125, 255, 0.15), transparent 56%),
    radial-gradient(900px 520px at 96% -12%, rgba(0, 33, 57, 0.98), transparent 50%),
    radial-gradient(760px 500px at 50% 118%, rgba(10, 125, 255, 0.045), transparent 58%),
    linear-gradient(180deg, #000c14 0%, #001018 42%, #000d15 100%),
    var(--bg);
}

/* ——— House bar: editorial, considered ——— */
.topbar {
  padding: 14px 0 12px;
  gap: 16px;
  border-bottom: 1px solid rgba(213, 213, 213, 0.08);
  box-shadow: 0 1px 0 rgba(10, 125, 255, 0.06);
  background: rgba(0, 33, 57, 0.94);
}

.brand-lockup { gap: 12px; }

.product-name {
  gap: 2px;
  padding-left: 12px;
  border-left-color: rgba(213, 213, 213, 0.22);
}

.product-kicker {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(213, 213, 213, 0.55);
}

.product-mark {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(10, 125, 255, 0.22);
}

.live-pill {
  background: linear-gradient(180deg, rgba(10, 125, 255, 0.38) 0%, rgba(10, 125, 255, 0.18) 100%);
  border-color: rgba(10, 125, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(10, 125, 255, 0.1),
    var(--electric-glow);
  padding: 5px 11px 5px 9px;
}

/* Quiet the sheen — less AI-slop shimmer */
.live-pill::before {
  animation: none;
  opacity: 0;
}

.live-dot {
  background: var(--electric-bright);
  box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.55);
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(77, 163, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0); }
}

.count-on {
  font-size: 14px;
  color: rgba(213, 213, 213, 0.74);
  padding-bottom: 5px;
}

.count-on::after {
  opacity: 0.55;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.75), transparent);
}

.count-on-sub {
  margin-top: 3px;
  letter-spacing: 0.1em;
  color: rgba(213, 213, 213, 0.48);
}

/* Market strip accents — electric, quieter scan */
.market-strip { margin: 12px 0 0; }

.market-strip-inner {
  border-color: rgba(10, 125, 255, 0.26);
  padding: 10px 14px 10px 16px;
}

.market-strip-inner::before {
  background: linear-gradient(180deg, var(--electric-bright) 0%, var(--electric) 42%, rgba(10, 125, 255, 0.12) 100%);
  box-shadow: 0 0 10px rgba(10, 125, 255, 0.45);
}

.market-strip-inner::after {
  opacity: 0.12;
  animation: none;
}

.market-live-dot { background: var(--electric-bright); }

.market-symbol {
  background: rgba(10, 125, 255, 0.26);
  border-color: rgba(10, 125, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 12px rgba(10, 125, 255, 0.18);
}

.market-price.is-shimmer {
  text-shadow: 0 0 16px rgba(10, 125, 255, 0.5);
}

/* Focus rings — consistent electric */
.filter:focus-visible,
.retry-btn:focus-visible,
.drawer-close:focus-visible,
.drawer-dismiss:focus-visible,
.drawer-cta:focus-visible,
.media-card:focus-visible,
.bp-spark:focus-visible,
.card:focus-visible,
.watch-tag:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.card:focus-visible,
.card.is-selected {
  border-color: rgba(10, 125, 255, 0.45);
  box-shadow: inset 2px 0 0 var(--electric), var(--elev-1);
}

.card:focus-visible .card-hint,
.card.is-selected .card-hint,
.card:hover .card-hint {
  color: var(--electric);
}

a:focus-visible {
  outline: 2px solid rgba(10, 125, 255, 0.65);
  outline-offset: 2px;
}

.filter.is-active {
  background: rgba(10, 125, 255, 0.28);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(10, 125, 255, 0.45);
}

/* Tighten vertical rhythm */
.signal-strip {
  gap: 10px;
  padding: 16px 0 6px;
}

.sentiment-section {
  margin-top: 12px;
  margin-bottom: 6px;
  padding: 18px 20px 20px;
}

.brand-pulse-section {
  margin-top: 10px;
  margin-bottom: 4px;
}

.workspace {
  margin-top: 14px;
  gap: 20px;
}

.feed-toolbar { margin-bottom: 12px; }
.feed-list { gap: 10px; }

.kpi::before {
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.4), transparent);
}

.kpi:hover {
  border-color: rgba(10, 125, 255, 0.42);
}

/* ——— Media highlights rail ——— */
.media-rail {
  margin: 10px 0 4px;
  padding: 14px 16px 14px;
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(0, 40, 69, 0.35) 0%, rgba(0, 18, 32, 0.55) 100%);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}

.media-rail::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.4), transparent);
  opacity: 0.65;
}

.media-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.media-rail-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(213, 213, 213, 0.72);
}

.media-rail-sub {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(213, 213, 213, 0.48);
  letter-spacing: 0.01em;
}

.media-rail-count {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(10, 125, 255, 0.9);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.media-rail-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 125, 255, 0.35) transparent;
}

.media-rail-track::-webkit-scrollbar { height: 4px; }
.media-rail-track::-webkit-scrollbar-thumb {
  background: rgba(10, 125, 255, 0.35);
  border-radius: 999px;
}

.media-card {
  flex: 0 0 auto;
  width: 188px;
  scroll-snap-align: start;
  appearance: none;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: rgba(0, 16, 28, 0.85);
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.media-card:hover {
  border-color: rgba(10, 125, 255, 0.45);
  transform: translateY(-1px);
  box-shadow: var(--elev-2);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(145deg, rgba(10, 125, 255, 0.18), rgba(0, 33, 57, 0.9)),
    #001525;
  overflow: hidden;
}

.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 70% at 30% 20%, rgba(10, 125, 255, 0.28), transparent 60%),
    linear-gradient(160deg, #003057 0%, #001018 100%);
}

.media-thumb--quote {
  display: flex;
  align-items: flex-end;
}

.media-thumb--quote .media-quote-text {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 12px 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.media-thumb--quote .media-quote-text::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display), Georgia, serif;
  font-size: 22px;
  line-height: 1;
  color: rgba(10, 125, 255, 0.85);
  margin-bottom: 4px;
}

.media-thumb--video .media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: rgba(0, 33, 57, 0.72);
  border: 1px solid rgba(10, 125, 255, 0.65);
  box-shadow: 0 0 16px rgba(10, 125, 255, 0.35);
}

.media-thumb--video .media-play::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--white);
}

.media-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
  min-height: 58px;
}

.media-source {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10, 125, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.media-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 8px 4px 4px;
  min-height: 64px;
}

.media-empty-mark {
  display: block;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--electric), transparent);
  opacity: 0.7;
}

.media-empty-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.88);
}

.media-empty-body {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(213, 213, 213, 0.55);
  max-width: 52ch;
}

.media-rail.is-empty {
  background:
    linear-gradient(180deg, rgba(0, 33, 57, 0.28) 0%, rgba(0, 14, 22, 0.4) 100%);
  border-color: rgba(213, 213, 213, 0.08);
}

.media-card.is-broken {
  display: none !important;
}

@media (max-width: 800px) {
  .media-card { width: 164px; }
  .media-rail { padding: 12px 12px 12px; }
  .media-rail-head { flex-wrap: wrap; }
  .topbar { padding: 12px 0 10px; }
}

/* ============================================================
   v6 — Overnight durable media (2:15am ET)
   Local assets/media hosts · media-card electric hover glow
   ============================================================ */
.media-card {
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.media-card:hover,
.media-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(10, 125, 255, 0.55);
  box-shadow: var(--electric-glow), 0 8px 22px rgba(0, 0, 0, 0.35);
  outline: none;
}
.media-thumb {
  position: relative;
}
.media-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(0, 14, 22, 0.55));
  pointer-events: none;
}
.media-rail-count {
  color: rgba(77, 163, 255, 0.95);
}

/* ============================================================
   v7 — Overnight rail editorial order (3:15am ET)
   Owned + reliability lead · lead cards slightly larger
   ============================================================ */
.media-card--lead {
  width: 204px;
}
.media-card--lead .media-thumb {
  aspect-ratio: 16 / 9;
}
.media-card--priority {
  border-color: rgba(10, 125, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(10, 125, 255, 0.12);
}
.media-card--priority .media-source {
  color: rgba(77, 163, 255, 0.95);
}
.media-card--lead .media-caption {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
@media (max-width: 800px) {
  .media-card--lead { width: 180px; }
}


/* ============================================================
   v8 — Overnight pre-market + media platform chips (4:15am ET)
   Extended quote on market strip · platform badge on thumbs
   ============================================================ */
.market-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.market-ext {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: rgba(213, 213, 213, 0.72);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-ext.is-up { color: rgba(3, 194, 82, 0.95); }
.market-ext.is-down { color: rgba(255, 131, 49, 0.95); }
.market-ext.is-flat { color: rgba(213, 213, 213, 0.7); }
.market-session.is-pre-market {
  color: var(--electric-bright);
  background: rgba(10, 125, 255, 0.14);
  border-color: rgba(10, 125, 255, 0.4);
}

.media-rail {
  position: relative;
}
/* v8 edge fades retired — v9 uses .media-rail-edge inside viewport */
.media-rail:not(.is-empty)::before {
  /* restore top hairline only (earlier rule) */
  top: 0;
  bottom: auto;
  left: 16px;
  right: 16px;
  width: auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.45), transparent);
  opacity: 0.7;
}
.media-rail:not(.is-empty)::after {
  content: none;
}

.media-platform {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 33, 57, 0.78);
  border: 1px solid rgba(10, 125, 255, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.media-platform.is-tiktok {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(16, 16, 24, 0.82);
}
.media-platform.is-ig {
  border-color: rgba(225, 48, 108, 0.55);
  background: rgba(88, 24, 48, 0.78);
}
.media-platform.is-yt {
  border-color: rgba(255, 80, 80, 0.55);
  background: rgba(72, 16, 16, 0.78);
}
.media-platform.is-x {
  border-color: rgba(213, 213, 213, 0.4);
  background: rgba(20, 24, 32, 0.82);
}
.media-platform.is-owned {
  border-color: rgba(10, 125, 255, 0.65);
  color: rgba(77, 163, 255, 0.98);
  background: rgba(0, 33, 57, 0.88);
}
.media-platform.is-social {
  border-color: rgba(10, 125, 255, 0.4);
}
.media-platform.is-press {
  border-color: rgba(10, 125, 255, 0.35);
  color: rgba(213, 213, 213, 0.9);
}


/* ============================================================
   v9 — Overnight media rail chrome (5:25am ET)
   Scroll controls · viewport edge fades · brighter electric punch
   ============================================================ */
:root {
  --electric: #1488ff;
  --electric-rgb: 20, 136, 255;
  --electric-bright: #5eb0ff;
  --electric-deep: #006ee0;
  --electric-soft: rgba(20, 136, 255, 0.18);
  --electric-mid: rgba(20, 136, 255, 0.36);
  --electric-strong: rgba(20, 136, 255, 0.58);
  --electric-glow: 0 0 22px rgba(20, 136, 255, 0.38);
}

.live-pill {
  border-color: rgba(20, 136, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(20, 136, 255, 0.12), 0 0 18px rgba(20, 136, 255, 0.18);
}
.live-dot {
  background: var(--electric-bright);
  box-shadow: 0 0 10px rgba(20, 136, 255, 0.85);
}
.filter.is-active {
  background: rgba(20, 136, 255, 0.22);
  border-color: rgba(20, 136, 255, 0.55);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 136, 255, 0.2);
}

.media-rail-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.media-rail-nav {
  display: inline-flex;
  gap: 4px;
}
.media-rail-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(20, 136, 255, 0.4);
  background: rgba(0, 24, 40, 0.85);
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.media-rail-btn:hover:not(:disabled),
.media-rail-btn:focus-visible {
  border-color: rgba(20, 136, 255, 0.75);
  background: rgba(20, 136, 255, 0.18);
  box-shadow: var(--electric-glow);
  outline: none;
}
.media-rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.media-rail-viewport {
  position: relative;
}
.media-rail-edge {
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 36px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.media-rail-edge--start {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 14, 22, 0.95), transparent);
}
.media-rail-edge--end {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 14, 22, 0.95), transparent);
}
.media-rail-viewport.is-overflow-start .media-rail-edge--start,
.media-rail-viewport.is-overflow-end .media-rail-edge--end {
  opacity: 1;
}
.media-rail.is-empty .media-rail-nav {
  display: none;
}
.media-rail.is-empty .media-rail-edge {
  opacity: 0 !important;
}

.media-platform {
  border-color: rgba(20, 136, 255, 0.5);
}
.media-card--priority {
  border-color: rgba(20, 136, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(20, 136, 255, 0.16), 0 0 18px rgba(20, 136, 255, 0.12);
}

/* ==========================================================================
   v10 — Morning reveal polish (6:25am ET)
   Lead media cards slightly larger · quieter rail chrome · fresher live pulse
   ========================================================================== */
.media-card--lead {
  min-width: 248px;
  max-width: 268px;
}
.media-card--lead .media-thumb {
  height: 148px;
}
.media-card--priority .media-source {
  color: var(--electric-bright);
}
.live-pill {
  box-shadow: 0 0 0 1px rgba(var(--electric-rgb), 0.28), 0 0 14px rgba(var(--electric-rgb), 0.22);
}
.live-dot {
  box-shadow: 0 0 8px rgba(var(--electric-rgb), 0.85);
}
.media-rail-title {
  letter-spacing: 0.02em;
}
.media-rail-sub {
  opacity: 0.78;
}
.sentiment-section {
  border-top: 1px solid rgba(var(--electric-rgb), 0.08);
}


/* ==========================================================================
   v11 — Morning QA polish (browser visual pass ~6:30am ET)
   KPI theme tile scale · media rail uniformity · electric hierarchy
   ========================================================================== */

/* 1) Themes KPI must not inherit the 32px number size from .kpi-value */
.kpi-value.kpi-value-sm {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  max-height: 2.5em;
}
#kpiThemes {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 102px;
  max-height: 118px;
}
#kpiThemes .kpi-sub {
  margin-top: auto;
}

/* 2) Media rail — uniform 16:9 cover, intentional edge fade, word-safe captions */
.media-thumb,
.media-card--lead .media-thumb {
  aspect-ratio: 16 / 9;
  height: auto;
}
.media-thumb img {
  object-fit: cover;
  object-position: center;
}
.media-caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.35;
  max-height: 2.7em;
}
.media-rail-track {
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding-bottom: 2px;
}
.media-card {
  scroll-snap-align: start;
}
.media-rail-edge--start {
  width: 48px;
  background: linear-gradient(90deg, rgba(0, 14, 22, 0.98), rgba(0, 14, 22, 0.55), transparent);
}
.media-rail-edge--end {
  width: 56px;
  background: linear-gradient(270deg, rgba(0, 14, 22, 0.98), rgba(0, 14, 22, 0.55), transparent);
}
.media-rail-viewport.is-overflow-end .media-rail-edge--end,
.media-rail-viewport.is-overflow-start .media-rail-edge--start {
  opacity: 1;
}

/* 3) Electric hierarchy — page vs card separation + section kickers + hero signal */
body {
  background:
    radial-gradient(1100px 620px at 8% -18%, rgba(20, 136, 255, 0.18), transparent 58%),
    radial-gradient(900px 520px at 92% -8%, rgba(0, 33, 57, 0.95), transparent 52%),
    var(--bg);
}
.kpi,
.sentiment-section,
.brand-pulse-section,
.card,
.media-card {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 28px rgba(0, 0, 0, 0.28);
}
/* Brighten existing section bars; add kickers only where none exist */
.sentiment-title::before {
  background: var(--electric-bright);
  box-shadow: 0 0 12px rgba(var(--electric-rgb), 0.75);
  width: 3px;
}
.brand-pulse-title::before {
  background: var(--electric-bright);
  box-shadow: 0 0 12px rgba(var(--electric-rgb), 0.55);
  width: 3px;
}
.media-rail-title,
.feed-title {
  position: relative;
  padding-left: 12px;
}
.media-rail-title::before,
.feed-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  border-radius: 2px;
  background: var(--electric-bright);
  box-shadow: 0 0 10px rgba(var(--electric-rgb), 0.65);
}
.sentiment-section,
.brand-pulse-section {
  border: 1px solid rgba(var(--electric-rgb), 0.22);
  border-top: 2px solid rgba(var(--electric-rgb), 0.55);
}
.card.is-hero {
  border-color: rgba(var(--electric-rgb), 0.55);
  background:
    linear-gradient(180deg, rgba(20, 136, 255, 0.14) 0%, var(--bg-card) 58%);
  box-shadow:
    inset 0 0 0 1px rgba(var(--electric-rgb), 0.18),
    0 12px 32px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(var(--electric-rgb), 0.12);
}
.card.is-hero::after {
  background: var(--electric-bright);
  box-shadow: 0 0 14px rgba(var(--electric-rgb), 0.7);
}

/* Evidence chips: single denser wrap */
.bp-evidence {
  gap: 4px;
  max-height: 52px;
  overflow: hidden;
}
.bp-evidence-chip {
  font-size: 10px;
  padding: 2px 7px;
}

/* Risks/opportunities: tighter line clamp feel */
.ro-list li {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Market strip commentary breathing room */
.market-commentary {
  font-size: 11.5px;
  line-height: 1.4;
  opacity: 0.88;
}

/* ==========================================================================
   v12 — 7:22am ET overnight push
   Compact sourced thumbs on signal cards · slightly brighter electric filter active
   ========================================================================== */
.card.has-thumb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  align-items: stretch;
}
.card.has-thumb .card-body {
  min-width: 0;
}
.card-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(0, 33, 57, 0.55);
  border: 1px solid rgba(var(--electric-rgb), 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-thumb-play {
  position: absolute;
  inset: auto 8px 8px auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(10, 125, 255, 0.92);
  box-shadow: 0 0 12px rgba(var(--electric-rgb), 0.55);
}
.card-thumb-play::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
}
.filter-pill.is-active,
.filters .is-active {
  background: rgba(var(--electric-rgb), 0.22);
  border-color: rgba(var(--electric-rgb), 0.55);
  color: #e8f3ff;
  box-shadow: 0 0 0 1px rgba(var(--electric-rgb), 0.2), 0 0 16px rgba(var(--electric-rgb), 0.18);
}
@media (max-width: 720px) {
  .card.has-thumb {
    grid-template-columns: 1fr;
  }
  .card-thumb {
    aspect-ratio: 16 / 9;
    max-height: 160px;
  }
}


/* v13 people-talking rail — demoted, compact */
.media-rail {
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 10px 14px 12px;
  opacity: 0.98;
}
.media-rail-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}
.media-rail-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
}
.media-rail .media-card {
  width: 148px;
  min-width: 148px;
}
.media-rail .media-thumb,
.media-rail .media-thumb--video {
  aspect-ratio: 9 / 12;
  max-height: 148px;
}
.media-rail .media-caption {
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}
.media-rail .media-card--lead,
.media-rail .media-card--priority {
  box-shadow: none;
  outline: 1px solid rgba(20, 136, 255, 0.35);
}

/* ============================================================
   v15 — People talking live pulse + library archive
   Editorial VCCP×Spectrum · Midnight / Electric
   ============================================================ */
.media-library-btn {
  appearance: none;
  border: 1px solid rgba(10, 125, 255, 0.42);
  background: rgba(0, 33, 57, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.media-library-btn:hover,
.media-library-btn:focus-visible {
  border-color: rgba(10, 125, 255, 0.75);
  background: rgba(10, 125, 255, 0.16);
  color: #fff;
  outline: none;
}

.media-empty-cta {
  appearance: none;
  margin-top: 6px;
  border: 1px solid rgba(10, 125, 255, 0.5);
  background: linear-gradient(180deg, rgba(10, 125, 255, 0.22), rgba(0, 33, 57, 0.55));
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.media-empty-cta:hover,
.media-empty-cta:focus-visible {
  border-color: var(--electric);
  box-shadow: var(--electric-glow);
  outline: none;
}

.media-age {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(213, 213, 213, 0.48);
  font-variant-numeric: tabular-nums;
}

.media-library-root {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.media-library-root:not(.is-hidden) {
  pointer-events: auto;
}
.media-library-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 8, 14, 0.2) 0%, rgba(0, 16, 24, 0.62) 42%, rgba(0, 33, 57, 0.9) 100%);
  backdrop-filter: blur(5px) saturate(1.05);
  opacity: 0;
  transition: opacity 0.26s ease;
}
.media-library-root:not(.is-hidden) .media-library-backdrop {
  opacity: 1;
}
.media-library-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #003052 0%, var(--midnight) 22%, #001018 100%);
  border-left: 1px solid rgba(10, 125, 255, 0.4);
  box-shadow: -28px 0 72px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 255, 255, 0.04);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.media-library-root:not(.is-hidden) .media-library-panel {
  transform: translateX(0);
}
.media-library-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 33, 57, 0.55);
  flex: 0 0 auto;
}
.media-library-kicker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.media-library-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
}
.media-library-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(213, 213, 213, 0.52);
  max-width: 36ch;
}
.media-library-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.media-library-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(10, 125, 255, 0.95);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.media-library-close {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s;
}
.media-library-close:hover,
.media-library-close:focus-visible {
  border-color: rgba(10, 125, 255, 0.65);
  background: rgba(10, 125, 255, 0.12);
  outline: none;
}
.media-library-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px 14px 28px;
  -webkit-overflow-scrolling: touch;
}
.media-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.media-library-card {
  width: 100% !important;
  min-width: 0 !important;
  flex: none;
}
.media-library-card .media-thumb,
.media-library-card .media-thumb--video {
  aspect-ratio: 16 / 10;
  max-height: none;
}
.media-library-empty {
  grid-column: 1 / -1;
  padding: 18px 6px;
}
body.media-library-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .media-library-panel {
    width: 100vw;
  }
  .media-library-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .media-library-head {
    padding: 14px 12px 12px;
  }
  .media-library-body {
    padding: 12px 10px 24px;
  }
  .media-rail-tools {
    flex-wrap: wrap;
  }
}

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

/* Today's takeaways — exec skim strip (Midnight × Electric) */
.exec-takeaways {
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 16px 20px 18px;
  background:
    linear-gradient(140deg, rgba(10, 125, 255, 0.11) 0%, rgba(0, 33, 57, 0.72) 38%, rgba(0, 16, 24, 0.94) 100%);
  border: 1px solid rgba(10, 125, 255, 0.36);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.2);
  position: relative;
}
.exec-takeaways::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 125, 255, 0.65), transparent);
  opacity: 0.75;
}
.exec-takeaways.is-empty,
.exec-takeaways.is-loading {
  border-style: dashed;
  border-color: rgba(213, 213, 213, 0.22);
  background:
    linear-gradient(145deg, rgba(0, 33, 57, 0.45) 0%, rgba(0, 16, 24, 0.88) 100%);
}
.exec-takeaways-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.exec-takeaways-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}
.exec-takeaways-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.exec-takeaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.exec-takeaways.is-empty .exec-takeaways-grid {
  display: block;
}
.exec-takeaway-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px 14px;
  min-height: 88px;
  background: rgba(0, 16, 24, 0.5);
  border: 1px solid rgba(10, 125, 255, 0.22);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}
.exec-takeaway-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--electric), rgba(10, 125, 255, 0.15));
}
.exec-takeaway-index {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--electric);
  opacity: 0.9;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.exec-takeaway-body {
  min-width: 0;
  flex: 1;
}
.exec-takeaway-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.96);
  margin: 0 0 5px;
}
.exec-takeaway-detail {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(213, 213, 213, 0.88);
}
.exec-takeaways-placeholder {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
  margin: 2px 0 0;
}

@media (max-width: 800px) {
  .exec-takeaways { padding: 14px; }
  .exec-takeaways-grid { grid-template-columns: 1fr; }
}
