/* Homepage: tonight's leaders, live (live.js). Site tokens only, so dark mode follows the page. */
.fp-live .fp-kick { color: var(--hi-coral); }
.fpl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hi-coral); align-self: center; animation: fpl-pulse 1.6s ease-in-out infinite; }
.fp-live.is-final .fp-kick { color: var(--hi-muted); }
.fp-live.is-final .fpl-dot { background: var(--hi-muted); animation: none; }
/* Stale: the feed has stopped rewriting a live board. The dot holds still and the kicker reads Delayed. */
.fp-live.is-stale .fp-kick { color: var(--hi-muted); }
.fp-live.is-stale .fpl-dot { background: var(--hi-muted); animation: none; }
.fp-live.is-stale .fpl-g.on { border-color: var(--hi-line); }
.fp-live.is-stale .fpl-g.on .s, .fp-live.is-stale .fpl-row .who .lv { color: var(--hi-muted); }
@keyframes fpl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Scores: one pill a game */
.fpl-scores { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.fpl-g { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--hi-line); border-radius: var(--rad-pill);
  background: var(--hi-surface-1); font: 600 .76rem/1 var(--hi-sans); color: var(--hi-ink-2); white-space: nowrap; }
.fpl-g .t { display: inline-flex; align-items: center; gap: 4px; }
.fpl-g .t b { font: 700 .8rem/1 var(--hi-mono); color: var(--hi-ink-2); }
.fpl-g .t.w, .fpl-g .t.w b { color: var(--hi-ink); font-weight: 800; }
.fpl-g .s { font: 700 .62rem/1 var(--hi-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--hi-muted); }
.fpl-g.on { border-color: var(--hi-coral); }
.fpl-g.on .s { color: var(--hi-coral); }

/* Tiles: the leader in every stat at a glance */
.fpl-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.fpl-tile { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: stretch; width: 100%; gap: 8px; text-align: left; padding: 12px 14px; min-width: 0; cursor: pointer; color: var(--hi-ink);
  border: 1px solid var(--hi-line); border-radius: var(--fp-r-sm, 12px); background: var(--hi-surface-1); box-shadow: var(--hi-ambient);
  transition: border-color var(--mo-fast, .15s) ease, transform var(--mo-fast, .15s) ease; font: inherit; }
.fpl-tile:hover, .fpl-tile:focus-visible { border-color: var(--hi-blue-2); }
.fpl-tile.on { border-color: var(--hi-blue); box-shadow: inset 0 0 0 1px var(--hi-blue), var(--hi-ambient); }
.fpl-lbl { font: var(--hi-lbl-w, 800) var(--t-micro, .57rem)/1.2 var(--hi-sans); letter-spacing: var(--hi-lbl-track, .14em); text-transform: uppercase; color: var(--hi-muted); }
.fpl-tile.on .fpl-lbl { color: var(--hi-blue); }
.fpl-lead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 36px; }
.fpl-who { display: grid; gap: 3px; min-width: 0; }
.fpl-who b { font: 700 .9rem/1.15 var(--hi-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpl-who small, .fpl-row .who small { display: inline-flex; align-items: center; gap: 4px; font: 600 .68rem/1.2 var(--hi-sans); color: var(--hi-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A tile's detail line is one line of text, so a long one ends in an ellipsis on a phone. */
.fpl-who small { display: block; }
.fpl-who small .cr { vertical-align: -3px; margin-right: 4px; }
.fpl-val { font: 700 1.55rem/1 var(--hi-mono); letter-spacing: -.02em; color: var(--hi-ink); }
.fpl-val.sm { font-size: 1.15rem; }
.fpl-next { font: 600 .68rem/1.3 var(--hi-sans); color: var(--hi-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--hi-hair); padding-top: 7px; }
.fpl-none { grid-column: 1 / -1; font: 600 .8rem/1.2 var(--hi-sans); color: var(--hi-muted); }

/* The open board: top ten in two columns */
.fpl-board { padding: 16px 20px 14px; }
.fpl-board h3 { margin: 0 0 10px; }
.fpl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 28px; }
.fpl-row { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto 48px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hi-hair); min-width: 0; }
.fpl-row .rk { font: 700 .72rem/1 var(--hi-mono); color: var(--hi-muted); text-align: right; }
.fpl-row .who { display: grid; gap: 3px; min-width: 0; }
.fpl-row .who b { font: 700 .88rem/1.15 var(--hi-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpl-row .who .lv { color: var(--hi-coral); font-weight: 700; }
.fpl-row .ctx { font: 600 .68rem/1.2 var(--hi-mono); color: var(--hi-muted); white-space: nowrap; }
.fpl-row .val { font: 700 1.1rem/1 var(--hi-mono); text-align: right; color: var(--hi-ink); }
.fpl-all { display: none; margin: 10px 0 0; padding: 7px 14px; border: 1px solid var(--hi-line); border-radius: var(--rad-pill, 999px); background: var(--hi-surface-1); cursor: pointer; font: 700 .76rem/1 var(--hi-sans); color: var(--hi-blue); }
.fpl-more { margin: 8px 0 0; font: 600 var(--t-small, .78rem)/1.4 var(--hi-sans); color: var(--hi-muted); }

/* A number that just went up glows once */
.fpl-val.bump, .fpl-row.bump .val { animation: fpl-bump 2.4s ease-out 1; border-radius: 6px; }
@keyframes fpl-bump { 0% { background: var(--hi-mint-soft); color: var(--hi-mint); box-shadow: 0 0 0 4px var(--hi-mint-soft); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }

@media (max-width: 1100px) { .fpl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .fpl-scores { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--fp-gut, 16px) * -1) 14px; padding: 0 var(--fp-gut, 16px) 4px; scrollbar-width: thin; }
  .fpl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fpl-tile { padding: 10px 11px; gap: 6px; }
  .fpl-tile .mug { display: none; }
  .fpl-lead { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
  .fpl-val { font-size: 1.3rem; }
  .fpl-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  .fpl-row { grid-template-columns: 20px auto minmax(0, 1fr) 40px; }
  .fpl-row .ctx { display: none; }
  .fpl-board:not(.all) .fpl-row:nth-child(n+6), .fpl-board:not(.all) .fpl-more { display: none; }
  .fpl-board:not(.all) .fpl-all { display: inline-block; }
  .fpl-board { padding: 14px 14px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fpl-dot, .fpl-val.bump, .fpl-row.bump .val { animation: none; }
}
