/* The dashboard's live mode (ch. 16 E-26): the RIGHT NOW strip in THIS
   WEEK's seat, the Final Drive pill's live form and the header indicator's
   phone rule. Linked AFTER dashboard-leagues-modal.css (page.js); styles.css
   is on a ratchet that only goes down, so none of this lives there.

   Tokens only: --good helps, --bad hurts, --warn is a conflict, --muted the
   target. No new semantic color (ch. 03).

   The strip keeps THIS WEEK's element and box (#verdictStrip): same surface,
   radius and outer margin; only the inside changes. The guide-active selector
   beats styles.css's <=768 phone rule, which would otherwise make the strip a
   nowrap horizontal scroller. */
/* The strip keeps THIS WEEK's seat and box: same element (#verdictStrip),
   same surface, radius and outer margin. Only the inside changes. */
.verdict-strip.right-now,
body.guide-active .verdict-strip.right-now {
  display: block;
  padding: 8px 12px 4px;
  margin-bottom: 10px;
  overflow: visible;
}
/* E-25: every league hidden -> the box, and no strip. This file is linked
   after leagues-modal.css and the rule above ties with its hide rule, so the
   hide is restated here. */
.all-hidden-box ~ .verdict-strip.right-now {
  display: none;
}

.rn-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 24px;
  margin-bottom: 4px;
}
.rn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  align-self: center;
  flex: 0 0 auto;
  animation: rn-blink 1.5s ease-in-out infinite;
}
.right-now.lull .rn-dot {
  background: var(--faint);
  animation: none;
}
@keyframes rn-blink {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rn-dot {
    animation: none;
  }
}
.rn-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.rn-meta {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rn-meta b {
  color: var(--text);
  font-weight: 700;
}

/* --- Your leagues: one line each, in YOUR order (E-13, F-57) ------------ */
/* ONE control over the whole list (>= 44px by construction: >= 1 row of 30
   plus padding), opening the LEAGUES lens. */
.rn-leagues {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--border-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rn-leagues:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 4px;
}
.rn-league {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 2px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.8rem;
}
.rn-lname {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.rn-score {
  display: none; /* 768 and up: the pair beside the margin */
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rn-margin {
  flex: 0 0 auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rn-margin.up {
  color: var(--good);
}
.rn-margin.down {
  color: var(--bad);
}
.rn-margin.flat {
  color: var(--muted);
}
.rn-margin.won {
  color: var(--good);
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}
.rn-margin.lost {
  color: var(--bad);
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

/* --- On the field: points so far against what the board needs --------- */
.rn-players {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.rn-wide {
  display: none; /* 768 and up */
}
.rn-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  min-height: 44px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border-left: 3px solid var(--border);
  color: var(--text);
  text-decoration: none;
  align-content: center;
}
.rn-player.for {
  border-left-color: var(--good);
}
.rn-player.against {
  border-left-color: var(--bad);
}
.rn-player.target {
  border-left-color: var(--muted);
}
.rn-player.conflict {
  border-left-color: var(--warn);
}
.rn-pname {
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rn-target {
  font-weight: 800;
  font-size: 0.9rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rn-player.for .rn-target {
  color: var(--good);
}
.rn-player.against .rn-target {
  color: var(--bad);
}
.rn-sub {
  font-size: 0.7rem;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rn-call {
  font-weight: 800;
  letter-spacing: 0.05em;
}
.rn-player.for .rn-call {
  color: var(--good);
}
.rn-player.against .rn-call {
  color: var(--bad);
}
.rn-player.target .rn-call {
  color: var(--text);
}
.rn-flag {
  color: var(--warn);
  font-weight: 800;
  letter-spacing: 0.05em;
}
.rn-now {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rn-now b {
  color: var(--text);
}

.rn-empty {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.rn-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-top: 2px;
  padding: 0 4px;
  color: var(--accent-hi);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

/* How many rows each width shows. 320: three players (the first CONFLICTS
   card stays whole above the 720 fold, E-26). The foot names the TOTAL, so
   it reads the same at every width. */
.rn-players > li:nth-child(n + 4) {
  display: none;
}
.rn-leagues > .rn-league:nth-child(n + 4):not(.rn-lmore) {
  display: none;
}
.rn-lmore .rn-lname {
  color: var(--accent-hi);
  font-weight: 700;
}

@media (min-width: 768px) {
  .verdict-strip.right-now,
  body.guide-active .verdict-strip.right-now {
    padding: 10px 16px 6px;
  }
  .rn-score,
  .rn-wide {
    display: inline;
  }
  .rn-leagues {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    column-gap: 16px;
  }
  .rn-leagues > .rn-league:nth-child(n + 4) {
    display: flex;
  }
  .rn-leagues > .rn-league:nth-child(n + 7):not(.rn-lmore) {
    display: none;
  }
  .rn-leagues > .rn-lmore.narrow-only {
    display: none;
  }
  .rn-players {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rn-players > li:nth-child(n + 4) {
    display: list-item;
  }
  .rn-players > li:nth-child(n + 5) {
    display: none;
  }
}
@media (min-width: 1024px) {
  .rn-players {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rn-players > li:nth-child(n + 5) {
    display: list-item;
  }
}

/* The pill row, while a game is on: Final Drive is the primary (E-26 (3)).
   The one purple on a guide-active screen. */
.mm-pill.is-live {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  gap: 8px;
}
.mm-pill.is-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: rn-blink 1.5s ease-in-out infinite;
}

/* The header's live indicator (E-26 (4)): on at every width but one — a
   phone with a guide on screen, where it wraps the header (+35px, measured)
   and the strip's own dot already says it (E-10's exception). */
@media (max-width: 640px) {
  body.guide-active .live-indicator.active {
    display: none;
  }
}
