/**
 * nfl-week.css — page-scoped layout for the weekly hub (/week/), v0.44.4,
 * dec 78. Loaded only when Weekly_Hub renders.
 *
 * Layout only — cards, KPI treatment, badges and empty states come from the
 * shared design system (assets/css/nfl-lines-ds.css) so this surface reads as
 * the same product as /nfl-home/, /account/ and the team pages.
 *
 * NOTE: the page shell is co-classed onto `.nfl-teams-index` /
 * `.nfl-teams-index__container`, which is why this surface was correctly SIZED
 * while being entirely unstyled inside. Those rules live in nfl-lines-ds.css —
 * do not duplicate them here, do not remove them there.
 */

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

.nfl-week {
  --week-gap: var(--nfl-gap-5, 16px);
  color: var(--nfl-text, #111827);
}

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

/* The container is co-classed with .nfl-teams-index__container (which carries
   the max-width + centring in nfl-lines-ds.css); this hook exists so the hub
   can diverge later without touching the shared shell. */
.nfl-week__container { padding-bottom: 8px; }

.nfl-week__header {
  margin-bottom: 6px;
}

.nfl-week__body {
  margin-top: 4px;
}

.nfl-week__empty {
  margin: 20px 0;
}

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

/* Three fixed slots so prev / current / next never run together, and a
   disabled edge holds its space instead of collapsing the row. */
.nfl-week__weeknav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--nfl-gap-4, 12px);
  margin: 0 0 22px;
  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-week__weeknav-slot { min-width: 0; display: flex; }
.nfl-week__weeknav-slot--prev    { justify-content: flex-start; }
.nfl-week__weeknav-slot--current { justify-content: center; }
.nfl-week__weeknav-slot--next    { justify-content: flex-end; }

.nfl-week__weeknav-link {
  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-week__weeknav-link:hover,
.nfl-week__weeknav-link:focus-visible {
  background: var(--nfl-accent-bg, #dbeafe);
}

.nfl-week__weeknav-link--disabled {
  visibility: hidden;
  pointer-events: none;
}

.nfl-week__weeknav-arrow { font-size: 1.05em; line-height: 1; }

/* Direction modifiers — the slot handles alignment; these carry the
   directional affordance so either can be targeted independently later. */
.nfl-week__weeknav-prev { padding-left: 10px; }
.nfl-week__weeknav-next { padding-right: 10px; }

.nfl-week__weeknav-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.nfl-week__weeknav-week {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nfl-week__weeknav-season {
  font-size: 0.8rem;
  color: var(--nfl-text-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- game cards -- */

.nfl-week__cards,
.nfl-week__recap-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--week-gap);
  margin: 0;
}

.nfl-week__card,
.nfl-week__recap-card {
  display: flex;
  flex-direction: column;
  gap: var(--nfl-gap-3, 10px);
  padding: 16px;
}

/* Played games recede slightly; upcoming ones read as live. */
.nfl-week__card--final { background: var(--nfl-page-bg, #fafafa); }

.nfl-week__card-matchup,
.nfl-week__recap-card-matchup {
  display: flex;
  align-items: baseline;
  gap: var(--nfl-gap-2, 8px);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.nfl-week__card-away,
.nfl-week__card-home { white-space: nowrap; }

.nfl-week__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nfl-gap-1, 6px) 10px;
  font-size: 0.9rem;
}

.nfl-week__card-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--nfl-radius-pill, 999px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nfl-week__card-status--final {
  background: var(--nfl-mid-bg, #f3f4f6);
  color: var(--nfl-text, #111827);
}

.nfl-week__card-status--scheduled {
  background: var(--nfl-accent-bg, #dbeafe);
  color: var(--nfl-accent, #2563eb);
}

.nfl-week__card-score,
.nfl-week__recap-card-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nfl-week__card-vegas {
  color: var(--nfl-text-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}

.nfl-week__card-ats,
.nfl-week__recap-card-ats { margin: 0; }

.nfl-week__card-ats-badge { font-size: 0.75rem; }

.nfl-week__card-consensus,
.nfl-week__recap-card-consensus {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--nfl-card-border, #e6e8ec);
  font-size: 0.85rem;
  color: var(--nfl-text-muted, #6b7280);
}

/* ------------------------------------------------------ slate actions -- */

.nfl-week__slate-actions {
  margin: 20px 0 0;
  text-align: center;
}

.nfl-week__slate-link {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--nfl-radius-control, 9px);
  background: var(--nfl-accent, #2563eb);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.nfl-week__slate-link:hover,
.nfl-week__slate-link:focus-visible {
  background: var(--nfl-text, #111827);
  color: #fff;
}

/* --------------------------------------------------------------- recap -- */

.nfl-week__recap {
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 2px solid var(--nfl-card-border, #e6e8ec);
}

.nfl-week__recap-header { margin-bottom: 16px; }

.nfl-week__recap-title {
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.nfl-week__recap-subtitle {
  color: var(--nfl-text-muted, #6b7280);
  margin: 0;
  font-size: 0.94rem;
}

.nfl-week__recap-tally { margin: 18px 0 0; }

.nfl-week__recap-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-2, 8px) 18px;
  align-items: center;
  margin: 16px 0 0;
}

.nfl-week__recap-link {
  color: var(--nfl-accent, #2563eb);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.nfl-week__recap-link:hover,
.nfl-week__recap-link:focus-visible { text-decoration: underline; }

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

@media (max-width: 900px) {
  .nfl-week__cards,
  .nfl-week__recap-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .nfl-week__cards,
  .nfl-week__recap-cards { grid-template-columns: 1fr; }

  .nfl-week__weeknav {
    padding: 8px 10px;
    gap: var(--nfl-gap-2, 8px);
  }
  .nfl-week__weeknav-link { padding: 8px 10px; font-size: 0.88rem; }
  .nfl-week__weeknav-week { font-size: 1.05rem; }
  .nfl-week__slate-link { display: block; }
}

/* ==========================================================================
 * v0.46.4 — THE BOARD, FULLY DESIGNED (L5)
 * Tokens only, no raw hex, no raw geometry (the .45.5 uniformity gate).
 * ========================================================================== */

/* The whole capsule is the link now, so it has to carry the card's own
   affordances: block layout, inherited colour, and a hover that reads as
   "this goes somewhere" without turning the board into sixteen buttons
   (the .117 anatomy ruling — one boxed element per row). */
.nfl-week__card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nfl-week__card--link:hover,
.nfl-week__card--link:focus-visible {
  border-color: var(--nfl-accent, #2563eb);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

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

/* Kickoff leads the meta row; the line and total sit beside it as plain
   text, not pills — the meta row is information, not controls. */
.nfl-week__card-kick {
  font-weight: 700;
}

.nfl-week__card-total,
.nfl-week__card-noline {
  font-size: 0.9rem;
}

/* Ratings summary: the quiet line under the numbers that says why the game
   looks the way it does. */
.nfl-week__card-ratings {
  margin: 0;
  font-size: 0.9rem;
}

/* Season + week picker. Sits with the week nav; wraps rather than
   overflowing on a narrow screen (L8). */
.nfl-week__picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nfl-gap-2, 8px);
  margin: 0 0 var(--nfl-gap-5, 16px);
}

.nfl-week__picker-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.nfl-week__picker-select {
  padding: var(--nfl-gap-1, 6px) var(--nfl-gap-2, 8px);
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-control, 9px);
  background: var(--nfl-card-bg, #fff);
  color: var(--nfl-text, #111827);
  font: inherit;
}

/* L8 — one column on a phone, and the picker stacks instead of squeezing. */
@media (max-width: 640px) {
  .nfl-week__picker {
    gap: var(--nfl-gap-1, 6px);
  }
  .nfl-week__picker-select {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ==========================================================================
 * v0.46.6 — RESULTS BOARD
 * Shares the week board's card grid deliberately: the two pages are mirrors
 * (Rule 2), so a visitor moving between them should not have to relearn the
 * layout. Only what genuinely differs is styled here.
 * ========================================================================== */

/* The final score is why the visitor came — it outranks the matchup line. */
.nfl-results__score {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* A finished card is settled rather than live: the board reads as record,
   not as anticipation. */
.nfl-results .nfl-week__card--final {
  background: var(--nfl-card-bg, #fff);
}

.nfl-results .nfl-week__card-meta {
  align-items: center;
}

@media (max-width: 640px) {
  .nfl-results__score {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
 * v0.46.7 REBUILD — THE SLATE (§0b.2)
 * One card component, both boards. A week is Thursday / Sunday / Monday, so
 * the slate reads as a schedule under day headers rather than sixteen
 * identical boxes in a flat grid.
 * ========================================================================== */

.nfl-slate__day + .nfl-slate__day {
  margin-top: var(--nfl-gap-6, 20px);
}

.nfl-slate__day-title {
  margin: 0 0 var(--nfl-gap-3, 10px);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-slate__cards {
  display: grid;
  /* ⚠️ EXPLICIT COLUMNS, NOT auto-fill. auto-fill only creates tracks when the
     parent actually offers width — and when a container shrink-wraps (see the
     .nfl-ds-container note), it offers none, so the whole slate collapses to a
     single narrow column. The board this replaced used repeat(3, 1fr) and
     filled correctly; the rebuild swapped a working rule for one with a
     hidden dependency. Explicit tracks cannot collapse. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nfl-gap-4, 12px);
}

@media (max-width: 1100px) {
  .nfl-slate__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- the card ----------------------------------------------------------- */

.nfl-gc {
  display: flex;
  flex-direction: column;
  gap: var(--nfl-gap-3, 10px);
  padding: var(--nfl-gap-4, 12px) var(--nfl-gap-5, 16px);
  background: var(--nfl-card-bg, #fff);
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-card, 12px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nfl-gc:hover,
.nfl-gc:focus-visible {
  border-color: var(--nfl-accent, #2563eb);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

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

/* Two teams stacked, away above home — the way a slate is read everywhere. */
.nfl-gc__teams {
  display: flex;
  flex-direction: column;
  gap: var(--nfl-gap-1, 6px);
}

.nfl-gc__team {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto auto;
  align-items: baseline;
  gap: var(--nfl-gap-2, 8px);
}

.nfl-gc__abbr {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nfl-gc__name {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nfl-gc__record {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-gc__score {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: right;
}

/* The winner is marked by weight on its own row — not a badge, and not a
   colour the reader has to decode (.117 anatomy). */
.nfl-gc__team--won .nfl-gc__abbr,
.nfl-gc__team--won .nfl-gc__score {
  color: var(--nfl-accent, #2563eb);
}

.nfl-gc__meta,
.nfl-gc__market,
.nfl-gc__ratings {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--nfl-gap-2, 8px);
  font-size: 0.9rem;
}

.nfl-gc__kick,
.nfl-gc__status {
  font-weight: 700;
}

.nfl-gc__status--final {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.nfl-gc__line--none,
.nfl-gc__total,
.nfl-gc__ratings {
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-gc__ratings-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 800;
}

.nfl-gc__ratings-vals {
  font-variant-numeric: tabular-nums;
}

/* L8 — the card stacks, it does not compress. */
@media (max-width: 640px) {
  .nfl-slate__cards {
    grid-template-columns: 1fr;
  }
  .nfl-gc__team {
    grid-template-columns: 3rem 1fr auto;
  }
  .nfl-gc__name {
    display: none;   /* the abbr and record carry it at this width */
  }
}

/* ---- the pick and the decisive stats on the card ----------------------- */

.nfl-gc__pick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-2, 8px);
  align-items: baseline;
  padding-top: var(--nfl-gap-2, 8px);
  border-top: 1px solid var(--nfl-card-border, #e6e8ec);
  font-size: 0.9rem;
}

.nfl-gc__pick-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-gc__pick-val {
  font-weight: 700;
}

/* Right and wrong are words first; colour reinforces, never carries alone. */
.nfl-gc__pick--right .nfl-gc__pick-val { color: var(--nfl-good, #15803d); }
.nfl-gc__pick--wrong .nfl-gc__pick-val { color: var(--nfl-bad, #b91c1c); }

/* Gated copy is quiet — it names what is behind the door and links nowhere. */
.nfl-gc__pick--gated {
  color: var(--nfl-text-muted, #6b7280);
  font-weight: 600;
}

.nfl-gc__decisive {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-gc__decisive-line {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
 * v0.46.8 — THE HOUSE DIARY (§P14)
 * Deliberately thin: the page is the shared card slate plus a record band, so
 * almost everything it needs is already styled. Only what is genuinely new
 * gets a rule.
 * ========================================================================== */

.nfl-diary__container {
  display: flex;
  flex-direction: column;
  gap: var(--nfl-gap-5, 16px);
}

.nfl-diary__record {
  display: flex;
  flex-direction: column;
  gap: var(--nfl-gap-3, 10px);
  padding: var(--nfl-gap-5, 16px);
}

.nfl-diary__windows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-5, 16px);
}

.nfl-diary__window {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nfl-diary__window-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-diary__window-rec {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* A replayed window reads quieter than a real one — the label already says
   "simulated", and the weight difference stops the eye treating them as one
   run of numbers. */
.nfl-diary__window--sim .nfl-diary__window-rec {
  font-weight: 600;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-diary__record-note,
.nfl-diary__source {
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .nfl-diary__windows {
    gap: var(--nfl-gap-4, 12px);
  }
}

/* ---- the diary's collapsed weeks (v0.46.8.2) --------------------------- */

.nfl-diary__week {
  padding: 0;
}

.nfl-diary__week + .nfl-diary__week {
  margin-top: var(--nfl-gap-3, 10px);
}

.nfl-diary__week-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--nfl-gap-3, 10px);
  padding: var(--nfl-gap-4, 12px) var(--nfl-gap-5, 16px);
  cursor: pointer;
  list-style: none;
}

.nfl-diary__week-head::-webkit-details-marker { display: none; }

/* A disclosure affordance that does not depend on the browser's default
   triangle, and rotates with the open state — CSS only, no script. */
.nfl-diary__week-head::before {
  content: '\25B8';
  color: var(--nfl-text-muted, #6b7280);
  transition: transform 0.15s ease;
}

.nfl-diary__week[open] > .nfl-diary__week-head::before {
  transform: rotate(90deg);
}

.nfl-diary__week-name {
  font-weight: 800;
}

.nfl-diary__week-rec,
.nfl-diary__week-run {
  font-variant-numeric: tabular-nums;
}

.nfl-diary__week-run {
  font-size: 0.85rem;
}

.nfl-diary__week-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nfl-gap-4, 12px);
  padding: 0 var(--nfl-gap-5, 16px) var(--nfl-gap-5, 16px);
}

.nfl-diary__missing {
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  .nfl-diary__week-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nfl-diary__week-games { grid-template-columns: 1fr; }
}

/* v0.46.26.4 — the slate's action closes the slate rather than opening a band
   of its own. One link is not a band (Frame Law 3). */
.nfl-week__slate-actions {
  margin: var(--nfl-gap-4, 12px) 0 0;
  padding: 0;
  border: 0;
}

/* ⛔ v0.46.26.4 — THREE SHARED-CARD CLASSES HAD NO RULE ANYWHERE IN THE TREE.
   Not stranded in a sheet the page failed to load — never written. `nfl-gc__cover`
   (who covered, on a finished game) and `nfl-gc__line` (the market number, and
   its --none variant which WAS styled) render on /week/, /results/, the game
   result page and now /predictions/. Found by deriving every emitted class
   against the page's own loaded chain rather than spot-checking. */
.nfl-gc__cover {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-gc__line {
  display: block;
  font-size: 0.85rem;
  color: var(--nfl-text-muted, #6b7280);
}
