/* ═══════════════════════════════════════════════════════════════
   PICK ON THE WIRE
   What Horses to Watch and Top Rated share for Pick (wire_picks.js):
   the burst of gold a pick throws, and the message that says why a pick
   did not go through. Each page's own look for its buttons, tallies and
   cards is in wire_watchlist.css and wire_top_rated.css.
   ═══════════════════════════════════════════════════════════════ */

/* A pick's burst: gold sparks thrown from the button (made and moved by
   the script, fixed to the screen so no card's edge clips them). */
.wire-spark {
  position: fixed;
  z-index: 50;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5e49a 0%, var(--wire-gold) 70%, #c8a020 100%);
  pointer-events: none;
}

/* Why a pick did not go through ("This race is off", the day's limit),
   read out, at the foot of the screen for five seconds. */
.wire-picks-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  max-width: min(480px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: var(--wire-body);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  text-align: center;
  color: var(--wire-paper);
  background: var(--wire-ink);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / 50%), inset 0 0 0 1px color-mix(in srgb, var(--wire-gold) 60%, transparent);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.wire-picks-toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Your next race (made by the script, under each page's tally, on its
   dark band): "YOUR NEXT Jet Bay · off in 23m", a live dot before it,
   green once the race is off. A way to the horse's card. */
.wire-picks-next {
  display: flex;
  flex: 1 0 100%;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: rgb(255 255 255 / 90%);
  text-decoration: none;
}
.wire-picks-next[hidden] {
  display: none;
}
.wire-picks-next::before {
  content: "";
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wire-gold);
}
.wire-picks-next.is-off::before {
  background: #3ccf7a;
}
.wire-picks-next b {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wire-gold);
}
.wire-picks-next:hover span,
.wire-picks-next:focus-visible span {
  text-decoration: underline;
}
.wire-picks-next:focus-visible {
  outline: 2px solid var(--wire-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .wire-picks-next::before {
    animation: wire-picks-live 1.8s ease-out infinite;
  }
}
@keyframes wire-picks-live {
  from { box-shadow: 0 0 0 0 rgb(212 175 55 / 70%); }
  to { box-shadow: 0 0 0 8px transparent; }
}


/* ── THE RACE-DAY HEAD ────────────────────────────────────────────
   The head of both pages as a race-day card: across the page, the
   floodlit field fading in on the right, the desk as a gold pill, the
   day as a stamp beside the title and in gold under it, Sly's words on
   a gold rule and his face in a gold ring. Markup: news/v2/article.html
   (wire.head) and the sandbox's two articles. */
.wire-art__head--sly {
  --sly-head-ink: #8c6e10;
  --sly-head-night: #030b16;
  position: relative;
  isolation: isolate;
  max-width: none;
  overflow: hidden;
  padding: 28px 32px 26px;
  border-radius: 18px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(212 175 55 / 18%), transparent 60%),
    linear-gradient(180deg, #fffdf7, #faf4e2);
  box-shadow:
    inset 0 0 0 1px rgb(212 175 55 / 38%),
    0 2px 6px rgb(17 21 31 / 5%),
    0 24px 44px -30px rgb(17 21 31 / 40%);
}
/* The field, fading in from behind the words. */
.wire-art__head--sly::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 48%;
  background: url("../img/field.7a9b0e4ada68.webp") 70% 40% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  opacity: 0.9;
}
/* A gold line along its foot. */
.wire-art__head--sly::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--wire-gold) 25%, #f5e49a 50%, var(--wire-gold) 75%, transparent);
}
.wire-art__head--sly .wire-art__kicker a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgb(212 175 55 / 16%);
  box-shadow: inset 0 0 0 1px rgb(212 175 55 / 45%);
  color: var(--sly-head-ink);
  letter-spacing: 0.08em;
}
/* The dot is ::after, put first: on phones ::before is the link's
   44px tap area (wire_article.css). */
.wire-art__head--sly .wire-art__kicker a::after {
  content: "";
  order: -1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wire-gold);
}
.wire-sly-head {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 660px;
  margin-top: 16px;
}
.wire-sly-head__day {
  display: grid;
  flex: none;
  place-items: center;
  width: 84px;
  padding: 10px 0 11px;
  border-radius: 14px;
  background: var(--sly-head-night);
  box-shadow: inset 0 0 0 1px rgb(212 175 55 / 55%), 0 14px 26px -16px rgb(3 11 22 / 70%);
  color: var(--wire-gold);
  font-size: 12px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wire-sly-head__day b {
  margin: 2px 0;
  color: #fff;
  font-family: var(--wire-display);
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}
.wire-art__head--sly .wire-art__title {
  margin-top: 0;
}
.wire-sly-head__date {
  display: block;
  margin-top: 10px;
  color: var(--sly-head-ink);
  font-family: var(--wire-body);
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* The title's dash is for readers that hear it, not the eye. */
.wire-sly-head__dash {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wire-art__head--sly .wire-art__deck {
  max-width: 600px;
  margin-top: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--wire-gold);
}
.wire-art__head--sly .wire-art__by {
  margin-top: 20px;
}
.wire-art__head--sly .wire-art__by img {
  width: 56px;
  height: 56px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wire-gold);
}

@media (max-width: 767px) {
  .wire-art__head--sly {
    padding: 20px 18px 22px;
    border-radius: 14px;
  }
  /* On a phone, the field stays a glow in the corner. */
  .wire-art__head--sly::before {
    width: 70%;
    opacity: 0.22;
  }
  .wire-sly-head {
    align-items: flex-start;
    gap: 14px;
  }
  .wire-sly-head__day {
    width: 62px;
    padding: 8px 0 9px;
    border-radius: 12px;
    font-size: 10px;
    line-height: 12px;
  }
  .wire-sly-head__day b {
    font-size: 28px;
  }
  .wire-art__head--sly .wire-art__title {
    font-size: 28px;
  }
  .wire-sly-head__date {
    margin-top: 6px;
    font-size: 12px;
    line-height: 16px;
  }
  .wire-art__head--sly .wire-art__deck {
    font-size: 17px;
    line-height: 25px;
  }
}
