/* Tipping. Simplified to one question per game: who wins?
 *
 * The confidence slider and the Brier explainer are gone. They were honest and they were
 * unreadable for the audience this page is for. What is left is a pick, the model's pick,
 * and a count. Five type sizes, one accent, no decoration.
 *
 * Tokens come from styles.css. --subtle and --faint are never used for text: both fail
 * WCAG AA on the card surface in light AND dark.
 */

.tip-main {
  --tip-meta: 0.8125rem;   /* 13px, the floor */
  --tip-sm: 0.9375rem;     /* 15px */
  --tip-base: 1rem;        /* 16px */
  --tip-lead: 1.125rem;    /* 18px, the team names */
  --tip-title: 1.75rem;    /* 28px */

  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  color: var(--text);
}

.tip-intro h1 {
  margin: 0 0 0.6rem;
  font-size: var(--tip-title);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tip-lede {
  margin: 0;
  max-width: 58ch;
  font-size: var(--tip-base);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.tip-section-title {
  margin: 0 0 0.85rem;
  font-size: var(--tip-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tip-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

/* Scoreboard: two numbers and who is ahead. ------------------------------- */

.tip-tally {
  display: flex;
  align-items: baseline;
  gap: 2.5rem;
}

.tip-tally-side { display: flex; flex-direction: column; gap: 0.15rem; }

.tip-tally-value {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--text);
}

.tip-tally-label { font-size: var(--tip-sm); color: var(--muted); }

.tip-tally-of {
  margin: 0.75rem 0 0;
  font-size: var(--tip-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tip-verdict {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: var(--tip-sm);
  line-height: 1.6;
  color: var(--text);
  max-width: 62ch;
}
.tip-verdict.ahead { color: var(--green-strong); }

/* Games: hairline-separated rows, never cards inside a card. -------------- */

.tip-list { display: flex; flex-direction: column; }

.tip-game {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.tip-game:first-child { border-top: 0; padding-top: 0.25rem; }
.tip-game:last-child { padding-bottom: 0.25rem; }

.tip-game-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.tip-league {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: var(--tip-meta);
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.tip-date { font-size: var(--tip-meta); color: var(--muted); margin-left: auto; }

/* The pick. Two large targets and nothing between them but a "v". */

.tip-sides {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.5rem;
}

.tip-v {
  align-self: center;
  font-size: var(--tip-meta);
  color: var(--muted);
}

.tip-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tip-side:hover { border-color: var(--text); }
.tip-side:active { transform: translateY(1px); }
.tip-side:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Selected state carries colour AND weight AND a border, so it survives greyscale. */
.tip-side[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
}
.tip-side[aria-pressed="true"] .tip-side-team { font-weight: 600; }

.tip-side-team { font-size: var(--tip-lead); line-height: 1.25; }

.tip-side-model {
  font-size: var(--tip-meta);
  color: var(--muted);
}

.tip-model-line {
  margin: 0;
  font-size: var(--tip-sm);
  line-height: 1.55;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tip-model-line strong { color: var(--text); font-weight: 600; }

.tip-warn { margin: 0; font-size: var(--tip-meta); color: var(--rose-strong); }

/* Played ----------------------------------------------------------------- */

.tip-played-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: var(--tip-sm);
  align-items: baseline;
}
.tip-played-row:first-child { border-top: 0; padding-top: 0; }
.tip-played-row .hit { color: var(--green-strong); font-weight: 600; }
.tip-played-row .miss { color: var(--muted); }

.tip-empty { margin: 0; color: var(--muted); font-size: var(--tip-sm); }

.tip-footer { font-size: var(--tip-meta); line-height: 1.65; color: var(--muted); }
.tip-footer p { margin: 0 0 0.5rem; max-width: 68ch; }
.tip-footer a { color: var(--text); text-underline-offset: 2px; }

@media (max-width: 34rem) {
  .tip-main { padding-top: 1.75rem; gap: 2rem; }
  /* Stack the two sides so each stays a full-width target. */
  .tip-sides { grid-template-columns: 1fr; }
  .tip-v { display: none; }
  .tip-played-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .tip-tally { gap: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tip-side { transition: none; }
  .tip-side:active { transform: none; }
}

/* League headings. The round spans a dozen competitions, so the list needs a spine. */
.tip-league-heading {
  margin: 1.75rem 0 0.25rem;
  font-size: var(--tip-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tip-league-heading:first-child { margin-top: 0; }
/* The first game under a heading opens the group, so it carries no rule of its own. */
.tip-league-heading + .tip-game { border-top: 0; padding-top: 0.5rem; }

/* Competition filter. Eleven leagues in one round is more than anyone scrolls, so the
   round can be narrowed to the sport a visitor actually follows. */
.tip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.tip-filter {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: var(--tip-meta);
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tip-filter:hover { border-color: var(--text); color: var(--text); }
.tip-filter[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--text);
  font-weight: 600;
}
.tip-filter:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.tip-filter-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  margin-left: 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .tip-filter { transition: none; }
}
