/* section_ticker — thin live-ticker divider strip.
   Scoped: .tkr- prefix only. Loaded from inside the section template. */

.tkr-strip {
  width: 100vw;
  margin-left: calc(50% - 50vw);   /* full-bleed out of the 920px column */
  height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font: 500 12.5px var(--mono);
  letter-spacing: -.01em;
  color: var(--fg);
  background: var(--bg);
}

/* The track holds two identical groups; translateX(-50%) loops seamlessly. */
.tkr-track {
  display: flex;
  align-items: center;
  flex: none;
  width: max-content;
  animation: tkr-scroll 45s linear infinite;
  will-change: transform;
}
.tkr-strip:hover .tkr-track { animation-play-state: paused; }

.tkr-group { display: flex; align-items: center; flex: none; }
.tkr-group-dup { user-select: none; }

/* Items are buttons in the first group, plain spans in the aria-hidden
   duplicate — both render identically so the halves stay the same width. */
.tkr-item {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
}
button.tkr-item:hover { background: rgba(38,38,34,.06); color: inherit; }
button.tkr-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: none; color: inherit; }
.tkr-item.tkr-active { background: rgba(23,107,74,.14); }

.tkr-icon { width: 14px; height: 14px; object-fit: contain; flex: none; position: relative; top: 1px; }
.tkr-sym { font-weight: 600; }
.tkr-px { padding: 1px 3px; border-radius: 4px; }
.tkr-chg.up { color: var(--up); }
.tkr-chg.down { color: var(--down); }

.tkr-sep { color: var(--accent); font-size: 8px; opacity: .6; margin: 0 4px; }

@keyframes tkr-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes tkr-flash-up   { 0% { background: rgba(61,139,95,.30); } 100% { background: transparent; } }
@keyframes tkr-flash-down { 0% { background: rgba(162,50,50,.24); } 100% { background: transparent; } }
.tkr-flash-up   { animation: tkr-flash-up .7s ease-out; }
.tkr-flash-down { animation: tkr-flash-down .7s ease-out; }

/* Reduced motion: no marquee — a static, wrap-enabled row instead. */
@media (prefers-reduced-motion: reduce) {
  .tkr-strip { height: auto; min-height: 44px; padding: 8px 12px; }
  .tkr-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 4px; }
  .tkr-group { flex-wrap: wrap; justify-content: center; }
  .tkr-group-dup { display: none; }
  .tkr-flash-up, .tkr-flash-down { animation: none; }
}
