/* Fourth & Value: broadcast-football look. Turf-green header with yard lines, chalk white,
   and first-down-line yellow as the accent; condensed scoreboard type for names and numbers. */
:root {
  --turf: #0f3d26;
  --turf-2: #155234;
  --on: #0f3d26;
  --chalk: #f7f5ef;
  --yellow: #ffd23f;
  --yellow-ink: #1c1a10;
  --bg: #f1efe8;
  --surface: #ffffff;
  --surface-2: #f2f1ec;
  --text: #15201a;
  --muted: #5b665f;
  --border: #dcdad2;
  --accent: #17663f;
  --strong: #146c3e;
  --strong-bg: #dff3e6;
  --lean: #8a5a00;
  --lean-bg: #fbefd2;
  --pass: #66706a;
  --pass-bg: #ecebe6;
  --live: #d22d2d;
  --win: #146c3e;
  --loss: #c42b2b;
  --bar: #e1dfd7;
  --shadow: 0 1px 2px rgba(15, 40, 25, .06), 0 1px 3px rgba(15, 40, 25, .08);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --turf: #0b2c1c;
    --turf-2: #103a26;
    --on: #1d6a43;
    --bg: #0c1410;
    --surface: #131d17;
    --surface-2: #1a261f;
    --text: #e9efe9;
    --muted: #97a59c;
    --border: #26342b;
    --accent: #5fd08f;
    --strong: #5fd08f;
    --strong-bg: #173524;
    --lean: #f0b54c;
    --lean-bg: #3a2c12;
    --pass: #97a59c;
    --pass-bg: #1f2a23;
    --live: #ff5d5d;
    --win: #5fd08f;
    --loss: #ff6b6b;
    --bar: #26342b;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --turf: #0b2c1c;
  --turf-2: #103a26;
  --on: #1d6a43;
  --bg: #0c1410;
  --surface: #131d17;
  --surface-2: #1a261f;
  --text: #e9efe9;
  --muted: #97a59c;
  --border: #26342b;
  --accent: #5fd08f;
  --strong: #5fd08f;
  --strong-bg: #173524;
  --lean: #f0b54c;
  --lean-bg: #3a2c12;
  --pass: #97a59c;
  --pass-bg: #1f2a23;
  --live: #ff5d5d;
  --win: #5fd08f;
  --loss: #ff6b6b;
  --bar: #26342b;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* layout rules like .field { display: flex } must not un-hide things */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
h3 { margin: 24px 0 10px; font: 700 18px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
a { color: var(--accent); }

/* Header: turf with yard lines */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .07) 79px 81px),
    linear-gradient(180deg, var(--turf-2), var(--turf));
  border-bottom: 3px solid var(--yellow);
  color: var(--chalk);
}

/* Logo: a down-and-distance marker */
.brand { display: inline-flex; align-items: stretch; font-family: var(--display); font-weight: 800; font-size: 20px;
  line-height: 1; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.brand .down { background: var(--yellow); color: var(--yellow-ink); padding: 7px 8px 6px; }
.brand .dist { background: #0a1a12; color: var(--chalk); padding: 7px 10px 6px; }
.brand .dist b { color: var(--yellow); font-weight: 800; margin-right: 5px; }

.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; padding: 8px 12px 6px; border-bottom: 3px solid transparent;
  color: rgba(247, 245, 239, .78); font: 700 16px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; cursor: pointer;
}
.tabs button:hover { color: var(--chalk); }
.tabs button[aria-selected="true"] { color: var(--chalk); border-bottom-color: var(--yellow); }
.top .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: var(--chalk); }
.top .icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  width: 38px; height: 38px; font-size: 18px; cursor: pointer; flex: none; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: .4; cursor: default; }

main { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* Week bar: scoreboard */
.weekbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.week-label { flex: 1; text-align: center; display: flex; flex-direction: column; }
.week-label strong { font: 800 30px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.week-label span { color: var(--muted); font-size: 13px; margin-top: 2px; }

.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field > span { text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.field.grow { flex: 1; min-width: 160px; }
.field small { color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; }
/* Inputs and dropdowns share one size, corner radius and focus ring */
.field input, .field select, .search input, .inline-select select {
  height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background-color: var(--surface); color: var(--text); min-width: 0; font-size: 14px; font-weight: 500;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a948d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
input:focus-visible, select:focus-visible, .chips button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Segmented control: one rounded track, the selected option filled in turf green */
.chips {
  display: inline-flex; gap: 2px; padding: 3px; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.show-sm { display: none; }
.chips button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s;
}
.chips button:hover { color: var(--text); }
.chips button.on { background: var(--on); color: var(--chalk); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.chips .count {
  min-width: 22px; padding: 2px 6px; border-radius: 999px; font: 700 12px/1 var(--display);
  font-variant-numeric: tabular-nums; background: var(--border); color: var(--muted);
}
.chips .count:empty { display: none; }
.chips button.on .count { background: rgba(255, 255, 255, .18); color: var(--chalk); }
.chips .lbl { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; }
.is-live .live-dot { background: var(--live); opacity: 1; }

/* Games toolbar */
.toolbar {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .chips { flex: none; }
.search { position: relative; flex: 1; min-width: 200px; display: flex; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; padding-left: 36px; }
.toolbar-sub { padding-top: 10px; border-top: 1px solid var(--border); gap: 16px; }
.inline-select { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.inline-select select { height: 34px; text-transform: none; letter-spacing: 0; }
.toolbar-note { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { .toolbar-note { display: none; } }

.summary { color: var(--muted); margin: 4px 0 12px; }
.section-head { margin: 30px 0 6px; font: 800 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.section-head:first-child { margin-top: 4px; }
.section-head span { font: 400 14px/1.4 "Barlow", sans-serif; text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.note { color: var(--muted); font-size: 13px; }
.explain { margin-top: 20px; color: var(--muted); font-size: 14px; }
.explain summary { cursor: pointer; font-weight: 600; color: var(--text); }
.explain ul { padding-left: 20px; }

/* Game cards */
.day-head { margin: 22px 0 8px; font: 800 18px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  display: flex; align-items: center; gap: 10px; }
.day-head::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--border) 0 10px, transparent 10px 16px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; box-shadow: var(--shadow);
}
.game { position: relative; overflow: hidden; }
.game.strong { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow), var(--shadow); }
.game.strong::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--yellow); }
.game-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; gap: 8px;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.status.live { color: var(--live); font-weight: 700; }
.status.live::before { content: "● "; }
.team { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.team img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.team .name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team .rank { color: var(--muted); font-size: 12px; font-weight: 700; margin-right: 3px; }
.team .rec { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.team .score { font: 800 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.team.lost .name, .team.lost .score { color: var(--muted); }

.lines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; padding: 9px 10px; background: var(--surface-2); border-radius: 8px; font-size: 14px; }
.lines .k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.lines .v { font: 700 18px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.lines .open { color: var(--muted); font-weight: 400; font-size: 12px; }

.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pick { font: 800 21px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font: 700 13px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.badge.strong { color: var(--yellow-ink); background: var(--yellow); }
.badge.lean { color: var(--lean); background: var(--lean-bg); }
.badge.pass, .badge.small { color: var(--pass); background: var(--pass-bg); }
.badge.win { color: var(--win); background: var(--strong-bg); }
.badge.loss { color: var(--loss); background: var(--pass-bg); }

.prob { margin-top: 10px; font-size: 13px; color: var(--muted); }
.prob .row { display: flex; justify-content: space-between; align-items: baseline; }
.prob b { color: var(--text); font: 700 17px/1 var(--display); font-variant-numeric: tabular-nums; }
/* Cover bar with the break-even point marked like the first-down line */
.bar { position: relative; height: 8px; background: var(--bar); border-radius: 999px; margin: 5px 0 7px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.bar::after { content: ""; position: absolute; left: 52.4%; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.bar.good i { background: var(--strong); }
.bar.bad i { background: var(--loss); }

.game-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; font-size: 12px; color: var(--muted); }
.track { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.track.on { background: var(--on); border-color: var(--on); color: var(--chalk); }
.track:disabled { opacity: .45; cursor: default; }
.nopick { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Tables */
.table-wrap.scroll { max-height: 420px; overflow-y: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th:first-child, table.data td:first-child, table.data .l { text-align: left; }
table.data th { font-size: 11px; color: var(--muted); font-weight: 700; background: var(--surface-2); position: sticky; top: 0;
  text-transform: uppercase; letter-spacing: .05em; }
table.data th[data-sort] { cursor: pointer; }
table.data th[data-sort]:hover { color: var(--text); }
table.data tr:last-child td { border-bottom: 0; }
table.data td img { width: 20px; height: 20px; vertical-align: middle; margin-right: 8px; object-fit: contain; }
table.data .good { color: var(--win); font-weight: 700; }
table.data .bad { color: var(--loss); }
table.data .empty { text-align: center; color: var(--muted); padding: 24px; }
table.data select { padding: 4px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
table.data button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }

/* Stat tiles and headline cards: scoreboard numbers */
.stats, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; border-top: 3px solid var(--on); }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .v { font: 800 32px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.cards .card { border-top: 3px solid var(--yellow); }
.cards .card h4 { margin: 0 0 4px; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cards .card .big { font: 800 32px/1.1 var(--display); text-transform: uppercase; }
.cards .card p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Forms, buttons, dialog */
.form h3 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.form { margin-bottom: 16px; }
.primary { background: var(--yellow); color: var(--yellow-ink); border: 0; border-radius: 8px; height: 38px; padding: 0 18px;
  font: 800 16px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.primary:hover { filter: brightness(1.05); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; }
dialog { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 20, 12, .45); }
.settings { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.settings h3 { margin: 0; }
.settings .row { display: flex; justify-content: flex-end; }

.foot { max-width: 1100px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.foot .tagline { font: 700 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--text); flex-basis: 100%; }
.error { color: var(--loss); }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 8px; }
  .brand { margin-right: auto; }
  .tabs { order: 3; flex-basis: 100%; }
  .tabs { gap: 0; justify-content: space-between; }
  .tabs button { padding: 8px 5px 6px; font-size: 14px; letter-spacing: .03em; }
  .grid { grid-template-columns: 1fr; }
  .controls .field:not(.grow):not(.wide) { flex: 1 1 45%; }
  .controls .field.wide, .controls .field.grow { flex: 1 1 100%; }
  .toolbar .chips { flex: 1 1 100%; }
  /* phones: four equal columns, count under the label, so it fits any width */
  .toolbar .chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .toolbar #filter { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .toolbar #market { grid-template-columns: 1fr 1fr; }
  .toolbar #market button { flex-direction: row; height: 32px; }
  .toolbar .chips button { flex-direction: column; height: 50px; gap: 3px; padding: 0 2px; font-size: 13px; }
  .toolbar .chips .count { min-width: 22px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .controls .chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .controls .chips button { padding: 0 4px; font-size: 13px; }
  .search { flex-basis: 100%; }
  .toolbar-sub { gap: 10px; }
  .inline-select { flex: 1 1 100%; justify-content: space-between; }
  .inline-select > span { flex: none; width: 82px; }
  .inline-select select { flex: 1; min-width: 0; width: 100%; }
  .toolbar-note { margin-left: 0; }
  .field select { width: 100%; }
}

/* Game detail view (game.js) */
.game[data-game] { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.game[data-game]:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(15, 40, 25, .14); }
.game[data-game]:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.gd-back { font: 700 16px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; margin: 4px 0 12px; display: inline-block; }
.gd-head { margin-bottom: 12px; }
.gd-team { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.gd-team img { width: 52px; height: 52px; object-fit: contain; }
.gd-name { flex: 1; font: 800 28px/1.05 var(--display); text-transform: uppercase; }
.gd-name span { display: block; font: 500 13px/1.4 "Barlow", sans-serif; text-transform: none; color: var(--muted); }
.gd-name .rank { display: inline; font: 700 18px/1 var(--display); color: var(--muted); margin-right: 6px; }
.gd-score { font: 800 44px/1 var(--display); font-variant-numeric: tabular-nums; }
.gd-team.lost .gd-name, .gd-team.lost .gd-score { color: var(--muted); }
.gd-at { font: 700 13px/1 var(--display); color: var(--muted); text-transform: uppercase; margin: 0 0 0 66px; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.gd-grid .card h3 { margin-top: 0; }
.gd-grid .card > p { margin: 0 0 10px; }
.gd-wide { grid-column: 1 / -1; }
.gd-chosen td { background: var(--surface-2); }
.gd-vs td, .gd-vs th { text-align: center !important; }
.gd-vs .gd-mid { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.gd-vs .gd-sub { text-align: left !important; }
.gd-h4 { margin: 14px 0 6px; font: 700 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gd-form-row { display: flex; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.gd-form-row > b { width: 44px; font-family: var(--display); }
.gd-form-row > div { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.gd-form { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; font: 800 13px/1 var(--display); background: var(--pass-bg); color: var(--pass); }
.gd-form.w { background: var(--strong-bg); color: var(--win); }
.gd-form.l { background: var(--pass-bg); color: var(--loss); }
.gd-form-opp { color: var(--muted); margin-right: 4px; }
.gd-wp { display: grid; grid-template-columns: 1fr; gap: 4px; margin-bottom: 12px; font-size: 13px; }
.gd-wp-bar { height: 12px; border-radius: 999px; background: var(--accent); overflow: hidden; }
.gd-wp-bar i { display: block; height: 100%; background: var(--muted); opacity: .5; }
.gd-wp-num { font: 700 16px/1 var(--display); }
.gd-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.gd-dl dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding-top: 2px; }
.gd-dl dd { margin: 0; }
.gd-chart { width: 100%; height: auto; display: block; margin: 6px 0; overflow: visible; }
.gd-chart .grid { stroke: var(--border); stroke-width: 1; }
.gd-chart .mid { stroke: var(--yellow); stroke-width: 2; stroke-dasharray: 6 5; }
.gd-chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.gd-chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.gd-chart text { fill: var(--muted); font: 600 12px/1 "Barlow", sans-serif; }
.gd-warn { border-left: 5px solid var(--yellow); }
@media (max-width: 640px) {
  .gd-grid { grid-template-columns: 1fr; }
  .gd-name { font-size: 22px; }
  .gd-score { font-size: 36px; }
  .gd-team img { width: 40px; height: 40px; }
  .gd-at { margin-left: 54px; }
}
.gd-grid table.data { font-size: 13px; }
.gd-grid table.data th, .gd-grid table.data td { padding: 7px 8px; }
.gd-grid .badge { font-size: 12px; padding: 2px 7px; }
.gd-grid > * { min-width: 0; }  /* let wide tables scroll inside their card instead of stretching it */

/* Model change notice (Games tab) and log (Track record) */
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--yellow); border-radius: 12px;
  font-size: 14px; box-shadow: var(--shadow); }
.notice > span:nth-child(2) { flex: 1; min-width: 200px; }
.notice-tag { font: 700 13px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--yellow-ink);
  background: var(--yellow); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.notice-x { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px; }
.notice-x:hover { color: var(--text); }
.change { margin-bottom: 12px; border-left: 5px solid var(--yellow); }
.change h4 { margin: 2px 0 10px; font: 800 20px/1.2 var(--display); text-transform: uppercase; }
.change-date { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Updates tab */
.up-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.up-layout aside { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.up-list { display: flex; flex-direction: column; gap: 10px; }
.up { position: relative; padding-top: 12px; }
.up h3 { margin: 6px 0 4px; font-size: 20px; }
.up p { margin: 0; font-size: 14px; }
.up-dl { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.up-type { display: inline-block; padding: 2px 8px; border-radius: 6px; font: 700 12px/1.3 var(--display); text-transform: uppercase;
  letter-spacing: .06em; background: var(--pass-bg); color: var(--pass); }
.up-model { border-left: 5px solid var(--yellow); }
.up-model .up-type { background: var(--yellow); color: var(--yellow-ink); }
.up-feature .up-type { background: var(--strong-bg); color: var(--strong); }
.up-design .up-type { background: var(--lean-bg); color: var(--lean); }
.fb-card h3 { margin-top: 0; }
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-form select, .fb-form input { width: 100%; }
.fb-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: 500 14px/1.4 "Barlow", sans-serif; resize: vertical; }
.fb-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-form .primary { align-self: flex-start; }
.fb-item { display: block; padding: 9px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.fb-item:last-child { border-bottom: 0; }
.fb-item:hover .fb-title { color: var(--accent); }
.fb-title { display: block; font-weight: 600; font-size: 14px; }
.fb-meta { font-size: 12px; color: var(--muted); }
.fb-label { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-right: 4px;
  background: var(--pass-bg); color: var(--pass); }
.fb-suggestion { background: var(--strong-bg); color: var(--strong); }
.fb-problem, .fb-bug { background: var(--lean-bg); color: var(--lean); }
@media (max-width: 860px) {
  .up-layout { grid-template-columns: 1fr; }
  .up-layout aside { position: static; }
}

/* Model pick box: who the model picked and how it's doing, impossible to misread */
.pickbox { margin: 10px 0 2px; padding: 10px 12px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.pickbox-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pickbox-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pickbox-main { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pickbox-main img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.pickbox-main .pick { font-size: 22px; }
.pickbox-note { margin-top: 6px; font-size: 13px; line-height: 1.35; }
.pick-chip { padding: 3px 9px; border-radius: 6px; font: 800 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; background: var(--pass-bg); color: var(--pass); }
.pb-win { background: var(--strong-bg); border-color: var(--win); }
.pb-win .pick-chip { background: var(--win); color: var(--surface); font-size: 16px; }
.pb-loss { background: color-mix(in srgb, var(--loss) 10%, var(--surface)); border-color: var(--loss); }
.pb-loss .pick-chip { background: var(--loss); color: var(--surface); font-size: 16px; }
.pb-loss .pickbox-main .pick { color: var(--muted); }
.pb-push .pick-chip { background: var(--muted); color: var(--surface); font-size: 16px; }
.pb-covering { border-color: var(--win); }
.pb-covering .pick-chip { background: var(--strong-bg); color: var(--win); }
.pb-behind { border-color: var(--lean); }
.pb-behind .pick-chip { background: var(--lean-bg); color: var(--lean); }
/* the picked team in the score rows */
.team.picked .name { font-weight: 800; }
.pick-tag { padding: 1px 6px; border-radius: 4px; font: 800 11px/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase;
  background: var(--yellow); color: var(--yellow-ink); flex: none; }
.gd-name .pick-tag { display: inline-block; vertical-align: middle; margin-left: 8px; font: 800 13px/1.3 var(--display); color: var(--yellow-ink);
  text-transform: uppercase; letter-spacing: .08em; }

/* Ratings tab: guide and Compare two teams */
.rt-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 16px; }
.rt-guide summary { cursor: pointer; font: 800 18px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.rt-guide[open] summary { margin-bottom: 4px; }
.rt-dl { font-size: 14px; }
.rt-list { margin: 0; padding-left: 18px; font-size: 14px; }
.rt-list li { margin-bottom: 5px; }
.rt-example { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; line-height: 1.45; }
.rt-compare h3 { margin-top: 0; }
.rt-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rt-pickers select { width: 100%; }
.rt-opts { align-items: flex-end; }
.rt-line { flex: 1; min-width: 150px; }
.rt-line input { width: 100%; }
#cmp-out table.data { font-size: 13px; }
#cmp-out table.data th, #cmp-out table.data td { padding: 7px 8px; }
@media (max-width: 860px) { .rt-intro { grid-template-columns: 1fr; } }
#cmp-out td .badge { display: inline-block; margin-top: 3px; }
#cmp-out td { white-space: normal; }
/* a collapsed guide becomes a slim bar above the compare tool */
.rt-intro:has(.rt-guide:not([open])) { grid-template-columns: 1fr; }
.close-tag { padding: 2px 7px; border-radius: 5px; font: 800 12px/1.3 var(--display); letter-spacing: .05em; text-transform: uppercase;
  background: var(--yellow); color: var(--yellow-ink); white-space: nowrap; }
/* 5+ point edges: a caution, not a stronger pick */
.badge.check { color: var(--lean); background: transparent; box-shadow: inset 0 0 0 1.5px var(--lean); }
.badge.check::before { content: "⚠ "; }

/* Props tab */
.pp-about { margin-bottom: 14px; }
.pp-about summary { cursor: pointer; font: 800 17px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.pp-about p { font-size: 14px; }
.pp-about .table-wrap { margin: 8px 0; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pp-card { display: flex; flex-direction: column; gap: 10px; }
.pp-head { display: flex; align-items: center; gap: 10px; }
.pp-head img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.pp-name { font: 800 20px/1.1 var(--display); text-transform: uppercase; }
.pp-proj { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pp-proj .k, .pp-last .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pp-num { font: 800 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.pp-last { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pp-chip { min-width: 34px; padding: 3px 6px; border-radius: 6px; text-align: center; font: 700 14px/1.2 var(--display);
  background: var(--pass-bg); color: var(--text); font-variant-numeric: tabular-nums; }
.pp-chip.over { background: var(--strong-bg); color: var(--win); }
.pp-chip.under { background: color-mix(in srgb, var(--loss) 12%, var(--surface)); color: var(--loss); }
.pp-def { margin: 0; }
.pp-inputs { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.pp-inputs input { width: 100%; }
.pp-hint { margin: 0; }
.pp-result { padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.pp-result.pp-lean { border-color: var(--lean); }
.pp-odds { display: flex; justify-content: space-between; font: 700 16px/1 var(--display); text-transform: uppercase; }
.pp-verdict { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pp-verdict .badge { align-self: flex-start; }
.pp-more { margin: 14px auto 0; display: block; }

/* Spread / Total switch on the Games toolbar and Track record */
.toolbar #market button { padding: 0 14px; }
.rec-market { display: flex; justify-content: flex-end; margin: 4px 0 -8px; }
@media (max-width: 640px) { .rec-market { margin-bottom: 4px; } .rec-market .chips { width: 100%; } }

/* Over/under pick: an arrow where the team logo goes */
.ou-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px;
  background: var(--on); color: var(--chalk); font-size: 14px; }
.pickbox-move { color: var(--muted); }

/* Margin of error after a hit rate */
.moe { font: 600 .55em/1 "Barlow", sans-serif; color: var(--muted); letter-spacing: 0; text-transform: none; white-space: nowrap; }
table.data .moe { font-size: 11px; font-weight: 500; }

/* Forward-test verdict: the estimate from line movement, with its range against break-even */
.verdict { margin-bottom: 12px; border-top: 3px solid var(--yellow); }
.verdict h4 { margin: 0 0 4px; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.verdict .big { font: 800 40px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.verdict p { margin: 8px 0 0; font-size: 14px; max-width: 760px; }
.verdict p.note { font-size: 13px; }
.vbar { position: relative; height: 10px; margin: 10px 0 22px; max-width: 520px; background: var(--bar); border-radius: 999px; }
.vbar i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 999px; }
.vbar b { position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px; background: var(--accent); border-radius: 2px; }
.vbar em { position: absolute; top: -4px; width: 3px; height: 18px; margin-left: -1.5px; background: var(--yellow); border-radius: 2px; }
.vbar span { position: absolute; top: 15px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.vbar span.be { color: var(--text); font-weight: 700; }

/* Alerts button and panel */
.top-btns { display: flex; gap: 8px; flex: none; }
#alerts-dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.al-head { display: flex; align-items: center; justify-content: space-between; }
.al-head form { margin: 0; }
.alerts > .note { margin: 0; }
.al-way { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); font-size: 14px; }
.al-way code { white-space: nowrap; font-size: 13px; padding: 1px 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); }
.al-copy { display: flex; gap: 8px; margin-top: 4px; }
.al-copy input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 13px; }
.al-sub { margin: 4px 0 0; font: 700 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.al-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.al-list li { padding: 10px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.al-list li p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.al-list li .note { margin-left: auto; font-size: 12px; }
.al-kind { font: 700 11px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px;
  background: var(--pass-bg); color: var(--pass); }
.al-kind.al-pick, .al-kind.al-total { background: var(--strong-bg); color: var(--strong); }
.al-kind.al-key { background: var(--lean-bg); color: var(--lean); }

/* QB watch: a likely quarterback change, from box scores */
.qb-tag { padding: 2px 7px; border-radius: 5px; font: 800 12px/1.3 var(--display); letter-spacing: .05em; text-transform: uppercase;
  color: var(--lean); box-shadow: inset 0 0 0 1.5px var(--lean); white-space: nowrap; }
.gd-qb p { margin: 0 0 8px; }

/* Bowl, playoff and conference championship names */
.game-note { margin: -2px 0 6px; font: 700 13px/1.25 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
