/* =============================================================================
   J's Footy Accas: the one stylesheet.

   Premium redesign, phase 2 (2026-10-23). Everything is built from the tokens
   in the :root block below; a colour, size or space that is not a token should
   not appear further down. The only literals are the font files, the shirt
   colours the server writes inline, and the two rgba overlays that need an
   alpha channel (the nav blur and the card top highlight).

   Fonts: Inter only, self-hosted (fonts/OFL-inter.txt), no third-party request.
   The old Archivo, Anton and Permanent Marker files stay on disk because the
   Instagram and video renderers under cards/ load them; this site does not.
   Icons: Lucide, inlined by templates/_icons.html (static/icons/LICENSE-lucide.txt).
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-v20-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/inter-v20-latin-800.woff2') format('woff2');
}

:root {
  /* Surfaces */
  --bg: #0b0b0d;
  --panel: #141418;
  --raised: #1c1c22;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.16);
  --highlight: rgba(255, 255, 255, 0.05);   /* the faint top edge on a card */
  --nav-bg: rgba(11, 11, 13, 0.78);

  /* Text. --text-muted is a shade lighter than the brief's #71717a, which
     measures 4.0:1 on the page background; this one clears AA (4.5:1) on every
     surface above. */
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-muted: #8b8b95;

  /* Accent: J's red from the logo (#c80000 sampled, #cc0000 as the site has
     always had it). ONLY primary buttons, the active nav item and key
     highlights. --accent-text is the same hue lifted to read as small text on
     the dark surfaces. */
  --accent: #cc0000;
  --accent-hover: #a30000;
  --accent-text: #ff6b64;
  --on-accent: #ffffff;

  /* Results only: a settled slip, a leg that hit or missed. Never a market
     tile, never decoration. */
  --win: #4ade80;
  --win-bg: rgba(74, 222, 128, 0.12);
  --loss: #f87171;
  --loss-bg: rgba(248, 113, 113, 0.12);
  --open: #d4a73a;
  --open-bg: rgba(212, 167, 58, 0.12);

  /* The one restrained highlight for "above that league's own average". */
  --edge: #8fb3cc;
  --edge-bg: rgba(143, 179, 204, 0.12);

  /* Result bar greys: the most likely outcome brightest. */
  --seg-lead: #d4d4d8;
  --seg-lead-text: #18181b;
  --seg-1: #52525b;
  --seg-2: #3f3f46;

  /* Two sides of a comparison (match page overview bars and head to head). */
  --side-home: #a1a1aa;
  --side-away: #52525b;

  /* Type: five sizes. */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;     /* 12px: labels, chips, small print */
  --text-sm: 0.875rem;    /* 14px: secondary text, table cells */
  --text-md: 1rem;        /* 16px: body */
  --text-lg: 1.375rem;    /* 22px: card figures, section titles */
  --text-xl: 2rem;        /* 32px: page titles, hero, big numbers */
  --weight: 400;
  --weight-strong: 600;

  /* Spacing, on a 4px scale. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --page: 1100px;
  --topbar-h: 56px;
  --tabbar-h: 60px;
}

@media (max-width: 640px) {
  :root { --text-xl: 1.75rem; }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* Room under the content for the fixed tab bar and the iOS home indicator. */
@media (max-width: 800px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: var(--weight-strong);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s3);
}
/* H1 and H2 go one weight heavier than everything else, with tighter tracking,
   so the headings keep some punch against the neutral cards. */
h1, h2 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }

p { margin: 0 0 var(--s3); }
a { color: var(--accent-text); }
b, strong { font-weight: var(--weight-strong); }

:focus-visible {
  outline: 2px solid var(--edge);
  outline-offset: 2px;
}

.icon { flex: 0 0 auto; vertical-align: middle; }

/* Page shells ------------------------------------------------------------ */

.app-content {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s5) var(--s4) var(--s7);
}

.page-title { font-size: var(--text-xl); margin-bottom: var(--s2); }

.meta { color: var(--text-2); font-size: var(--text-sm); }

.page-footnote {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--text-muted);
}
.page-footnote a { color: var(--accent-text); }

/* Home sections are direct children of <main class="home">. */
.home > section {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s6) var(--s4);
}

/* Navigation -------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--page);
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--weight-strong);
  font-size: var(--text-md);
  white-space: nowrap;
}
.brand-logo { border-radius: var(--radius-sm); display: block; }

.topnav { display: flex; gap: var(--s1); margin-left: var(--s2); }
.topnav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
}
.topnav a:hover { color: var(--text); background: var(--highlight); }
.topnav a.is-current { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

.topbar-cta { margin-left: auto; }

.tabbar { display: none; }

@media (max-width: 800px) {
  .topnav { display: none; }
  .topbar-inner { gap: var(--s3); }
  .topbar-cta .icon { display: none; }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-top: 1px solid var(--border);
  }
  .tabbar a {
    height: var(--tabbar-h);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--weight-strong);
  }
  .tabbar a.is-current { color: var(--accent-text); }
}

/* Buttons and chips -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3) var(--s5);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn--sm { padding: var(--s2) var(--s4); }
.btn--primary, .btn-primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover, .btn-primary:hover { background: var(--accent-hover); }
.btn--ghost, .btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover, .btn-secondary:hover { background: var(--highlight); }
.btn-disabled { cursor: not-allowed; opacity: 0.7; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s2);
  border-radius: var(--radius-pill);
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  line-height: 1.5;
}
.chip--quiet { color: var(--text-muted); }
.chip--edge { background: var(--edge-bg); border-color: transparent; color: var(--edge); }

/* Cards -------------------------------------------------------------------- */

.card, .fixture-card, .record, .filter-bar, .market, .tile, .proj-item, .ms-card, .today-fixture, .testimonial-card, .chat-mock {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top-color: var(--border-strong);
  border-radius: var(--radius);
}

.card { padding: var(--s5); }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--text-2); font-size: var(--text-sm); margin: 0; }
.card-icon { width: 32px; height: 32px; color: var(--text-2); margin-bottom: var(--s3); }
.card-icon svg { width: 100%; height: 100%; }
.card-link { display: inline-block; margin-top: var(--s3); font-weight: var(--weight-strong); font-size: var(--text-sm); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6) var(--s5);
  text-align: center;
  max-width: 560px;
  margin: var(--s6) auto;
}
.empty-state-label { display: block; color: var(--text); font-weight: var(--weight-strong); margin-bottom: var(--s2); }
.empty-state p { color: var(--text-2); font-size: var(--text-sm); margin: 0; }

/* Stat tiles --------------------------------------------------------------- */

.model-label {
  display: block;
  margin: 0 0 var(--s2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* The three-way result as one segmented bar. */
.rbar { display: flex; flex-direction: column; gap: var(--s2); }

.rbar-track { display: flex; gap: 2px; height: 28px; border-radius: var(--radius-sm); overflow: hidden; }
.rbar-seg {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--seg-1);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}
.rbar-seg:nth-child(2) { background: var(--seg-2); }
.rbar-seg.is-lead { background: var(--seg-lead); color: var(--seg-lead-text); }

.rbar-legend { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s2); font-size: var(--text-xs); color: var(--text-2); line-height: 1.35; }
.rbar-item { min-width: 0; overflow-wrap: anywhere; }
.rbar-item--draw { text-align: center; }
.rbar-item--away { text-align: right; }
.rbar-item b { color: var(--text); font-weight: var(--weight-strong); white-space: nowrap; }
.rbar-item.is-lead b { color: var(--text); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.tiles:empty { display: none; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s3) var(--s3) var(--s5);
  overflow: hidden;
  min-width: 0;
}
.tile-pct { font-size: var(--text-xl); font-weight: var(--weight-strong); line-height: 1.1; color: var(--text); }
.tile-label { font-size: var(--text-sm); color: var(--text-2); line-height: 1.35; overflow-wrap: anywhere; }
.tile-meta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); margin-top: var(--s2); }
@media (max-width: 480px) {
  .fx-body, .match-model { padding-left: var(--s3); padding-right: var(--s3); }
}
.tile .chip { white-space: nowrap; padding: 2px 6px; }
.meta .chip { margin: var(--s2) 0; }
.tile-league { font-size: var(--text-xs); color: var(--text-muted); }
.tile-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--raised); }
.tile-bar > span { display: block; height: 100%; background: var(--text-muted); }
.tile--edge .tile-bar > span { background: var(--edge); }

.proj { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.proj-item { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--raised); }
.proj-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.proj-value { font-size: var(--text-lg); font-weight: var(--weight-strong); }

.tile-price, .market-price { display: block; color: var(--text-muted); font-size: var(--text-xs); margin: var(--s2) 0 0; }

.tile-group { margin-top: var(--s4); }
.tile-group:first-child { margin-top: 0; }
.tile-group-title { margin: 0 0 var(--s2); font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }

/* Fixtures (Stats) --------------------------------------------------------- */

.updated { display: inline-flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); padding: var(--s1) var(--s3); border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); font-size: var(--text-xs); font-weight: var(--weight-strong); }
.updated svg { color: var(--text-muted); }

/* Day headers stick just under the top bar while their day scrolls past. */
.day-heading {
  position: sticky;
  top: var(--topbar-h);
  z-index: 5;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  color: var(--text);
  margin: var(--s5) 0 var(--s3);
  padding: var(--s2) 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.league-heading {
  margin: var(--s4) 0 var(--s2);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: var(--s3);
  padding: var(--s4);
  margin: var(--s4) 0;
}
.filter-bar[hidden] { display: none; }
.filter-field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.filter-field--wide { grid-column: span 3; }
.filter-field label { color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.filter-field select, .filter-field input {
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--s2) var(--s3);
  width: 100%;
  min-width: 0;
}
.filter-clear {
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text-2);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--s2) var(--s4);
  cursor: pointer;
}
.filter-clear:hover { color: var(--text); }
.filter-note { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: var(--text-xs); }
.filter-count { color: var(--text-muted); font-size: var(--text-xs); margin: 0 0 var(--s2); }
.filter-empty { color: var(--text-2); padding: var(--s5) 0; }
@media (max-width: 720px) {
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-field--wide { grid-column: 1 / -1; }
}

.fixture-card { margin-bottom: var(--s3); }

/* Collapsed by default. A <details>, so it opens and closes with no script. */
.fx > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  position: relative;
}
.fx > summary::-webkit-details-marker { display: none; }
.fx-top { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--text-xs); padding-right: var(--s6); }
.fx-time { color: var(--text); font-weight: var(--weight-strong); font-size: var(--text-sm); }
.fx-tz { color: var(--text-muted); font-weight: var(--weight); }
.fx-league { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-teams { font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.35; overflow-wrap: anywhere; }
.fx-teams .v { color: var(--text-muted); font-weight: var(--weight); padding: 0 var(--s1); }
.fx-chevron { position: absolute; top: var(--s4); right: var(--s4); color: var(--text-muted); transition: transform 0.15s; }
.fx[open] .fx-chevron { transform: rotate(180deg); }
.fx-body { padding: 0 var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s4); border-top: 1px solid var(--border); padding-top: var(--s4); }
.fx-link { align-self: flex-start; font-size: var(--text-sm); font-weight: var(--weight-strong); text-decoration: none; }
.fx-link:hover { text-decoration: underline; }
.fx-odds { font-size: var(--text-sm); color: var(--text-2); }
.fx-odds summary { cursor: pointer; }
.fx-odds ul { margin: var(--s2) 0 0; padding-left: var(--s4); }
.fx-odds li span { color: var(--text); }
.fixture-note { color: var(--text-2); font-size: var(--text-sm); margin: 0; padding-left: var(--s3); border-left: 2px solid var(--border-strong); }

.fixture-head { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4); }
.fixture-teams { font-weight: var(--weight-strong); font-size: var(--text-md); line-height: 1.35; overflow-wrap: anywhere; }
.fixture-teams .v { color: var(--text-muted); font-weight: var(--weight); padding: 0 var(--s1); }
.fixture-sub { display: block; color: var(--text-2); font-size: var(--text-xs); }

.crest { display: inline-block; vertical-align: -0.35em; }
img.crest { border-radius: 50%; object-fit: cover; }
.crest.shirt { border-radius: 0; }

/* The old market-card pieces, still used by the match page's form blocks. */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); margin: 0 var(--s4) var(--s3); }
.market-grid:empty { display: none; }
.market { background: var(--raised); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); margin: 0 var(--s4) var(--s3); }
.market-grid .market { margin: 0; }
.market-name { display: block; color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s2); }
.market-lines { list-style: none; margin: 0; padding: 0; }
.market-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); font-size: var(--text-sm); padding: var(--s1) 0; }
.market-lines li span:first-child { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.market-lines i { color: var(--text-muted); font-style: normal; font-size: var(--text-xs); margin-left: var(--s1); }
.stat-value { display: inline-flex; align-items: baseline; gap: var(--s1); flex-shrink: 0; white-space: nowrap; }
.stat-none { color: var(--text-muted); font-weight: var(--weight); font-style: italic; font-size: var(--text-xs); }

/* Neutral percentage pill for rates over a handful of matches. A form rate
   is a count of what happened, not a forecast, and it has no good or bad end,
   so it takes no colour. */
.stat-badge { display: inline-block; padding: 0 var(--s2); border-radius: var(--radius-sm); font-weight: var(--weight-strong); background: var(--raised); color: var(--text); }
.stat-badge--high { background: var(--seg-1); color: var(--text); }
.stat-badge--mid { background: var(--raised); color: var(--text); }
.stat-badge--low { background: var(--raised); color: var(--text-2); }

/* Match page ---------------------------------------------------------------- */

.match-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s4); }

.match-tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 5;
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  background: var(--bg);
  padding: var(--s3) 0;
  margin: var(--s3) 0 var(--s2);
  border-bottom: 1px solid var(--border);
}
.match-tabs a {
  flex: 0 0 auto;
  padding: var(--s1) var(--s4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  text-decoration: none;
  white-space: nowrap;
}
.match-tabs a:hover, .match-tabs a:focus-visible { color: var(--text); background: var(--highlight); }

.match-model { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.match-model .fixture-note { margin: 0; }

.overview-bars { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); }
.overview-row { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; gap: var(--s2); }
.overview-value { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.overview-value-home { text-align: right; }
.overview-track { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--raised); }
.overview-half { flex: 1 1 50%; display: flex; height: 100%; }
.overview-half-home { justify-content: flex-end; }
.overview-bar { height: 100%; min-width: 2px; }
.overview-bar-home { background: var(--side-home); }
.overview-bar-away { background: var(--side-away); }
.overview-label { grid-column: 1 / -1; order: -1; color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.overview-legend { display: flex; gap: var(--s4); margin-top: var(--s3); font-size: var(--text-xs); color: var(--text-2); }
.overview-legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.overview-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.dot-home { background: var(--side-home); }
.dot-away { background: var(--side-away); }

.h2h-split { display: flex; gap: 2px; height: 28px; border-radius: var(--radius-sm); overflow: hidden; margin: var(--s3) 0; }
.h2h-split-seg { display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--weight-strong); min-width: 0; overflow: hidden; white-space: nowrap; color: var(--text); }
.h2h-split-home { background: var(--seg-1); }
.h2h-split-draw { background: var(--seg-2); }
.h2h-split-away { background: var(--seg-1); }
.h2h-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.h2h-legend-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--text-sm); color: var(--text-2); }
.h2h-legend-item b { color: var(--text); }
.h2h-legend-item:nth-child(2) { justify-content: center; }
.h2h-legend-item:nth-child(3) { justify-content: flex-end; }
.h2h-meeting-outcome { margin-right: var(--s2); }
@media (max-width: 600px) {
  .h2h-legend { grid-template-columns: 1fr; }
  .h2h-legend-item:nth-child(n) { justify-content: flex-start; }
}

/* A past result mark. Win and loss colours are allowed here: this is a result. */
.form-w, .form-d, .form-l, .form-x {
  display: inline-block;
  width: 1.25rem;
  text-align: center;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  margin-right: var(--s2);
}
.form-w { background: var(--win-bg); color: var(--win); }
.form-d { background: var(--raised); color: var(--text-2); }
.form-l { background: var(--loss-bg); color: var(--loss); }
.form-x { background: var(--raised); color: var(--text-muted); }

.squad-table { width: 100%; border-collapse: collapse; margin-top: var(--s3); font-size: var(--text-sm); background: transparent; }
.squad-table th { text-align: right; color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--border); background: transparent; }
.squad-table th:first-child, .squad-table td:first-child { text-align: left; }
.squad-table td { text-align: right; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.squad-pos { color: var(--text-muted); font-size: var(--text-xs); margin-left: var(--s2); }

/* Tables and the generic verdict chip -------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { border-bottom: 1px solid var(--border); padding: var(--s3) var(--s4); text-align: left; vertical-align: top; font-size: var(--text-sm); }
th { color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; background: var(--raised); }

.verdict { display: inline-block; padding: 2px var(--s2); border-radius: 4px; font-size: var(--text-xs); font-weight: var(--weight-strong); }
.verdict-won { background: var(--win-bg); color: var(--win); }
.verdict-lost { background: var(--loss-bg); color: var(--loss); }
.verdict-incomplete { border: 1px solid var(--border-strong); color: var(--text-2); }

/* Results page ---------------------------------------------------------------- */

.record { padding: var(--s4); margin: var(--s4) 0 var(--s5); }
.record-products { list-style: none; margin: 0 0 var(--s4); padding: 0 0 var(--s4); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s2); }
.record-product { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.record-product-name { flex: 1 1 10rem; font-size: var(--text-sm); }
.record-product-counts { color: var(--text-2); font-size: var(--text-xs); }
.record-product-rate { font-size: var(--text-md); min-width: 3rem; text-align: right; }
.record-product-withheld { color: var(--text-muted); font-size: var(--text-xs); text-align: right; }
.record-lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
@media (min-width: 700px) { .record-lines { grid-template-columns: repeat(4, 1fr); } }
.record-lines li { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.record-lines .record-won b { color: var(--win); }
.record-lines .record-lost b { color: var(--loss); }
.record-lines li span { color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.record-lines li b { font-size: var(--text-lg); line-height: 1.1; }
.record-note { display: block; color: var(--text-muted); font-size: var(--text-xs); line-height: 1.5; margin-top: var(--s3); }

.acca { background: var(--raised); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.acca-won, .slip-won, .ms-v-won { border-left-color: var(--win); }
.acca-lost, .slip-lost, .ms-v-lost { border-left-color: var(--loss); }
.acca-incomplete, .slip-open { border-left-color: var(--open); }
.ms-v-void { border-left-color: var(--text-muted); }
.acca-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); }
.acca-verdict { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--text-xs); font-weight: var(--weight-strong); padding: 2px var(--s2); border-radius: 999px; }
.leg-mark { display: inline-flex; }
.acca-verdict-won { background: var(--win-bg); color: var(--win); }
.acca-verdict-lost { background: var(--loss-bg); color: var(--loss); }
.acca-verdict-incomplete, .acca-verdict-open { background: var(--open-bg); color: var(--open); }
.acca-verdict-void, .acca-verdict-replaced { border: 1px solid var(--border-strong); color: var(--text-2); }
.acca-name { font-size: var(--text-sm); }
.acca-tag { color: var(--text-2); border: 1px solid var(--border-strong); font-size: var(--text-xs); padding: 0 var(--s2); border-radius: 4px; }
.acca-day { margin-left: auto; color: var(--text-2); font-size: var(--text-xs); }

.month { margin: 0 0 var(--s3); }
.month-summary, .slip-summary { cursor: pointer; list-style: none; }
.month-summary::-webkit-details-marker, .slip-summary::-webkit-details-marker { display: none; }
.month-summary { position: relative; padding: var(--s3) var(--s4) var(--s3) var(--s7); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--s2); }
.month-summary::before, .slip-summary::before { content: "\25B8"; position: absolute; left: var(--s4); color: var(--text-muted); }
.month[open] > .month-summary::before, .slip[open] > .slip-summary::before { content: "\25BE"; }
.month-label { font-weight: var(--weight-strong); }

.slip { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); margin: 0 0 var(--s2) var(--s3); }
.slip-summary { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); padding: var(--s3) var(--s4) var(--s3) var(--s7); font-size: var(--text-sm); }
.slip-tier { font-size: var(--text-xs); color: var(--text-muted); }
.slip-date { color: var(--text-2); font-size: var(--text-xs); margin-left: auto; }
.slip-odds { font-size: var(--text-sm); min-width: 5.5rem; text-align: right; }
.slip-body { padding: 0 var(--s4) var(--s3) var(--s7); }
.slip-note, .slip-fingerprint { margin: var(--s2) 0 0; font-size: var(--text-xs); color: var(--text-2); }
.slip-fingerprint code { color: var(--text); }
@media (max-width: 560px) {
  .slip { margin-left: 0; }
  .slip-date { margin-left: 0; }
  .slip-odds { text-align: left; min-width: 0; }
}

.acca-legs { list-style: none; margin: 0; padding: 0; }
.acca-leg { display: grid; grid-template-columns: 1.25rem minmax(0, 1.4fr) minmax(0, 1.2fr) 7.5rem; align-items: baseline; gap: var(--s2); font-size: var(--text-sm); padding: var(--s1) 0; }
.leg-mark { color: var(--text-muted); }
.leg-hit .leg-mark { color: var(--win); }
.leg-miss .leg-mark { color: var(--loss); }
.leg-bet { overflow-wrap: anywhere; }
.leg-fixture, .leg-outcome { color: var(--text-2); font-size: var(--text-xs); overflow-wrap: anywhere; }
.leg-outcome { text-align: right; }
@media (max-width: 560px) {
  .acca-leg { grid-template-columns: 1.25rem minmax(0, 1fr); }
  .leg-fixture, .leg-outcome { grid-column: 2; text-align: left; }
}

/* Slips ----------------------------------------------------------------------- */

.ms-days { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--text-sm); }
.ms-days a, .ms-past a { color: var(--text-2); }
.ms-past { margin: 0 0 var(--s4); font-size: var(--text-sm); }
.ms-day { font-weight: var(--weight-strong); }
.ms-summary { font-size: var(--text-md); font-weight: var(--weight-strong); margin: 0 0 var(--s2); }
.ms-nofree { margin: 0 0 var(--s4); color: var(--text-2); }
.ms-unavailable { margin: var(--s3) 0 var(--s1); color: var(--text-2); font-style: italic; }
.ms-empty { display: flex; flex-direction: column; gap: var(--s4); max-width: 640px; }
.ms-example { position: relative; overflow: hidden; }
.ms-example .ms-leg:last-child { border-bottom: 0; }
.ms-watermark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--text-xl); font-weight: var(--weight-strong); letter-spacing: 0.3em; color: var(--text-muted); opacity: 0.25; transform: rotate(-14deg); pointer-events: none; user-select: none; }
.ms-none-text, .ms-next { margin: 0; }
.ms-list { display: flex; flex-direction: column; gap: var(--s4); }
.ms-card { padding: 0; overflow: hidden; position: relative; }
/* Side gutters for everything that is not a full-bleed band. The :not() chain
   outranks the single-class rules (.ms-testing, .ms-code and so on) that set
   their own vertical margins. */
.ms-card > :not(.ms-head):not(.ms-frost):not(.ms-foot):not(.ms-legs) { margin-inline: var(--s4); }
.ms-card > .ms-head, .ms-card > .ms-frost { margin: 0; }
.ms-replaced { opacity: 0.8; }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--raised); border-bottom: 1px dashed var(--border-strong); }
.ms-product { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.ms-tags { display: inline-flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.ms-sub { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); margin-bottom: var(--s2); }
.ms-total-odds { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.ms-total-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--weight-strong); }
.ms-total-odds b { font-size: var(--text-xl); }
.ms-foot { margin: 0; padding: var(--s3) var(--s4) var(--s4); border-top: 1px dashed var(--border-strong); background: var(--raised); }
.ms-card > .ms-foot { margin: 0; }
.ms-foot > p { margin-left: 0; margin-right: 0; }
.ms-kick { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--text-sm); }
.ms-badge { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--text-xs); font-weight: var(--weight-strong); padding: 2px var(--s2); border-radius: 4px; background: var(--bg); color: var(--text-2); }
.ms-badge-free { background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); }
.ms-badge-members { background: var(--accent); color: var(--on-accent); }
.ms-badge-won { background: var(--win-bg); color: var(--win); }
.ms-badge-lost { background: var(--loss-bg); color: var(--loss); }
.ms-badge-void { background: var(--raised); color: var(--text); }
.ms-badge-replaced, .ms-badge-open { background: var(--open-bg); color: var(--open); }
.ms-meta { margin: var(--s3) 0 var(--s1); color: var(--text-2); font-size: var(--text-sm); }
.ms-code { margin: 0 0 var(--s3); color: var(--text-2); font-size: var(--text-sm); }
.ms-code code, .ms-check code { color: var(--text); letter-spacing: 0.05em; }
.ms-testing { margin: var(--s3) 0 0; color: var(--text-2); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.ms-legs { list-style: none; margin: var(--s3) var(--s4); padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ms-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.ms-leg:last-child { border-bottom: 0; padding-bottom: var(--s2); }
.ms-fixture { grid-column: 1 / -1; color: var(--text-2); font-size: var(--text-sm); }
.ms-sel { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.ms-odds { text-align: right; font-weight: var(--weight-strong); min-width: 3rem; padding: 0 var(--s2); background: var(--raised); border-radius: 6px; align-self: start; }
.ms-leg-result { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.ms-leg-won .ms-leg-result { color: var(--win); }
.ms-leg-lost .ms-leg-result { color: var(--loss); }
.ms-total { margin: var(--s2) 0 0; }

.ms-l10 { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-top: var(--s1); position: relative; }
.ms-l10-count { font-weight: var(--weight-strong); font-size: var(--text-sm); }
.ms-dots { display: inline-flex; gap: 3px; }
.ms-dot { position: relative; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--weight-strong); cursor: default; }
.ms-dot-hit { background: var(--win-bg); color: var(--win); }
.ms-dot-miss { background: var(--loss-bg); color: var(--loss); }
.ms-tip { display: none; position: absolute; z-index: 5; top: 26px; left: 0; width: max-content; max-width: 240px; padding: var(--s1) var(--s2); border-radius: 6px; background: var(--text); color: var(--bg); font-size: var(--text-xs); font-weight: var(--weight); line-height: 1.3; text-align: left; }
.ms-dot:hover .ms-tip, .ms-dot:focus .ms-tip { display: block; }
.ms-dot:nth-child(n+6) .ms-tip { left: auto; right: 0; }
.ms-l10-label { flex-basis: 100%; color: var(--text-2); font-size: var(--text-xs); }
.ms-l10-note { margin: var(--s1) 0 0; color: var(--text-muted); font-size: var(--text-xs); }
.ms-frost { position: relative; padding: var(--s2) var(--s4) var(--s4); }
.ms-frost .ms-legs { margin: 0; filter: blur(6px); opacity: 0.8; }
.ms-legs-locked li { display: flex; flex-direction: column; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); user-select: none; }
.ms-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); text-align: center; background: rgba(11, 11, 13, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ms-lock-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--raised); border: 1px solid var(--border-strong); color: var(--text); }
.ms-lock .ms-meta { margin: 0; }
.ms-ph { display: block; height: 0.8rem; border-radius: 4px; background: var(--border-strong); }
.ms-ph-a { width: 55%; }
.ms-ph-b { width: 80%; background: var(--text-muted); }
.ms-legs-locked li:nth-child(2n) .ms-ph-a { width: 70%; }
.ms-legs-locked li:nth-child(3n) .ms-ph-b { width: 60%; }
.ms-reveal { margin: var(--s3) 0 0; color: var(--text-2); font-weight: var(--weight-strong); }
.ms-lock-note { margin: var(--s2) 0 var(--s3); color: var(--text-2); font-size: var(--text-sm); }
.ms-cta { width: 100%; }
.ms-check { margin-top: var(--s3); font-size: var(--text-sm); }
.ms-check summary { cursor: pointer; color: var(--text-2); }
.ms-check pre { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: var(--s2); margin: var(--s1) 0 var(--s3); }
@media (min-width: 720px) {
  .ms-list { max-width: 640px; margin-left: auto; margin-right: auto; }
  .ms-cta { width: auto; }
}

/* Home ------------------------------------------------------------------------- */

/* Hero: the header image, darkened so white text passes AA on any part of it. */
.home > .home-hero {
  position: relative;
  max-width: none;
  padding: var(--s7) var(--s4);
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  text-align: center;
  isolation: isolate;
}
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.75)); }
.home-hero-copy { max-width: 46rem; }
.home-hero-copy h1 { font-size: var(--text-xl); margin-bottom: var(--s3); color: #fff; }
.home-hero-lede { color: #e8e8e8; font-size: var(--text-md); margin-bottom: var(--s5); }
.home-hero-actions { display: flex; justify-content: center; }
@media (min-width: 900px) {
  .home > .home-hero { padding-top: 6rem; padding-bottom: 6rem; }
  .home-hero-copy h1 { font-size: 40px; line-height: 1.1; }
}

/* Telegram copy beside the free slip: two equal columns, the same width as the panels above. */
.tg-split { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: center; }
.tg-split-copy { text-align: center; }
.tg-split-copy p { color: var(--text-2); max-width: 480px; margin: 0 auto var(--s5); }
@media (min-width: 900px) { .tg-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); } }
.home-hero-card { min-width: 0; }
.home-hero-card .ms-empty { max-width: none; gap: var(--s3); }
.home-hero-card .ms-cta { width: auto; }
.hero-note, .hero-next { padding: var(--s5); }
.hero-note h2, .hero-next-title { font-size: var(--text-md); margin-bottom: var(--s2); }
.hero-note p { margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.hero-fixture { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.hero-fixture-when { font-size: var(--text-xs); color: var(--text-muted); }
.hero-fixture-teams { font-weight: var(--weight-strong); }

.home-panels { display: grid; grid-template-columns: 1fr; gap: var(--s3); padding-top: 0; padding-bottom: var(--s6); }
@media (min-width: 700px) { .home-panels { grid-template-columns: repeat(3, 1fr); } }
.panel { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight); }
.panel-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; }
.panel-big { font-size: var(--text-xl); line-height: 1.1; }
.panel-sub { font-size: var(--text-sm); color: var(--text-2); }
.panel-figs { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--text-sm); color: var(--text-2); }
.panel-figs b { font-size: var(--text-lg); color: var(--text); margin-right: 2px; }
.panel-figs .fig-won b { color: var(--win); }
.panel-figs .fig-lost b { color: var(--loss); }
.panel-none { margin: 0; font-size: var(--text-sm); color: var(--text-2); }
a.panel--link { color: inherit; text-decoration: none; }
a.panel--link:hover { border-color: var(--border-strong); background: var(--highlight); }
.panel-link { margin-top: auto; font-size: var(--text-sm); color: var(--text-2); }

.today-more { margin: var(--s3) 0 0; font-size: var(--text-sm); }
.today-more a { color: var(--text-2); }

.features { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }

.mid-cta { text-align: center; }
.mid-cta p { color: var(--text-2); margin-bottom: var(--s5); }
.hero-community { max-width: 640px; }
.hero-community p { color: var(--text-2); font-size: var(--text-sm); }
.testimonials h2, .closing-cta h2 { text-align: center; }
.testimonial-track { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s2); }
.testimonial-card { flex: 0 0 82%; scroll-snap-align: start; padding: var(--s5); }
@media (min-width: 700px) { .testimonial-card { flex-basis: 31%; } }
.quote { font-size: var(--text-md); }
.handle { color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.closing-cta { text-align: center; }
.closing-cta p { color: var(--text-2); max-width: 480px; margin: 0 auto var(--s5); }

/* Legal, contact, news -------------------------------------------------------- */

.legal-content { max-width: 640px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); }
.legal-content p { color: var(--text-2); font-size: var(--text-sm); margin: 0 0 var(--s4); }
.legal-content a { color: var(--accent-text); }
.contact-card { max-width: 40rem; }

.news-list { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.news-item { border-bottom: 1px solid var(--border); padding: var(--s4) 0; }
.news-title { display: block; color: var(--text); text-decoration: none; font-weight: var(--weight-strong); }
.news-title:hover { text-decoration: underline; }
.news-meta { display: block; color: var(--text-2); font-size: var(--text-xs); margin-top: var(--s1); }
.news-summary { color: var(--text-2); font-size: var(--text-sm); margin: var(--s2) 0 0; }

/* Footer ------------------------------------------------------------------------ */

body > footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s6) var(--s4);
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer-links { display: flex; justify-content: center; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-bottom: var(--s4); }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: var(--text-sm); }
.footer-links a:hover { color: var(--text); }
.footer-fine { color: var(--text-muted); font-size: var(--text-xs); max-width: 520px; margin: 0 auto var(--s2); }
