/* Fonts are served from static/fonts (see the README there), not from Google. */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-1.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-3.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-latin-4.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-5.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-7.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-latin-8.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/oswald-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/oswald-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/oswald-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* Themes. Dark is the default. Light applies when the device asks for it (unless the visitor picked dark) or
   when the visitor picked light with the header toggle (data-theme on <html>). The hero panels (.hero-top,
   .fixtures-hero, .results-banner) keep the dark palette in dark mode so their photos and white headlines
   stay as designed, but in light mode they switch to the light palette too (see the extra selectors added
   to the light overrides below) so their washed-out pitch photo reads with dark ink text. */
:root,
.hero-top,
.fixtures-hero,
.results-banner {
  --bg: #06090f;
  --panel: #111827;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-strong: rgba(255, 255, 255, 0.18);
  --track: #1d2432;
  --text: #e8ecf4;
  --text-bright: #ffffff;
  --text-dim: #9aa5b8;
  --text-dim-2: #8a94a6;
  --text-dim-3: #6f7a8c;

  /* Accent fills (bars, rings, pills, chart lines). */
  --home: #22c55e;
  --draw: #8a94a6;
  --away: #3b82f6;
  --value: #22c55e;
  --overpriced: #e4574c;
  --purple: #a78bfa;
  --orange: #ff9f43;
  --teal: #2dd4bf;
  --gold: #f5c451;

  /* The same accents when used as TEXT or line icons: identical on dark, a deeper shade on light so they stay readable. */
  --home-ink: var(--home);
  --away-ink: var(--away);
  --value-ink: var(--value);
  --overpriced-ink: var(--overpriced);
  --purple-ink: var(--purple);
  --orange-ink: var(--orange);
  --teal-ink: var(--teal);
  --gold-ink: var(--gold);
  --home-soft: #8ff0b4;
  --away-soft: #a8cbff;
  --on-accent: #06090f;

  /* The handoff design uses five distinct near-black tones rather than one --
     keep them distinct instead of collapsing them into --bg/--panel/--track. */
  --header-bg: #080c12;
  --hero-bg: #0b111b;
  --fixture-card-bg: #0e1420;
  --divider: #39414f;
  --card-shadow: none;
  --cta-from: #2be06b;
  --cta-to: #16a34a;
}

.hero-top,
.fixtures-hero,
.results-banner {
  color: var(--text);
}

:root {
  color-scheme: dark;

  --font-display: 'Oswald', 'Segoe UI', sans-serif;
  --font-body: 'Barlow', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="light"],
:root[data-theme="light"] .hero-top,
:root[data-theme="light"] .fixtures-hero,
:root[data-theme="light"] .results-banner {
  color-scheme: light;
  --bg: #f2f4f8;
  --panel: #ffffff;
  --panel-border: rgba(15, 23, 42, 0.11);
  --panel-border-strong: rgba(15, 23, 42, 0.24);
  --track: #e5e9f0;
  --text: #1a2233;
  --text-bright: #0b1220;
  --text-dim: #4b5568;
  --text-dim-2: #566076;
  --text-dim-3: #5d6779;

  --home-ink: #12692f;
  --away-ink: #1d4ed8;
  --value-ink: #12692f;
  --overpriced-ink: #b23126;
  --purple-ink: #6d28d9;
  --orange-ink: #b45309;
  --teal-ink: #0f766e;
  --gold-ink: #94600a;
  --home-soft: #12692f;
  --away-soft: #1d4ed8;

  --header-bg: #ffffff;
  --hero-bg: #ffffff;
  --fixture-card-bg: #ffffff;
  --divider: #c3cad6;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
  --cta-from: #1fae55;
  --cta-to: #15803d;
}

:root[data-theme="light"] .site-header-logo .logo-on-dark { display: none; }
:root[data-theme="light"] .site-header-logo .logo-on-light { display: block; }
:root[data-theme="light"] .site-header-league-logo { filter: brightness(0); }
:root[data-theme="light"] .icon-badge.icon-badge-flat { box-shadow: inset 0 0 0 1.5px var(--panel-border-strong); }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]),
  :root:not([data-theme="dark"]) .hero-top,
  :root:not([data-theme="dark"]) .fixtures-hero,
  :root:not([data-theme="dark"]) .results-banner {
    color-scheme: light;
    --bg: #f2f4f8;
    --panel: #ffffff;
    --panel-border: rgba(15, 23, 42, 0.11);
    --panel-border-strong: rgba(15, 23, 42, 0.24);
    --track: #e5e9f0;
    --text: #1a2233;
    --text-bright: #0b1220;
    --text-dim: #4b5568;
    --text-dim-2: #566076;
    --text-dim-3: #5d6779;

    --home-ink: #12692f;
    --away-ink: #1d4ed8;
    --value-ink: #12692f;
    --overpriced-ink: #b23126;
    --purple-ink: #6d28d9;
    --orange-ink: #b45309;
    --teal-ink: #0f766e;
    --gold-ink: #94600a;
    --home-soft: #12692f;
    --away-soft: #1d4ed8;

    --header-bg: #ffffff;
    --hero-bg: #ffffff;
    --fixture-card-bg: #ffffff;
    --divider: #c3cad6;
    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    --cta-from: #1fae55;
    --cta-to: #15803d;
  }

  :root:not([data-theme="dark"]) .site-header-logo .logo-on-dark { display: none; }
  :root:not([data-theme="dark"]) .site-header-logo .logo-on-light { display: block; }
  :root:not([data-theme="dark"]) .site-header-league-logo { filter: brightness(0); }
  :root:not([data-theme="dark"]) .icon-badge.icon-badge-flat { box-shadow: inset 0 0 0 1.5px var(--panel-border-strong); }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

/* One link style for the whole site: brand green, no underline. Nav, cards and buttons
   set their own colours; links inside running text get an underline on hover. */
a {
  color: var(--value-ink);
  text-decoration: none;
}

p a:hover, li a:hover, .meta a:hover { text-decoration: underline; }

.page {
  max-width: 1440px;
  margin: 0 auto;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.dash-side, .dash-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dash-side .card, .dash-center .card, .matchday-grid .card {
  margin-bottom: 0;
}

.matchday-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  .dash-center { order: -1; }
}

@media (max-width: 700px) {
  .matchday-grid { grid-template-columns: minmax(0, 1fr); }
}

.table-wrap {
  overflow-x: auto;
}

/* Shared site header/nav, included on every page */
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  margin: -2rem -1rem 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--panel-border);
}

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
  min-width: 0;
}

.site-header-logo {
  display: flex;
  align-items: center;
}

.site-header-logo .logo-on-light { display: none; }

.site-header-logo img {
  height: clamp(4rem, 8vw, 11.2rem);
  width: auto;
  max-width: 100%;
  border-radius: 6px;
  display: block;
}

.site-header-league-link {
  display: flex;
  flex-shrink: 0;
  margin-right: clamp(0.5rem, 3vw, 3rem);  /* keeps the badge off the window's edge */
}

.site-header-league-link:hover .site-header-league-logo { opacity: 0.8; }

.site-header-league-logo {
  height: 7.25rem;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.site-header-center {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  max-width: 100%;
}

.site-header-tagline {
  font-size: clamp(0.85rem, 0.45rem + 0.9vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--value-ink);
  line-height: 1;
  white-space: nowrap;
}

.site-header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.5rem;
  column-gap: clamp(1.25rem, 3vw, 3.5rem);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55rem + 1.5vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.site-header-nav a, .site-header-nav span {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
}

.site-header-nav a {
  color: var(--text-dim);
}

.site-header-nav a.active, .site-header-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--value);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
  min-width: 0;
  flex-shrink: 0;
}

/* The larger league badge only fits alongside the nav on wide screens. */
@media (max-width: 1200px) {
  .site-header-league-logo { height: 4rem; }
}

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr; justify-items: start; gap: 0.75rem; }
  .site-header-brand, .site-header-center, .site-header-actions { justify-self: start; }
  .site-header-center { align-items: flex-start; }
  .site-header-nav { flex-wrap: wrap; gap: 1rem 1.25rem; white-space: normal; }
}

@media (max-width: 480px) {
  .site-header { margin: -1.25rem -0.75rem 1.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  border-radius: 50%;
  width: 2.1rem;
  height: 2.1rem;
}

.icon-badge svg {
  width: 55%;
  height: 55%;
  stroke-width: 2.25;
}

td .icon-badge {
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.55em;
}

.icon-badge.icon-badge-flat {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--panel-border);
  overflow: hidden;
  width: 4.2rem;
  height: 4.2rem;
}

td .icon-badge.icon-badge-flat {
  width: 3.1rem;
  height: 3.1rem;
}

.icon-badge-flat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  vertical-align: middle;
  min-width: 0;
  max-width: 100%;
}

.team-badge-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-crest {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1.5px var(--panel-border);
}

.team-crest-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--track);
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.team-badge-sm .team-crest {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.5rem;
}

.team-badge-lg .team-crest {
  width: 2rem;
  height: 2rem;
}

.icon-badge.c-dim { background: var(--track); color: var(--text-dim); }
.icon-badge.c-blue { background: rgba(59, 130, 246, 0.16); color: var(--away-ink); }
.icon-badge.c-red { background: rgba(228, 87, 76, 0.16); color: var(--overpriced-ink); }
.icon-badge.c-green { background: rgba(34, 197, 94, 0.16); color: var(--value-ink); }
.icon-badge.c-purple { background: rgba(167, 139, 250, 0.16); color: var(--purple-ink); }
.icon-badge.c-orange { background: rgba(255, 159, 67, 0.18); color: var(--orange-ink); }
.icon-badge.c-teal { background: rgba(45, 212, 191, 0.16); color: var(--teal-ink); }
.icon-badge.c-gold { background: rgba(245, 196, 81, 0.18); color: var(--gold-ink); }

.factor-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.factor-legend-vs {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.factor-grid {
  display: grid;
  /* One equal column per factor, however many there are, so none wraps onto a row alone. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.factor-cell {
  text-align: center;
  padding: 0 0.5rem;
  border-left: 1px solid var(--panel-border);
}

.factor-cell:first-child {
  border-left: none;
}

.factor-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0.6rem 0 0.4rem;
}

.factor-values {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.factor-values .home { color: var(--home-ink); }
.factor-values .away { color: var(--away-ink); }
.factor-values-sep { color: var(--panel-border); margin: 0 0.15em; }

.outcome-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.outcome-bar-row {
  display: grid;
  grid-template-columns: 8rem 1fr 3.5rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.outcome-bar-track {
  background: var(--track);
  border-radius: 6px;
  height: 0.9rem;
  overflow: hidden;
}

.outcome-bar-fill {
  height: 100%;
  border-radius: 6px;
}

.outcome-bar-fill.home { background: var(--home); }
.outcome-bar-fill.draw { background: var(--draw); }
.outcome-bar-fill.away { background: var(--away); }

.outcome-pct { text-align: right; font-variant-numeric: tabular-nums; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--panel-border);
}

th { color: var(--text-dim); font-weight: 600; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* The side columns are narrow: tighter tables so five columns (incl. the verdict badge) fit
   without scrolling sideways. */
.dash-side table { font-size: 0.82rem; }
.dash-side th, .dash-side td { padding: 0.5rem 0.25rem; }
.dash-side td:last-child, .dash-side th:last-child { text-align: right; }
.dash-side .verdict { padding: 0.2rem 0.4rem; font-size: 0.66rem; }

.lambda-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.note {
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--track);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
}

.verdict {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.verdict.value { color: var(--value-ink); background: rgba(34, 197, 94, 0.15); }
.verdict.overpriced { color: var(--overpriced-ink); background: rgba(228, 87, 76, 0.15); }
.verdict.neutral { color: var(--text-dim); background: var(--track); }

.meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.card.placeholder {
  border-style: dashed;
  background: transparent;
}

.card.placeholder h2 { color: var(--text-dim); }

.pending-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--track);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.75rem;
}

.placeholder-body {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

.placeholder-body .eta {
  color: var(--text);
  font-weight: 500;
}

.about-body p {
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.about-body p:last-child { margin-bottom: 0; }

/* Blog */

.post-list {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card:hover { border-color: var(--panel-border-strong); }

.post-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.card.post-card h2 {
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  margin-bottom: 0.6rem;
}

.post-card-summary {
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.post-card-more {
  color: var(--value-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Text-heavy pages (About, blog, legal) share one centred reading column so lines stay
   a comfortable length and every page lines up the same way. */
.reading, .post-back {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.post-back {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--value-ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.post-back:hover { text-decoration: underline; }

.post-body {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.75;
}

.post-body p { margin: 0 0 1.15rem; }

.card .post-body h2 {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text-bright);
  margin: 2.25rem 0 0.75rem;
}

.post-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin: 2rem 0 0.6rem;
}

.post-body .table-wrap { margin: 0 0 1.5rem; }

.post-body strong { color: var(--text-bright); }

.post-body a {
  color: var(--value-ink);
  text-decoration: none;
}

.post-body a:hover { text-decoration: underline; }

.post-body ul, .post-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
}

.post-body li { margin-bottom: 0.5rem; }

.post-body blockquote {
  margin: 0 0 1.15rem;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--value);
  color: var(--text-dim);
}

.post-body code {
  font-size: 0.9em;
  background: var(--track);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--panel-border);
  margin: 2rem 0;
}

.hero {
  text-align: center;
  background: var(--hero-bg);
}

.hero-top {
  margin: -1.5rem -1.5rem 0;
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 105%, rgba(34, 197, 94, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%),
    linear-gradient(rgba(11, 17, 27, 0.55), rgba(11, 17, 27, 0.68)),
    url("img/stadium-dark.svg") center / cover no-repeat,
    var(--hero-bg);
}

/* Light theme swaps the stadium photo for a bright-pitch shot, washed out with a white
   overlay so it blends into the page instead of sitting on it as a dark panel; the hero
   panel's own text colors switch to the light theme's dark ink (see above) to stay readable. */
:root[data-theme="light"] .hero-top {
  background:
    radial-gradient(ellipse 70% 55% at 50% 105%, rgba(34, 197, 94, 0.1), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.8)),
    url("img/pitch-light.png") center / cover no-repeat,
    var(--hero-bg);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-top {
    background:
      radial-gradient(ellipse 70% 55% at 50% 105%, rgba(34, 197, 94, 0.1), transparent 70%),
      radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08), transparent 70%),
      linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.8)),
      url("img/pitch-light.png") center / cover no-repeat,
      var(--hero-bg);
  }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--value-ink);
  margin-bottom: 0.4rem;
}

.hero-eyebrow .icon-badge {
  width: 2.6rem;
  height: 2.6rem;
}

.hero-eyebrow .icon-badge-flat {
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.hero-eyebrow .icon-badge-flat img {
  border-radius: 0;
  object-fit: contain;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 2.75rem;
  color: var(--text-bright);
  text-shadow: 0 0 40px rgba(34, 197, 94, 0.25);
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 30rem;
  margin: 0.6rem auto 0;
}

.hero-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
}

.hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.hero-team-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.25rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-team.home .hero-team-name { color: var(--home-ink); }
.hero-team.away .hero-team-name { color: var(--away-ink); }

.team-crest-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6.9rem;
}

.team-crest-box img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.team-crest-box span {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}

.hero-team.home .team-crest-box span { color: var(--home-soft); }
.hero-team.away .team-crest-box span { color: var(--away-soft); }

.hero-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2.25rem;
}

.hero-score-num {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}

.hero-score-dash {
  width: 1.5rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--text-bright);
  flex-shrink: 0;
}

.hero-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-lock {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: -0.75rem 0 1.5rem;
}

.hero-lock code {
  font-size: 0.75rem;
  color: var(--text);
}

.confidence-block {
  padding-top: 1.25rem;
  margin-bottom: 1.25rem;
  border-top: 1px solid var(--panel-border);
}

.confidence-caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.confidence-gauge {
  position: relative;
  width: 6rem;
  height: 6rem;
  margin: 0 auto;
}

.confidence-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.confidence-gauge .gauge-track {
  fill: none;
  stroke: var(--track);
  stroke-width: 7;
}

.confidence-gauge .gauge-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.confidence-gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--text-bright);
}

.confidence-level-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.confidence-level-label.high { color: var(--value-ink); }
.confidence-level-label.medium { color: var(--gold-ink); }
.confidence-level-label.low { color: var(--overpriced-ink); }

.confidence-gauge .gauge-fill.high { stroke: var(--value); }
.confidence-gauge .gauge-fill.medium { stroke: var(--gold); }
.confidence-gauge .gauge-fill.low { stroke: var(--overpriced); }

.xg-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
  height: 5rem;
  margin-top: 1rem;
}

.xg-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.xg-bar-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.xg-bar-value.home { color: var(--home-ink); }
.xg-bar-value.away { color: var(--away-ink); }

.xg-bar-track {
  flex: 1;
  width: 1.6rem;
  display: flex;
  align-items: end;
}

.xg-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.xg-bar-fill.home { background: var(--home); }
.xg-bar-fill.away { background: var(--away); }

.xg-bar-label {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.hero .table-wrap { text-align: left; }

/* Recent form */
.form-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-row-label {
  width: 3rem;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.form-row-label.home { color: var(--home-ink); }
.form-row-label.away { color: var(--away-ink); }

.form-squares {
  display: flex;
  gap: 0.35rem;
}

.form-squares b {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
}

.form-squares b.w { background: var(--value); color: var(--on-accent); }
.form-squares b.d { background: var(--track); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--panel-border); }
.form-squares b.l { background: var(--overpriced); color: var(--on-accent); }

/* Head to head */
.h2h-record {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.h2h-record > div {
  border-left: 1px solid var(--panel-border);
}

.h2h-record > div:first-child {
  border-left: none;
}

.h2h-record-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.h2h-record-num.home { color: var(--home-ink); }
.h2h-record-num.draw { color: var(--draw); }
.h2h-record-num.away { color: var(--away-ink); }

.h2h-record-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* Win probability donut */
.winprob {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.winprob-donut {
  position: relative;
  width: 7rem;
  height: 7rem;
  flex-shrink: 0;
}

.winprob-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.winprob-donut circle {
  fill: none;
  stroke-width: 21;
}

.winprob-donut circle.track { stroke: var(--track); }
.winprob-donut circle.home { stroke: var(--home); }
.winprob-donut circle.draw { stroke: var(--draw); }
.winprob-donut circle.away { stroke: var(--away); }

.winprob-trophy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-ink);
}

.winprob-trophy svg {
  width: 2.9rem;
  height: 2.9rem;
  transform: none;
}

.winprob-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.winprob-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text-dim);
}

.swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.swatch.home { background: var(--home); }
.swatch.draw { background: var(--draw); }
.swatch.away { background: var(--away); }

.winprob-pct {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-bright);
}

/* Betting value */
.betting-value {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
}

.betting-value-icon {
  flex-shrink: 0;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(34, 197, 94, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--value-ink);
}

.betting-value-icon svg {
  width: 1.7rem;
  height: 1.7rem;
}

.betting-value-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--value-ink);
  font-size: 1.1rem;
}

.betting-value-pick {
  font-weight: 500;
  margin-top: 0.15rem;
}

.betting-value-odds {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.betting-value-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 0.9rem;
}

.betting-value-stats > div {
  border-left: 1px solid var(--panel-border);
}

.betting-value-stats > div:first-child {
  border-left: none;
}

.betting-value-stats span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.betting-value-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: 0.3rem;
}

.betting-value-stats b.c-value { color: var(--value-ink); }

/* Fixtures landing page */
.fixtures-hero {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(120, 160, 210, 0.13), transparent 65%),
    linear-gradient(rgba(11, 17, 27, 0.55), rgba(11, 17, 27, 0.68)),
    url("img/stadium-dark.svg") center / cover no-repeat,
    var(--hero-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  margin-bottom: 1.5rem;
}

:root[data-theme="light"] .fixtures-hero {
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(120, 160, 210, 0.1), transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.8)),
    url("img/pitch-light.png") center / cover no-repeat,
    var(--hero-bg);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .fixtures-hero {
    background:
      radial-gradient(ellipse 60% 90% at 50% 0%, rgba(120, 160, 210, 0.1), transparent 65%),
      linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.8)),
      url("img/pitch-light.png") center / cover no-repeat,
      var(--hero-bg);
  }
}

.fixtures-hero-eyebrow {
  color: var(--value-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.fixtures-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 4.5rem;
  line-height: 1.05;
  color: var(--text-bright);
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
  margin: 0.5rem 0 0.75rem;
}

/* That shadow is tuned for white text on the dark stadium photo; on the light theme's
   washed pitch photo the title is dark ink, so drop it instead of leaving a muddy smudge. */
:root[data-theme="light"] .fixtures-hero-title { text-shadow: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .fixtures-hero-title { text-shadow: none; }
}

@media (max-width: 700px) {
  .fixtures-hero-title { font-size: 2.5rem; }
}

.fixtures-hero-sub {
  color: var(--text-dim);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.55;
}

.fixtures-hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--panel-border-strong);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  background: rgba(10, 14, 20, 0.5);
}

:root[data-theme="light"] .fixtures-hero-date { background: rgba(255, 255, 255, 0.65); }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .fixtures-hero-date { background: rgba(255, 255, 255, 0.65); }
}

.fixtures-hero-date svg {
  color: var(--value-ink);
}

.fixtures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.fixture-card {
  display: block;
  background: var(--fixture-card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem 0.9rem;
  color: var(--text);
  box-shadow: var(--card-shadow);
}

.fixture-card:hover {
  border-color: var(--value);
}

.fixture-card-ready {
  box-shadow: 0 0 0 1px var(--value);
}

.fixture-card-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.fixture-card-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.fixture-card-crest {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.8rem;
  height: 6.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.fixture-card-crest img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.fixture-card-crest.home {
  color: var(--home-soft);
}

.fixture-card-crest.away {
  color: var(--away-soft);
}

.fixture-card-team-name {
  min-width: 0;
  white-space: normal;
  line-height: 1.25;
  color: var(--text-bright);
}

.fixture-card-team.away {
  justify-content: flex-end;
  text-align: right;
}

.fixture-card-vs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--panel-border);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fixture-card-kickoff {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  border-top: 1px solid var(--panel-border);
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
}

.fixture-card-kickoff .day { color: var(--value-ink); }
.fixture-card-kickoff .sep { color: var(--divider); }
.fixture-card-kickoff .time { color: var(--text-bright); }
.fixture-card-kickoff .verdict { font-size: inherit; }

.fixtures-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--fixture-card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
}

.fixtures-cta-text {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.fixtures-cta-icon {
  flex-shrink: 0;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.09);
  box-shadow: inset 0 0 0 1.5px rgba(34, 197, 94, 0.5), 0 0 26px -12px rgba(34, 197, 94, 0.9);
  color: var(--value-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fixtures-cta-icon svg {
  width: 1.9rem;
  height: 1.9rem;
}

.fixtures-cta-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.fixtures-cta-sub {
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.fixtures-cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 1.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  box-shadow: 0 14px 36px -18px rgba(34, 197, 94, 0.95);
  white-space: nowrap;
}

/* Track record page */

.trackrecord-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.trackrecord-kpi {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  text-align: center;
}

.trackrecord-kpi-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  color: var(--text-bright);
}

.trackrecord-kpi-vs {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
  margin: 0 0.35em;
}

.trackrecord-kpi-label {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.3rem;
}

.trackrecord-kpi-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.trackrecord-notice {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.trackrecord-notice strong { color: var(--text-bright); }

.trackrecord-subhead {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 1.25rem 0 0.5rem;
}

.trackrecord-subhead:first-of-type { margin-top: 0; }

.acca-tier-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.25rem 0 0.25rem;
}

.acca-tier-head:first-of-type { margin-top: 0; }

.acca-tier-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.acca-tier-tagline {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.responsible-gambling {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.responsible-gambling strong { color: var(--text); }
.responsible-gambling a { color: var(--text); text-decoration: underline; }

.betting-profit.positive { color: var(--value-ink); }
.betting-profit.negative { color: var(--overpriced-ink); }

.trackrecord-scoretable { table-layout: fixed; }
.trackrecord-scoretable th:first-child { width: 50%; }

.trackrecord-verdict-line {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.trackrecord-verdict-line strong { color: var(--text-bright); }

.trackrecord-fineprint {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* The three per-matchweek bar charts sit side by side; each week's column grows to share the
   width, so early in the season a few bars spread out instead of huddling at the left. */
.trackrecord-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.trackrecord-chart-grid .card { margin-bottom: 0; display: flex; flex-direction: column; }
.trackrecord-chart-grid .trackrecord-barchart-plot,
.trackrecord-chart-grid .trackrecord-points-plot,
.trackrecord-chart-grid .trackrecord-goalsbars { margin-top: auto; }

@media (max-width: 1100px) {
  .trackrecord-chart-grid { grid-template-columns: minmax(0, 1fr); }
}

.trackrecord-barchart-plot {
  position: relative;
  display: flex;
  align-items: end;
  gap: 1rem;
  height: 11rem;
  padding-top: 1.5rem;
  overflow-x: auto;
}

.trackrecord-chance-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--panel-border-strong);
}

.trackrecord-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  flex: 1 0 2.75rem;
}

.trackrecord-bar-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.trackrecord-bar-track {
  flex: 1;
  width: 1.85rem;
  display: flex;
  align-items: end;
}

.trackrecord-bar-fill {
  width: 100%;
  background: var(--teal);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.trackrecord-bar-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.trackrecord-trend {
  position: relative;
  margin-top: 0.5rem;
}

.trackrecord-trend svg {
  width: 100%;
  height: 10rem;
  display: block;
}

.trackrecord-trend-chance {
  stroke: var(--panel-border-strong);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.trackrecord-trend-area {
  fill: var(--teal);
  opacity: 0.1;
  stroke: none;
}

.trackrecord-trend-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trackrecord-trend-dot {
  fill: var(--teal);
  stroke: var(--panel);
  stroke-width: 2;
}

.trackrecord-trend-endvalue {
  position: absolute;
  transform: translate(-50%, -160%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-bright);
  background: var(--track);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.trackrecord-legend {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.trackrecord-legend .swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  vertical-align: -0.05em;
}

.trackrecord-legend .swatch.predicted { background: var(--draw); }
.trackrecord-legend .swatch.actual { background: var(--gold); }

.trackrecord-goalsbars {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-top: 0.5rem;
}

.trackrecord-goals-week {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 0 4.5rem;
}

.trackrecord-goals-pair {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  height: 7rem;
}

.trackrecord-goals-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.trackrecord-goals-value {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.trackrecord-goals-track {
  flex: 1;
  width: 1.4rem;
  display: flex;
  align-items: end;
}

.trackrecord-goals-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.trackrecord-goals-bar.predicted { background: var(--draw); }
.trackrecord-goals-bar.actual { background: var(--gold); }

.trackrecord-goals-week-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.trackrecord-best-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.trackrecord-best-card {
  background: var(--track);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.trackrecord-best-teams {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.trackrecord-best-vs {
  color: var(--text-dim-3);
  margin: 0 0.3em;
}

.trackrecord-best-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-bright);
  margin: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.trackrecord-best-actual {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.trackrecord-best-meter {
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
  margin-top: 0.6rem;
}

.trackrecord-best-meter-fill {
  height: 100%;
  background: var(--value);
  border-radius: 999px;
}

.trackrecord-best-confidence {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Prediction points (stacked composition bar chart) */

.trackrecord-points-plot {
  position: relative;
  display: flex;
  align-items: end;
  gap: 1rem;
  height: 11rem;
  padding-top: 1.5rem;
  overflow-x: auto;
}

.trackrecord-points-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  flex: 1 0 2.75rem;
}

.trackrecord-points-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.trackrecord-points-track {
  flex: 1;
  width: 1.85rem;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 4px;
  overflow: hidden;
}

.trackrecord-points-segment.wrong { background: var(--track); }
.trackrecord-points-segment.correct { background: var(--value); }
.trackrecord-points-segment.exact { background: var(--gold); }

.trackrecord-points-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Results & Predictions page */
.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.results-main, .results-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.results-main .card, .results-side .card { margin-bottom: 0; }

.card.results-table-card { padding: 0.5rem 0.5rem 1rem; }

.results-table { min-width: 620px; }

.results-table th {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  padding: 1rem 0.45rem;
  white-space: nowrap;
}

.results-table td {
  padding: 0.6rem 0.45rem;
  vertical-align: middle;
}

.results-table tbody tr:last-child td { border-bottom: 0; }

.results-table th.mid, .results-table td.mid { text-align: center; }

.results-date {
  color: var(--text-dim);
  font-size: 0.88rem;
  white-space: nowrap;
}

.results-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim-3);
}

.results-match {
  display: flex;
  align-items: center;
  gap: 0.4rem 0.9rem;
  flex-wrap: wrap;
}

.results-team {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-bright);
  white-space: nowrap;
}

.results-crest {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-dim);
}

.results-crest img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.results-score {
  display: inline-block;
  min-width: 4.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.results-score.actual {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.32);
}

.results-score.predicted {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.36);
}

.results-verdict {
  min-width: 4.6rem;
  text-align: center;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.results-verdict.value { color: #ffffff; background: #0d7f3f; }
.results-verdict.overpriced { color: #ffffff; background: #c0352b; }
.results-verdict.neutral { color: var(--text-dim); background: var(--track); font-size: 0.7rem; }

.results-none { color: var(--text-dim-3); }

.results-date-inline { display: none; }

.results-key {
  color: var(--text-dim-3);
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.75rem 0.6rem 0;
  border-top: 1px solid var(--panel-border);
}

.results-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.75rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background:
    linear-gradient(90deg, var(--panel) 30%, rgba(17, 24, 39, 0.55) 62%, rgba(17, 24, 39, 0.15)),
    url("img/stadium-dark.svg") right center / cover no-repeat,
    var(--panel);
}

:root[data-theme="light"] .results-banner {
  background:
    linear-gradient(90deg, var(--panel) 30%, rgba(255, 255, 255, 0.75) 62%, rgba(255, 255, 255, 0.55)),
    url("img/pitch-light.png") right center / cover no-repeat,
    var(--panel);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .results-banner {
    background:
      linear-gradient(90deg, var(--panel) 30%, rgba(255, 255, 255, 0.75) 62%, rgba(255, 255, 255, 0.55)),
      url("img/pitch-light.png") right center / cover no-repeat,
      var(--panel);
  }
}

.results-banner-icon { color: var(--text-bright); display: flex; flex-shrink: 0; }

.results-banner-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text-bright);
}

.results-banner-sub {
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 26rem;
  margin: 0.4rem 0 0.7rem;
}

.results-banner-link {
  color: var(--teal-ink);
  font-weight: 600;
  font-size: 0.9rem;
}

.results-banner-link:hover { text-decoration: underline; }

.results-chart-card h2 { justify-content: space-between; }

.results-legend {
  display: inline-flex;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}

.results-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }

.results-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.results-legend .swatch.actual { background: var(--home); }
.results-legend .swatch.predicted { background: var(--away); }

.results-chart { width: 100%; height: auto; display: block; margin-top: 0.5rem; }

.results-chart-grid { stroke: var(--panel-border); stroke-width: 1; }
.results-chart-label { fill: var(--text-dim); font-size: 13px; }
.results-chart-axis { fill: var(--text-dim-2); font-size: 13px; }
.results-chart-area { fill: rgba(34, 197, 94, 0.1); }

.results-chart-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.results-chart-line.actual { stroke: var(--home); }
.results-chart-line.predicted { stroke: var(--away); }

.results-chart-dot.actual { fill: var(--home); stroke: var(--panel); stroke-width: 2; }
.results-chart-dot.predicted { fill: var(--away); stroke: var(--panel); stroke-width: 2; }

.results-chart-note {
  color: var(--text-dim-3);
  font-size: 0.78rem;
  margin-top: 0.4rem;
}

.results-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.results-tile {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.1rem 0.6rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.results-tile-label {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.25;
  min-height: 2.1em;
  display: flex;
  align-items: center;
}

.results-tile-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.results-ring { width: 74px; height: 74px; margin-top: 0.3rem; }

.results-ring circle { fill: none; stroke-width: 7; }
.results-ring-track { stroke: var(--track); }
.results-ring-fill {
  stroke: currentColor;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 40px 40px;
}

.results-ring text {
  fill: var(--text-bright);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}

.results-insights {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.results-insights-list { flex: 1; min-width: 0; }

.results-insights h2 { margin: 0 0 0.6rem; }

.results-insights ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.results-insights li {
  position: relative;
  padding-left: 1.7rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
}

.results-insights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%2306090f%22 stroke-width=%223.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 12.5l4 4 8-9%22/%3E%3C/svg%3E") center / 72% no-repeat;
}

.results-insights-note {
  color: var(--text-dim-3);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.8rem;
}

.results-insights-note a { color: var(--value-ink); }

.results-insights-tag {
  flex-shrink: 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--panel-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.results-insights-tag span { color: var(--value-ink); }

@media (max-width: 1100px) {
  .results-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .results-table { min-width: 0; }
  .results-table th:first-child, .results-table td.results-date { display: none; }
  .results-table th { white-space: normal; padding: 0.7rem 0.25rem; font-size: 0.68rem; line-height: 1.2; }
  .results-table td { padding: 0.55rem 0.25rem; }
  .results-match { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .results-team { font-size: 0.85rem; gap: 0.4rem; }
  .results-crest { width: 22px; height: 22px; }
  .results-date-inline { display: block; font-size: 0.72rem; color: var(--text-dim-3); }
  .results-score { min-width: 0; padding: 0.3rem 0.4rem; font-size: 0.85rem; letter-spacing: 0; }
  .results-verdict { min-width: 0; padding: 0.28rem 0.45rem; font-size: 0.68rem; letter-spacing: 0.03em; }
  .results-verdict.neutral { font-size: 0.6rem; }
  .results-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-insights { flex-direction: column; align-items: stretch; }
  .results-insights-tag { border-left: 0; border-top: 1px solid var(--panel-border); padding: 1rem 0 0; }
  .results-banner { flex-direction: column; align-items: flex-start; }
}

/* The five model-factor cells can't shrink to fit a phone in one row: two columns, the fifth centred on its own row. */
@media (max-width: 700px) {
  .factor-grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.1rem; }
  .factor-cell { border-left: none; }
  .factor-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .team-crest-box { width: 4.75rem; height: 5.5rem; }
}

@media (max-width: 400px) {
  .results-team { font-size: 0.8rem; }
  .results-table th { padding-left: 0.15rem; padding-right: 0.15rem; }
  .results-table td { padding-left: 0.15rem; padding-right: 0.15rem; }
  .results-score { padding: 0.3rem 0.3rem; }
}

/* Small-phone adjustments. These used to sit near the top of the file, before the base rules they override, so most of them never applied. */
@media (max-width: 480px) {
  body { padding: 1.25rem 0.75rem 3rem; }
  .card { padding: 1.1rem; }
  .hero-top { margin: -1.1rem -1.1rem 0; padding: 1.1rem; }
  .outcome-bar-row { grid-template-columns: 5.5rem minmax(0, 1fr) 3rem; gap: 0.5rem; font-size: 0.82rem; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.45rem 0.3rem; }
  .hero-score-num { font-size: 2.5rem; }
  .hero-teams { gap: 0.75rem; }
}

@media (max-width: 480px) {
  .hero-team-name { font-size: 0.95rem; letter-spacing: 0.02em; }
}

@media (max-width: 480px) {
  .fixture-card-teams { gap: 0.4rem; }
  .fixture-card-team { gap: 0.35rem; font-size: 0.78rem; letter-spacing: 0.01em; }
  .fixture-card-crest { width: 3.6rem; height: 4.2rem; }
  .fixture-card-vs { width: 1.9rem; height: 1.9rem; font-size: 0.62rem; }
}

/* Beside the donut the legend needs ~190px, which a 320px phone can't spare: stack them. */
@media (max-width: 400px) {
  .winprob { flex-direction: column; align-items: stretch; gap: 1rem; }
  .winprob-donut { align-self: center; }
}

/* Light/dark toggle in the header */
.theme-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-right: 0.9rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--panel-border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--value); color: var(--value-ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--value); outline-offset: 2px; }

/* Shows the icon for the mode a click switches TO; hidden until the script has set data-mode. */
.theme-toggle svg { display: none; width: 1.3rem; height: 1.3rem; }
.theme-toggle[data-mode="dark"] .icon-sun { display: block; }
.theme-toggle[data-mode="light"] .icon-moon { display: block; }

/* Site footer, legal pages and error pages */
.site-footer {
  max-width: 1440px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
  color: var(--text-dim-3);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6;
}

.site-footer a { color: var(--text-dim); text-decoration: underline; }
.site-footer a:hover { color: var(--text-bright); }
.site-footer-notice { max-width: 60rem; margin: 0 auto; color: var(--text-dim); }
.site-footer-notice strong { color: var(--text); }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.5rem; margin: 1rem 0; }
.site-footer-legal { max-width: 60rem; margin: 0 auto; }

.legal-body h2 { margin: 1.7rem 0 0; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { line-height: 1.65; color: var(--text); }
.legal-body p { margin: 0.6rem 0 0; }
.legal-body ul { margin: 0.6rem 0 0; padding-left: 1.3rem; }
.legal-body li { margin: 0.45rem 0; }
.legal-body a { color: var(--value-ink); }

.error-home-link {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--panel-border-strong);
  color: var(--text-bright);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-home-link:hover { border-color: var(--value); }
