/* Markets strip at the foot of the hero: market names, plus STARTRADER prices once js/ticker.js has data.
   Without data the names show alone. Keyframes marquee and strip-in live in hero.css. */
.markets {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: stretch;
  border-top: 1px solid rgba(224, 182, 70, .16); background: rgba(14, 16, 15, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: strip-in .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--t0) + .9s);
}
.mq-label {
  flex: none; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 24px;
  border-right: 1px solid rgba(224, 182, 70, .16); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.mq-status { display: flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.mq-status:empty { display: none; }
.markets.is-live .mq-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6fd39a; box-shadow: 0 0 0 3px rgba(111, 211, 154, .2); }
.mq-win { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.markets:hover .mq { animation-play-state: paused; }
.mq ul { display: flex; flex: none; }
.mq li { display: flex; align-items: baseline; gap: 12px; padding: 15px 30px 15px 0; white-space: nowrap; }
.mq li::after { content: ""; align-self: center; width: 7px; height: 7px; margin-left: 18px; transform: rotate(45deg); background: var(--gold); opacity: .7; }
.mq b { font: 600 28px/1 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px rgba(224, 182, 70, .7); }
.mq li:nth-child(odd) b { color: var(--gold); -webkit-text-stroke: 0; }
.mq .px { font: 600 18px/1 'Public Sans', sans-serif; font-variant-numeric: tabular-nums; color: var(--text); padding: 3px 5px; border-radius: 4px; }
.mq .chg { font: 700 12.5px/1 'Public Sans', sans-serif; font-variant-numeric: tabular-nums; }
.mq .chg.up { color: #6fd39a; }
.mq .chg.down { color: #f07a6a; }
.mq .chg.up::before { content: "\25B2  " / ""; }
.mq .chg.down::before { content: "\25BC  " / ""; }
.mq .px:empty, .mq .chg:empty { display: none; }

/* an open market stands out: pulsing dot, bright price, tinted change pill; a closed one fades back */
.mq li.open::before {
  content: ""; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: #6fd39a; flex: none;
  animation: live-dot 1.8s ease-out infinite;
}
.mq li.open .px { color: #fff; text-shadow: 0 0 14px rgba(255, 255, 255, .28); }
.mq li.open .chg { padding: 4px 8px; border-radius: 999px; }
.mq li.open .chg.up { background: rgba(111, 211, 154, .16); }
.mq li.open .chg.down { background: rgba(240, 122, 106, .16); }
.mq li.closed .px, .mq li.closed .chg { opacity: .45; }
.mq li.closed .chg::after { content: "  \00B7  closed"; color: var(--muted); }
@keyframes live-dot { 0% { box-shadow: 0 0 0 0 rgba(111, 211, 154, .7); } 100% { box-shadow: 0 0 0 9px rgba(111, 211, 154, 0); } }

/* docked copy, placed by js/ticker.js: .top under the header once the hero's strip has scrolled away; .bottom at the
   foot of the screen while the hero is viewed but its strip is below the fold. Hidden copies sit just past their edge. */
.markets.dock {
  position: fixed; z-index: 40; animation: none; opacity: 0; pointer-events: none; transition: transform .35s ease, opacity .35s ease;
  background: rgba(14, 16, 15, .92); top: 68px; bottom: auto; transform: translateY(-110%);
}
.markets.dock.top { border-top: 0; border-bottom: 1px solid rgba(224, 182, 70, .22); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.markets.dock.bottom {
  top: auto; bottom: 0; transform: translateY(110%); padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid rgba(224, 182, 70, .22); box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}
.markets.dock.on { opacity: 1; transform: none; pointer-events: auto; }
.markets.dock .mq-label { padding: 0 18px; font-size: 10.5px; gap: 4px; }
.markets.dock .mq-status { font-size: 9.5px; }
.markets.dock li { padding: 9px 26px 9px 0; }
.markets.dock b { font-size: 19px; }
.markets.dock .px { font-size: 15px; }
html.has-dock { scroll-padding-top: 130px; }
@media (prefers-reduced-motion: reduce) {
  .markets.dock { transition: none; }
  .markets.dock .mq, .mq li.open::before { animation: none !important; }
}
.mq .px.tick-up { animation: tick-up .9s ease-out; }
.mq .px.tick-down { animation: tick-down .9s ease-out; }
@keyframes tick-up { from { background: rgba(111, 211, 154, .32); } }
@keyframes tick-down { from { background: rgba(240, 122, 106, .32); } }
@media (max-width: 480px) {
  .mq-label { display: none; }
  .mq b { font-size: 21px; }
  .mq .px { font-size: 15px; }
  .mq li { gap: 9px; padding: 12px 22px 12px 0; }
  .mq li::after { margin-left: 12px; }
}
