/* =============================================================
   CYCLEIQ — styles.css
   Tailwind (CDN) handles layout utilities.
   This file owns: glass cards, gauge, sparkline wrappers,
   filter buttons, bull/bear color system, animations,
   confluence meter, scrollbar, and every hover effect.
   ============================================================= */


/* ─────────────────────────────────────────────────────────────
   BASE
───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }


/* ─────────────────────────────────────────────────────────────
   BACKGROUND — subtle grid pattern
───────────────────────────────────────────────────────────── */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 44px 44px;
}


/* ─────────────────────────────────────────────────────────────
   GLASSMORPHIC CARD
───────────────────────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    transform      0.25s ease,
    background     0.25s ease,
    border-color   0.25s ease,
    box-shadow     0.25s ease;
}

/* Base hover — lift + brighten */
.glass-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

/* ── Colored glow on hover per signal status ── */
.glass-card.bull-glow:hover {
  box-shadow:
    0 24px 48px rgba(16, 185, 129, 0.14),
    0 0 0 1px rgba(16, 185, 129, 0.20);
  border-color: rgba(16, 185, 129, 0.28);
}

.glass-card.bear-glow:hover {
  box-shadow:
    0 24px 48px rgba(244, 63, 94, 0.14),
    0 0 0 1px rgba(244, 63, 94, 0.20);
  border-color: rgba(244, 63, 94, 0.28);
}

.glass-card.neutral-glow:hover {
  box-shadow:
    0 24px 48px rgba(245, 158, 11, 0.14),
    0 0 0 1px rgba(245, 158, 11, 0.20);
  border-color: rgba(245, 158, 11, 0.28);
}

/* ── Top-border accent by status ── */
.card-accent-bull    { border-top: 2px solid rgba(16,  185, 129, 0.55); }
.card-accent-bear    { border-top: 2px solid rgba(244,  63,  94, 0.55); }
.card-accent-neutral { border-top: 2px solid rgba(245, 158,  11, 0.55); }


/* ─────────────────────────────────────────────────────────────
   UNAVAILABLE SIGNAL CARDS
   Cards where isLive === false are faded and excluded from
   all scoring, confidence, verdict, and snapshot calculations.
───────────────────────────────────────────────────────────── */
.card-mock {
  opacity: 0.68;
  filter: saturate(0.50);
}

.card-mock:hover {
  opacity: 0.90;
  filter: saturate(0.75);
}

.mock-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  background: rgba(71, 85, 105, 0.10);
  border: 1px solid rgba(71, 85, 105, 0.22);
  border-radius: 9999px;
  padding: 1px 6px;
  line-height: 1.4;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   STATUS BADGE  (pill chips inside signal cards)
───────────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-bull {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.status-bear {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.status-neutral {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.28);
}


/* ─────────────────────────────────────────────────────────────
   BULL / BEAR SCORE PROGRESS BAR
───────────────────────────────────────────────────────────── */
.bull-bar {
  height: 3px;
  border-radius: 9999px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.bull-bar-bull    { background: linear-gradient(90deg, #059669, #10b981); }
.bull-bar-neutral { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bull-bar-bear    { background: linear-gradient(90deg, #be123c, #f43f5e); }


/* ─────────────────────────────────────────────────────────────
   CATEGORY FILTER BUTTONS
───────────────────────────────────────────────────────────── */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #64748b;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.filter-btn.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.30);
  color: #f59e0b;
}


/* ─────────────────────────────────────────────────────────────
   STATUS FILTER BOXES  (Bullish / Neutral / Bearish count cards)
───────────────────────────────────────────────────────────── */
.status-filter-btn {
  cursor: pointer;
  user-select: none;
  transition:
    background     0.2s ease,
    border-color   0.2s ease,
    box-shadow     0.2s ease,
    opacity        0.2s ease,
    transform      0.2s ease;
}

.status-filter-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Dim siblings when any box is active */
.status-filter-btn.status-filter-inactive {
  opacity: 0.38;
  transform: none !important;
}

.status-filter-btn.status-filter-active[data-status="bull"] {
  background:   rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.50) !important;
  box-shadow:   0 0 14px rgba(16, 185, 129, 0.22), 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.status-filter-btn.status-filter-active[data-status="neutral"] {
  background:   rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.50) !important;
  box-shadow:   0 0 14px rgba(245, 158, 11, 0.22), 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.status-filter-btn.status-filter-active[data-status="bear"] {
  background:   rgba(244, 63, 94, 0.18) !important;
  border-color: rgba(244, 63, 94, 0.50) !important;
  box-shadow:   0 0 14px rgba(244, 63, 94,  0.22), 0 0 0 1px rgba(244, 63, 94,  0.35);
}

/* Show clear button as flex when not hidden */
#status-clear-btn:not(.hidden) {
  display: inline-flex;
}


/* ─────────────────────────────────────────────────────────────
   WHY THIS SCORE — driver contribution rows
───────────────────────────────────────────────────────────── */
.driver-section-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.driver-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.driver-val {
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Confidence Score horizontal bar ── */
.conf-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.conf-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

/* Subtle tick marks at 25 / 50 / 75 */
.conf-bar-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(25% - 0.5px),
    rgba(255,255,255,0.07) calc(25% - 0.5px),
    rgba(255,255,255,0.07) 25%
  );
  pointer-events: none;
  border-radius: 9999px;
}

.driver-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
}

.driver-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.driver-bar-bull { background: linear-gradient(90deg, #059669, #10b981); }
.driver-bar-bear { background: linear-gradient(90deg, #be123c, #f43f5e); }

.driver-name {
  font-size: 10px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  flex-shrink: 0;
}

.why-score-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 11px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────
   MARKET STRUCTURE — compact metric cards
───────────────────────────────────────────────────────────── */
.structure-metric-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.structure-metric-card:hover {
  transform: translateY(-2px);
}


/* ─────────────────────────────────────────────────────────────
   CONFLUENCE GAUGE  (semi-circle Chart.js doughnut)
───────────────────────────────────────────────────────────── */
.gauge-wrapper {
  position: relative;
  width: 340px;
  height: 188px;
  margin: 0 auto;
}

/* Ambient glow behind the gauge — color driven by JS via --gauge-glow */
.gauge-wrapper::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 55%;
  background: radial-gradient(ellipse at center, var(--gauge-glow, rgba(245,158,11,0.09)) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}

/* Gauge canvas sits above the glow */
#confluence-gauge {
  position: relative;
  z-index: 1;
}

/* Score + label text floated inside the gauge hollow */
.gauge-center-text {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}


/* ─────────────────────────────────────────────────────────────
   CONFLUENCE BREAKDOWN — signal strength bubbles
───────────────────────────────────────────────────────────── */
.signal-bubble {
  flex-shrink: 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.signal-bubble:hover {
  transform: scale(1.16);
  filter: brightness(1.5);
}

@keyframes bubble-pulse {
  0%, 100% { filter: brightness(1);    }
  50%       { filter: brightness(1.40); }
}

.signal-bubble-top {
  animation: bubble-pulse 2.6s ease-in-out infinite;
}

/* Kill pulse on hover so scale takes over cleanly */
.signal-bubble-top:hover {
  animation: none;
  transform: scale(1.16);
  filter: brightness(1.5);
}

/* ── Per-bubble hover tooltip ── */
.bubble-tip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: 148px;
  padding: 8px 11px;
  background: rgba(7, 7, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease;
  z-index: 70;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
}

.signal-bubble:hover .bubble-tip {
  opacity: 1;
}

.bubble-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.bubble-tip-val {
  display: block;
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.bubble-tip-ctx {
  display: block;
  font-size: 10px;
  color: #475569;
  font-family: 'Inter', sans-serif;
  line-height: 1.45;
}


/* ─────────────────────────────────────────────────────────────
   TOOLTIP — "Strongest Signals" dotted-underline trigger
───────────────────────────────────────────────────────────── */
.tooltip-anchor {
  position: relative;
  display: inline-block;
}

/* Dotted underline is the only hover hint — clean, no icon */
.strongest-label {
  cursor: help;
  text-decoration: underline dotted rgba(100, 116, 139, 0.38);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.strongest-label:hover {
  color: #94a3b8;
  text-decoration-color: rgba(148, 163, 184, 0.55);
}

.tooltip-box {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 196px;
  padding: 11px 13px;
  background: rgba(7, 7, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  color: #64748b;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
  z-index: 60;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

.tooltip-box strong { color: #cbd5e1; font-weight: 600; }

/* Colour-coded score labels inside the tooltip */
.tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 10.5px;
}

.tip-bull    { color: #10b981; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.tip-bear    { color: #f43f5e; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.tip-neutral { color: #94a3b8; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.tip-divider {
  display: block;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 7px 0;
}

/* Downward arrow */
.tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 18px;
  border: 5px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.tooltip-anchor:hover .tooltip-box {
  opacity: 1;
}


/* ─────────────────────────────────────────────────────────────
   SPARKLINE WRAPPER  (chart canvas container inside each card)
───────────────────────────────────────────────────────────── */
.sparkline-wrapper {
  position: relative;
  width: 100%;
  height: 64px;
}

/* Force canvas to fill wrapper so Chart.js responsive sizing works */
.sparkline-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}


/* ─────────────────────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────────────────────── */

/* Pulsing live indicator dot in header */
@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.3; transform: scale(0.72); }
}
.live-dot {
  animation: pulse-dot 2.2s ease-in-out infinite;
}

/* Rotating refresh icon */
@keyframes spin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}
.spinning {
  animation: spin 0.75s linear infinite;
}

/* Card entrance — staggered fade-up (delay applied inline) */
@keyframes card-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.card-animate {
  opacity: 0;                          /* hidden until animation fires */
  animation: card-in 0.45s ease forwards;
}

/* Value flash when data refreshes */
@keyframes flash-bull {
  0%   { color: inherit; }
  28%  { color: #10b981; }
  100% { color: inherit; }
}
@keyframes flash-bear {
  0%   { color: inherit; }
  28%  { color: #f43f5e; }
  100% { color: inherit; }
}
.flash-bull { animation: flash-bull 1s ease; }
.flash-bear { animation: flash-bear 1s ease; }

/* Optional countdown progress bar (for auto-refresh) */
@keyframes countdown {
  from { width: 100%; }
  to   { width: 0%;   }
}
.countdown-bar {
  height: 2px;
  background: rgba(245, 158, 11, 0.5);
  border-radius: 9999px;
}


/* ─────────────────────────────────────────────────────────────
   HEADER TOGGLE BUTTONS
───────────────────────────────────────────────────────────── */

/* Live Only — active (emerald tint) */
#live-only-btn.active {
  background:   rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.30);
  color:        #10b981;
}
#live-only-btn.active i {
  color: #10b981;
}

/* Export — spinner state */
#export-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   LIVE DATA BADGE  (appears in card title when API call succeeded)
───────────────────────────────────────────────────────────── */
@keyframes live-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.45); opacity: 1;    }
  55%       { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);    opacity: 0.80; }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  padding: 1px 6px;
  line-height: 1.4;
  vertical-align: middle;
  flex-shrink: 0;
  animation: live-badge-pulse 2.6s ease-out infinite;
}

/* ─────────────────────────────────────────────────────────────
   GAUGE LOADING STATE
───────────────────────────────────────────────────────────── */
#confluence-gauge {
  transition: opacity 0.35s ease;
}

/* Loading pulse for the confluence label during API fetch */
@keyframes loading-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.loading-pulse {
  animation: loading-pulse 1.1s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────
   SCROLLBAR-HIDE  (used on horizontal filter bar on mobile)
───────────────────────────────────────────────────────────── */
.scrollbar-hide                        { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar     { display: none; }

/* ─────────────────────────────────────────────────────────────
   MOBILE CARD IMPROVEMENTS
───────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  /* Tighter gap between cards on small phones */
  #signals-grid { gap: 12px; }

  /* Slightly shorter sparklines to save vertical space */
  .sparkline-wrapper { height: 54px; }

  /* Filter buttons: don't shrink below comfortable tap size */
  .filter-btn { flex-shrink: 0; }
}

/* ─────────────────────────────────────────────────────────────
   CUSTOM SCROLLBAR
───────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: #07070f; }
::-webkit-scrollbar-thumb        { background: rgba(255, 255, 255, 0.09); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(255, 255, 255, 0.20); }


/* ─────────────────────────────────────────────────────────────
   EMAIL CAPTURE
───────────────────────────────────────────────────────────── */
.subscribe-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.subscribe-input::placeholder { color: #475569; }
.subscribe-input:focus {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #07070f;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.subscribe-btn:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}
.subscribe-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}


/* ─────────────────────────────────────────────────────────────
   SIGNAL INTELLIGENCE PANEL
───────────────────────────────────────────────────────────── */

/* Cards are clickable */
[data-signal-id] { cursor: pointer; }

/* Backdrop */
.sip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.30s ease, backdrop-filter 0.30s ease;
}
.sip-backdrop.sip-open {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: all;
}

/* Panel — desktop: right drawer */
.sip-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  z-index: 201;
  display: flex;
  flex-direction: column;
  background: rgba(7, 7, 18, 0.99);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(102%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.sip-panel.sip-open { transform: translateX(0); }

/* Panel — mobile: bottom sheet */
@media (max-width: 640px) {
  .sip-panel {
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 84vh;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px 18px 0 0;
    transform: translateY(102%);
  }
  .sip-panel.sip-open { transform: translateY(0); }
}

/* Inner layout */
.sip-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header */
.sip-header {
  flex-shrink: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
.sip-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sip-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.sip-category-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 9999px;
  padding: 2px 8px;
  line-height: 1.5;
}
.sip-live-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  padding: 2px 8px;
  line-height: 1.5;
}
.sip-unavailable-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  background: rgba(71, 85, 105, 0.10);
  border: 1px solid rgba(71, 85, 105, 0.22);
  border-radius: 9999px;
  padding: 2px 8px;
  line-height: 1.5;
}
.sip-title {
  font-size: 19px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
.sip-close-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 12px;
}
.sip-close-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #94a3b8;
}

/* Scrollable content */
.sip-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 28px;
  overscroll-behavior: contain;
}

/* Content sections */
.sip-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.sip-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #334155;
  margin-bottom: 8px;
}
.sip-text {
  font-size: 13px;
  line-height: 1.70;
  color: #64748b;
  margin: 0;
}
.sip-interpretation {
  color: #94a3b8;
}

/* Source row */
.sip-footer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 4px;
}
.sip-source-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1e293b;
}
.sip-source-value {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #334155;
}
