/* ============================================================
   UMBRA · Shared live chrome (topstrip, ticker, pulse)
   Inject by placing:
     <div data-umbra-topstrip></div>
     <div data-umbra-ticker></div>
   then including umbra-live.js.
   Pages must also offset their fixed nav by 28px (topstrip height).
   ============================================================ */

:root {
  --um-teal: var(--umbra-teal, #2ECDA7);
  --um-teal-glow: var(--umbra-teal-glow, rgba(46, 205, 167, 0.28));
  --um-gold: var(--umbra-gold, #E8B854);
  --um-bg-deep: var(--bg-deep, #06080D);
  --um-bg-near: var(--bg-near-black, #0A0E17);
  --um-border-soft: var(--border-soft, rgba(255,255,255,0.06));
  --um-rule: var(--rule, rgba(255,255,255,0.05));
  --um-text: var(--text, #E8EBF0);
  --um-text-dim: var(--text-dim, #9AA4B4);
  --um-text-faint: var(--text-faint, #5A6478);
  --um-mono: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
}

@keyframes um-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.3); }
}

@keyframes um-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Top strip ---------- */
.um-topstrip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: var(--um-bg-deep);
  border-bottom: 1px solid var(--um-border-soft);
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--um-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--um-text-faint);
}
.um-topstrip .ts-group { display: flex; gap: 24px; align-items: center; }
.um-topstrip .ts-item  { display: flex; gap: 8px; align-items: center; }
.um-topstrip .ts-key   { color: var(--um-text-faint); }
.um-topstrip .ts-val   { color: var(--um-text-dim); }
.um-topstrip .ts-val.live { color: var(--um-teal); }
.um-topstrip .ts-dot {
  display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--um-teal);
  box-shadow: 0 0 8px var(--um-teal-glow);
  animation: um-pulse 2.5s ease-in-out infinite;
}
@media (max-width: 900px) {
  .um-topstrip .ts-hide-mobile { display: none; }
  .um-topstrip { padding: 0 14px; }
}

/* Offset body so content doesn't hide under the strip when page has no fixed nav */
body[data-umbra-strip-offset] { padding-top: 28px; }

/* ---------- Ticker strip ---------- */
.um-ticker-strip {
  border-top: 1px solid var(--um-border-soft);
  border-bottom: 1px solid var(--um-border-soft);
  background: var(--um-bg-deep);
  overflow: hidden;
  position: relative;
  z-index: 2;
  height: 42px;
  display: flex;
  align-items: center;
}
.um-ticker-strip::before,
.um-ticker-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.um-ticker-strip::before { left: 0;  background: linear-gradient(90deg, var(--um-bg-deep), transparent); }
.um-ticker-strip::after  { right: 0; background: linear-gradient(-90deg, var(--um-bg-deep), transparent); }

.um-ticker {
  display: inline-flex;
  white-space: nowrap;
  animation: um-ticker 80s linear infinite;
  font-family: var(--um-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--um-text-dim);
}
.um-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  border-right: 1px solid var(--um-rule);
}
.um-ticker-item .k      { color: var(--um-text-faint); }
.um-ticker-item .v      { color: var(--um-text); font-weight: 500; }
.um-ticker-item .v.up   { color: var(--um-teal); }
.um-ticker-item .v.gold { color: var(--um-gold); }

/* Respect motion preference */
@media (prefers-reduced-motion: reduce) {
  .um-ticker { animation: none; }
  .um-topstrip .ts-dot { animation: none; }
}

/* ---------- Live badge (page-specific dynamic) ---------- */
.um-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--um-border-soft);
  border-radius: 999px;
  background: rgba(46, 205, 167, 0.06);
  font-family: var(--um-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--um-text-dim);
}
.um-live-badge .lb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--um-teal);
  box-shadow: 0 0 8px var(--um-teal-glow);
  animation: um-pulse 2.5s ease-in-out infinite;
}
.um-live-badge .lb-val { color: var(--um-teal); font-weight: 500; }
.um-live-badge.is-closed .lb-dot { background: var(--um-text-faint); box-shadow: none; animation: none; }
.um-live-badge.is-closed .lb-val { color: var(--um-text-faint); }
