/* News Triage. One system font, neutral surfaces, one blue accent, and semantic good/bad/warn
   tints. Phone first: most people arrive from a link on their phone. */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --sunken: #f0f2f5;
  --text: #16181d;
  --muted: #5d6471;
  --faint: #8a909c;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --accent: #2b59c3;
  --accent-strong: #234aa6;
  --on-accent: #ffffff;
  --accent-soft: #e6eefc;
  --act-bg: #e3f6ea;
  --act-text: #146c37;
  --read-bg: #e6eefc;
  --read-text: #2349a3;
  --bad-bg: #fde8e8;
  --bad-text: #b42318;
  --neutral-bg: #eceef2;
  --neutral-text: #4b5260;
  --warn-bg: #fdf1dc;
  --warn-text: #93600a;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 1px 3px rgb(16 24 40 / 0.06);
  --focus: 0 0 0 3px rgb(43 89 195 / 0.35);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 26px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --page: 760px;
  --tap: 40px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --card: #1a1d23;
    --sunken: #15181d;
    --text: #e8eaee;
    --muted: #a0a7b3;
    --faint: #7c838f;
    --border: #2b3039;
    --border-strong: #3a414c;
    --accent: #7aa2ff;
    --accent-strong: #9bb9ff;
    --on-accent: #0d1530;
    --accent-soft: #1c2944;
    --act-bg: #173524;
    --act-text: #7fe0a4;
    --read-bg: #1c2944;
    --read-text: #9dbbff;
    --bad-bg: #3d1c1c;
    --bad-text: #ff9b92;
    --neutral-bg: #2a2e36;
    --neutral-text: #b8bec9;
    --warn-bg: #3a2d14;
    --warn-text: #f5c56b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    --focus: 0 0 0 3px rgb(122 162 255 / 0.4);
  }
}

/* ─── Base ─── */

* {
  box-sizing: border-box;
}

/* Flex and grid containers would otherwise override the hidden attribute. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border-strong) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: var(--text-base) / 1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
  caret-color: var(--accent);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* ─── Controls ─── */

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

.button,
.button-primary,
.vote-form button {
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600;
  font-size: var(--text-md);
  white-space: nowrap;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

.button:hover,
.vote-form button:hover {
  border-color: var(--border-strong);
}

.button-primary,
.vote-form button[type='submit'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover,
.vote-form button[type='submit']:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  transition: color 150ms ease-out, border-color 150ms ease-out;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-button:disabled .icon {
  animation: spin 900ms linear infinite;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Text inputs and selects are 16px so iOS doesn't zoom in when they're focused. */
input[type='text'],
input[type='email'],
input:not([type]),
.league-select {
  font-size: 16px;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 var(--space-3);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

input::placeholder {
  color: var(--faint);
}

input:focus,
.league-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.league-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ─── Top bar ─── */

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.topbar-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-2) var(--space-4);
  padding-top: max(var(--space-2), env(safe-area-inset-top));
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand-mark rect {
  fill: var(--accent);
}

.brand-mark path {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap);
  min-width: 0;
  max-width: 46vw;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sunken);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
}

.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.user-chip:hover {
  border-color: var(--border-strong);
}

.pass-chip {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--act-bg);
  color: var(--act-text);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Page ─── */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-7);
}

.status {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.controls {
  display: grid;
  gap: var(--space-3);
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

/* Sections: a segmented control that stays put while you scroll. */
.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 4px var(--space-2);
  margin: 0 calc(-1 * var(--space-4));
  background: var(--sunken);
  border-block: 1px solid var(--border);
}

.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 2px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button[aria-selected='true'] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--neutral-bg);
  color: var(--neutral-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}

.count:empty {
  display: none;
}

.tabs [data-tab='act'] .count.hot {
  background: var(--accent);
  color: var(--on-accent);
}

/* ─── Feed and cards ─── */

.feed {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
}

.card h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Skipped cards are headlines, not players: a step smaller. */
.card h2:has(a) {
  font-size: var(--text-lg);
  font-weight: 600;
}

.card h2 a {
  color: inherit;
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--accent);
}

.player-pos {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
}

.player-value {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.description {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--text-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.type-badge {
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  background: var(--neutral-bg);
  color: var(--neutral-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.tag.good,
.tag.fa {
  background: var(--act-bg);
  color: var(--act-text);
}

.tag.bad {
  background: var(--bad-bg);
  color: var(--bad-text);
}

.tag.neutral {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.tag.waivers,
.tag.stash {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.tag.add {
  background: var(--act-text);
  color: var(--card);
}

.tag.add,
.tag.stash {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.unsure {
  color: var(--muted);
  font-size: var(--text-xs);
  font-style: italic;
}

/* A card's sections stack with hairlines between them, never boxes inside the box. */
.section-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.section-list > li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}

.section-list > li:last-child {
  padding-bottom: 0;
}

/* Do now / Watch: one row per league. */
.league-row-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
}

.league-row-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  min-width: 0;
  flex: 1;
}

.league-name {
  font-weight: 500;
  font-size: var(--text-md);
}

.league-type {
  color: var(--muted);
  font-size: var(--text-xs);
}

.pickup-facts {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-1) var(--space-2);
  margin: var(--space-1) 0 0;
  font-size: var(--text-md);
}

.pickup-facts dt {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 21px;
}

.pickup-facts dd {
  margin: 0;
  min-width: 0;
}

/* Players: one line per league with the move. */
.move-list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-md);
}

.move-list .muted {
  color: var(--muted);
}

.move-list .league-name {
  margin-right: var(--space-1);
}

/* News lines inside a card: tag and source on top, headline under, votes on the right. */
.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-2);
  row-gap: var(--space-1);
  align-items: center;
}

.news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.news-kind {
  font-weight: 600;
}

.news-kind.good {
  color: var(--act-text);
}

.news-kind.bad {
  color: var(--bad-text);
}

.news-kind.neutral {
  color: var(--neutral-text);
}

.news-reason {
  color: var(--text);
}

.news-title {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.4;
  text-decoration: none;
}

.news-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.more-news {
  margin-top: var(--space-2);
}

.more-news > summary,
.fyi > summary,
.kept > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 36px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.more-news > summary::-webkit-details-marker,
.fyi > summary::-webkit-details-marker,
.kept > summary::-webkit-details-marker {
  display: none;
}

details > summary .icon {
  width: 16px;
  height: 16px;
  transition: transform 150ms ease-out;
}

details[open] > summary .icon {
  transform: rotate(90deg);
}

.kept {
  display: inline-block;
  margin-left: var(--space-2);
}

.kept > summary {
  min-height: 0;
  font-size: var(--text-xs);
}

.kept ul {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.fyi {
  margin-top: var(--space-2);
}

.fyi > summary {
  width: 100%;
  min-height: var(--tap);
  padding: 0 var(--space-1);
}

.fyi > .card {
  margin-top: var(--space-3);
}

/* ─── Votes ─── */

.votes {
  display: inline-flex;
  gap: 2px;
}

.vote {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--faint);
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

.vote .icon {
  width: 17px;
  height: 17px;
}

.vote:hover {
  color: var(--text);
  background: var(--sunken);
}

.vote.up.active {
  color: var(--act-text);
  background: var(--act-bg);
}

.vote.down.active {
  color: var(--bad-text);
  background: var(--bad-bg);
}

.voted-down > :not(.votes):not(.vote-note):not(.vote-form) {
  opacity: 0.5;
}

.vote-note {
  grid-column: 1 / -1;
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.vote-form {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-2);
}

.vote-form input {
  flex: 1 1 200px;
  min-width: 0;
}

/* ─── Today brief and rundown ─── */

.rundown {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.rundown h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.brief {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brief li + li {
  border-top: 1px solid var(--border);
}

.brief-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  grid-template-areas: 'label icon' 'text icon';
  align-items: center;
  column-gap: var(--space-3);
  row-gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--text-md);
  line-height: 1.45;
}

.brief li:last-child .brief-row {
  padding-bottom: 0;
}

.brief-row strong {
  grid-area: label;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
}

.brief-row > span {
  grid-area: text;
}

.brief-row .icon {
  grid-area: icon;
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.brief-row:hover .icon {
  color: var(--text);
}

.brief-row .quiet {
  color: var(--muted);
}

/* ─── Skipped articles ─── */

.decisions {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: var(--space-2);
}

.decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-2);
  font-size: var(--text-md);
}

.pill {
  display: inline-block;
  margin-right: var(--space-1);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pill.act {
  background: var(--act-bg);
  color: var(--act-text);
}

.pill.read {
  background: var(--read-bg);
  color: var(--read-text);
}

.pill.watch {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.related {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* ─── Empty, loading and error states ─── */

.empty {
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--text-base);
}

.empty p {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--muted);
  font-size: var(--text-md);
}

.empty .button {
  margin-top: var(--space-4);
}

.empty.error {
  border-style: solid;
  border-color: var(--bad-bg);
  background: var(--card);
}

.skeleton {
  display: grid;
  gap: var(--space-2);
}

.skeleton span {
  display: block;
  height: 12px;
  border-radius: var(--radius-sm);
  background: var(--sunken);
}

.skeleton span:nth-child(1) {
  width: 30%;
}

.skeleton span:nth-child(2) {
  width: 70%;
  height: 18px;
}

.skeleton span:nth-child(3) {
  width: 92%;
}

.skeleton span:nth-child(4) {
  width: 60%;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton span {
    background: linear-gradient(90deg, var(--sunken) 25%, var(--neutral-bg) 50%, var(--sunken) 75%);
    background-size: 300% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .icon-button:disabled .icon {
    animation: none;
  }
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Username screen ─── */

.who {
  padding: var(--space-5) 0 var(--space-4);
  max-width: 560px;
}

.who-title {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.who-lede {
  margin: var(--space-3) 0 var(--space-6);
  color: var(--muted);
  font-size: var(--text-base);
  max-width: 52ch;
}

.field-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-md);
  font-weight: 600;
}

.who-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.who-row input {
  flex: 1 1 220px;
  min-width: 0;
}

.who-row .button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex: 1 0 auto;
  min-height: 44px;
}

.who-row .button-primary .icon {
  width: 18px;
  height: 18px;
}

.who-error {
  margin: var(--space-2) 0 0;
  color: var(--bad-text);
  font-size: var(--text-sm);
}

.who-error:empty {
  display: none;
}

.who-hint {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.button-quiet {
  margin-top: var(--space-4);
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--text-md);
}

.button-quiet:hover {
  color: var(--accent-strong);
}

.paywall-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

.paywall-actions .button-primary {
  min-height: 44px;
}

.paywall-actions .button-quiet {
  align-self: flex-start;
  margin-top: 0;
}

.paywall-restore {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.paywall-restore .who-hint {
  margin-top: 0;
}

#restore-status:empty {
  display: none;
}

.who-features {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.who-features li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-md);
}

.who-features strong {
  font-weight: 600;
}

.who-features span {
  color: var(--muted);
}

/* ─── Footer and toast ─── */

.site-footer {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) max(var(--space-5), env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: var(--text-xs);
}

.site-footer p {
  margin: 0 0 var(--space-1);
  max-width: 70ch;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-md);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
}

/* ─── Wider screens ─── */

@media (min-width: 640px) {
  .page {
    padding-top: var(--space-5);
  }

  .controls {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .meta {
    grid-column: 1 / -1;
  }

  .tabs {
    margin: 0;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .tabs button {
    font-size: var(--text-md);
  }

  .league-select {
    max-width: 240px;
  }

  .who-title {
    font-size: 30px;
  }
}
