/* WagerWall app layer.
   The design system is assets/system.css (tokens, grid, nav, buttons, cards, tabs) with
   assets/ui/cards.css and assets/motion (hover and press). This file only adds what a data
   dashboard needs that the kit lacks, and uses the kit's tokens for every size and colour. */

:root {
  /* results only (win, loss, pending): always shown with their word, never colour alone */
  --pos: #3DDC84;
  --neg: #FF6B61;
  --warn: #F2B33D;
  /* the logo's glow, for edges and the projected winner */
  --glow: #2B8CFF;
  --win: #2B8CFF;
  --lose-bar: #4A5568;
}

/* The logo theme: a faint blue glow at the top of the page, blue-edged cards and header */
body { background: radial-gradient(1200px 600px at 85% -10%, color-mix(in oklab, var(--glow) 14%, transparent), transparent 60%) no-repeat, var(--bg); }
.card { border: 1px solid color-mix(in oklab, var(--glow) 18%, transparent); }
.nav { background: color-mix(in oklab, var(--bg) 88%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--glow) 22%, transparent); }

/* ------------------------------------------------------------ app pages
   Lists of live data scroll at their own height; only the hub's hero is a full screen. */
.app { padding: calc(var(--nav) + var(--s-7)) 0 var(--s-9); min-height: calc(100svh - 72px); }
@media (max-width: 639px) { .app { padding: calc(var(--nav) + var(--s-6)) 0 var(--s-8); } }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--head-gap); }
.page-head > div:first-child { display: grid; gap: var(--s-3); min-width: 0; }
.page-head p { max-width: 62ch; }

.crumbs { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.crumbs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color var(--dur) var(--ease); }
.crumbs a:hover { text-decoration-color: currentColor; }
@media (max-width: 639px) { .crumbs a { display: inline-flex; align-items: center; min-height: 44px; } }

.block { margin-top: var(--s-8); }
.block > h2 { font-size: var(--t-h3); line-height: 1.2; margin-bottom: var(--s-3); }
.block > .note { max-width: 62ch; margin-bottom: var(--s-5); }
.block > .grid + .table-wrap, .block > .stats + .table-wrap { margin-top: var(--s-6); }
.meta { font-size: var(--t-small); color: var(--muted); }

.empty { display: grid; gap: var(--s-4); justify-items: start; max-width: 52ch; padding: var(--s-7) 0; }
.empty h2 { font-size: var(--t-h3); }

.app-foot { border-top: 1px solid var(--line); padding: var(--s-5) 0 var(--s-6); font-size: var(--t-label); color: var(--muted); }
.app-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6); }

/* ------------------------------------------------------------ tags and states */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
       font: 500 var(--t-label)/1 var(--font-text); color: var(--ink); background: color-mix(in oklab, var(--ink) 7%, transparent); }
.tag--edge { color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.tag--win, .tag--live { color: var(--pos); background: color-mix(in oklab, var(--pos) 11%, transparent); }
.tag--loss { color: var(--neg); background: color-mix(in oklab, var(--neg) 10%, transparent); }
.tag--pending { color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, transparent); }
.tag--quiet { color: var(--muted); }
.tag--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* a linked card: one link covers the whole card, so the card is one target */
.cover::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cover:focus-visible { outline: none; }
.card:has(.cover:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .card:hover .link::after { transform: translateX(3px); } }

/* ------------------------------------------------------------ hub
   The first screen: the words left, the sports to choose from right. It grows when a short
   screen cannot hold the cards, so nothing is ever cut. */
main > .hero.hub { height: auto; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
main > .hero.hub > .wrap { height: auto; }
.hub h1 { font-size: clamp(38px, 2.48vw + 28.3px, 64px); line-height: 1.04; letter-spacing: var(--display-tracking-xl, var(--display-tracking)); }
.hub .hero-split > .hero-visual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); align-content: start; height: auto; }
/* a desktop: the two small cards run down to the facts' bottom line */
@media (min-width: 1024px) { .hub .hero-split > .hero-visual { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; } }
@media (max-width: 1023px) { .hub .hero-split > .hero-visual { flex: none; min-height: 0; } }
@media (max-width: 479px) { .hub .hero-split > .hero-visual { grid-template-columns: minmax(0, 1fr); } }

.sport { --c-pad: 24px; }
.sport--main { grid-column: 1 / -1; }
.sport__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.card > h3.sport__name, .sport__name { font: var(--display-weight) var(--t-h3)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.sport--main .sport__name { font-size: var(--t-h2); line-height: 1; }
.card.sport > p.sport__league { margin: var(--s-1) 0 0; font-size: var(--t-small); color: var(--muted); }
.card.sport > p.sport__why { margin: var(--s-4) 0 0; font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.sport__games { margin-top: var(--s-5); padding: var(--s-4); background: var(--bg); border-radius: var(--r-md); }
.sport__games > li { padding-block: var(--s-3); }
.sport__games > li:last-child { border-bottom: 0; padding-bottom: 0; }
.sport__games .rows__name { font-weight: 400; }
.card.sport > p.sport__more { margin: var(--s-4) 0 0; }
.sport--off { background: none; box-shadow: none; }
.sport--off .sport__name { color: var(--muted); }

/* ------------------------------------------------------------ day navigation */
.daynav { display: flex; align-items: center; gap: var(--s-2); }
.daynav__day { padding: 0 var(--s-3); font-weight: 500; white-space: nowrap; }
.daynav__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn); border: 1px solid var(--line-strong); color: var(--ink);
               transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 90ms var(--ease); }
.daynav__btn:hover { background: color-mix(in oklab, var(--bg) 94%, var(--ink)); border-color: color-mix(in oklab, var(--ink) 35%, transparent); }
.daynav__btn:active { transform: scale(.96); }
.daynav__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
span.daynav__btn { opacity: .3; }
@media (max-width: 639px) { .daynav { width: 100%; justify-content: space-between; } }

/* ------------------------------------------------------------ game cards */
.card.game { --c-pad: 24px; gap: var(--s-4); }
.card.game > p { margin: 0; }
@media (min-width: 640px) and (max-width: 1279px) { .grid > .card.game { grid-column: auto / span 6; } }
.game__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.game__tip { font-size: var(--t-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.game__teams { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.game__teams > .cover { display: grid; gap: var(--s-2); }
.team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
/* the team's logo; if it fails to load, the team's colour dot stands in */
.team__mark { display: grid; place-items: center; width: 32px; height: 32px; }
.team__mark > img { width: 32px; height: 32px; object-fit: contain; }
.team__mark:not(:has(img))::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--team); }
.team__dot { width: 10px; height: 10px; border-radius: 50%; }
.team__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team__score { font-variant-numeric: tabular-nums; }
.card.game > p.game__venue { font-size: var(--t-small); color: var(--muted); margin-top: calc(-1 * var(--s-2)); }
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: var(--s-4); background: var(--bg); border-radius: var(--r-md); }
.lines > div { display: grid; gap: 2px; align-content: start; min-width: 0; }
.lines dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.lines dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines--none { display: block; font-size: var(--t-small); color: var(--muted); }
.game__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-height: 24px; font-size: var(--t-small); }
/* the card's second link sits above the cover link, so it is its own target */
.game__foot .link { position: relative; z-index: 2; }
@media (max-width: 639px) { .lines { padding: var(--s-3); gap: var(--s-2); } .lines dd { font-size: 15px; } }

/* ------------------------------------------------------------ game page */
.matchup { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.matchup__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.matchup__meta > span:not(.tag) { color: var(--muted); }
.matchup__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3); }
.matchup__score .team__dot { align-self: center; }

.card.pick { --c-pad: 28px; gap: var(--s-4); border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.card.pick > p, .card.panel-card > p { margin: 0; }
.card > h2.pick__bet, .pick__bet { font: var(--display-weight) var(--t-h2)/1.05 var(--font-display); letter-spacing: var(--display-tracking); }
.card.pick > p.pick__kind { font-size: var(--t-small); color: var(--muted); margin-top: calc(-1 * var(--s-2)); }
.card.pick > .pick__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.pick__stats > div:first-child .t-stat { color: var(--accent); }
@media (max-width: 479px) { .card.pick > .pick__stats { grid-template-columns: minmax(0, 1fr); } }
.card.pick > p.pick__why { max-width: 56ch; }
.card.pick > p.pick__context { font-size: var(--t-small); color: var(--muted); max-width: 60ch; }
.card.pick--none { border-color: var(--c-border); box-shadow: none; }
.card.pick--none .pick__bet { font-size: var(--t-h3); }
.card.panel-card { --c-pad: 28px; gap: var(--s-4); }
.panel-card .rows__value { font-weight: 500; }
.panel-card .rows > li:last-child { border-bottom: 0; padding-bottom: 0; }
.card.pick > .btn-row { margin-top: var(--s-2); }

/* the brand mark: a padlock, drawn as a mask like the kit's own marks so it takes the accent */
.mark[data-mark="lock"] { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10.5V7a5 5 0 0 1 10 0v3.5h-2.4V7a2.6 2.6 0 0 0-5.2 0v3.5z'/%3E%3Cpath fill-rule='evenodd' d='M6.5 10h11A2.5 2.5 0 0 1 20 12.5v7a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 19.5v-7A2.5 2.5 0 0 1 6.5 10zm5.5 3.6a1.7 1.7 0 0 0-.85 3.17V18.5h1.7v-1.73A1.7 1.7 0 0 0 12 13.6z'/%3E%3C/svg%3E"); }
.card > h2.card__label, .card__label { font: 500 var(--t-small)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); }

.game-tabs { margin: var(--s-8) 0 var(--s-6); }
[role="tabpanel"] > .block:first-child { margin-top: 0; }
[role="tabpanel"] .block { margin-top: var(--s-7); }

.proj { display: grid; gap: var(--s-5); }
.proj__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3) var(--s-4); }
.proj__score .t-stat { font-size: var(--t-h2); }
.prob { display: grid; gap: var(--s-2); }
.prob__labels { display: flex; justify-content: space-between; gap: var(--s-4); font-weight: 500; font-variant-numeric: tabular-nums; }
.prob__bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface); }
.prob__bar > span { height: 100%; }

.checker { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); }
.checker .field { width: 140px; }
.checker__out { flex-basis: 100%; min-height: 1.55em; font-variant-numeric: tabular-nums; }
.notice { padding: var(--s-4); border-radius: var(--r-md); background: color-mix(in oklab, var(--warn) 9%, var(--bg)); font-size: var(--t-small); }
.notice + .notice, .table-wrap + .notice { margin-top: var(--s-4); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 500 var(--t-label)/1.4 var(--font-text); color: var(--muted); white-space: nowrap;
            padding: 0 var(--s-5) var(--s-3) 0; border-bottom: 1px solid var(--line-strong); }
.table td { padding: var(--s-3) var(--s-5) var(--s-3) 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table :is(th, td):last-child { padding-right: 0; }
.table :is(th, td).num { text-align: right; }
.table td.strong, .table td strong { font-weight: 500; }
.table td.dim { color: var(--muted); }
.table td small.sub { display: block; font-size: var(--t-label); font-weight: 400; color: var(--muted); }
.table tr.total td { font-weight: 500; border-top: 1px solid var(--line-strong); }
.table tr.rule td { border-top: 1px solid var(--line-strong); }
.card .table tbody tr:last-child td { border-bottom: 0; padding-bottom: 0; }
/* a phone: the four columns of a card's table fit the card, so the gap column is never off screen */
@media (max-width: 639px) {
  .table :is(th, td) { padding-right: var(--s-3); }
  .card .table { font-size: var(--t-small); }
  .card .table th { white-space: normal; vertical-align: bottom; }
  .card .table .pick-row .tag { display: none; }
  .card .table .pick-row td:first-child { color: var(--accent); }
  .card .table :is(th, td) { padding-right: var(--s-2); }
  .card .table :is(th, td):last-child { padding-right: 0; }
  .card.pick, .card.panel-card { --c-pad: 20px; }
}

/* ------------------------------------------------------------ filters, metric cards, chart */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-7) 0 var(--s-5); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.card.metric { --c-pad: 24px; gap: var(--s-4); }
.card.metric > h3 { display: flex; align-items: center; gap: var(--s-2); }
.metric__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: 0; }
.metric__grid dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.metric__grid dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric__grid dd small { display: block; font-size: var(--t-label); font-weight: 400; color: var(--muted); }
.card.metric.is-prod { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-5) var(--gutter); margin: 0; }
.facts dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.checklist { display: grid; }
.checklist > li { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.checklist > li.is-overall { font-weight: 500; }

.chart { max-width: 640px; margin-bottom: var(--s-6); }
.chart svg { width: 100%; height: auto; }
.chart text { font-family: var(--font-text); fill: var(--muted); }

/* ------------------------------------------------------------ scoreboard, rosters, best picks */
.team__mark--lg, .team__mark--lg > img { width: 48px; height: 48px; }

/* the game page opens on its bubbles, then the scoreboard */
.game-tabs { margin: 0 0 var(--s-5); }

.card.board { --c-pad: 28px; gap: 0; }
.board__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.board__cols, .board__row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 96px 132px; align-items: center; column-gap: var(--s-4); }
.board__cols { font-size: var(--t-label); font-weight: 500; color: var(--muted); text-align: right; padding-bottom: var(--s-2); }
.board__cols > span:first-child { grid-column: 3; }
.board__row { padding-block: var(--s-3); border-top: 1px solid var(--line); }
.board__name { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); min-width: 0; }
.board__name small { display: block; font: 400 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); }
.board__win { text-align: right; font-size: var(--t-lead); font-variant-numeric: tabular-nums; color: var(--muted); }
.board__score { text-align: right; font: var(--display-weight) var(--t-h2)/1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; color: var(--muted); }
.board__row.is-ahead :is(.board__score, .board__win) { color: var(--ink); }
.card.board > .prob__bar { margin-top: var(--s-4); background: var(--bg); }
.board-under { margin-top: var(--card-gap); }
.board-under .card__label { margin-bottom: var(--s-3); }
.card .card__label { margin-bottom: 0; }
.rerun { margin-top: var(--s-6); }
.board__win-inline { display: none; }
/* a phone: the win chance moves under the team's name, so a long name has room */
@media (max-width: 639px) {
  .board__cols, .board__row { grid-template-columns: 36px minmax(0, 1fr) 84px; column-gap: var(--s-3); }
  .board__cols > span:first-child, .board__win { display: none; }
  .board__cols > span:last-child { grid-column: 3; }
  .board__win-inline { display: inline; }
  .team__mark--lg, .team__mark--lg > img { width: 36px; height: 36px; }
  .board__name { font-size: var(--t-card); }
  .roster .table td:first-child { white-space: normal; }
}

/* the glossary bubble and the panel it opens */
.glossary-btn { cursor: pointer; font-family: var(--font-text); font-weight: 500; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.glossary-btn:hover { border-color: var(--line-strong); background: var(--bg); }
.qmark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 500 13px/1 var(--font-text); }
.glossary { width: min(640px, calc(100vw - 2 * var(--s-5))); max-height: min(80vh, 720px); overflow: auto; padding: var(--s-6);
            border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--bg); color: var(--ink); }
.glossary::backdrop { background: color-mix(in oklab, var(--ink) 35%, transparent); }
.glossary__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.glossary__head h2 { font-size: var(--t-h3); }

/* rosters */
.roster__team { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-h3); line-height: 1.2; margin-bottom: var(--s-4); }
.roster__note { margin-top: var(--s-4); }

/* best picks */
.card.bestpick { --c-pad: 24px; gap: var(--s-4); }
.card.bestpick > p { margin: 0; }
.card.bestpick > h2.pick__bet { font-size: clamp(30px, 1vw + 26px, 40px); }
@media (min-width: 640px) and (max-width: 1023px) { .grid > .card.bestpick { grid-column: auto / span 6; } }
.bestpick__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.card.bestpick > p.bestpick__game { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-small); font-weight: 500; }
.bestpick__game .team__mark, .bestpick__game .team__mark > img { width: 24px; height: 24px; }
.bestpick__game .muted { font-weight: 400; }
.bestpick__facts { display: grid; gap: var(--s-2); margin: 0; padding: var(--s-4); background: var(--bg); border-radius: var(--r-md); }
.bestpick__facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.bestpick__facts dt { font-size: var(--t-small); color: var(--muted); }
.bestpick__facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.bestpick__day { margin-top: var(--s-5); }
.page-head + .notice { margin-bottom: var(--s-6); max-width: 70ch; }
.block > .notice { margin-bottom: var(--s-4); max-width: 70ch; }
.notice--ok { background: color-mix(in oklab, var(--pos) 9%, var(--bg)); }
.block > .stats { margin-bottom: var(--s-6); }

.settings { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-4); margin-bottom: var(--s-4); }
.settings .field { width: 220px; }
@media (max-width: 639px) { .settings .field, .settings .btn { width: 100%; } }

/* data freshness in the footer: out-of-date data is said in words, not colour alone */
.freshness .is-stale { color: var(--warn); font-weight: 500; }

/* two game cards side by side (tablet): a long spread like "WAS +10.5" must not run into the total */
@media (min-width: 640px) and (max-width: 1279px) {
  .lines { column-gap: var(--s-4); }
  .lines dd { font-size: var(--t-small); white-space: normal; }
}

/* Why this pick (game page) */
.why { margin-top: var(--card-gap); }
.why__headline { font-size: var(--t-lead, 1.125rem); margin: 0 0 var(--s-4); max-width: 70ch; }
.why .notice { margin-bottom: var(--s-5); max-width: 70ch; }
.why__grid { align-items: start; }
.why .card__label { margin-bottom: var(--s-3); }
.why .meta { margin: 0 0 var(--s-4); max-width: 60ch; }
.why__factors { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.why__factors li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.why__factors li:last-child { border-bottom: 0; padding-bottom: 0; }
.why__title { font-weight: 600; }
.why__effect { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; white-space: nowrap; }
.why__detail { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-small); overflow-wrap: anywhere; }
.why .rows li.is-total { font-weight: 600; }
.why .rows + .card__label { margin-top: var(--s-6); }
.why__rules { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-3); font-size: var(--t-small); }
.why__rules li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s-2); }
.why__rules .is-ok .why__mark { color: var(--pos); }
.why__rules .is-no .why__mark { color: var(--neg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .why__factors li { grid-template-columns: 1fr; } .why__effect { text-align: left; } }
.bestpick__why { list-style: none; margin: var(--s-4) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }

/* your picks: the owner's call on each game, beside the model's */
.yours__intro { max-width: 70ch; margin-bottom: var(--s-5); }
.card.yours { --c-pad: 24px; gap: var(--s-4); }
.card.yours .bestpick__game { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--t-small); font-weight: 500; }
.card.yours .bestpick__game .team__mark, .card.yours .bestpick__game .team__mark > img { width: 24px; height: 24px; }
.yours__pick > p { margin: 0; }
.yours__bet { margin: var(--s-1) 0; font-size: var(--t-h3); line-height: 1.2; }
.yours__bet .muted { font-size: var(--t-body); font-weight: 400; }
.yours__form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); }
.yours__form .field { flex: 1 1 220px; }
.yours__form .yours__units { flex: 0 0 170px; }
.yours__done { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); font-size: var(--t-small); }
.yours__done form { margin-left: auto; }
.yours__own summary { cursor: pointer; font-size: var(--t-small); font-weight: 500; }
.yours__own[open] summary { margin-bottom: var(--s-3); }
.bestpick__why li.pos { color: var(--pos); }
.bestpick__why li.neg { color: var(--neg); }
.yours__history { margin-top: var(--s-6); }
.yours__tags { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); }
h1 > .tag, h2 > .tag { vertical-align: middle; margin-left: var(--s-2); }
@media (max-width: 639px) { .yours__form .yours__units, .yours__form .btn { flex: 1 1 100%; } }

.nfl-intro { max-width: 80ch; margin: calc(-1 * var(--s-4)) 0 var(--s-6); }


/* ---- Sports hub and the Games tab's league chooser (2026-11-18) ---------------------------------- */
main > .hero.hub { min-height: 0; height: auto; padding-block: var(--s-9, 96px) var(--s-8, 72px); }
main > .hero.hub > .hub__wrap { display: grid; grid-template-rows: auto auto; height: auto; row-gap: var(--s-7, 48px); }
.hub__intro { max-width: 46rem; }
.hub h1 { font-size: clamp(36px, 2.2vw + 26px, 58px); line-height: 1.05; letter-spacing: var(--display-tracking-xl, var(--display-tracking)); }
.hub .t-lead { margin-top: var(--s-4); }
.hub__steps { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin: var(--s-5) 0 0; padding: 0; list-style: none; font-size: var(--t-small); color: var(--muted); }
.hub__steps li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hub__step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--ink); font: 500 12px/1 var(--font-mono); }
.league-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap); margin: var(--s-5) 0 0; padding: 0; list-style: none; }
.hub .league-grid { margin-top: 0; }
@media (max-width: 1023px) { .league-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .league-grid { grid-template-columns: minmax(0, 1fr); } }
.card.league { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: var(--s-5); min-height: 128px; padding: var(--s-5) var(--s-6); }
.league__logo { flex: none; width: 64px; height: 64px; object-fit: contain; }
.league__text { flex: 1; min-width: 0; }
.card .league__name, .league__name { margin: 0; font: var(--display-weight) var(--t-h3)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.card .league__kind, .league__kind { margin: var(--s-1) 0 0; font-size: var(--t-small); color: var(--muted); }
.league__go { flex: none; width: 18px; height: 18px; color: var(--muted); }
.league--off { background: none; box-shadow: none; border: 1px dashed var(--line, #dcdcdc); }
.league--off .league__logo { filter: grayscale(1); opacity: .55; }
.league--off .league__name { color: var(--muted); }
.card .league__soon { margin: var(--s-2) 0 0; }

/* NFL v3: our prediction marked apart from the sportsbook numbers */
.card.board--ours { border-top: 3px solid var(--accent); }
.card.board--ours .lines { margin-top: var(--s-4); }
.card.panel--book { background: var(--surface); }

/* the WagerWall logo in the header (2026-11-19): round, so its black corners never show */
.nav__logo img.nav__brand { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* the hub's running-ROI line (2026-11-19): beside the description, above the leagues */
.hub__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--card-gap); align-items: center; }
@media (min-width: 960px) { .hub__top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.card.roi { margin: 0; gap: var(--s-3); }
.roi__head { display: grid; gap: var(--s-1); }
.roi__value { font-size: clamp(28px, 2vw + 16px, 40px); line-height: 1; color: var(--ink); }
.roi__plot { position: relative; }
.roi__plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.roi__grid { stroke: var(--line); stroke-width: 1; }
.roi__grid--zero { stroke: var(--line-strong); }
.roi__tick { font: 500 11px/1 var(--font-text); fill: var(--muted); }
.roi__area { fill: var(--accent); opacity: 0.1; }
.roi__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.roi__end, .roi__dot { fill: var(--accent); stroke: var(--card, var(--bg)); stroke-width: 2; }
.roi__cross { stroke: var(--line-strong); stroke-width: 1; }
.roi__hit { fill: transparent; cursor: crosshair; }
.roi__tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
            padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: var(--t-label); line-height: 1.4; }

/* Pick write-ups (writeup.py): the post, My note, Show the numbers */
.writeup__head { font-size: var(--t-h3, 1.5rem); margin: 0 0 var(--s-3); }
.writeup__exp { margin: 0 0 var(--s-4); max-width: 70ch; color: var(--muted); font-size: var(--t-small); }
.writeup__body { max-width: 70ch; }
.writeup__body p { margin: 0 0 var(--s-4); line-height: 1.6; }
.writeup__note { padding: var(--s-3) var(--s-4); border-left: 3px solid var(--accent, currentColor); background: var(--surface); }
.writeup__foot { color: var(--muted); font-size: var(--t-small); }
.writeup__edit, .writeup__numbers { margin-top: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.writeup__edit summary, .writeup__numbers summary { cursor: pointer; font-weight: 600; }
.writeup__numbers[open] summary { margin-bottom: var(--s-4); }
.writeup__numbers .table-wrap { margin-bottom: var(--s-4); }
.writeup__form { display: grid; gap: var(--s-3); margin-top: var(--s-3); max-width: 70ch; }
.writeup__form textarea { width: 100%; font: inherit; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius, 8px); background: var(--bg, transparent); color: inherit; }
.writeup__form .btn { justify-self: start; }
.bestpick__wu { margin-top: var(--s-3); font-size: var(--t-small); }
.bestpick__wu summary { cursor: pointer; font-weight: 600; }
.bestpick__wu p { margin: var(--s-2) 0 0; line-height: 1.55; }

/* Best Picks medals: 1st gold, 2nd silver, 3rd bronze */
.bestpick__tags { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }
.medal { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.medal__icon { flex: none; display: block; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.18)); }
.medal__ribbon { fill: var(--m-ribbon); }
.medal__ribbon--r { fill: var(--m-ribbon-2); }
.medal__disc { fill: var(--m-disc); stroke: var(--m-edge); stroke-width: 1.5; }
.medal__ring { fill: none; stroke: var(--m-edge); stroke-width: 1; opacity: 0.55; }
.medal__num { font-family: inherit; font-size: 12px; font-weight: 700; fill: var(--m-ink); }
.medal--1 { --m-disc: #E9B937; --m-edge: #9C7210; --m-ink: #4A3500; --m-ribbon: #2F5DD8; --m-ribbon-2: #23459F; }
.medal--2 { --m-disc: #CDD3DB; --m-edge: #7A8594; --m-ink: #2D3540; --m-ribbon: #C23B3B; --m-ribbon-2: #8F2A2A; }
.medal--3 { --m-disc: #D08F55; --m-edge: #8A5425; --m-ink: #3D2108; --m-ribbon: #2E8B57; --m-ribbon-2: #1F633E; }
@media (prefers-reduced-motion: no-preference) {
  .card.bestpick:hover .medal__icon { transform: rotate(-6deg); transition: transform 0.2s ease; }
}

/* Power rankings */
.rankings { margin-top: var(--s-5); }
.rankings__team { display: inline-flex; align-items: center; gap: var(--s-3); }
.rankings__rank { width: 3.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.rankings tbody tr:nth-child(-n+3) .rankings__rank { color: var(--ink); font-weight: 700; }

/* The simulation's projected winner: its win chance and score in the logo blue, the other side muted;
   the win-chance bar the same (team colours vanish on the dark ground) */
.board__row.is-ahead .board__score, .board__row.is-ahead .board__win, .board__row.is-ahead .board__win-inline { color: var(--win); }
.board__row:not(.is-ahead) .board__score { color: var(--muted); }
.prob__bar > span { background: var(--lose-bar); }
.prob__bar > span.is-ahead { background: var(--win); }
/* team logos on the dark ground: a thin silver edge so dark logos (Spurs, Nets, Raiders) stay visible */
.team__mark > img { filter: drop-shadow(0 0 1px rgb(233 237 244 / 0.75)) drop-shadow(0 0 5px rgb(233 237 244 / 0.16)); }

/* Home hero photo (2026-11-20): a sports bar behind the words only, darkened and tinted with the
   logo blue so it reads as a mood, not a picture to look at. Never behind the league cards. */
main > .hero.hub--photo { position: relative; isolation: isolate; overflow: hidden;
  padding-block: calc(var(--nav) + var(--s-9, 96px)) var(--s-9, 96px); }
.hub__photo { position: absolute; inset: 0; z-index: -2; }
.hub__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
main > .hero.hub--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(5 7 12 / 0.88) 0%, rgb(5 7 12 / 0.74) 55%, rgb(5 7 12 / 0.70) 100%),
    linear-gradient(125deg, color-mix(in oklab, var(--glow) 34%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
.hub--photo h1 { font-weight: 700; color: #fff; text-shadow: 0 2px 24px rgb(0 0 0 / 0.45); }
.hub--photo .t-lead { color: #E3E8F0; font-size: clamp(17px, 0.5vw + 15px, 20px); max-width: 38ch; }
.hub__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
html .hub--photo .hub__actions .btn--secondary { background: rgb(5 7 12 / 0.55); color: #fff; border: 1px solid rgb(233 237 244 / 0.45);
  padding-inline: var(--s-5); text-decoration: none; backdrop-filter: blur(4px); }
html .hub--photo .hub__actions .btn--secondary:hover { background: rgb(5 7 12 / 0.75); border-color: rgb(233 237 244 / 0.8); }
.hub--photo .card.roi { background: var(--surface); }
main > section.hub-leagues { height: auto; padding: var(--s-6) 0 var(--s-9, 96px); }
@media (max-width: 767px) {
  main > .hero.hub--photo { padding-block: calc(var(--nav) + var(--s-7, 48px)) var(--s-7, 48px); }
  main > .hero.hub--photo::before { background:
    linear-gradient(180deg, rgb(5 7 12 / 0.66) 0%, rgb(5 7 12 / 0.74) 50%, rgb(5 7 12 / 0.82) 80%, var(--bg) 100%),
    linear-gradient(135deg, color-mix(in oklab, var(--glow) 30%, transparent) 0%, transparent 60%); }
  .hub__photo img { object-position: 50% 20%; }
  .hub__actions .btn { flex: 1 1 auto; justify-content: center; }
}
