/* ============================================================
   pulse.css — MacroBull Market Pulse  (v2 clean refactor)

   Layout contract (never break this):
   ─────────────────────────────────────────────────────────
   #panel-pulse  [overflow-y:auto  ← set in index.html inline]
     └── .pulse-shell  [flex column, NO overflow, NO min-height%]
           ├── .pulse-topbar
           ├── .pulse-grid   [2-col grid, align-items:start]
           │     ├── #pulse-main  .pulse-card
           │     └── #pulse-side
           └── #pulse-trending-mount   ← plain block, last child
                 └── .pulse-trending-card
                       └── .pulse-trending-scroll  [overflow-y:auto, max-height:320px]
                             └── table.pulse-trending-table
                                   ├── thead  th [position:sticky top:0]  ← SAFE here
                                   └── tbody

   Chip system (v2):
   • 4 decision chips replace the old multi-pill badge cluster
   • All chip labels/tones/tooltips live in CHIP_CONFIG in pulse.js
   • .decision-chip-grid / .decision-chip → new canonical chip styles
   • .pulse-label-stack / .pulse-label-chip → kept for backward compat but hidden

   Execution plan card (v2):
   • .exec-plan-card replaces .execution-plan-card
   • Clean hierarchy: header → meta row → trigger → confirmation → invalidation
   ============================================================ */

/* ── CSS custom properties ───────────────────────────────── */
:root {
  --sw-muted:   #6b7fa8;
  --sw-text:    #e8edf8;
  --bull:       #63f0c1;
  --bear:       #ff8ba2;
  --accent:     #548cff;
}

/* ── Shell ───────────────────────────────────────────────────
   Simple flex column. No overflow, no min-height percentage.
   The parent #panel-pulse handles scrolling.               */
.pulse-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 22px 48px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Shared card surface ─────────────────────────────────── */
.pulse-topbar,
.pulse-card,
.pulse-trending-card {
  background: linear-gradient(160deg, rgba(13,21,40,.98) 0%, rgba(8,14,28,.99) 100%);
  border: 1px solid rgba(91,122,199,.15);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

/* ── Topbar ──────────────────────────────────────────────── */
.pulse-topbar {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 22px 24px 18px;
  position: relative;
  overflow: visible;
}

.pulse-kicker,
.portfolio-kicker {
  font-size: 10px;
  letter-spacing: .2em;
  color: #7ea6ff;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pulse-title {
  font-size: 32px;
  font-weight: 950;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1;
}
.pulse-sub { font-size: 13px; color: var(--sw-muted); margin-top: 6px; }

/* ── Topbar controls ─────────────────────────────────────── */
.pulse-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}
.pulse-input {
  height: 42px;
  min-width: 200px;
  border-radius: 12px;
  border: 1px solid rgba(104,132,204,.26);
  background: rgba(255,255,255,.045);
  color: var(--sw-text);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.pulse-input:focus {
  border-color: rgba(84,140,255,.55);
  box-shadow: 0 0 0 3px rgba(58,108,255,.12);
}
.pulse-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(84,140,255,.28);
  background: linear-gradient(180deg, rgba(58,108,255,.28), rgba(58,108,255,.1));
  color: #dce8ff;
  font-weight: 800;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.pulse-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(19,37,84,.3); }
.pulse-btn:active { transform: translateY(0); }
.pulse-btn.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

/* Hot-list chips */
.pulse-hotlist {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.05);
  grid-column: 1 / -1;
}
.pulse-hot-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--sw-muted);
  font-weight: 700;
}
.pulse-chip {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(84,140,255,.18);
  background: rgba(255,255,255,.04);
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.pulse-chip:hover { background: rgba(84,140,255,.14); transform: translateY(-1px); }

/* Search dropdown */
.pulse-search-wrap {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 60;
}
.pulse-search-results {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #0b1329;
  border: 1px solid rgba(91,122,199,.24);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0,0,0,.38);
  max-height: 280px;
  overflow-y: auto;
  min-width: 300px;
}
.pulse-search-results.hidden { display: none; }
.pulse-search-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.pulse-search-item:hover { background: rgba(84,140,255,.08); }
.pulse-search-item span { display: block; font-size: 12px; color: var(--sw-muted); margin-top: 2px; }
.pulse-search-item small { color: #8da5d9; }

/* ── Two-column grid ─────────────────────────────────────── */
.pulse-grid {
  display: grid;
  grid-template-columns: minmax(0,1.22fr) minmax(300px,.85fr);
  gap: 20px;
  align-items: start;
}
#pulse-main,
#pulse-side { min-width: 0; }

.pulse-card { padding: 20px; }

/* ── Signal hero ─────────────────────────────────────────── */
.premium-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.pulse-sym  { font-size: 40px; font-weight: 950; color: #fff; line-height: 1; letter-spacing: -.04em; }
.pulse-name { font-size: 13px; color: var(--sw-muted); margin-top: 5px; }

.pulse-score-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pulse-score-ring {
  border-radius: 20px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.1);
  min-width: 120px;
  backdrop-filter: blur(8px);
}
.pulse-score       { font-size: 56px; font-weight: 950; line-height: 1; color: #fff; }
.pulse-score small { font-size: 14px; color: var(--sw-muted); font-weight: 700; }
.pulse-score-sub   {
  margin-top: 5px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #9eb4e7;
  font-weight: 800;
}

/* Legacy .pulse-badges (kept for any old references, but not rendered in v2) */
.pulse-badges { display: none; }

.pulse-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(58,108,255,.12);
  border: 1px solid rgba(58,108,255,.28);
  color: #7ea6ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pulse-pill.ghost {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.09);
  color: #e9efff;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Tone colours ────────────────────────────────────────── */
.is-bullish { --tone: rgba(0,230,168,.42); --toneText: #63f0c1; }
.is-bearish { --tone: rgba(255,92,121,.38); --toneText: #ff8ba2; }
.is-cooling { --tone: rgba(150,163,184,.38); --toneText: #d2dae6; }
.is-mixed,
.is-neutral { --tone: rgba(84,140,255,.34); --toneText: #7ea6ff; }

.pulse-score-ring.is-bullish { box-shadow: 0 0 0 1px rgba(0,230,168,.22), 0 0 30px rgba(0,230,168,.12); }
.pulse-score-ring.is-bearish { box-shadow: 0 0 0 1px rgba(255,92,121,.22), 0 0 28px rgba(255,92,121,.10); }
.pulse-score-ring.is-mixed,
.pulse-score-ring.is-neutral { box-shadow: 0 0 0 1px rgba(84,140,255,.2),  0 0 28px rgba(84,140,255,.10); }
.pulse-score-ring.is-cooling { box-shadow: 0 0 0 1px rgba(148,163,184,.16), 0 0 22px rgba(148,163,184,.08); }

.pulse-pill.is-bullish, .table-pill.is-bullish,
.pulse-btn.small.is-bullish, .state-text.is-bullish {
  background: rgba(0,230,168,.10); border-color: rgba(0,230,168,.26); color: #63f0c1;
}
.pulse-pill.is-bearish, .table-pill.is-bearish,
.pulse-btn.small.is-bearish, .state-text.is-bearish {
  background: rgba(255,92,121,.10); border-color: rgba(255,92,121,.24); color: #ff8ba2;
}
.pulse-pill.is-cooling, .table-pill.is-cooling,
.pulse-btn.small.is-cooling, .state-text.is-cooling {
  background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.22); color: #d7dee8;
}
.pulse-pill.is-mixed,   .pulse-pill.is-neutral,
.table-pill.is-mixed,   .table-pill.is-neutral,
.pulse-btn.small.is-mixed, .pulse-btn.small.is-neutral,
.state-text.is-mixed,   .state-text.is-neutral {
  background: rgba(84,140,255,.10); border-color: rgba(84,140,255,.24); color: #7ea6ff;
}

/* Neutral gets an amber tint to distinguish from blue mixed */
.pulse-pill.is-neutral,
.state-text.is-neutral,
.table-pill.is-neutral,
.pulse-btn.small.is-neutral {
  background: rgba(255,193,7,.10);
  border-color: rgba(255,193,7,.22);
  color: #ffe39a;
}

/* ═══════════════════════════════════════════════════════════
   DECISION CHIPS  (v2 — replaces old .pulse-label-stack)
   4 chips: Setup · Action · Timing · Gate
   ═══════════════════════════════════════════════════════════ */

.decision-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin: 0 0 16px;
}

@media (max-width: 700px) {
  .decision-chip-grid { grid-template-columns: 1fr; }
}

.decision-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  color: #eef4ff;
  cursor: help;
  font: inherit;
  text-align: left;
  transition: border-color .15s, background .15s, transform .12s;
}

.decision-chip:hover {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}
.decision-chip:focus-visible {
  outline: 2px solid rgba(84,140,255,.55);
  outline-offset: 2px;
}

/* Tone variants for chips */
.decision-chip.is-bullish {
  border-color: rgba(0,230,168,.22);
  background: rgba(0,230,168,.06);
}
.decision-chip.is-bullish .chip-label { color: #7fffd4; }

.decision-chip.is-bearish {
  border-color: rgba(255,92,121,.22);
  background: rgba(255,92,121,.06);
}
.decision-chip.is-bearish .chip-label { color: #ffb4c4; }

.decision-chip.is-neutral {
  border-color: rgba(255,193,7,.2);
  background: rgba(255,193,7,.05);
}
.decision-chip.is-neutral .chip-label { color: #ffe39a; }

.decision-chip.is-mixed {
  border-color: rgba(84,140,255,.22);
  background: rgba(84,140,255,.06);
}
.decision-chip.is-mixed .chip-label { color: #9ec4ff; }

.decision-chip.is-cooling {
  border-color: rgba(148,163,184,.18);
  background: rgba(148,163,184,.05);
}
.decision-chip.is-cooling .chip-label { color: #c8d4e4; }

/* Chip inner layout */
.chip-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.chip-prefix {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sw-muted);
  line-height: 1;
}

.chip-label {
  font-size: 13px;
  font-weight: 700;
  color: #eef4ff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Info icon */
.chip-info-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(180,200,240,.7);
  transition: border-color .12s, color .12s;
}
.decision-chip:hover .chip-info-icon {
  border-color: rgba(255,255,255,.3);
  color: #dce7ff;
}

/* Tooltip */
.chip-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 50;
  width: min(300px, 80vw);
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(10,16,30,.97);
  backdrop-filter: blur(12px);
  color: #d4e2ff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 16px 40px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.04);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity .16s ease, transform .16s ease;
  /* Prevent clipping inside the card */
  white-space: normal;
}

/* Right-align tooltip on chips in the right column */
.decision-chip-grid > .decision-chip:nth-child(even) .chip-tooltip {
  left: auto;
  right: 0;
}

.decision-chip:hover .chip-tooltip,
.decision-chip:focus-visible .chip-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ── Suppress old duplicate pill system ─────────────────── */
/* These were the old overlapping labels — killed in v2.     */
.pulse-label-stack   { display: none !important; }
.pulse-label-chip    { display: none !important; }
.pulse-chip-tooltip  { display: none !important; }
.pulse-chip-info     { display: none !important; }

/* ── Metrics row ─────────────────────────────────────────── */
.pulse-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin: 16px 0;
}
.metric {
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
}
.metric-k  { font-size: 10.5px; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.metric-v  { margin-top: 8px; font-size: 26px; color: #fff; font-weight: 950; line-height: 1; }
.metric-v.pos { color: #63f0c1; }
.metric-v.neg { color: #ff8ba2; }
.metric-mini  { font-size: 12px; color: var(--sw-muted); }
.metric-s     { margin-top: 6px; font-size: 12px; color: #9db4e8; font-weight: 700; }

/* ── Plain-english summary line ──────────────────────────── */
.plain-english-line {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #eaf1ff;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.plain-english-line.is-bullish { border-color: rgba(0,230,168,.22); background: rgba(0,230,168,.07); }
.plain-english-line.is-bearish { border-color: rgba(255,77,109,.22); background: rgba(255,77,109,.07); }
.plain-english-line.secondary  { background: rgba(255,255,255,.03); border-style: dashed; }
.plain-english-line.secondary strong { color: #9fe0ff; }

/* ── Section labels ──────────────────────────────────────── */
.premium-section-title {
  margin: 20px 0 10px;
  color: #9eb4e7;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

/* ─────────────────────────────────────────────────────────────
   EXECUTION PLAN CARD  (v2 — clean premium decision card)
   Replaces old .execution-plan-card / .execution-grid / .ai-box
   ───────────────────────────────────────────────────────────── */

.exec-plan-card {
  margin: 16px 0 4px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(84,140,255,.18);
  background: linear-gradient(160deg, rgba(18,28,55,.92) 0%, rgba(10,16,36,.96) 100%);
  box-shadow: 0 4px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
}

/* Header: title + status badge */
.exec-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.exec-plan-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7ea6ff;
}

.exec-status-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.exec-status-trade   { background: rgba(0,230,168,.12); border-color: rgba(0,230,168,.3);  color: #7fffd4; }
.exec-status-prepare { background: rgba(255,193,7,.10); border-color: rgba(255,193,7,.28); color: #ffe39a; }
.exec-status-watch   { background: rgba(84,140,255,.12); border-color: rgba(84,140,255,.28); color: #9ec4ff; }
.exec-status-wait    { background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.22); color: #c8d4e4; }

/* Meta row: Bias · Risk Frame · Entry Type */
.exec-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 10px;
  margin-bottom: 18px;
}

.exec-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}

.exec-meta-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sw-muted);
  line-height: 1;
}

.exec-meta-value {
  font-size: 14px;
  font-weight: 800;
  color: #dce8ff;
  line-height: 1.2;
}

/* Bias colours */
.exec-bias-bull { color: #7fffd4; }
.exec-bias-bear { color: #ffb4c4; }
.exec-bias-neut { color: #c8d4e4; }

/* Trigger / Confirmation / Invalidation sections */
.exec-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.exec-section:last-child { border-bottom: none; padding-bottom: 0; }

.exec-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7ea6ff;
  margin-bottom: 8px;
  line-height: 1;
}
.exec-section-label svg { flex: 0 0 auto; color: #7ea6ff; opacity: .8; }

.exec-section-risk .exec-section-label { color: #ff9eb5; }
.exec-section-risk .exec-section-label svg { color: #ff9eb5; }

.exec-section-body {
  font-size: 13px;
  color: #c8d8f4;
  line-height: 1.6;
}

.exec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: #c8d8f4;
  line-height: 1.55;
}
.exec-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(84,140,255,.55);
}

/* ── Signal breakdown bars ───────────────────────────────── */
.comp          { display: grid; gap: 10px; margin-top: 4px; }
.premium-comp  { margin-bottom: 4px; }
.comp-row      { display: grid; grid-template-columns: 100px 1fr 40px; gap: 10px; align-items: center; color: #dbe7ff; font-size: 13px; }
.bar           { height: 8px; background: rgba(255,255,255,.05); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); }
.bar > span    { display: block; height: 100%; background: linear-gradient(90deg, rgba(58,108,255,.65), rgba(0,230,168,.9)); border-radius: 999px; }

/* ── News snapshot grid ──────────────────────────────────── */
.news-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.news-snapshot-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
}
.snapshot-main { margin-top: 6px; font-size: 18px; font-weight: 900; color: #fff; line-height: 1.15; }
.snapshot-main.is-bullish { color: #7ff0c6; }
.snapshot-main.is-bearish { color: #ff93aa; }

/* ── Driver / headline cards ─────────────────────────────── */
.driver-list,
.headline-list { display: grid; gap: 8px; margin-top: 10px; }
.chip-list     { grid-template-columns: repeat(2, minmax(0,1fr)); }
.driver,
.headline {
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(15,24,43,.9);
  border: 1px solid rgba(255,255,255,.055);
  color: #e8edf8;
  font-size: 13.5px;
  line-height: 1.5;
}
.driver.emphasis { background: linear-gradient(180deg, rgba(40,76,170,.18), rgba(16,26,49,.92)); border-color: rgba(84,140,255,.16); }
.headline small  { display: block; color: var(--sw-muted); margin-top: 4px; font-size: 11.5px; }

.headline a { color: #eef4ff; text-decoration: none; display: block; line-height: 1.5; }
.headline a:hover { color: #9ed3ff; text-decoration: underline; }
.headline small a { display: inline; color: inherit; }

.headline-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mini-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.mini-tag.ghost      { color: #c9d8ff; }
.mini-tag.is-bullish { background: rgba(0,230,168,.10); border-color: rgba(0,230,168,.22); color: #94ffd5; }
.mini-tag.is-bearish { background: rgba(255,77,109,.10); border-color: rgba(255,77,109,.22); color: #ffb4c4; }
.mini-tag.is-mixed   { background: rgba(126,166,255,.10); border-color: rgba(126,166,255,.18); color: #dce8ff; }

/* ── AI side card ────────────────────────────────────────── */
.ai-premium-card     { position: relative; }
.premium-side-head   { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.scroll-list         { max-height: 340px; overflow-y: auto; padding-right: 4px; }
.narrative-list      { margin-top: 0; }

/* ── Trending Leaders ────────────────────────────────────── */
#pulse-trending-mount { display: block; width: 100%; }

.pulse-trending-card {
  padding: 22px 24px;
}

.pulse-trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pulse-trending-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9eb4e7;
}
.pulse-trending-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sw-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  padding: 3px 10px;
}

/*
  .pulse-trending-scroll IS the scroll container.
  position:sticky on <th> is scoped to this element only.
*/
.pulse-trending-scroll {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(8,13,25,.97);
}

.pulse-trending-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.pulse-trending-table th,
.pulse-trending-table td {
  padding: 11px 10px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.pulse-trending-table td { color: #e8edf8; background: transparent; }
.pulse-trending-table th {
  color: var(--sw-muted);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(9,16,30,.99);
  position: sticky;
  top: 0;
  z-index: 2;
}
.pulse-trending-table tbody tr:hover td { background: rgba(255,255,255,.028); }
.pulse-trending-table tbody tr:last-child td { border-bottom: none; }

.pulse-trending-table colgroup col:nth-child(1) { width: 90px; }
.pulse-trending-table colgroup col:nth-child(2) { width: 70px; }
.pulse-trending-table colgroup col:nth-child(3) { width: 68px; }
.pulse-trending-table colgroup col:nth-child(4) { width: 96px; }
.pulse-trending-table colgroup col:nth-child(5) { width: 84px; }
.pulse-trending-table colgroup col:nth-child(6) { width: auto; }

.table-pill {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.09);
  font-size: 12px;
  font-weight: 800;
}
.state-text {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.09);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* Colour helpers */
.pos { color: #63f0c1; }
.neg { color: #ff8ba2; }

/* Legacy .pulse-table — permanently disabled */
.pulse-table { display: none !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pulse-grid                { grid-template-columns: 1fr; }
  .pulse-meta                { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chip-list                 { grid-template-columns: 1fr; }
  .pulse-topbar              { grid-template-columns: 1fr; }
  .news-snapshot-grid        { grid-template-columns: 1fr; }
  .exec-meta-row             { grid-template-columns: 1fr 1fr; }
  .exec-meta-cell.exec-meta-wide { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .pulse-shell               { padding: 12px 12px 36px; }
  .pulse-meta                { grid-template-columns: 1fr; }
  .pulse-hotlist             { width: 100%; }
  .pulse-actions             { width: 100%; }
  .pulse-input               { min-width: 0; flex: 1; }
  .pulse-title               { font-size: 26px; }
  .pulse-sym                 { font-size: 32px; }
  .pulse-score               { font-size: 44px; }
  .chip-list                 { grid-template-columns: 1fr; }
  .decision-chip-grid        { grid-template-columns: 1fr; }
  .exec-meta-row             { grid-template-columns: 1fr; }
  .exec-meta-cell.exec-meta-wide { grid-column: auto; }
  .news-snapshot-grid        { grid-template-columns: 1fr; }
}
