/* ═══════════════════════════════════════════════════════════════
   nfl/assets/css/game.css — Game page only (loaded by game.php)
   Colours come from tokens.css; structure from base.css.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Game header card ─── */
.gm-head {
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}
.gm-head-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.gm-picker { display: flex; align-items: center; gap: 10px; }
.gm-picker label,
.gm-side-label,
.gm-stat span {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.gm-select { position: relative; }
.gm-select::after {
  content: '▾';
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 12px;
}
.gm-select select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 8px 36px 8px 14px;
  min-width: 170px;
  cursor: pointer;
}
.gm-select select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gm-kick { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.gm-btn {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.gm-btn:hover { background: var(--accent); color: var(--on-accent); }
/* Column Key muted for now: delete this line to bring the button back */
[data-open-key] { display: none !important; }
.gm-btn + .gm-btn { margin-left: 8px; }
a.gm-btn { text-decoration: none; }
.gm-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}
.gm-side { display: flex; flex-direction: column; gap: 6px; }
.gm-side-home { align-items: flex-end; text-align: right; }
.gm-side-team { display: flex; align-items: center; gap: 10px; }
.gm-side-home .gm-side-team { flex-direction: row-reverse; }
.gm-team-name { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink); }
.gm-pts {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--ink);
  font-feature-settings: 'tnum';
}

.gm-mid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.gm-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; min-width: 170px; }
.gm-stat strong { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--ink); }

/* ─── Tabs + team filter ─── */
.gm-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--chrome);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.gm-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.gm-tab {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-tab) var(--radius-tab) 0 0;
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
}
.gm-tab:hover { color: var(--ink); }
.gm-tab.active { background: var(--chrome); color: var(--chrome-ink); }
.gm-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  line-height: 16px;
}
.gm-filter, .gm-views { display: flex; margin-bottom: 6px; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.gm-seg, .gm-view {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: none;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}
.gm-seg:last-child, .gm-view:last-child { border-right: none; }
.gm-seg.active, .gm-view.active { background: var(--accent); color: var(--on-accent); }
.gm-views { display: inline-flex; margin: 14px 0 12px; }

/* ─── Tables ─── */
.gm .dt th.gm-l, .gm .dt td.gm-l { text-align: left; }
.gm .dt td.gm-wrap { white-space: normal; min-width: 200px; }
.gm .dt td.num { text-align: right; }
.gm .dt thead th { text-align: right; }
.gm .dt thead th.gm-l { text-align: left; }
.gm .dt thead th:first-child, .gm .dt td:first-child { padding-left: 16px; }
.gm-name { text-align: left !important; white-space: nowrap; }
.gm-player { font-weight: 600; margin-right: 6px; }
.gm-name .pos-badge { vertical-align: 1px; }
.gm-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  vertical-align: 1px;
}
.gm-tag-status { background: var(--paper-3); color: var(--ink-2); }

/* Candidate tags: one color each, so they read without reading */
.gm-tag-any   { background: rgba(34, 139, 84, .14);  color: #1d7346; }   /* TD Pick: green */
.gm-tag-multi { background: #1d7346; color: #e6f5ec; }                    /* Multi-TD: dark green (TD Pick reversed) */
.gm-tag-first { background: rgba(37, 99, 200, .14);  color: #2459b8; }   /* First TD Pick: blue */
.gm-tag-last  { background: rgba(190, 24, 93, .14);  color: #9d174d; }   /* Last TD Pick: dark pink */
.gm-tag-long  { background: rgba(214, 170, 20, .22); color: #8a6a00; }   /* Longshot: yellow */
[data-theme="dark"] .gm-tag-any   { background: rgba(34, 139, 84, .25);  color: #7fd9a5; }
[data-theme="dark"] .gm-tag-multi { background: #7fd9a5; color: #0f2f1e; }
[data-theme="dark"] .gm-tag-first { background: rgba(37, 99, 200, .28);  color: #9cbcf5; }
[data-theme="dark"] .gm-tag-last  { background: rgba(219, 39, 119, .28); color: #f9a8d4; }
[data-theme="dark"] .gm-tag-long  { background: rgba(214, 170, 20, .25); color: #f0d36a; }

/* Tags column: every tag starts at the same spot */
.gm .dt th.gm-tags, .gm .dt td.gm-tags { text-align: left; white-space: nowrap; }
.gm-tags .gm-tag:first-child { margin-left: 0; }
/* Small note under a column header, e.g. "+/-" with "vs 2026 Avg" */
.gm-th-note { display: block; margin-top: 2px; font-size: 9px; font-weight: 600; letter-spacing: .5px; color: var(--muted); }
/* Regulars out: each name with its position badge */
.gm-out { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.gm-out + .gm-out { margin-top: 4px; }
.gm-out .pos-badge { min-width: 30px; text-align: center; }
/* QB under each team's score: same weight as the team name */
.gm-qb { font-family: var(--font-display); font-size: 13px; font-weight: 800; color: var(--ink); }
.gm .dt td:last-child.gm-tags { white-space: nowrap; }
.gm .dt td.gm-rank, .gm .dt th.gm-rank { width: 36px; text-align: center; color: var(--muted); font-family: var(--font-mono); }
.gm-up { color: var(--win); font-weight: 700; }
.gm-down { color: var(--loss); font-weight: 700; }
.gm-team-block .tw { margin-bottom: 24px; }.gm-team-block .tw { margin-bottom: 24px; }

/* Score & Players box score: teams side by side; they stack on narrow screens, and one team fills the width when the filter hides the other */
.gm-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 16px; margin-bottom: 28px; }
.gm-box-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--font-display); font-size: 13px; font-weight: 800; color: var(--ink); }
/* Pos column: badge centered in its own column so every badge lines up */
.gm .dt th.gm-pos, .gm .dt td.gm-pos { text-align: center; width: 1%; padding-left: 12px; padding-right: 12px; }

/* Column group labels (This Week / His 2026 Avg / Last Game) and a divider before each group */
.gm .dt thead tr.gm-groups th { text-align: center; font-size: 11px; color: var(--ink); border-bottom: 1px solid var(--rule); padding-top: 10px; padding-bottom: 6px; }
.gm .dt th.gm-gstart, .gm .dt td.gm-gstart { border-left: 1px solid var(--rule); }

/* Player Projections: Projected vs his 2026 average */
.gm .dt td.pp-up   { background: color-mix(in srgb, var(--win) 22%, transparent); }
.gm .dt td.pp-down { background: color-mix(in srgb, var(--loss) 22%, transparent); }
.gm .dt td.pp-even { background: rgba(230, 200, 60, .28); }/* Why toggle */
.gm .dt td.gm-why-cell { text-align: right; width: 1%; }
.gm-why-btn {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
}
.gm-why-btn:hover, .gm-why-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.gm .dt tbody tr.gm-why-row:hover { transform: none; box-shadow: none; }
.gm .dt tr.gm-why-row td {
  text-align: left;
  white-space: normal;
  background: var(--paper-2);
  padding: 12px 16px 14px;
  border-left: 3px solid var(--accent);
}
.gm-why-row p { max-width: 90ch; font-size: 13px; line-height: 1.6; color: var(--ink); }

/* Why popup (phone) */
.gm-pop { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gm-pop[hidden] { display: none; }
.gm-pop-box { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; background: var(--paper); border-top: 3px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 18px 20px; }
.gm-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.gm-pop-name { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink); }
.gm-pop-close { flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.gm-pop-text { font-size: 14px; line-height: 1.6; color: var(--ink); text-align: left; }

/* First TD: game cards */
.ft-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.ft-card { border: 1px solid var(--rule); background: var(--paper); box-shadow: var(--shadow-card); border-radius: var(--radius); overflow: hidden; }
.ft-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.ft-card-head strong { font-family: var(--font-display); font-size: 14px; font-weight: 800; color: var(--ink); }
.ft-card-head span { font-size: 11.5px; color: var(--muted); }
.ft-split { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 8px; }
.ft-team { display: flex; align-items: center; gap: 8px; }
.ft-split .ft-pct { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--ink); }
.ft-bar { display: flex; height: 8px; margin: 0 14px; border-radius: 4px; overflow: hidden; background: var(--paper-3); }
.ft-bar-away { background: var(--chrome); }
.ft-bar-none { background: var(--paper-3); }
.ft-bar-home { background: var(--accent); }
.ft-none { padding: 6px 14px 10px; text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-display); font-weight: 800; }
.ft-picks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ft-picks li { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--rule); }
.ft-picks li:last-child { border-bottom: none; }
.ft-pick-name { font-weight: 600; color: var(--ink); margin-right: auto; }
.ft-picks .ft-pct { font-family: var(--font-mono); font-weight: 700; color: var(--ink); min-width: 52px; text-align: right; }
.ft-empty { color: var(--muted); }

/* Full Board with a filter set: one card per player */
.tb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 32px; }
.tb-card { display: flex; flex-direction: column; border: 1px solid var(--rule); background: var(--paper); box-shadow: var(--shadow-card); border-radius: var(--radius); overflow: hidden; }
.tb-card-head { padding: 12px 14px 10px; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.tb-card-who { display: flex; align-items: center; gap: 8px; }
.tb-card-name { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink); margin-right: auto; }
.tb-card-game { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.tb-card-nums { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 14px; gap: 8px; }
.tb-card-nums div { display: flex; flex-direction: column; gap: 2px; }
.tb-card-nums span { font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.tb-card-nums strong { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--ink); }
.tb-card-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.tb-card-tags .gm-tag { margin-left: 0; }
.tb-why { margin-top: auto; border-top: 1px solid var(--rule); padding: 8px 14px 10px; }
.tb-why summary { list-style: none; cursor: pointer; font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.tb-why summary::-webkit-details-marker { display: none; }
.tb-why[open] summary { color: var(--accent); }
.tb-why p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
@media (max-width: 720px) { .tb-cards { grid-template-columns: 1fr; } }

/* Team and Game columns: centered, Game shown as two team pills */
.gm .dt th.gm-c, .gm .dt td.gm-c { text-align: center; }
.gm .dt td.gm-game { white-space: nowrap; }
.gm-game .at, .tb-card-game .at { margin: 0 4px; font-size: 11px; color: var(--muted); }
.tb-card-game { display: flex; align-items: center; gap: 2px; }
.tb-card-kick { margin-left: 8px; }

/* Home: one card per menu group, listing every page in it */
.home-links { list-style: none; margin: 10px 0 0; padding: 0; }
.home-links li + li { border-top: 1px solid var(--rule); }
.home-links a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); }
.home-links a strong { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 800; }
.home-links a span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.home-links a:hover strong { color: var(--accent); }
/* Home card icons: on the left, next to the card title and next to each page name */
.home-card .card-title { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.home-card .card-title .home-icon { font-size: 24px; color: var(--accent); }
.home-links a strong { display: flex; align-items: center; gap: 8px; }
.home-links a .home-link-icon { display: inline-block; margin: 0; font-size: 20px; color: var(--accent); }/* A card with a single page still gets the line under it, like the others */
.home-links li:only-child { border-bottom: 1px solid var(--rule); }

/* Home: This Week at a Glance (right side of the intro) */
.glance { border: 1px solid var(--rule); background: var(--paper); box-shadow: var(--shadow-card); border-radius: var(--radius); }
.glance-head { padding: 10px 14px; background: var(--chrome); color: var(--chrome-ink); font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.glance-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.glance-row { align-items: center; grid-template-columns: 1fr 132px 108px; }.glance-what { justify-content: flex-end; }
.glance-pill { display: inline-flex; justify-content: center; width: 52px; }
.glance-label { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.glance-label:hover { color: var(--accent); }
.glance-what { display: flex; align-items: center; gap: 4px; }
.glance-what .at { color: var(--muted); font-size: 11px; }
.glance-val { font-family: var(--font-mono); font-weight: 700; color: var(--ink); min-width: 64px; text-align: right; }

/* Home: scoreboard tiles, grouped by day */
.sb-day { margin: 18px 0 8px; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink); }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sb-tile { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-card); color: var(--ink); }
.sb-top { display: flex; justify-content: space-between; align-items: baseline; }
.sb-time { font-size: 11px; color: var(--muted); }
.sb-view { position: relative; }
.sb-view summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.sb-view summary::-webkit-details-marker { display: none; }
.sb-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; padding: 6px 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.sb-menu a { display: block; padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.sb-menu a:hover { background: var(--paper-2); color: var(--accent); }
.sb-team { display: flex; align-items: center; gap: 8px; }
.sb-qb { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sb-tops { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--rule); }
.sb-line { display: grid; grid-template-columns: 96px 34px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 12.5px; }
.sb-line .pos-badge { justify-self: start; }.sb-label { font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.sb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-num { font-family: var(--font-mono); font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 720px) { .sb-grid { grid-template-columns: 1fr; } }

/* First TD, one game picked: Who Scores First and Who Scores Last side by side; stacked on phone */
.ft-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ft-pair .ft-cards { grid-template-columns: 1fr; }
@media (max-width: 720px) { .ft-pair { grid-template-columns: 1fr; } }/* ─── Phone ─── */
@media (max-width: 720px) {
  .gm-head-top { flex-wrap: wrap; padding: 12px 14px; gap: 10px; }  .gm-head-top { flex-wrap: wrap; padding: 12px 14px; gap: 8px; }
  .gm-picker { gap: 8px; min-width: 0; }
  .gm-select select { min-width: 0; font-size: 14px; padding: 7px 28px 7px 10px; }
  .gm-select::after { right: 10px; }
  .gm-head-top .gm-btn { font-size: 10px; letter-spacing: .5px; padding: 7px 10px; }

  /* Filter pages (Edges, etc.): one row per filter, labels in one column, dropdowns the same width; count left and Column Key right on the last row */
  .gm-filters { flex-basis: 100%; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
  .gm-filters .gm-select select { width: 100%; }
  .gm-kick { order: 3; flex-basis: 100%; }
  .gm-head-filters .gm-kick { order: 0; flex-basis: auto; }.gm-board { grid-template-columns: 1fr 1fr; padding: 16px; gap: 16px; }
  .gm-mid { grid-column: 1 / -1; order: 3; border: none; border-top: 1px solid var(--rule); padding: 14px 0 0; }
  .gm-pts { font-size: 36px; }
  .gm-team-name { display: none; }
  .gm-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .gm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  .gm-tab { text-align: center; padding: 10px 8px; }
  .gm-filter { margin-bottom: 8px; }
  .gm-seg { flex: 1; text-align: center; }
  .gm-views { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .gm-view { text-align: center; padding: 8px 4px; }
  .gm-views .gm-view:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .gm-views .gm-view:nth-child(3n) { border-right: none; }
}
/* Week badge above the intro headline */
.week-badge { display: inline-block; margin-bottom: .5rem; padding: .3rem .7rem; border-radius: 0; background: var(--accent, #C8102E); color: #fff; font-family: 'Roboto Mono', monospace; font-size: .9rem; font-weight: 700; letter-spacing: .05em; }
/* Game links: same look as before, just clickable */
a.game-link { color: inherit; text-decoration: none; }
