/* Shared Insights ticker (ISD navy). Used on insights/index.html and the home hero strip.
   Item copy lives in insights/ticker.json; run sync-ticker.py after changing it.
   Weekend ticker conventions (Captain 2 Nov 2026): full-bleed, identical passes,
   seamless loop, pause on hover and keyboard focus, no motion when reduced.
   No gap above the Insights strip (Captain 2 Nov 2026): the Reference guides row ends flush on the ticker. */
.evergreen--ticker { padding-bottom: 0; border-bottom: 0; }


.wticker {
  --navy-alt: #01405c;
  position: relative;
  background: var(--navy, #015478);
  color: #fff;
  border-top: 1px solid var(--navy-alt);
  border-bottom: 1px solid var(--navy-alt);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
}

.wticker::before,
.wticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 1;
  pointer-events: none;
}

.wticker::before { left: 0; background: linear-gradient(to right, var(--navy, #015478), rgba(1, 84, 120, 0)); }
.wticker::after { right: 0; background: linear-gradient(to left, var(--navy, #015478), rgba(1, 84, 120, 0)); }

/* Insights strip only. Home already has padding-left: 1.25rem and remains readable. */
.wticker:not(.wticker--home) {
  padding-left: 48px; /* match .wticker::before width */
}

.wticker-track {
  display: flex;
  width: max-content;
  animation: wticker-scroll var(--wticker-duration, 80s) linear infinite;
}

.wticker:hover .wticker-track,
.wticker:focus-within .wticker-track { animation-play-state: paused; }

.wticker-list { display: flex; flex-shrink: 0; margin: 0; padding: 0; list-style: none; }
.wticker-list li { display: flex; align-items: center; white-space: nowrap; padding: 11px 0; }
.wticker-list li::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 2rem;
}

.wticker a { color: #fff; }
.wticker a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.wticker a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }

.wticker-label { font-weight: 700; color: #a9dcf2; letter-spacing: 0.02em; margin-right: 0.4em; }
.wticker-list li.wticker-head::after { display: none; }

.wticker .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes wticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(var(--wticker-shift, -50%)); }
}

@media (max-width: 600px) {
  .wticker { font-size: 14px; }
  .wticker-list li::after { margin: 0 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wticker::before,
  .wticker::after { display: none; }
  .wticker:not(.wticker--home) { padding-left: 0; }
  .wticker-track {
    animation: none;
    width: auto;
    padding: 10px max(1.5rem, calc((100% - var(--max, 1200px)) / 2));
  }
  .wticker-list { flex-wrap: wrap; flex-shrink: 1; row-gap: 4px; }
  .wticker-list li { white-space: normal; padding: 2px 0; }
  .wticker-list li.wticker-head { flex-basis: 100%; }
  .wticker-list li:last-child::after { display: none; }
  .wticker-list[aria-hidden="true"] { display: none; }
}

/* Home hero: sits on the finger-pressing Artlist loop, not during the Adrian intro.
   Hidden with .intro-deferred until the intro hands off; omitted entirely when empty. */
.wticker--home {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  border-bottom: 0;
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.28);
}
/* Do not run the loop while the strip is still hidden during the Adrian intro,
   otherwise it can fade in mid-sentence. Playback starts at the label once revealed. */
.wticker--home:not(.is-revealed) .wticker-track {
  animation-play-state: paused;
}

.hero:has(#home-insights-ticker.is-revealed) .sound-chip,
.hero:has(#home-insights-ticker.is-revealed) .replay-chip {
  bottom: calc(1.25rem + 3rem);
}

@media (prefers-reduced-motion: reduce) {
  .wticker--home .wticker-track { padding-right: 1.5rem; padding-bottom: 6px; }
}
