/**
 * nfl-picksweek.css — the head-to-head picks grid (/picks/week/), v0.45.3.
 *
 * WHY A SHEET AT ALL, given the standing reuse rule: the surface it styles is
 * `class-picks-week.php`, which is FLOOR LOCK #2 (cd44a668) and cannot be
 * edited. Its markup already carries 34 bespoke `nfl-picksweek__*` hooks, so
 * this redesign is pure CSS against hooks that already exist — the floor's md5
 * is preserved by construction, not by a delegation trick.
 *
 * These classes are page-specific BY NATURE (a head-to-head grid, disagreement
 * flags, a hidden-pick chip). They deliberately do NOT go in nfl-lines-ds.css:
 * putting one page's structure in the shared component layer is exactly the
 * drift v0.45.5 exists to clean up. Everything with a SHARED shape (tables,
 * cards, badges, buttons, empty states) is expressed through `.nfl-ds-*`
 * instead, which is why this sheet is small.
 *
 * LOAD CHAIN (Picks_Week_Assets): front → ds → market-base → this.
 * market-base is in the chain deliberately: the floor emits
 * `nfl-market-container` and that sheet is otherwise enqueued ONLY by
 * Marketplace, so before v0.45.3 this page had no max-width, no centring and
 * no padding at all — the same defect /leaderboards/ had before v0.44.1.5.
 */

/* --------------------------------------------------------------- shell -- */

.nfl-picksweek {
  color: var(--nfl-text, #111827);
}

.nfl-picksweek *,
.nfl-picksweek *::before,
.nfl-picksweek *::after { box-sizing: border-box; }

.nfl-picksweek__header { margin: 0 0 16px; }

/* ------------------------------------------------------------ week nav -- */

/* Three fixed slots, matching the weekly hub (v0.44.4) so the two week
   controls on this site behave the same way. */
.nfl-picksweek__weeknav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--nfl-gap-4, 12px);
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-card, 12px);
  background: var(--nfl-card-bg, #fff);
}

.nfl-picksweek__weeknav a {
  display: inline-flex;
  align-items: center;
  gap: var(--nfl-gap-1, 6px);
  padding: 8px 14px;
  border-radius: var(--nfl-radius-control, 9px);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--nfl-accent, #2563eb);
  white-space: nowrap;
}

.nfl-picksweek__weeknav a:hover,
.nfl-picksweek__weeknav a:focus-visible { background: var(--nfl-accent-bg, #dbeafe); }

.nfl-picksweek__weeknav a:first-child { justify-self: start; }
.nfl-picksweek__weeknav a:last-child  { justify-self: end; }

.nfl-picksweek__weeknav-current {
  grid-column: 2;
  justify-self: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ selector -- */

.nfl-picksweek__selector {
  padding: 14px 16px;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-card, 12px);
  background: var(--nfl-card-bg, #fff);
  margin: 0 0 18px;
}

.nfl-picksweek__selector-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nfl-text-muted, #6b7280);
  margin: 0 0 10px;
}

.nfl-picksweek__selector-cap {
  display: block;
  margin: 10px 0 0;
  color: var(--nfl-text-faint, #9ca3af);
  font-size: 0.82rem;
}

.nfl-picksweek__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-2, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each chip is a real toggle control. NOTE: these are <a> elements carrying a
   toggled URL, not checkboxes — style the anchor, not a label. */
.nfl-picksweek__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--nfl-gap-1, 6px);
  padding: 7px 12px;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-pill, 999px);
  background: var(--nfl-card-bg, #fff);
  color: var(--nfl-text, #111827);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.nfl-picksweek__chip:hover { background: var(--nfl-page-bg, #fafafa); }

.nfl-picksweek__chip:focus-visible {
  outline: 2px solid var(--nfl-accent, #2563eb);
  outline-offset: 1px;
}

/* Selected — the state the whole control exists to communicate. */
.nfl-picksweek__chip--on {
  background: var(--nfl-accent, #2563eb);
  border-color: var(--nfl-accent, #2563eb);
  color: #fff;
}

.nfl-picksweek__chip--on:hover { background: var(--nfl-text, #111827); border-color: var(--nfl-text, #111827); }
.nfl-picksweek__chip--on .nfl-picksweek__chip-dot { background: #fff; }
.nfl-picksweek__chip--on .nfl-picksweek__chip-status { color: #e5e7eb; }

.nfl-picksweek__chip-name { font-weight: 600; }

/* The dot carries a glyph (✓ when selected, + when not), so it is sized as a
   marker rather than a bullet. */
.nfl-picksweek__chip-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--nfl-accent-bg, #dbeafe);
  color: var(--nfl-accent, #2563eb);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.nfl-picksweek__chip-status {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------- grid -- */

.nfl-picksweek__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-card, 12px);
  background: var(--nfl-card-bg, #fff);
}

.nfl-picksweek__grid {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.nfl-picksweek__grid th,
.nfl-picksweek__grid td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--nfl-card-border, #e6e8ec);
  white-space: nowrap;
  vertical-align: top;
}

.nfl-picksweek__grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--nfl-card-bg, #fff);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nfl-text-muted, #6b7280);
  border-bottom-width: 2px;
}

.nfl-picksweek__grid tbody tr:last-child td { border-bottom: none; }
.nfl-picksweek__grid tbody tr:hover { background: var(--nfl-page-bg, #fafafa); }

/* The matchup column stays put while the algorithm columns scroll — with six
   algorithms side by side the row label is the first thing off the edge. */
.nfl-picksweek__col-matchup,
.nfl-picksweek__cell-matchup {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--nfl-card-bg, #fff);
  min-width: 190px;
}

.nfl-picksweek__grid thead .nfl-picksweek__col-matchup { z-index: 3; }
.nfl-picksweek__grid tbody tr:hover .nfl-picksweek__cell-matchup { background: var(--nfl-page-bg, #fafafa); }

.nfl-picksweek__col-vegas,
.nfl-picksweek__cell-vegas {
  background: var(--nfl-mid-bg, #f3f4f6);
  font-weight: 600;
}

.nfl-picksweek__col-algo { min-width: 130px; }

.nfl-picksweek__col-algo a {
  color: var(--nfl-accent, #2563eb);
  text-decoration: none;
  font-weight: 700;
}

.nfl-picksweek__col-algo a:hover { text-decoration: underline; }

/* "You have access" marker on the column head. */
.nfl-picksweek__col-access {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: var(--nfl-radius-pill, 999px);
  background: var(--nfl-good-bg, #dcfce7);
  color: var(--nfl-good, #15803d);
  font-size: 0.72rem;
  font-weight: 800;
}

/* ------------------------------------------------------------- matchup -- */

.nfl-picksweek__matchup {
  display: inline-flex;
  align-items: baseline;
  gap: var(--nfl-gap-1, 6px);
  font-weight: 700;
}

.nfl-picksweek__team { white-space: nowrap; }

.nfl-picksweek__at {
  color: var(--nfl-text-faint, #9ca3af);
  font-size: 0.82rem;
  font-weight: 500;
}

.nfl-picksweek__playoff-flag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--nfl-radius-pill, 999px);
  background: var(--nfl-accent-bg, #dbeafe);
  color: var(--nfl-accent, #2563eb);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.nfl-picksweek__playoff-note {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.84rem;
  margin: 10px 0 0;
}

/* --------------------------------------------------------------- picks -- */

.nfl-picksweek__spread {
  display: block;
  font-variant-numeric: tabular-nums;
}

/* A visible PICK is the payload — it reads as a result. */
.nfl-picksweek__pick {
  font-weight: 800;
  color: var(--nfl-text, #111827);
}

.nfl-picksweek__spread--missing {
  color: var(--nfl-text-faint, #9ca3af);
  font-style: italic;
}

/* THE WITHHELD PICK. Before v0.45.3 this chip had no rule, so "you can't see
 * this" looked identical to "there is no pick here" — on the one surface whose
 * entire job is showing you which picks you can and cannot see. The gating
 * itself lives in the floor (Pick_Purchases::user_has_access) and is untouched;
 * this only makes the withheld state legible.
 */
.nfl-picksweek__hidden-pick {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 9px;
  border-radius: var(--nfl-radius-pill, 999px);
  border: 1px dashed var(--nfl-card-border, #e6e8ec);
  background: repeating-linear-gradient(
    45deg,
    var(--nfl-mid-bg, #f3f4f6),
    var(--nfl-mid-bg, #f3f4f6) 5px,
    var(--nfl-page-bg, #fafafa) 5px,
    var(--nfl-page-bg, #fafafa) 10px
  );
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: help;
}

/* v0.46.11 — J's marker ruling: the threshold flags, flag note and legend
   are REPLACED by the signed delta beside each pick (algo line minus the
   market close, home frame). A number has no threshold cliff and survives
   390px and colour-blindness. */

.nfl-picksweek__delta {
  margin-left: 6px;
  font-size: 0.82rem;
  color: var(--nfl-text-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}

.nfl-picksweek__delta--big {
  color: var(--nfl-text, #111827);
  font-weight: 700;
}

.nfl-picksweek__delta-note {
  font-size: 0.85rem;
  margin: 4px 0 8px;
}

/* --------------------------------------------------------------- empty -- */

.nfl-picksweek__empty {
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-card, 12px);
  background: var(--nfl-card-bg, #fff);
  color: var(--nfl-text-muted, #6b7280);
}

/* -------------------------------------------------------- responsive   -- */

@media (max-width: 560px) {
  .nfl-picksweek__weeknav { padding: 8px 10px; gap: var(--nfl-gap-2, 8px); }
  .nfl-picksweek__weeknav a { padding: 8px 10px; font-size: 0.88rem; }
  .nfl-picksweek__weeknav-current { font-size: 1rem; }
  .nfl-picksweek__grid { font-size: 0.85rem; }
  .nfl-picksweek__grid th,
  .nfl-picksweek__grid td { padding: 8px 9px; }
  .nfl-picksweek__col-matchup,
  .nfl-picksweek__cell-matchup { min-width: 140px; }
}

/* =============================================================================
   v0.46.9 — MY ALGORITHM PICKS (§P13). Additive block: the record band, the
   column boundary sub-line, the page-level replay note and the build CTA.
   Tokens only (L5); the pre-46.9 rules above are untouched. The hidden-pick
   and col-access rules above are now INERT SELECTORS — their markup left with
   the access machinery; pruning rides the §47 sweep, declared in the notes.
   ========================================================================== */

.nfl-picksweek__cell-algo { text-align: center; white-space: nowrap; }

.nfl-picksweek__col-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--nfl-text-muted, #6b7280);
  margin-top: 2px;
}

.nfl-picksweek__cta { margin: var(--nfl-gap-4, 12px) 0 0; }

.nfl-picksweek__records { margin: var(--nfl-gap-4, 12px) 0; }

.nfl-picksweek__record-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--nfl-gap-3, 10px);
  padding: 6px 0;
  border-bottom: 1px solid var(--nfl-card-border, #e6e8ec);
}
.nfl-picksweek__record-row:last-of-type { border-bottom: 0; }

.nfl-picksweek__record-name { font-weight: 600; min-width: 140px; }

.nfl-picksweek__windows {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-3, 10px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nfl-picksweek__window { white-space: nowrap; }
.nfl-picksweek__window--sim .nfl-picksweek__window-label { font-style: italic; }
.nfl-picksweek__window-label { color: var(--nfl-text-muted, #6b7280); font-size: 12px; }
.nfl-picksweek__window-rec { font-weight: 600; font-variant-numeric: tabular-nums; }

.nfl-picksweek__records-note,
.nfl-picksweek__replay-note {
  font-size: 12px;
  margin: var(--nfl-gap-2, 8px) 0;
}

@media (max-width: 480px) {
  .nfl-picksweek__record-name { min-width: 100%; }
}

/* =============================================================================
   v0.46.10 — DOWNLOADED PICKS (§P13b). Additive: the stale flag + its
   week-scoped free re-download link, in the column header sub-line.
   ========================================================================== */

.nfl-picksdl { /* page scope hook for the §P13b surface */ }

.nfl-picksdl__stale { color: var(--nfl-bad, #b42318); }

.nfl-picksdl__redl {
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}


/* =============================================================================
   v0.46.11 — §P13c GRADED MIRRORS. Additive: verdict marks, finals, running
   record, week-totals band, mirror links.
   ========================================================================== */

.nfl-picksres { /* page scope hook for the §P13c surfaces */ }

.nfl-picksweek__col-final { white-space: nowrap; }

.nfl-picksweek__cell-final { font-size: 0.88rem; }

.nfl-picksres__final {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nfl-picksres__verdict {
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 3px;
}

.nfl-picksres__verdict--w { color: var(--nfl-good, #067647); }
.nfl-picksres__verdict--l { color: var(--nfl-bad, #b42318); }
.nfl-picksres__verdict--p { color: var(--nfl-text-muted, #6b7280); }

.nfl-picksres__run {
  font-size: 0.8rem;
  white-space: nowrap;
}

.nfl-picksres__pending { font-size: 0.85rem; }

.nfl-picksres__totals { margin-top: 16px; }

.nfl-picksres__totals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-2, 8px) var(--nfl-gap-6, 20px);
}

.nfl-picksres__total-name { font-weight: 600; }

.nfl-picksres__total-rec { font-variant-numeric: tabular-nums; }

.nfl-picksres__total-sim {
  font-size: 0.8rem;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-picksres__totals-note { font-size: 0.8rem; margin: 8px 0 0; }

.nfl-picksweek__mirror-link { margin: 14px 0 0; font-weight: 600; }
