/* ticker.css — 22 Oct (Ali): the promo ticker above the nav ("Save 45% on Strix and Express evaluations ·
   Ends soon · Code OCTOBER", scrolling). Hidden until api.js applyPromo() confirms a live promo, then
   body.has-ticker pushes the fixed nav and the page down by --ticker-h. Colours are the site's own: the
   deep navy of the hero panel, white copy, the brand blue for the dots and the code pill.
   29 Oct (Sanjana): white bar, slate copy, blue figures, lavender code pill, to match the pages. */
:root {
  --ticker-h: 0px;
}
body.has-ticker {
  --ticker-h: 38px;
  padding-top: var(--ticker-h);
}
body.has-ticker .navwrap {
  top: calc(env(safe-area-inset-top, 0px) + var(--staging-bar-h, 0px) + var(--ticker-h));
}
/* 7 Nov (Ali, D4): on the Staging Box staging.js adds html.is-staging and --staging-bar-h: 24px, and
   the orange bar takes the top 24px; the page, the ticker and the nav all start below it. Off the
   Staging Box neither is set and nothing here applies. */
html.is-staging body {
  padding-top: calc(var(--ticker-h, 0px) + var(--staging-bar-h, 0px));
}
.ticker {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--staging-bar-h, 0px));
  left: 0;
  right: 0;
  z-index: 61; /* above .navwrap (60) */
  height: var(--ticker-h, 38px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #fff;
  color: var(--ink-2, #55598a);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-d, #dcdff5);
  box-shadow: 0 6px 24px -14px rgba(12, 15, 44, 0.25);
}
.ticker[hidden] {
  display: none;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-roll 38s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker__track,
.ticker:focus-visible .ticker__track {
  animation-play-state: paused;
}
.ticker:focus-visible {
  outline: 2px solid var(--blue, #2b2bf5);
  outline-offset: -3px;
}
.ticker__set {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.ticker__txt b,
.ticker__code b {
  color: var(--blue, #2b2bf5);
  font-weight: 800;
}
.ticker__set > i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 22px;
  border-radius: 50%;
  background: #4d6bff;
}
.ticker__code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid #d6d9ff;
  background: var(--lav, #eef0ff);
  color: var(--ink, #0c0f2c);
}
.ticker__code b {
  letter-spacing: 0.12em;
}
@keyframes ticker-roll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); } /* three identical sets: one set's width per cycle */
}
@media (max-width: 768px) {
  body.has-ticker {
    --ticker-h: 36px;
  }
  .ticker {
    font-size: 14px; /* phone minimum (M-00) */
    letter-spacing: 0.06em;
  }
  .ticker__set > i {
    margin: 0 16px;
  }
  .ticker__track {
    animation-duration: 26s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
    width: 100%;
    justify-content: center;
  }
  .ticker__set:nth-child(n + 2) {
    display: none;
  }
  .ticker__set > i:last-child {
    display: none;
  }
}
/* the desktop promo card docks 24px under the nav (home.css); move it down with the nav */
@media (min-width: 961px) {
  body.has-ticker .promo {
    top: calc(var(--staging-bar-h, 0px) + var(--ticker-h) + var(--nav-h, 60px) + 24px + 24px);
  }
}

/* ---------- 29 Oct (Sanjana): the ticker in brand blue, no navy ----------
   The strip is the site blue with white copy; the dots and the code pill go white-on-blue. Same
   markup and behaviour; these rules sit last and only recolour. */
.ticker {
  background: var(--blue, #2b2bf5);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 24px -12px rgba(43, 43, 245, 0.55);
}
.ticker__txt b,
.ticker__code b {
  color: #fff;
}
.ticker__set > i {
  background: rgba(255, 255, 255, 0.7);
}
.ticker__code {
  border-color: rgba(255, 255, 255, 0.35);
  background: #fff;
  color: var(--blue, #2b2bf5);
}
.ticker__code b {
  color: var(--blue, #2b2bf5);
}
.ticker:focus-visible {
  outline-color: #fff;
}
