:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #16181d;
  --muted: #676b74;
  --faint: #9a9da4;
  --line: #e5e3dd;
  --line-strong: #d4d1c9;
  --win: #17703a;
  --win-bg: #e3f2e7;
  --loss: #b3261e;
  --loss-bg: #fbe5e3;
  --tie-bg: #eceae5;
  --major: #1f5130; /* the biggest events: tennis's Slams, golf's majors (white text on it) */
  --team: #aa0000;
  --team-ink: #ffffff;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ─── Masthead ─────────────────────────────────────────── */

.masthead {
  background: var(--team);
  color: var(--team-ink);
  transition: background-color .25s ease;
}

/* Breadcrumbs sit on the masthead color, quieter than the title. */
.crumbs ol {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  font-size: 13px;
  font-weight: 500;
}
.crumbs li { display: flex; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .45; }
.crumbs a { text-decoration: none; opacity: .78; }
.crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:focus-visible { outline: 2px solid var(--team-ink); outline-offset: 2px; border-radius: 2px; }
.crumbs [aria-current] { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.masthead-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 16px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.crest {
  flex: none;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: #fff;
}
.crest img { width: 60px; height: 60px; object-fit: contain; }
.crest svg { width: 52px; height: 52px; }
.crest:focus-visible { outline: 2px solid var(--team-ink); outline-offset: 3px; }

.title { min-width: 0; flex: 1; }

.eyebrow:empty { display: none; }
.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}

h1 {
  margin: 0;
  font: 700 36px/1.02 var(--display);
  letter-spacing: .005em;
}

.standing { margin: 4px 0 0; font-size: 15px; opacity: .92; }
.standing strong, .standing .phrase { font-weight: 700; white-space: nowrap; }
.standing .phrase { font-weight: inherit; }
.standing .dot { margin: 0 7px; opacity: .6; }
/* The season, linked to its page on a page within it: as the crumbs' links are */
.standing a { text-decoration: none; }
.standing a:hover { text-decoration: underline; text-underline-offset: 3px; }
.standing a:focus-visible { outline: 2px solid var(--team-ink); outline-offset: 2px; border-radius: 2px; }

.controls { flex: none; align-self: flex-start; display: flex; gap: 8px; align-items: center; }

/* Season picker */
.season-pick { position: relative; display: inline-flex; }
.season-pick select {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 6px 28px 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--team-ink) 45%, transparent);
  background: transparent;
  color: var(--team-ink);
  font: 600 14px/1.4 var(--body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.season-pick::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  pointer-events: none;
}
.season-pick select:hover { background: color-mix(in srgb, var(--team-ink) 10%, transparent); }
.season-pick select:focus-visible { outline: 2px solid var(--team-ink); outline-offset: 2px; }
.season-pick option { color: #15171c; background: #fff; }

/* Team picker */
.picker > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--team-ink) 45%, transparent);
  font-size: 14px;
  font-weight: 600;
}
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary::after { content: " ▾"; font-size: 11px; }
.picker[open] > summary { background: color-mix(in srgb, var(--team-ink) 14%, transparent); }
.picker > summary:focus-visible { outline: 2px solid var(--team-ink); outline-offset: 2px; }

.picker-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% - 12px);
  right: 16px;
  width: min(680px, calc(100vw - 32px));
  padding: 14px 16px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.picker-panel h2 {
  margin: 4px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker-panel ul { list-style: none; margin: 0 0 8px; padding: 0; }
.picker-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}
.picker-panel a:hover { background: var(--bg); }
.picker-panel a[aria-current] { background: var(--bg); font-weight: 700; }

/* ─── Schedule ─────────────────────────────────────────── */

.wrap { max-width: 880px; margin: 0 auto; padding: 20px 16px 40px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.msg { margin: 0; padding: 28px 20px; color: var(--muted); text-align: center; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Copy link (sports/slugs.js): an icon button by an open result. */
.copy-link {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  vertical-align: middle;
  cursor: pointer;
}
.copy-link:hover { background: var(--line); color: var(--ink); }
.copy-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.copy-link .cl-done, .copy-link.is-copied .cl-link { display: none; }
.copy-link.is-copied .cl-done { display: block; }
.copy-link.is-copied { color: var(--win); }

.sched { width: 100%; border-collapse: collapse; table-layout: fixed; }
.c-wk { width: 46px; }
.c-date { width: 104px; }
.c-res { width: 160px; } /* a kickoff and its network, 12:00 PM Prime Video, in full */
.c-rec { width: 70px; }
.c-exp { width: 40px; }

:where(.sched > thead > tr > th) {
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
:where(.sched > * > tr > .wk) { text-align: center; }
:where(.sched > * > tr > .rec) { text-align: right; }

:where(.sched > tbody > tr > td) {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

tr.group th {
  padding: 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  text-align: left;
}
.group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody.upcoming tr.group { cursor: pointer; }
.count {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0;
  text-align: center;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}
.toggle svg { transform: rotate(-90deg); transition: transform .15s ease; }
.toggle[aria-expanded="true"] svg { transform: rotate(0deg); }

tr.game { cursor: pointer; }
tr.game:hover td, tr.game.open td { background: var(--surface-2); }
tr.game td.wk { color: var(--muted); font-weight: 600; }
/* The next game's week sits in a chip of the team's color. */
.next-wk {
  display: inline-block;
  min-width: 24px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--team);
  color: var(--team-ink);
}
/* Playoff rounds (WC, DIV, CONF, SB) in the condensed face so CONF fits the column. */
tr.game td.wk.post { padding-left: 4px; padding-right: 4px; font: 600 15px/1.4 var(--display); letter-spacing: .02em; }

.date { color: var(--ink); }
.dow { color: var(--muted); }

td.opp .ha { display: inline-block; width: 22px; color: var(--muted); font-size: 13px; }
.team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
  max-width: calc(100% - 22px);
  text-decoration: none;
  font-weight: 600;
}
.team > span { overflow: hidden; text-overflow: ellipsis; }
a.team:hover > span { text-decoration: underline; text-underline-offset: 3px; }
.logo { flex: none; display: block; object-fit: contain; }
.logo-blank { display: inline-block; border-radius: 50%; background: var(--line); }
.sm { display: none; }
td.opp .site { margin-left: 8px; color: var(--muted); font-size: 13px; }

.wl {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}
.wl.w { background: var(--win-bg); color: var(--win); }
.wl.l { background: var(--loss-bg); color: var(--loss); }
.wl.t { background: var(--tie-bg); color: var(--muted); }
.score { font-weight: 600; }
.ot { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.kick { font-weight: 600; }
.tv { margin-left: 8px; color: var(--muted); font-size: 13px; }
.note { color: var(--muted); }
.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
  color: var(--loss);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.clock { display: block; font-size: 12px; color: var(--muted); }

td.rec { color: var(--muted); }

td.exp { padding: 0; text-align: center; }
.exp-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.exp-btn svg { transition: transform .15s ease; }
.exp-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.exp-btn:hover { background: var(--line); color: var(--ink); }
.exp-btn:focus-visible, .toggle:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

tr.bye td { color: var(--muted); background: var(--surface-2); font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
tr.bye .bye-label { font-style: italic; }

.sched tr.detail > td {
  padding: 0;
  border-top: 0;
  background: var(--surface-2);
  white-space: normal;
  overflow: visible;
}

/* ─── Box score ────────────────────────────────────────── */

.box { padding: 6px 16px 18px; border-top: 1px dashed var(--line-strong); font-size: 14px; }
.box-msg { margin: 0; padding: 14px 0 0; color: var(--muted); }
.box-link { float: right; margin: 8px -8px 0 8px; }

.box-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px 28px;
  align-items: start;
  padding-top: 12px;
}

/* A box score without its facts (a Super Bowl's page says them in its own head): the line score
   alone, no wider than it would be beside them */
.box-top.box-top-line { grid-template-columns: minmax(0, 560px); }

.box table { border-collapse: collapse; }
.box th, .box td { white-space: nowrap; }
.num { text-align: right; }

.line { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; }
.line th, .line td { padding: 8px 6px; text-align: center; }
.line thead th { font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.line thead th:first-child { text-align: left; padding-left: 10px; }
.line tbody th { text-align: left; padding-left: 10px; font-weight: 600; }
.line tbody tr + tr > * { border-top: 1px solid var(--line); }
.line .tot { font-weight: 700; padding-right: 12px; }
.line tbody tr:not(.won) .tot { color: var(--muted); }
.line tbody td.tot { font-size: 17px; }
.status { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 700; color: var(--muted); }
.status.is-live { color: var(--loss); }

.facts { display: grid; gap: 8px; margin: 0; }
.facts > div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; }
.facts .team { font-weight: 600; gap: 5px; }
.records { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.records .at { margin: 0 4px; color: var(--muted); }
.muted { color: var(--muted); }
.preview .facts { padding-top: 14px; max-width: 560px; }

.sect h3 {
  margin: 22px 0 8px;
  font: 600 17px/1.2 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.scoring { width: 100%; }
.scoring th, .scoring td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.scoring thead th, .tstats thead th, .pstats thead th {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.scoring .num { text-align: right; width: 44px; }
.scoring .q, .scoring .time { width: 48px; color: var(--muted); }
.scoring td.play { white-space: normal; min-width: 220px; }
.scoring td.play .logo { display: inline-block; vertical-align: -4px; margin-right: 8px; }
.ptype {
  display: inline-block;
  min-width: 26px;
  margin-right: 8px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--line);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.tstats { width: 100%; max-width: 520px; }
.tstats th, .tstats td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tstats tbody th { text-align: left; font-weight: 500; color: var(--muted); }
.tstats thead th span { vertical-align: middle; }
.tstats thead .logo { display: inline-block; vertical-align: middle; margin-right: 6px; }
.tstats td { width: 90px; font-weight: 600; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.pstats { width: 100%; font-size: 13px; }
.pstats caption {
  text-align: left;
  padding: 0 0 6px;
  font-weight: 600;
  white-space: nowrap;
}
.pstats caption .logo { display: inline-block; vertical-align: -4px; margin-right: 6px; }
.pstats th, .pstats td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.pstats .name { text-align: left; font-weight: 500; padding-left: 0; }
.pstats thead .name { font-weight: 700; }
.pstats tfoot th, .pstats tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.pstats td.none { text-align: left; color: var(--muted); padding-left: 0; }

.foot { margin: 14px 2px 0; font-size: 13px; color: var(--muted); }

/* ─── A team's season beside its roster ───────────────── */

/* The current season on a wide screen: the schedule in two thirds, the roster (the coach heading
   it) in the third beside it, the page and its masthead widened to hold them. Narrower, or a season
   without a roster (2015), one column as before. team.css does the same for an NBA team. */
#schedule { container: sched / inline-size; }
/* The schedule's column: a box score stacks, a kickoff's network goes under its time, and below
   600 px an opponent is his short name (Commanders). */
@container sched (max-width: 640px) {
  .box-top, .pair { grid-template-columns: 1fr; }
  .sched .tv { display: block; margin-left: 0; font-size: 12px; }
}
@container sched (max-width: 600px) {
  .sched td.opp .lg { display: none; }
  .sched td.opp .sm { display: inline; }
}
@media (min-width: 1200px) {
  [data-view="team"]:has(#roster:not([hidden])) :is(.crumbs ol, .masthead-inner, .wrap) { max-width: 1400px; }
  .tcols:has(> #roster:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .tcols > #roster { margin-top: 0; }
}

/* ─── Football hub: 32 team banners by division ───────── */

[data-view="hub"] .crumbs ol,
[data-view="hub"] .masthead-inner,
[data-view="hub"] .wrap { max-width: 1060px; }
[data-view="hub"] .picker { display: none; }

/* The season's draft, Pro Bowl and All-Pro team, above the conferences */
.hub-lists { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 18px; font-size: 14px; font-weight: 600; }
.hub-lists a { color: var(--muted); text-decoration: none; }
.hub-lists a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.conf + .conf { margin-top: 30px; }
.conf h2 {
  margin: 4px 0 12px;
  font: 700 30px/1 var(--display);
  letter-spacing: .01em;
}
.divisions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
}
.division h3 {
  margin: 0 0 8px;
  font: 600 19px/1.1 var(--display);
}
.banners { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* A flat band of team color framed in the alternate color. */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 5px 9px 5px 5px;
  border: 3px solid var(--c-alt);
  border-radius: 8px;
  background: var(--c);
  color: var(--c-ink);
  text-decoration: none;
}
.banner[data-light-alt] { outline: 1px solid var(--c); outline-offset: -1px; }
.banner:hover { background: color-mix(in srgb, var(--c) 86%, #000); }
.banner:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.banner-crest {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: #fff;
}
.banner-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.banner-loc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  opacity: .82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-nick {
  font: 700 21px/1.05 var(--display);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-rec { flex: none; font-size: 14px; font-weight: 600; opacity: .9; }

/* ─── Front page ───────────────────────────────────────── */

[data-view="home"] .wrap { padding-top: 0; }
.home-head { padding: 44px 0 22px; }
.wordmark { margin: 0; font: 700 72px/.9 var(--display); letter-spacing: -.005em; }
.home-head p { margin: 10px 0 0; font-size: 17px; color: var(--muted); }

.sports { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.sports li { border-bottom: 1px solid var(--line-strong); }
.sport {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 2px 13px;
  text-decoration: none;
}
.sport-name { font: 700 46px/1 var(--display); }
.sport-note { font-size: 15px; }
.sport-link .sport-note { font-weight: 600; }
.sport-soon { color: var(--faint); }
.sport-link:hover .sport-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }
.sport-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* The 32 team colors, division by division. A cleanup once removed this strip
   and James asked for it back, so it stays. */
.strip { flex-basis: 100%; display: flex; height: 10px; margin-top: 6px; }
.strip i { flex: 1; }
.strip i:nth-child(4n):not(:last-child) { margin-right: 4px; }

.home-head { position: relative; }
.home-nav { position: absolute; top: 44px; right: 2px; }
.home-nav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.home-nav a:hover { background: var(--surface); }
.home-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* A sport with something to show: its name, then its leagues. */
.sport-live .sport-name { text-decoration: none; }
.sport-live .sport-name:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }
.sport-live .sport-name:focus-visible, .sport-leagues a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sport-leagues { font-weight: 600; }
.sport-leagues a { text-decoration: none; white-space: nowrap; }
.sport-leagues a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sport-leagues .dot { margin: 0 8px; color: var(--faint); }

/* Each sport's engraving beside its name, linking where the name does. A long league list
   wraps; the dot in front of each league hangs left of the clip, so no line starts with one. */
.sports-home .sport { flex-wrap: nowrap; align-items: center; gap: 22px; padding: 12px 2px; }
.sport-icon { flex: none; display: block; width: 60px; height: 60px; }
.sport-icon img { display: block; width: 100%; height: 100%; }
.sport-soon .sport-icon { opacity: .35; }
/* The hand-colored engraving sits over the plain one and shows while its row is hovered or
   holds focus. Football's shows too, until another row takes the color. */
.sport-icon { position: relative; }
.sport-icon img { transition: opacity .2s ease; }
.sport-icon .ic-c { position: absolute; inset: 0; opacity: 0; }
.sport-color .ic-c, .sport:focus-within .ic-c { opacity: 1; }
.sport-color .ic-m, .sport:focus-within .ic-m { opacity: 0; }
.sports-home:has(.sport:not(.sport-color):focus-within) .sport-color:not(:focus-within) .ic-c { opacity: 0; }
.sports-home:has(.sport:not(.sport-color):focus-within) .sport-color:not(:focus-within) .ic-m { opacity: 1; }
/* Hover by a mouse, trackpad or pen (an iPad's too, whose screen is its primary input), never a
   tap: hover.js keeps :root[data-hover] while the last pointer hovers. */
:root[data-hover] .sport:hover .ic-c { opacity: 1; }
:root[data-hover] .sport:hover .ic-m { opacity: 0; }
:root[data-hover] .sports-home:has(.sport:not(.sport-color):hover) .sport-color .ic-c { opacity: 0; }
:root[data-hover] .sports-home:has(.sport:not(.sport-color):hover) .sport-color .ic-m { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sport-icon img { transition: none; }
}
/* Every other sport's strip, drawn like football's: cells in groups, 4px apart. A flag's bands
   run down it, or across (cs-h); one with white keeps a hairline. */
.colors { flex-basis: 100%; display: flex; gap: 4px; height: 10px; margin-top: 6px; }
.colors > span { flex: 1; display: flex; min-width: 0; }
.colors .cs-h { flex-direction: column; }
.colors i { flex: 1; }
.colors .cs-lt { outline: 1px solid var(--line-strong); outline-offset: -1px; }
.sport-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.sport-live:has(.sport-icon:hover) .sport-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }
.sports-home .sport-leagues { overflow: clip; overflow-clip-margin: 6px; }
.sport-lgs { display: flex; flex-wrap: wrap; margin-left: -20px; }
.sport-lg { white-space: nowrap; }
.sport-lg .dot { display: inline-block; width: 20px; margin: 0; text-align: center; }
@media (max-width: 560px) {
  .sports-home .sport { gap: 16px; padding: 12px 2px 13px; }
  .sport-icon { width: 52px; height: 52px; }
  .sports-home .sport-leagues { flex-basis: 100%; }
}

/* ─── A sport's leagues, and a league's pages ──────────── */

[data-view="sport"] .controls,
[data-view="player"] .controls,
[data-view="league"] .picker { display: none; }
[data-view="league"] .crumbs ol,
[data-view="league"] .masthead-inner,
[data-view="league"] .wrap,
[data-view="player"] .crumbs ol,
[data-view="player"] .masthead-inner,
[data-view="player"] .wrap { max-width: 1060px; }
.leagues .sport-name { font-size: 34px; }

/* ─── Archive progress ─────────────────────────────────── */

[data-view="progress"] .crest,
[data-view="progress"] .controls,
[data-view="credits"] .crest,
[data-view="credits"] .controls { display: none; }

.cr-t th { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; color: var(--muted); }

.pg-units { display: grid; gap: 10px; }
.pg-unit {
  padding: 14px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
/* The sport whose turn it is: white, with a full ink frame. */
.pg-unit.is-turn { background: var(--surface); border: 2px solid var(--ink); padding: 13px 15px 9px; }
.pg-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.pg-top h2 { margin: 0; font: 700 28px/1 var(--display); }
.pg-state { font-size: 14px; font-weight: 600; color: var(--muted); }
.is-turn .pg-state { color: var(--ink); }

.pg-queues { display: grid; gap: 6px; margin-top: 10px; }
.pg-q {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 150px 96px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.pg-lbl { color: var(--muted); }
.pg-num { text-align: right; white-space: nowrap; }
.pg-eta { text-align: right; white-space: nowrap; color: var(--muted); }
.bar {
  display: block;
  height: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--ink); }
.bar.is-done i { background: var(--win); }
.bar.is-empty { background: transparent; border-style: dashed; }

.pg-leagues { margin-top: 8px; font-size: 13px; }
.pg-leagues summary { cursor: pointer; color: var(--muted); width: max-content; }
.pg-leagues summary:hover { color: var(--ink); }
.pg-lt-wrap { overflow-x: auto; }
.pg-lt { width: 100%; margin: 6px 0 4px; border-collapse: collapse; }
.pg-lt th, .pg-lt td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.pg-lt th:first-child { text-align: left; font-weight: 500; padding-left: 0; }
.pg-lt thead th { font-weight: 700; color: var(--muted); }

.pg-feed { margin-top: 28px; }
.pg-feed h2 { margin: 0 0 10px; font: 700 28px/1 var(--display); }
.pg-ft { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-ft td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.pg-ft tr:last-child td { border-bottom: 0; }
.pg-t { width: 1%; white-space: nowrap; color: var(--muted); }
.pg-s { white-space: nowrap; font-weight: 600; }
.pg-lg { font-weight: 400; color: var(--muted); }
.pg-n { width: 1%; white-space: nowrap; text-align: right; color: var(--muted); }
.pg-n .bad { color: var(--loss); font-weight: 600; }

/* ─── Narrow screens ───────────────────────────────────── */

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

@media (max-width: 560px) {
  /* Two divisions across; nickname over record, since nicknames alone are unique. */
  .divisions { gap: 16px 10px; }
  .banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    min-height: 52px;
    padding: 4px 5px 4px 4px;
  }
  .banner-crest { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 34px; height: 34px; border-radius: 6px; }
  .banner-crest .logo { width: 26px; height: 26px; }
  .banner-name { grid-column: 2; grid-row: 1; align-self: end; }
  .banner-loc { display: none; }
  .banner-nick { font-size: 18px; white-space: normal; }
  .banner-rec { grid-column: 2; grid-row: 2; align-self: start; font-size: 12px; }
  .division h3 { font-size: 17px; }
  .conf h2 { font-size: 26px; }
  .wordmark { font-size: 56px; }
  .home-head { padding: 30px 0 18px; }
  .home-nav { top: 30px; }
  .pg-q { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 2px 10px; }
  .pg-eta { grid-column: 2 / -1; text-align: left; font-size: 12px; margin-top: -2px; }
  .pg-eta:empty { display: none; }
  .pg-lg { display: none; }
  .pg-ft td { padding: 7px 8px; }
  .pg-s { white-space: normal; }
  .sport-name { font-size: 36px; }
  .sport-note { font-size: 14px; }
}

@media (max-width: 760px) {
  .box-top { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .masthead-inner { padding: 12px 16px 16px; gap: 12px; flex-wrap: wrap; }
  .crumbs ol { padding-top: 10px; }
  .controls { order: 3; flex-basis: 100%; padding-left: 70px; margin-top: -2px; }
  .crest { width: 58px; height: 58px; border-radius: 14px; }
  .crest img { width: 46px; height: 46px; }
  .crest svg { width: 40px; height: 40px; }
  h1 { font-size: 27px; }
  .standing { font-size: 14px; }
  .picker-panel { grid-template-columns: repeat(2, 1fr); top: calc(100% - 8px); }

  .wrap { padding: 14px 12px 32px; }
  .c-wk { width: 26px; }
  .c-date { width: 48px; }
  .c-res { width: 84px; }
  .c-rec { width: 50px; } /* a record with a tie, 10–6–1, in full */
  .c-exp { width: 22px; }
  :where(.sched > * > tr > *) { padding-left: 4px; padding-right: 4px; }
  :where(.sched > thead > tr > th) { font-size: 10px; letter-spacing: .04em; }
  td.opp .site { display: none; }
  .lg { display: none; }
  .sm { display: inline; }
  td.opp .ha { width: 15px; font-size: 12px; }
  td.opp .team { gap: 4px; max-width: calc(100% - 15px); font-size: 14px; }
  td.opp .team .logo { width: 20px; height: 20px; }
  .score { font-size: 14px; }
  .live .live-txt { display: none; }
  .scoring td.play { min-width: 0; }
  .scoring .q, .scoring .time { width: auto; padding-left: 4px; padding-right: 4px; }
  .scoring .num { width: 30px; padding-left: 4px; padding-right: 4px; }
  .scoring td.play .logo { display: none; }
  .tv { display: block; margin-left: 0; font-size: 12px; }
  .wl { width: 20px; height: 20px; margin-right: 4px; }
  .ot { margin-left: 2px; font-size: 10px; }
  .sched td.wk { padding-left: 2px; padding-right: 2px; }
  .next-wk { min-width: 0; padding: 0 2px; }
  .sched tr.game td.wk.post { padding-left: 0; padding-right: 0; font-size: 12px; }
  .live { margin-right: 4px; font-size: 11px; }
  .exp-btn { width: 22px; }
  td.rec { font-size: 14px; }
  .box { padding: 4px 12px 16px; }
  .facts > div { grid-template-columns: 72px 1fr; }
}

/* Archive progress of a league's newest season: on the front page beside the league, and above
   a league page */
.lg-pct { margin-left: 4px; font-weight: 500; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.archive-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.archive-status a { font-weight: 600; }
.as-bar { display: inline-block; width: 120px; height: 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); overflow: hidden; }
.as-bar i { display: block; height: 100%; background: var(--muted); }
