/* St Catherine's FC, Killybegs

   Two marks carry the site: the first team's green-and-white hoops, used as
   solid bands (never a texture, never behind text), and the crest itself. Oswald sets the fixture board, scores and headings; Source
   Sans 3 sets everything you read. Amber means "now": live, the next
   kick-off, the one action that matters on a screen. */

@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

/* Fallbacks sized to the web fonts' metrics, so the swap doesn't move text. */
@font-face {
  font-family: "Oswald Fallback";
  src: local("Arial Narrow"), local("ArialNarrow"), local("Arial");
  size-adjust: 82%;
  ascent-override: 145%;
  descent-override: 35%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Source Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 94%;
  ascent-override: 109%;
  descent-override: 42.5%;
  line-gap-override: 0%;
}

:root {
  /* Colour */
  --crest-green: #1a6139;
  --pitch: #0f3f27;
  --pitch-deep: #0a2e1c;
  --amber: #eb9530;
  --amber-ink: #8a5a12;
  --kit-white: #f7f6f1;
  --white: #fff;
  --away-grey: #5e6b72;
  --ink: #14231a;
  --ink-2: #33423a;
  --muted: #56615a;
  --line: #dcd9cd;
  --line-strong: #b7b3a3;
  --wash: #e9f0e8;
  --mint: #cfe0cd;
  --mint-2: #a8c2ad;
  --won: #1a6139;
  --drawn: #5e6b72;
  --lost: #a3321f;
  --live: #e0483a;

  /* Type */
  --font-display: "Oswald", "Oswald Fallback", "Arial Narrow", sans-serif;
  --font-text: "Source Sans 3", "Source Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--2: clamp(0.76rem, 0.74rem + 0.08vw, 0.8rem);
  --step--1: clamp(0.86rem, 0.83rem + 0.13vw, 0.93rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.38vw, 1.38rem);
  --step-2: clamp(1.4rem, 1.26rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.68rem, 1.44rem + 1.2vw, 2.25rem);
  --step-4: clamp(2rem, 1.62rem + 1.9vw, 2.95rem);
  --step-5: clamp(2.4rem, 1.8rem + 3vw, 3.9rem);
  --step-6: clamp(2.9rem, 1.9rem + 5vw, 5.4rem);

  /* Space */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --space-m: clamp(1.5rem, 1.4rem + 0.5vw, 1.75rem);
  --space-l: clamp(2rem, 1.8rem + 1vw, 2.6rem);
  --space-xl: clamp(3rem, 2.6rem + 2vw, 4.25rem);
  --space-2xl: clamp(4rem, 3.4rem + 3vw, 6rem);

  --page: 76rem;
  --gutter: clamp(1rem, 4vw, 2.25rem);
  --radius: 2px;
  --hoop: clamp(6px, 0.8vw, 11px);
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --focus-ring: var(--crest-green);
  color-scheme: light;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--kit-white);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-wrap: break-word;
  font-kerning: normal;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

img, svg, iframe, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

a {
  color: var(--crest-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--pitch); text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 600; }
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
[hidden] { display: none !important; }
address { font-style: normal; }
abbr[title] { text-decoration: none; cursor: help; }
table { border-collapse: collapse; }

::selection { background: var(--amber); color: var(--pitch-deep); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--pitch);
  color: var(--kit-white);
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: var(--kit-white); }

.page-width {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

/* Dark grounds: the fixture board, the lotto band, the footer. */
:is(.masthead, .home-lotto, .lotto-hero, .match-hero, .site-footer, .club-head, .toast) {
  --focus-ring: var(--amber);
}

/* ---------------------------------------------------------------- hoops */

.hoops { display: block; }
.hoops--rule {
  height: calc(var(--hoop) / 2 * 3);
  background: linear-gradient(var(--crest-green) 0 33.34%, var(--white) 0 66.67%, var(--crest-green) 0);
}
.hoops--band {
  height: calc(var(--hoop) * 5);
  background: repeating-linear-gradient(180deg, var(--crest-green) 0 var(--hoop), var(--white) 0 calc(var(--hoop) * 2));
}

/* ----------------------------------------------------------- typography */

.page-head {
  padding: var(--space-l) 0 var(--space-m);
}
.page-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-s) var(--space-l);
}

.page-title {
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.02;
  text-wrap: balance;
}

.page-meta {
  max-width: 48rem;
  margin-top: var(--space-2xs);
  color: var(--muted);
  font-size: var(--step-0);
}

.section-title {
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: var(--space-s);
  text-wrap: balance;
}

/* Small labels: the only place type is set in capitals. */
.label,
.month__title,
.tab-panel__title {
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}
.label { margin-bottom: var(--space-2xs); }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  font-weight: 600;
  text-decoration: none;
}
.more-link::after {
  content: "";
  width: 0.5em; height: 0.5em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms var(--ease);
}
.more-link:hover { text-decoration: underline; }
.more-link:hover::after { transform: translateX(3px) rotate(45deg); }

.source-note, .fine-print, .hint {
  margin-top: var(--space-xs);
  color: var(--muted);
  font-size: var(--step--1);
}
.hint { margin: -0.4rem 0 var(--space-s); }
.muted { color: var(--muted); }

.empty { color: var(--muted); }

.notice {
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--amber);
  background: #fbf1e2;
  color: var(--ink);
}

.eircode { font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }

.plain-list { display: grid; gap: var(--space-2xs); }
.link-list { display: grid; gap: var(--space-2xs); font-size: var(--step-1); }
.link-list a { font-weight: 600; }

.breadcrumb {
  padding-top: var(--space-m);
  color: var(--muted);
  font-size: var(--step--1);
}

/* ------------------------------------------------------ buttons & inputs */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.55rem 1.15rem;
  border: 2px solid var(--pitch);
  border-radius: var(--radius);
  background: var(--pitch);
  color: var(--kit-white);
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.button:hover { background: var(--crest-green); border-color: var(--crest-green); color: var(--white); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled, .button.is-disabled { opacity: 0.4; pointer-events: none; }
.button--amber { background: var(--amber); border-color: var(--amber); color: var(--pitch-deep); }
.button--amber:hover { background: #f3a94f; border-color: #f3a94f; color: var(--pitch-deep); }
.button--quiet { background: transparent; color: var(--pitch); }
.button--quiet:hover { background: var(--wash); border-color: var(--pitch); color: var(--pitch); }
.button--light { background: var(--kit-white); border-color: var(--kit-white); color: var(--pitch); }
.button--light:hover { background: var(--white); border-color: var(--white); color: var(--pitch); }
.button--ghost-light { background: transparent; border-color: rgba(247, 246, 241, 0.7); color: var(--kit-white); }
.button--ghost-light:hover { background: rgba(247, 246, 241, 0.1); border-color: var(--kit-white); color: var(--kit-white); }
.button--danger { background: transparent; border-color: var(--lost); color: var(--lost); }
.button--danger:hover { background: var(--lost); border-color: var(--lost); color: var(--white); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-s);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--crest-green);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Choice chips: team switch, shop and album filters. */
.switch, .chips, .album-tools__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.switch label, .chips label, .album-tools__tags label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.95rem;
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.switch label + label, .chips label + label, .album-tools__tags label + label { margin-left: -1.5px; }
.switch label:first-of-type, .chips label:first-of-type, .album-tools__tags label:first-of-type { border-radius: var(--radius) 0 0 var(--radius); }
.switch label:last-of-type, .chips label:last-of-type, .album-tools__tags label:last-of-type { border-radius: 0 var(--radius) var(--radius) 0; }
.switch input, .chips input, .album-tools__tags input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch label:has(input:checked), .chips label:has(input:checked), .album-tools__tags label:has(input:checked) {
  z-index: 1;
  border-color: var(--pitch);
  background: var(--pitch);
  color: var(--kit-white);
}
.switch label:has(input:focus-visible), .chips label:has(input:focus-visible), .album-tools__tags label:has(input:focus-visible) {
  z-index: 2;
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

input[type="search"], input[type="text"], input[type="url"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--pitch); outline-offset: 0; }
input::placeholder { color: #7b847e; }

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--kit-white);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  width: min(100% - 2 * var(--gutter), 86rem);
  min-height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: var(--pitch);
  text-decoration: none;
}
.brand:hover { color: var(--pitch); text-decoration: none; }
.brand__crest { width: 46px; height: 46px; flex: none; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand__place {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.site-nav ul { display: flex; gap: 0.15rem; list-style: none; }
.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0.7rem;
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: 0.2rem;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }

.site-header__tools { display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--pitch);
  border-radius: var(--radius);
  background: transparent;
  color: var(--pitch);
  font-weight: 700;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after {
  display: block;
  width: 1.1rem; height: 2px;
  background: currentColor;
  content: "";
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before { position: absolute; top: -6px; }
.nav-toggle__icon::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }

.basket-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--pitch);
  border-radius: var(--radius);
  background: transparent;
  color: var(--pitch);
  font-weight: 700;
}
.basket-button:hover { background: var(--wash); }
.basket-button__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem; height: 1.5rem;
  padding-inline: 0.3rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--pitch-deep);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.basket-button.is-bumped .basket-button__count { animation: bump 420ms var(--ease-out); }
/* An empty basket only needs a button in the shop. */
html:not(:has(.product-grid)) .basket-button.is-empty { display: none; }

@media (max-width: 1120px) {
  .brand__place { display: none; }
  .site-nav a { padding-inline: 0.55rem; }
  .site-nav a::after { left: 0.55rem; right: 0.55rem; }
}

@media (max-width: 1020px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed;
    inset: calc(var(--header-h) + var(--hoop) * 1.5) 0 0 0;
    z-index: 39;
    overflow-y: auto;
    padding: var(--space-m) var(--gutter) var(--space-xl);
    background: var(--pitch);
    border-top: calc(var(--hoop) * 1.5) solid var(--white);
    --focus-ring: var(--amber);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a {
    min-height: 3.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(247, 246, 241, 0.16);
    color: var(--kit-white);
    font-size: var(--step-3);
    font-weight: 500;
  }
  .js .site-nav a::after { left: 0; right: auto; width: 2.5rem; bottom: 0.45rem; }
  .js .site-nav a[aria-current] { color: var(--amber); }
  html:not(.js) .site-header__bar { flex-wrap: wrap; padding-bottom: 0.4rem; }
  html:not(.js) .site-nav { order: 3; width: 100%; overflow-x: auto; }
  body:has(.site-nav.is-open) { overflow: hidden; }
}

@media (max-width: 480px) {
  :root { --header-h: 3.75rem; }
  .brand__name { font-size: 1.15rem; }
  .brand__crest { width: 38px; height: 38px; }
  .basket-button__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle { padding-inline: 0.65rem; }
}

.phase-dot {
  display: inline-block;
  flex: none;
  width: 0.62rem; height: 0.62rem;
  border-radius: 50%;
  background: var(--live);
}

/* --------------------------------------------------------------- footer */

.site-footer {
  margin-top: var(--space-2xl);
  background: var(--pitch);
  color: var(--mint);
}
.site-footer a { color: var(--kit-white); }
.site-footer a:hover { color: var(--amber); }
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-l);
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
  padding: var(--space-xl) 0 var(--space-l);
}
.site-footer__club { display: flex; gap: var(--space-s); align-items: flex-start; }
.site-footer__club img { flex: none; }
.site-footer__name {
  color: var(--kit-white);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
}
.site-footer__since { color: var(--amber); font-weight: 600; }
.site-footer address { margin-top: 0.4rem; }
.site-footer__heading { margin-bottom: 0.5rem; color: var(--mint-2); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.site-footer__contact { display: grid; align-content: start; gap: 0.3rem; }
.site-footer__nav ul { list-style: none; display: grid; gap: 0.1rem; }
.site-footer__nav a { display: inline-flex; min-height: 2rem; align-items: center; }
.site-footer__league { display: flex; gap: 0.8rem; align-items: flex-start; }
.site-footer__league img { border-radius: 50%; background: var(--kit-white); }
.site-footer__credits {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin: 0 auto;
  padding: var(--space-s) 0 var(--space-l);
  border-top: 1px solid rgba(207, 224, 205, 0.18);
  color: var(--mint-2);
  font-size: var(--step--1);
}
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-m); } }

/* ------------------------------------------------------------- crests */

.crest {
  flex: none;
  width: var(--crest-size, 28px);
  height: var(--crest-size, 28px);
  object-fit: contain;
}
.crest--initials {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: calc(var(--crest-size, 28px) * 0.38);
  font-weight: 600;
  line-height: 1;
}

/* ------------------------------------------------- scores (digit slots) */

/* Oswald has no tabular figures, so every digit gets a fixed slot. With
   JavaScript a strip of 0–9 can roll to the score; without it, or with
   reduced motion, the digit itself is shown. */
.digits { display: inline-flex; --roll-colour: var(--pitch); }
.match-hero .digits { --roll-colour: var(--kit-white); }
.digit {
  position: relative;
  display: inline-block;
  width: 0.6em;
  height: 1em;
  overflow: hidden;
  line-height: 1;
  text-align: center;
}
.digits--roll.is-primed .digit, .digits--roll.is-rolling .digit { color: transparent; }
.digits--roll.is-primed .digit::before, .digits--roll.is-rolling .digit::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  position: absolute;
  inset: 0 0 auto;
  color: var(--roll-colour);
  white-space: pre;
  line-height: 1;
  transform: translateY(0);
}
.digits--roll.is-rolling .digit::before {
  transform: translateY(calc(var(--digit) * -1em));
  transition: transform 1100ms var(--ease-out);
}
.digits--roll.is-rolling .digit + .digit::before { transition-delay: 90ms; }

/* ------------------------------------------------------------- masthead */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  background: var(--pitch);
  color: var(--kit-white);
}

.masthead__board {
  display: grid;
  align-content: center;
  gap: var(--space-m);
  padding: var(--space-xl) var(--space-l) var(--space-l) max(var(--gutter), (100vw - var(--page)) / 2);
}

.board { display: grid; gap: var(--space-s); }
.board__label { color: var(--amber); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.board__date { color: var(--mint); font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; line-height: 1.1; }
.board__teams { display: grid; gap: 0.3rem; }
.board__team { display: flex; align-items: center; gap: var(--space-s); }
.board__team .crest { width: clamp(44px, 5vw, 64px); height: clamp(44px, 5vw, 64px); }
.board__team .crest--initials { background: var(--kit-white); }
.board__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.board__team.is-club .board__name { color: var(--white); }
.board__v {
  padding-left: calc(clamp(44px, 5vw, 64px) + var(--space-s));
  color: var(--amber);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1;
}
/* Dividers sit on each item's left edge; the clip hides the one that starts
   a line, so a wrapped line never begins or ends with a stray rule. */
.board__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin-left: calc(-0.75rem - 1px);
  clip-path: inset(0 0 0 calc(0.75rem + 1px));
  color: var(--mint);
  font-size: var(--step-0);
}
.board__facts > span { padding: 0 0.75rem; border-left: 1px solid rgba(207, 224, 205, 0.4); line-height: 1.3; }
.board__ko { color: var(--amber); font-weight: 700; }
.board__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-2xs); }
.board--empty .board__date { font-size: var(--step-3); color: var(--kit-white); }
.board--empty a { color: var(--kit-white); }
p.board--empty { color: var(--mint); font-size: var(--step-1); }

/* Line wrappers for the reveal: the mask lets a line rise into place. */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__inner { display: inline-block; }

/* Held back for the reveal (home.js). If the script never gets to it, the
   board shows itself after a moment anyway. */
.reveal .masthead .line__inner { transform: translateY(105%); animation: reveal-safety 1ms 2.5s forwards; }
.reveal .masthead :is(.board__label, .board__team .crest, .board__v, .board__facts, .board__actions) { opacity: 0; animation: reveal-safety 1ms 2.5s forwards; }
@keyframes reveal-safety { to { transform: none; opacity: 1; } }

.masthead__also {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  padding-top: var(--space-s);
  border-top: 1px solid rgba(207, 224, 205, 0.2);
  color: var(--mint);
  font-size: var(--step--1);
}
.masthead__also-label { color: var(--mint-2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; font-size: var(--step--2); align-self: center; }
.masthead__also a { color: var(--kit-white); }

/* Photos behind the board, faded into the green. They sit in the
   background: no frame, no controls beyond a small pause. */
.masthead { position: relative; overflow: hidden; }
.masthead__board { position: relative; z-index: 1; }
.masthead__photos { position: relative; min-height: 34rem; }
.backdrop { position: absolute; inset: 0; margin: 0; }
.backdrop__slides {
  position: absolute;
  inset: 0;
  list-style: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%), linear-gradient(to top, transparent 0, #000 26%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 38%), linear-gradient(to top, transparent 0, #000 26%);
  mask-composite: intersect;
}
.backdrop__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1100ms var(--ease); }
.backdrop__slide.is-current { opacity: 1; }
.backdrop__slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; filter: saturate(0.85); }
.backdrop__caption {
  position: absolute;
  right: max(var(--gutter), (100vw - var(--page)) / 2);
  bottom: var(--space-s);
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
  color: var(--mint-2);
  font-size: var(--step--2);
  text-align: right;
}
.backdrop__caption a { color: var(--mint); text-decoration-color: rgba(207, 224, 205, 0.4); }
.backdrop__caption a:hover { color: var(--kit-white); }
.backdrop__pause {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid rgba(207, 224, 205, 0.45);
  border-radius: 50%;
  background: rgba(10, 46, 28, 0.55);
  color: var(--mint);
}
.backdrop__pause:hover { border-color: var(--kit-white); color: var(--kit-white); }
.backdrop__pause-icon { width: 0.6rem; height: 0.7rem; border-inline: 3px solid currentColor; }
.backdrop__pause.is-stopped .backdrop__pause-icon {
  width: 0; height: 0;
  border-inline: 0;
  border-block: 0.38rem solid transparent;
  border-left: 0.62rem solid currentColor;
  margin-left: 0.2rem;
}

/* The last time we played them, on the board. */
.board__last {
  display: grid;
  gap: 0.1rem;
  max-width: 34rem;
  padding: var(--space-xs) 0 0;
  border-top: 1px solid rgba(207, 224, 205, 0.2);
  color: var(--kit-white);
  font-weight: 600;
}
.board__last a { color: var(--kit-white); }
.board__last-label { color: var(--mint-2); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.board__last-when { color: var(--mint); font-size: var(--step--1); font-weight: 400; }
.board__record .h2h-mini { margin-top: 0.15rem; color: var(--mint-2); background: none; border-color: rgba(207, 224, 205, 0.35); }

@media (min-width: 901px) {
  /* Each photo at the size it was prepared at (twice the album copy, shown
     one image pixel to one screen pixel), top right, clipped to the panel,
     fading into the green to the left and below. */
  .backdrop__slides {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
    mask-image: linear-gradient(to right, transparent 0, #000 38%);
  }
  .backdrop__slide img {
    position: absolute;
    top: 0;
    right: 0;
    width: 52rem;
    max-width: none;
    height: auto;
    /* Its own soft left edge too, for panels wider than the photo. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 25%), linear-gradient(to top, transparent 0, #000 32%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, #000 25%), linear-gradient(to top, transparent 0, #000 32%);
    mask-composite: intersect;
  }
}

@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr; }
  .masthead__photos { order: -1; min-height: 0; height: clamp(15rem, 62vw, 26rem); }
  .backdrop__slides {
    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 45%);
    mask-image: linear-gradient(to top, transparent 0, #000 45%);
  }
  .backdrop__caption { right: var(--gutter); left: var(--gutter); bottom: 0.4rem; }
  .masthead__board { padding: var(--space-s) var(--gutter) var(--space-l); }
  .backdrop__caption { justify-content: space-between; text-align: left; }
}

/* ----------------------------------------------------------------- home */

.home > section { margin-top: var(--space-2xl); }
.home > section:first-child { margin-top: var(--space-xl); }

.home-results {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}
@media (max-width: 900px) { .home-results { grid-template-columns: 1fr; gap: var(--space-l); } }
.home-results__form { margin-top: var(--space-m); }
.home-results__table .label { margin-top: var(--space-m); }

.scoreboard {
  padding: var(--space-m) 0 var(--space-s);
  border-top: 3px solid var(--pitch);
  border-bottom: 1px solid var(--line);
}
.scoreboard__meta { color: var(--muted); font-size: var(--step--1); }
.scoreboard__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-s);
  margin: var(--space-s) 0;
  color: var(--ink);
  text-decoration: none;
}
.scoreboard__line:hover { color: var(--ink); }
.scoreboard__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}
.scoreboard__team .crest { width: 56px; height: 56px; }
.scoreboard__team.is-club { color: var(--pitch); font-weight: 600; }
.scoreboard__score {
  display: flex;
  align-items: center;
  gap: 0.15em;
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1;
}
.scoreboard__dash { color: var(--line-strong); font-weight: 400; }
.scoreboard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  font-size: var(--step--1);
}
.scoreboard__outcome {
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius);
  background: var(--won);
  color: var(--white);
  font-weight: 700;
}
.scoreboard--drawn .scoreboard__outcome { background: var(--drawn); }
.scoreboard--lost .scoreboard__outcome { background: var(--lost); }

/* Last five: each chip carries the letter, the score and the opponent. */
.form { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.form__chip a {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  width: 3.4rem;
  padding: 0.45rem 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}
.form__chip a:hover { border-color: var(--pitch); }
.form__item {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  width: 3.4rem;
  padding: 0.45rem 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.form__item .crest { width: 20px; height: 20px; }
.form--small { flex-wrap: nowrap; gap: 3px; }
.form--small .form__item { width: auto; padding: 0; border: 0; background: none; }
.form--small .form__letter { width: 1.35rem; height: 1.35rem; font-size: 0.8rem; }
.form__letter {
  display: grid;
  place-items: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: var(--radius);
  background: var(--won);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
}
.form__chip--drawn .form__letter { background: var(--drawn); }
.form__chip--lost .form__letter { background: var(--lost); }
.form__score { font-size: var(--step--1); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Mini table: the Saints and two rows either side. */
.mini-table { width: 100%; font-variant-numeric: tabular-nums; }
.mini-table caption { padding-bottom: 0.5rem; color: var(--muted); font-size: var(--step--1); text-align: left; }
.mini-table th, .mini-table td { padding: 0.55rem 0.4rem; text-align: right; }
.mini-table thead th { border-bottom: 2px solid var(--pitch); color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mini-table tbody tr { border-bottom: 1px solid var(--line); }
.mini-table th:nth-child(2), .mini-table td:nth-child(2), .mini-table tbody th { text-align: left; font-weight: 500; }
.mini-table td:first-child, .mini-table th:first-child { width: 2.5rem; text-align: left; }
.mini-table tr.is-club { background: var(--wash); }
.mini-table tr.is-club th, .mini-table tr.is-club td { font-weight: 700; color: var(--pitch); }
.snapshot__note { margin-top: 0.5rem; color: var(--muted); font-size: var(--step--1); }

.team { display: inline-flex; align-items: center; gap: 0.5rem; }
.team .crest { width: 22px; height: 22px; }

/* Lotto band */
.home-lotto { background: var(--pitch); color: var(--kit-white); }
.home-lotto__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-xl);
  align-items: center;
  padding-block: var(--space-xl);
}
.home-lotto__draw, .lotto-hero__draw { margin: 0; display: grid; gap: 0.4rem; }
.home-lotto__draw figcaption, .lotto-hero__draw figcaption { color: var(--mint-2); font-size: var(--step--1); }
.home-lotto__title { font-family: var(--font-display); font-size: var(--step-5); font-weight: 600; line-height: 1; }
.home-lotto__rules { margin-top: var(--space-2xs); color: var(--mint); font-size: var(--step-1); max-width: 34rem; }
@media (max-width: 800px) {
  .home-lotto__inner { grid-template-columns: 1fr; gap: var(--space-m); }
}

/* News */
.stories { display: grid; gap: 0; }
.stories--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--space-l); }
.story { display: grid; gap: var(--space-xs); align-content: start; }
.stories--row .story { padding-top: var(--space-s); border-top: 3px solid var(--pitch); }
.story__figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
.story__figure figcaption { margin-top: 0.3rem; color: var(--muted); font-size: var(--step--2); }
.story__meta { color: var(--muted); font-size: var(--step--1); }
.story__source { color: var(--ink-2); font-weight: 700; }
.story__title { font-size: var(--step-1); font-weight: 700; line-height: 1.25; margin-top: 0.2rem; }
.story__title a { color: var(--ink); text-decoration: none; }
.story__title a:hover { color: var(--crest-green); text-decoration: underline; }
.story__line { margin-top: 0.35rem; font-weight: 600; }
.story__summary { margin-top: 0.35rem; color: var(--ink-2); }

/* News page: a press list, newest first, thumbnails kept small. */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem); gap: var(--space-xl); align-items: start; }
@media (max-width: 960px) { .news-layout { grid-template-columns: 1fr; } }
.news-layout__aside { display: grid; gap: var(--space-xl); }
.press-list--lead .story { padding: var(--space-m); border: 0; border-top: 4px solid var(--pitch); background: var(--white); }
.press-list--lead .story__title { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; line-height: 1.1; }
.press-list--lead + .news-month { margin-top: var(--space-l); }

/* A result a story is about */
.result-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-xs);
  max-width: 30rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--kit-white);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
}
.result-line:hover { border-color: var(--pitch); color: var(--ink); }
.result-line__side { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.result-line__side:first-child { flex-direction: row-reverse; text-align: right; }
.result-line__side .crest { width: 22px; height: 22px; }
.result-line__score { padding: 0.15rem 0.5rem; border-radius: var(--radius); background: var(--won); color: var(--white); font-family: var(--font-display); font-size: var(--step-0); }
.result-line--drawn .result-line__score { background: var(--drawn); }
.result-line--lost .result-line__score { background: var(--lost); }

/* The latest round in the Saints' divisions */
.rounds__grid { display: grid; gap: var(--space-m); }
.round { padding: var(--space-s); border-top: 4px solid var(--pitch); background: var(--white); }
.round__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; }
.round__date { margin-bottom: var(--space-xs); color: var(--muted); font-size: var(--step--1); }
.round__results { display: grid; list-style: none; }
.round__row { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem minmax(0, 1fr); align-items: center; gap: 0.4rem; padding: 0.45rem 0; border-top: 1px solid var(--line); font-size: var(--step--1); font-weight: 600; }
.round__row.is-club { margin-inline: calc(var(--space-s) * -1); padding-inline: var(--space-s); background: var(--wash); color: var(--pitch); font-weight: 800; }
.round__team { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.round__team--home { justify-content: flex-end; text-align: right; }
.round__team .crest { width: 22px; height: 22px; }
.round__score { text-align: center; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.round__more { margin-top: var(--space-xs); font-size: var(--step--1); font-weight: 600; }
.news-month + .news-month { margin-top: var(--space-l); }
.news-month .month__title { margin-bottom: var(--space-2xs); }
.press-list { display: grid; list-style: none; }
.press-list .story { grid-template-columns: minmax(0, 1fr); padding: var(--space-s) 0; border-top: 1px solid var(--line); }
.press-list .story:last-child { border-bottom: 1px solid var(--line); }
.press-list .story--image { grid-template-columns: minmax(0, 1fr) clamp(7rem, 22vw, 12rem); column-gap: var(--space-m); }
.press-list .story__figure { grid-column: 2; grid-row: 1; }
.press-list .story__text { grid-column: 1; grid-row: 1; }

.press-list--quiet .story__title { font-size: var(--step-0); }
.press-list--quiet .story__summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--step--1);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Ground */
.ground {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--white);
  border-block: 1px solid var(--line);
}
.ground__photo { display: grid; place-items: center end; padding: var(--space-l); }
.ground__photo img, .club-ground__photo img {
  width: 100%;
  max-width: 25rem;
  height: auto;
  padding: 0.375rem;
  border: 1px solid var(--line-strong);
  background: var(--white);
}
.ground__text { display: grid; align-content: center; gap: var(--space-xs); padding: var(--space-xl) var(--space-l); }
.ground__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-5); font-weight: 600; line-height: 1; }
.ground__text address { color: var(--ink-2); font-size: var(--step-1); }
.ground__next { color: var(--ink-2); }
@media (max-width: 800px) {
  .ground { grid-template-columns: 1fr; }
  .ground__photo { place-items: center start; padding: var(--space-l) var(--gutter) 0; }
  .ground__text { padding: var(--space-l) var(--gutter); }
}

/* --------------------------------------------------------------- matches */

.fixtures { container-type: inline-size; list-style: none; }

/* A programme line: date block, then the two sides with the score between. */
.fixture {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  column-gap: var(--space-s);
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--line);
}
.fixture:first-child { border-top: 1px solid var(--line); }
.fixture__main {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.fixture__main:hover { color: var(--ink); }
.fixture__main:hover .fixture__name { text-decoration: underline; text-decoration-thickness: 1px; }
.fixture__date { align-self: start; }
.fixture__date time { display: grid; justify-items: start; line-height: 1; }
.fixture__dow, .fixture__month { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.fixture__day { margin: 0.1rem 0 0.15rem; color: var(--pitch); font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; }
.fixture__tbc { color: var(--muted); font-weight: 700; font-size: var(--step--1); }

.fixture__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-xs);
}
.fixture__team { display: flex; align-items: center; gap: 0.6rem; min-width: 0; font-weight: 600; line-height: 1.2; }
.fixture__team:first-child { flex-direction: row-reverse; text-align: right; }
.fixture__team.is-club { color: var(--pitch); font-weight: 800; }
.fixture__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1;
}
.fixture--won .fixture__score, .fixture--drawn .fixture__score, .fixture--lost .fixture__score { color: var(--white); }
.fixture--won .fixture__score { background: var(--won); }
.fixture--drawn .fixture__score { background: var(--drawn); }
.fixture--lost .fixture__score { background: var(--lost); }
.fixture__dash { padding: 0 0.12em; opacity: 0.65; }
.fixture__v { color: var(--amber-ink); font-size: var(--step-1); font-weight: 500; }

.fixture__info, .fixture__extra {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: var(--step--1);
  text-align: center;
}
.fixture__info > span:not(:empty) + span:not(:empty)::before,
.fixture__extra > * + *::before {
  content: "";
  display: inline-block;
  width: 1px; height: 0.9em;
  margin: 0 0.65rem;
  background: var(--line-strong);
  vertical-align: -0.1em;
}
.fixture__ft { color: var(--ink); font-weight: 700; }
.fixture__off { color: var(--lost); font-weight: 700; }
.fixture__relative:not(:empty) { color: var(--amber-ink); font-weight: 700; }
.fixture__extra { margin-top: 0.25rem; }
.fixture__extra a { font-weight: 600; }
.fixture__note { color: var(--ink-2); }

.fixture--compact { padding: var(--space-xs) 0; }
.fixture--compact .fixture__day { font-size: var(--step-2); }

/* Wide lists: the facts move into a third column, one per line. */
@container (min-width: 52rem) {
  .fixture { grid-template-columns: 4.25rem minmax(0, 1.6fr) minmax(14rem, 1fr); column-gap: var(--space-m); align-items: center; }
  .fixture__main { grid-column: 1 / 3; grid-row: 1 / span 2; }
  .fixture__date { align-self: center; }
  .fixture__info, .fixture__extra { grid-column: 3; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; margin-top: 0; line-height: 1.4; }
  .fixture__info { grid-row: 1; align-self: end; }
  .fixture__extra { grid-row: 2; align-self: start; margin-top: 0.2rem; }
  .fixture__info > span:not(:empty) + span:not(:empty)::before, .fixture__extra > * + *::before { display: none; }
  .fixture__info > :first-child { color: var(--ink); font-weight: 700; }
  .fixture__info:only-of-type, .fixture:not(:has(.fixture__extra)) .fixture__info { grid-row: 1 / span 2; align-self: center; }
}

/* Narrow lists (phones, side columns): each side gets its own row. */
@container (max-width: 34rem) {
  .fixture { grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: var(--space-xs); }
  .fixture__teams {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "home hs" "away as";
    gap: 0.35rem var(--space-xs);
  }
  .fixture__team:first-child { grid-area: home; flex-direction: row; text-align: left; }
  .fixture__team:last-child { grid-area: away; }
  .fixture__score { display: contents; }
  .fixture__score .digits { justify-content: center; min-width: 2.25rem; padding: 0.3rem 0; }
  .fixture__score .digits:first-child { grid-area: hs; }
  .fixture__score .digits:last-child { grid-area: as; }
  .fixture--won .fixture__score .digits { background: var(--won); }
  .fixture--drawn .fixture__score .digits { background: var(--drawn); }
  .fixture--lost .fixture__score .digits { background: var(--lost); }
  .fixture__score .fixture__dash { display: none; }
  .fixture__v { display: none; }
  .fixture__info, .fixture__extra { justify-content: flex-start; text-align: left; }
  /* Rules on each fact's left edge, clipped where a line starts. */
  .fixture__info { margin-left: calc(-0.65rem - 1px); clip-path: inset(0 0 0 calc(0.65rem + 1px)); }
  .fixture__info > span:not(:empty) { padding: 0 0.65rem; border-left: 1px solid var(--line-strong); }
  .fixture__info > span:not(:empty) + span:not(:empty)::before { display: none; }
  .fixture__extra { flex-direction: column; align-items: flex-start; }
  .fixture__extra > * + *::before { display: none; }
  .fixture__day { font-size: var(--step-2); }
}

.month + .month { margin-top: var(--space-l); }
.month__title { margin-bottom: var(--space-2xs); }

/* Matches page: one side at a time, the season in a strip, then tabs. */
.matchday .page-head { padding-bottom: var(--space-m); align-items: flex-end; }

.side-switch { display: flex; gap: var(--space-2xs); margin: 0; padding: 0; border: 0; }
.side-switch__option {
  position: relative;
  display: grid;
  gap: 0.1rem;
  min-width: 11.5rem;
  padding: 0.65rem 0.9rem 0.7rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}
.side-switch__option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.side-switch__name { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; line-height: 1.1; }
.side-switch__league { color: var(--muted); font-size: var(--step--2); font-weight: 600; }
.side-switch__option:hover { border-color: var(--pitch); }
.side-switch__option:has(input:checked) { border-color: var(--pitch); background: var(--pitch); box-shadow: inset 0 -4px 0 var(--amber); }
.side-switch__option:has(input:checked) .side-switch__name { color: var(--white); }
.side-switch__option:has(input:checked) .side-switch__league { color: var(--mint); }
.side-switch__option:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 640px) {
  .side-switch { width: 100%; }
  .side-switch__option { flex: 1; min-width: 0; }
}

/* The season at a glance */
.strip-season {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.3fr);
  margin-bottom: var(--space-m);
  border-top: 4px solid var(--pitch);
  background: var(--white);
}
.strip-season__cell { display: grid; align-content: start; gap: 0.25rem; padding: var(--space-s); border-right: 1px solid var(--line); }
.strip-season__cell:last-child { border-right: 0; }
.strip-season__label { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.strip-season__big { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-5); font-weight: 600; line-height: 0.95; }
.strip-season__small { color: var(--muted); font-size: var(--step--1); }
.strip-season__record { display: flex; gap: var(--space-s); color: var(--ink-2); font-size: var(--step--1); }
.strip-season__record span { display: grid; }
.strip-season__record strong { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; line-height: 1; }
.strip-season .form__chip a { width: 3rem; padding-block: 0.35rem; }
.strip-season__next { display: flex; gap: 0.6rem; align-items: center; color: var(--ink); text-decoration: none; }
.strip-season__next strong { display: block; color: var(--pitch); font-size: var(--step-1); line-height: 1.15; }
.strip-season__next:hover strong { text-decoration: underline; }
.strip-season__next .crest { width: 36px; height: 36px; }
@media (max-width: 900px) {
  .strip-season { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-season__cell:nth-child(2) { border-right: 0; }
  .strip-season__cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .strip-season__cell { padding: 0.7rem var(--space-xs); }
  .strip-season__cell:nth-child(3), .strip-season__cell:nth-child(4) { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .strip-season__cell:nth-child(4) { border-bottom: 0; }
  .strip-season__cell:nth-child(3) { display: flex; align-items: center; gap: var(--space-s); }
  .strip-season__big { font-size: var(--step-4); }
  .strip-season__record strong { font-size: var(--step-2); }
  .strip-season .form { flex-wrap: nowrap; gap: 3px; }
  .strip-season .form__chip a { width: 2.5rem; padding: 0.3rem 0.1rem; }
  .strip-season .form__chip .crest { display: none; }
}

/* Tabs stay in reach while a long list scrolls. */
.tabs__list {
  position: sticky;
  top: calc(var(--header-h) + var(--hoop) * 1.5);
  z-index: 5;
  display: flex;
  gap: var(--space-m);
  margin-bottom: var(--space-m);
  border-bottom: 1px solid var(--line-strong);
  background: var(--kit-white);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__list [role="tab"] {
  position: relative;
  min-height: 3rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  white-space: nowrap;
}
.tabs__list [role="tab"]:hover { color: var(--pitch); }
.tabs__list [role="tab"][aria-selected="true"] { color: var(--pitch); }
.tabs__list [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 4px;
  background: var(--amber);
}
@media (max-width: 480px) { .tabs__list { gap: var(--space-s); } .tabs__list [role="tab"] { font-size: var(--step-1); } }
[data-enhanced] .tab-panel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tab-panel:focus-visible { outline-offset: 6px; }
.tab-panel + .tab-panel { margin-top: var(--space-xl); }
[data-enhanced] .tab-panel + .tab-panel { margin-top: 0; }
.tab-panel__title { margin-bottom: var(--space-s); }

/* Without the script both sides are listed; with it, the switch says which. */
.team-block + .team-block { margin-top: var(--space-l); }
.team-block__title { margin-bottom: var(--space-xs); color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; }
.js .team-block__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.panel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-m); margin-bottom: var(--space-s); }
.panel-bar__count { color: var(--muted); font-weight: 600; }
.panel-bar__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.panel-subtitle { margin: var(--space-l) 0 var(--space-xs); color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; }
.button--small { min-height: 2.5rem; padding: 0.35rem 0.8rem; font-size: var(--step--1); }

/* Match rows: a programme line for fixtures, our result first for results. */
.mrows { container-type: inline-size; list-style: none; border-top: 1px solid var(--line); }
.mrow {
  position: relative;
  display: grid;
  grid-template-columns: 3.4rem 4.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem var(--space-s);
  padding: 0.7rem 0.75rem 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.mrow--result { grid-template-columns: 3.4rem 1.9rem 3.1rem minmax(0, 1fr); }
.mrow:hover { background: #fbfbf6; }
.mrow__date { display: grid; justify-items: center; line-height: 1; }
.mrow__date--tbc { color: var(--muted); font-weight: 700; font-size: var(--step--1); text-align: center; }
.mrow__dow, .mrow__mon { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mrow__day { margin: 0.1rem 0; color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; }
.mrow__ha {
  justify-self: start;
  padding: 0.12rem 0.45rem;
  border: 1.5px solid var(--pitch);
  border-radius: var(--radius);
  color: var(--pitch);
  font-size: var(--step--2);
  font-weight: 700;
}
.mrow__ha--home { background: var(--pitch); color: var(--white); }
.mrow__main { display: grid; gap: 0.2rem; min-width: 0; }
.mrow__opp { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.mrow__opp .crest { width: 30px; height: 30px; }
.mrow__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; min-width: 0; font-size: var(--step-1); font-weight: 700; line-height: 1.2; }
.mrow__link { color: var(--ink); text-decoration: none; }
.mrow__link::after { content: ""; position: absolute; inset: 0; }
.mrow__link:hover { text-decoration: underline; }
.mrow__link:focus-visible { outline: none; }
.mrow:has(.mrow__link:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.mrow__pos { color: var(--muted); font-size: var(--step--1); font-weight: 600; }
/* Our record against a club: there if you look, not shouted. */
.h2h-mini {
  display: inline-block;
  padding: 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: 0.1em;
}
/* Facts on one line, with a rule between them (none at the start of a line). */
.mrow__meta {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(2.4rem - 0.6rem - 1px);
  clip-path: inset(0 0 0 calc(0.6rem + 1px));
  color: var(--ink-2);
  font-size: var(--step--1);
}
.mrow__meta > * { padding: 0 0.6rem; border-left: 1px solid var(--line-strong); line-height: 1.35; }
.mrow__meta > :empty { display: none; }
.mrow__comp { color: var(--muted); }
.mrow__extra { position: relative; z-index: 1; font-weight: 700; }
.mrow__relative:not(:empty) { border-left: 0; margin-left: 0.3rem; padding: 0 0.4rem; border-radius: var(--radius); background: var(--amber); color: var(--pitch-deep); font-size: var(--step--2); font-weight: 700; }
.mrow__note { margin-left: 2.4rem; color: var(--ink-2); font-size: var(--step--1); }
.mrow__ko { display: grid; justify-items: end; color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1; white-space: nowrap; }
.mrow__ko-label { color: var(--muted); font-family: var(--font-text); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.06em; }
.mrow__off { color: var(--lost); font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; }
.mrow__outcome {
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: var(--radius);
  background: var(--won);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
}
.mrow--drawn .mrow__outcome { background: var(--drawn); }
.mrow--lost .mrow__outcome { background: var(--lost); }
.mrow__score { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; white-space: nowrap; }
.cup .mrow__comp { display: none; }
@container (max-width: 34rem) {
  .mrow { grid-template-columns: 2.6rem minmax(0, 1fr) auto; column-gap: 0.6rem; }
  .mrow--fixture .mrow__ha { grid-column: 2; grid-row: 2; }
  .mrow--fixture .mrow__main { grid-column: 2; grid-row: 1; }
  .mrow--fixture .mrow__date { grid-row: 1 / span 2; }
  .mrow--fixture .mrow__ko { grid-row: 1 / span 2; font-size: var(--step-1); }
  .mrow--result { grid-template-columns: 2.6rem 1.7rem 2.6rem minmax(0, 1fr); }
  .mrow__outcome { width: 1.7rem; height: 1.7rem; }
  .mrow__name { font-size: var(--step-0); }
  .mrow__opp .crest { width: 24px; height: 24px; }
  .mrow__day { font-size: var(--step-1); }
  .mrow__score { font-size: var(--step-1); }
  .mrow__meta { margin-left: calc(-0.6rem - 1px); }
  .mrow__note { margin-left: 0; }
}

/* The season as a run of results */
.run { display: flex; flex-wrap: wrap; gap: 3px; list-style: none; }
.run__game { width: 0.9rem; height: 1.4rem; border-radius: 1px; background: var(--won); }
.run__game--drawn { background: var(--drawn); }
.run__game--lost { background: var(--lost); }

.season-results { border-bottom: 1px solid var(--line); background: var(--white); }
.season-results:first-of-type { border-top: 1px solid var(--line); }
.season-results summary {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr) minmax(0, 1.4fr) 1.5rem;
  align-items: center;
  gap: var(--space-s);
  min-height: 3.25rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  list-style: none;
}
.season-results summary::-webkit-details-marker { display: none; }
.season-results summary::after { content: "+"; grid-column: 4; grid-row: 1; justify-self: end; color: var(--crest-green); font-size: 1.3rem; font-weight: 700; }
.season-results[open] summary::after { content: "–"; }
.season-results__season { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; white-space: nowrap; }
.season-results__record { color: var(--ink-2); font-size: var(--step--1); }
.season-results__finish { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 640px) {
  .season-results summary { grid-template-columns: 5.4rem minmax(0, 1fr) 1.5rem; }
  .season-results summary::after { grid-column: 3; }
  .season-results__finish { grid-column: 2; }
}
.season-table { width: 100%; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.season-table th, .season-table td { padding: 0.45rem 0.75rem; text-align: left; border-top: 1px solid var(--line); }
.season-table thead th { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.season-table tbody th { font-weight: 600; }
.season-table td:first-child { width: 6.5rem; color: var(--muted); white-space: nowrap; }
.season-table__ha { color: var(--muted); font-size: var(--step--2); font-weight: 700; }
.season-table__comp { color: var(--muted); }
@media (max-width: 560px) { .season-table__comp { display: none; } }

/* Cups */
.cups { display: grid; gap: var(--space-l); }
.cup { border-top: 4px solid var(--pitch); background: var(--white); }
.cup__head { display: grid; gap: 0.35rem; padding: var(--space-s); }
.cup__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; line-height: 1.05; }
.cup__status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: var(--ink-2); font-weight: 600; }
.cup__badge { padding: 0.15rem 0.55rem; border-radius: var(--radius); font-size: var(--step--1); font-weight: 700; }
.cup__status--in .cup__badge { background: var(--won); color: var(--white); }
.cup__status--next .cup__badge { background: var(--amber); color: var(--pitch-deep); }
.cup__status--out .cup__badge { background: var(--lost); color: var(--white); }
.cup .source-note { padding: 0 var(--space-s) var(--space-s); }

.league-table + .league-table { margin-top: var(--space-2xl); }
.league-table__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-m);
  padding-bottom: var(--space-s);
}
.league-table__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-4); font-weight: 500; line-height: 1.05; }
.league-table__team { margin-top: 0.3rem; color: var(--muted); font-weight: 600; }
.league-table__team a { font-weight: 700; }
.sponsor img { width: auto; height: 36px; }
.league-table__key { margin-top: var(--space-xs); color: var(--muted); font-size: var(--step--1); }

/* The table: a broadcast-style board. The Saints' row is set in the club's
   green; the next opponent is marked in amber. */
.table-scroll { overflow-x: auto; border-top: 4px solid var(--pitch); }
.table-scroll:focus-visible { outline-offset: 0; }
.standings { width: 100%; min-width: 44rem; font-variant-numeric: tabular-nums; background: var(--white); }
.standings th, .standings td { padding: 0.7rem 0.55rem; text-align: right; white-space: nowrap; }
.standings thead th { background: var(--kit-white); border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.standings tbody tr { border-bottom: 1px solid var(--line); }
.standings tbody tr:nth-child(even) { background: #fbfbf8; }
.standings__pos { width: 3.6rem; text-align: left !important; font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; color: var(--pitch); }
thead .standings__pos { font-family: var(--font-text); font-size: var(--step--2); }
.standings__team { text-align: left !important; width: 36%; font-weight: 600; }
.standings__team .team { gap: 0.65rem; }
.standings__team .crest { width: 26px; height: 26px; }
.standings__points { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; color: var(--pitch); }
thead .standings__points { font-family: var(--font-text); font-size: var(--step--2); }
.standings__form, .standings__vs { text-align: left !important; }
.standings tr.is-club { background: var(--pitch) !important; color: var(--kit-white); }
.standings tr.is-club th, .standings tr.is-club td, .standings tr.is-club .standings__pos, .standings tr.is-club .standings__points { color: var(--kit-white); font-weight: 700; }
.standings tr.is-club .form__letter { box-shadow: 0 0 0 1px rgba(247, 246, 241, 0.5); }
.standings tr.is-next td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.tag-next {
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--pitch-deep);
  font-size: var(--step--2);
  font-weight: 700;
}
.move { display: inline-block; width: 0; height: 0; margin-left: 0.35rem; vertical-align: 0.15em; border: 0.32rem solid transparent; }
.move--up { border-bottom-color: var(--won); border-top-width: 0; }
.move--down { border-top-color: var(--lost); border-bottom-width: 0; }
.is-club .move--up { border-bottom-color: #8fd3a5; }
.vs { display: inline-block; margin-right: 0.25rem; padding: 0.1rem 0.45rem; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.vs--won { background: var(--won); color: var(--white); }
.vs--drawn { background: var(--drawn); color: var(--white); }
.vs--lost { background: var(--lost); color: var(--white); }
.vs--next { color: var(--crest-green); border: 1px solid var(--line-strong); font-weight: 600; }
.vs:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .standings__wdl, .standings__goals, .standings__vs { display: none; }
  .standings { min-width: 0; }
  .standings th, .standings td { padding-inline: 0.35rem; }
  .standings__team .team__name { white-space: normal; }
  .form--small .form__chip:nth-last-child(n+4) { display: none; }
}

/* ------------------------------------------------------------ match page */

.match-hero { padding-bottom: var(--space-l); background: var(--pitch); color: var(--kit-white); }
.match-hero .breadcrumb { color: var(--mint-2); }
.match-hero .breadcrumb a { color: var(--kit-white); }
.match-hero__competition { margin-top: var(--space-m); color: var(--amber); font-weight: 700; }
.match-hero__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-m);
  margin: var(--space-m) 0 var(--space-s);
}
.match-hero__line .board__team { flex-direction: column; text-align: center; gap: var(--space-xs); }
.match-hero__line .board__team .crest { width: clamp(56px, 8vw, 88px); height: clamp(56px, 8vw, 88px); }
.match-hero__line .board__name { font-size: var(--step-3); }
.match-hero__score { display: flex; align-items: center; font-family: var(--font-display); font-size: var(--step-6); font-weight: 600; line-height: 1; }
.match-hero__score .board__v { padding: 0; font-size: var(--step-4); }
.match-hero__score .scoreboard__dash { color: var(--mint-2); }
.match-hero__when { color: var(--mint); text-align: center; font-size: var(--step-1); }
.match-hero__when .scoreboard__outcome { margin-right: 0.5rem; font-size: var(--step-0); }
.match-page__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
  gap: var(--space-xl);
  align-items: start;
  padding-top: var(--space-l);
}
.match-page__main { display: grid; gap: var(--space-xl); }
.match-aside { display: grid; gap: var(--space-l); position: sticky; top: calc(var(--header-h) + var(--space-s)); }
@media (max-width: 900px) {
  .match-page__body { grid-template-columns: 1fr; }
  .match-aside { position: static; }
}
.match-section .section-title { margin-bottom: var(--space-xs); }
.match-section__lede { margin-bottom: var(--space-s); color: var(--ink-2); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--space-s) var(--space-l);
}
.facts div { padding-top: var(--space-xs); border-top: 2px solid var(--pitch); }
.facts__wide { grid-column: 1 / -1; }
.facts dt { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.facts dd { margin-top: 0.25rem; font-size: var(--step-1); font-weight: 600; }
.match-calendar { margin-top: var(--space-s); }
.facts dd a { font-size: var(--step-0); }

/* Form, side by side */
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
@media (max-width: 600px) { .form-pair { grid-template-columns: 1fr; } }
.form-pair__side { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-s); background: var(--white); border: 1px solid var(--line); }
.form-pair__team { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; font-weight: 700; }
.form-pair__team .crest { width: 28px; height: 28px; }
.form-pair__pos { flex-basis: 100%; color: var(--muted); font-size: var(--step--1); font-weight: 600; }

/* Thumbnails of the last meeting, at their own size */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 4px; list-style: none; }
.thumbs a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--wash); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.match-aside__block { padding: var(--space-s); background: var(--white); border: 1px solid var(--line); }
.match-aside__block .mini-table th, .match-aside__block .mini-table td { padding: 0.45rem 0.3rem; }
.mini-table tr.is-opponent { box-shadow: inset 3px 0 0 var(--amber); }
.mini-table tr.is-opponent th, .mini-table tr.is-opponent td { font-weight: 700; }
.opponent__body { display: flex; gap: var(--space-s); align-items: flex-start; }
.opponent__body .crest { width: 56px; height: 56px; }
.opponent__facts { display: grid; gap: 0.4rem; }
.opponent__facts dt { color: var(--muted); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.opponent__facts dd { font-weight: 600; }

/* ---------------------------------------------------------------- lotto */

.lotto-hero { background: var(--pitch); color: var(--kit-white); }
.lotto-hero a:not(.button) { color: var(--kit-white); }
.lotto-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: var(--space-xl);
  padding-block: var(--space-xl);
}
.lotto-hero__title { font-family: var(--font-display); font-size: var(--step-6); font-weight: 600; line-height: 0.98; }
.lotto-hero__rules { margin: var(--space-xs) 0 var(--space-m); color: var(--mint); font-size: var(--step-1); max-width: 36rem; }
.lotto-hero .fine-print { color: var(--mint-2); }
@media (max-width: 860px) { .lotto-hero__inner { grid-template-columns: 1fr; gap: var(--space-l); } }

.draw-summary { display: grid; gap: 0.35rem; }
.draw-summary a:not(.button) { color: var(--kit-white); }
.draw-summary__phase {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--amber);
  font-weight: 700;
}
.draw-summary .phase-dot { background: var(--amber); }

[data-phase="closed"] .phase-dot, [data-phase="unknown"] .phase-dot { background: var(--mint-2); }
[data-phase="closed"] .draw-summary__phase, [data-phase="unknown"] .draw-summary__phase { color: var(--mint); }
.draw-summary__close { font-size: var(--step-2); font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
.draw-summary__close time { font-weight: 600; }
.draw-summary__countdown { color: var(--mint); }
.draw-summary__jackpot { margin-top: 0.25rem; color: var(--mint); font-size: var(--step-1); }
.draw-summary__jackpot strong { color: var(--amber); font-family: var(--font-display); font-size: var(--step-5); font-weight: 600; line-height: 1; vertical-align: -0.08em; margin-left: 0.2rem; }
.draw-summary .button-row { margin-top: var(--space-s); }
.draw-summary .freshness { margin-top: 0.4rem; color: var(--amber); font-size: var(--step--1); }
.draw-summary--compact .draw-summary__jackpot strong { font-size: var(--step-4); }

/* Prices, as Clubforce lists them */
.prices { background: var(--white); border-bottom: 1px solid var(--line); }
.prices__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs) var(--space-l); align-items: center; padding-block: var(--space-m); }
.prices__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; }
.prices__list { display: flex; flex-wrap: wrap; gap: 0; list-style: none; }
.price { display: grid; padding: 0.35rem var(--space-m) 0.35rem 0; margin-right: var(--space-m); border-right: 1px solid var(--line); }
.price:last-child { border-right: 0; }
.price__amount { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; line-height: 1; }
.price__what { color: var(--muted); font-size: var(--step--1); }
.prices .source-note { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 700px) {
  .prices__inner { grid-template-columns: 1fr; }
  .prices__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
  .price { border-right: 0; margin: 0; padding: 0; }
}
.lotto-pick__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s); margin-bottom: var(--space-s); }
.lotto-pick__head .section-title { margin: 0; }
.lotto-pick__head .qr { padding: 0.5rem 0.75rem 0.5rem 0.5rem; border: 1px solid var(--line); }
.lotto-pick__head .qr img { width: 80px; height: 80px; }

.qr {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink) !important;
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
}
.qr img { width: 96px; height: 96px; }
@media (hover: none) and (pointer: coarse) { .qr { display: none; } }

.lotto > section { margin-top: var(--space-xl); }

/* The picker is a ticket: a grid of numbers, a perforation, then the stub. */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.ticket { max-width: 50rem; }
.ticket__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(2.75rem, 3.6rem));
  gap: clamp(0.4rem, 1.5vw, 0.7rem);
  align-content: start;
  justify-content: center;
  padding: var(--space-m);
}
.ticket__grid .pick { font-size: var(--step-2); }
.ticket__stub {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.25rem;
  padding: var(--space-m);
  border-left: 2px dashed var(--line-strong);
}
.ticket__stub::before, .ticket__stub::after {
  content: "";
  position: absolute;
  left: -0.75rem;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  background: var(--kit-white);
  border: 1px solid var(--line);
}
.ticket__stub::before { top: -0.75rem; clip-path: inset(50% 0 0 0); }
.ticket__stub::after { bottom: -0.75rem; clip-path: inset(0 0 50% 0); }
.ticket__stub .button-row { margin-top: var(--space-2xs); }
.ticket__status { margin-top: 0.4rem; font-weight: 700; }
@media (max-width: 760px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket__stub { border-left: 0; border-top: 2px dashed var(--line-strong); }
  .ticket__stub::before, .ticket__stub::after { top: -0.75rem; bottom: auto; clip-path: inset(0 0 0 50%); }
  .ticket__stub::before { left: -0.75rem; }
  .ticket__stub::after { left: auto; right: -0.75rem; clip-path: inset(0 50% 0 0); }
}

.pick {
  aspect-ratio: 1;
  min-height: 2.75rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
.pick:hover { border-color: var(--pitch); }
.pick[aria-pressed="true"] { border-color: var(--pitch); background: var(--pitch); color: var(--amber); }
.pick:active { transform: scale(0.94); }

.balls { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
.ball {
  display: inline-grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 2px solid var(--pitch);
  border-radius: 50%;
  background: var(--white);
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
}
.ball--empty { border: 1.5px dashed var(--line-strong); background: transparent; }
.ball--hit { border-color: var(--pitch); background: var(--amber); color: var(--pitch-deep); }

.balls--small .ball { width: 2.2rem; height: 2.2rem; font-size: 1rem; }

/* Saved lines as ticket stubs. */
.stubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--space-s); list-style: none; }
.stub {
  display: grid;
  gap: 0.55rem;
  padding: var(--space-s);
  border: 1px solid var(--line);
  border-left: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
}
.stub[data-state="current"] { border-left: 2px dashed var(--crest-green); }
.stub[data-state="matched"] { border-left: 2px dashed var(--amber); }
.stub__for { color: var(--muted); font-size: var(--step--1); }
.stub__check { font-weight: 700; }
.stub__check.is-all { color: var(--pitch); }
.stub__actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--step--1); }
.stub__actions button { min-height: 2.25rem; padding: 0; border: 0; background: none; color: var(--crest-green); text-decoration: underline; text-underline-offset: 0.2em; }
.stub__actions button:hover { color: var(--pitch); }

/* Past draws: each draw's video, and its numbers where known. */
.draw-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: var(--space-m) var(--space-s); list-style: none; }
.draw-entry { display: grid; align-content: start; gap: var(--space-xs); }
.draw-entry__video { order: -1; position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--pitch); }
.draw-entry:not(:has(.draw-entry__video)) { padding-top: var(--space-xs); border-top: 3px solid var(--pitch); }
.draw-entry__video iframe, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.draw-entry__date { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; margin-bottom: 0.4rem; }
.draw-entry__outcome { margin-top: 0.45rem; }

.draw-entry__missing { color: var(--muted); font-size: var(--step--1); }
.video-thumb { position: absolute; inset: 0; display: grid; color: var(--kit-white); text-decoration: none; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pitch-deep); border: 6px solid var(--kit-white); }
.video-thumb img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.video-thumb__label {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.6rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  background: var(--pitch);
  font-weight: 700;
  font-size: var(--step--1);
}
.play-icon {
  display: inline-block;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%230a2e1c'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.video-thumb:hover .video-thumb__label { background: var(--pitch-deep); }
.video-thumb:focus-visible { outline: 4px solid var(--amber); outline-offset: -4px; }

/* ----------------------------------------------------------------- shop */

.shop-status { margin-bottom: var(--space-s); color: var(--ink-2); font-size: var(--step--1); }
.shop-status.is-live::before, .shop-status.is-stale::before {
  content: "";
  display: inline-block;
  width: 0.55rem; height: 0.55rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  vertical-align: 0.05em;
  background: var(--crest-green);
}
.shop-status.is-stale::before { background: var(--amber); }

.shop-tools, .album-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-s);
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--line);
}
.shop-tools__search, .album-tools__search { flex: 1 1 16rem; max-width: 24rem; }
.shop-tools__count, .album-tools__count { margin-left: auto; color: var(--muted); font-size: var(--step--1); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: var(--space-l) var(--space-m);
  list-style: none;
}
@media (max-width: 540px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m) 0.75rem; } }
.product { display: grid; grid-template-rows: auto 1fr; align-content: start; }
.product__media { position: relative; aspect-ratio: 1; background: var(--white); }
.product__media img { width: 100%; height: 100%; object-fit: contain; }
.product__audience {
  position: absolute;
  left: 0; top: 0;
  padding: 0.15rem 0.5rem;
  background: var(--pitch);
  color: var(--kit-white);
  font-size: var(--step--2);
  font-weight: 700;
}
.product__body { display: flex; flex-direction: column; gap: 0.3rem; padding-top: var(--space-xs); }
.product__name { color: var(--ink); font-size: var(--step-1); font-weight: 700; line-height: 1.2; }
.product__meta { color: var(--muted); font-size: var(--step--1); }
.product__price { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; line-height: 1.1; }
.product__price s { margin-left: 0.4rem; color: var(--muted); font-size: 0.7em; }
.product__form { display: grid; gap: var(--space-xs); margin-top: auto; padding-top: 0.4rem; }
.product__option { display: grid; gap: 0.3rem; font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.product__option select { color: var(--ink); font-weight: 400; }
.product__add { width: 100%; background: transparent; color: var(--pitch); }
.product__add:hover { background: var(--pitch); border-color: var(--pitch); color: var(--kit-white); }
.product__jako { font-size: var(--step--1); }
.js .product__jako { display: none; }
.product.is-gone { opacity: 0.5; }

.swatches, .sizes { margin: 0; padding: 0; border: 0; min-width: 0; }
.swatches .label, .sizes .label { margin-bottom: 0.35rem; }
.swatches__options, .sizes__options { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.swatch, .size { position: relative; cursor: pointer; }
.swatch input, .size input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.25rem 0.6rem 0.25rem 0.3rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: var(--step--1);
}
.swatch__chip {
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(20, 35, 26, 0.25);
}
.swatch__name { line-height: 1.2; }
.swatch:has(input:checked) { border-color: var(--pitch); box-shadow: inset 0 0 0 1px var(--pitch); font-weight: 700; }
.size {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0.2rem 0.55rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
}
.size--long { flex-basis: 100%; place-items: center start; text-align: left; line-height: 1.3; padding-block: 0.4rem; }
.size:hover, .swatch:hover { border-color: var(--line-strong); }
.size:has(input:checked) { border-color: var(--pitch); background: var(--pitch); color: var(--kit-white); }
.size:has(input:disabled) { color: #8d948f; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(20, 35, 26, 0.06) 6px 7px), var(--white); text-decoration: line-through; cursor: not-allowed; }
.size:has(input:disabled) input { cursor: not-allowed; }
.swatch:has(input:focus-visible), .size:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* --------------------------------------------------------------- dialogs */

.sheet {
  width: min(100% - 2rem, 34rem);
  max-height: min(100% - 2rem, 48rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--kit-white);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(10, 46, 28, 0.55);
  opacity: 1;
  transform: none;
  transition: opacity 180ms var(--ease), transform 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete;
}
.sheet::backdrop { background: rgba(10, 46, 28, 0.55); transition: background-color 200ms var(--ease), overlay 240ms allow-discrete, display 240ms allow-discrete; }
@starting-style {
  .sheet[open] { opacity: 0; transform: translateY(12px); }
  .sheet[open]::backdrop { background: rgba(10, 46, 28, 0); }
}
.sheet__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--kit-white);
}
.sheet__title { color: var(--pitch); font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; }
.sheet__close {
  min-width: 2.75rem; min-height: 2.75rem;
  padding: 0 0.8rem;
  border: 2px solid var(--pitch);
  border-radius: var(--radius);
  background: transparent;
  color: var(--pitch);
  font-weight: 700;
}
.sheet__close:hover { background: var(--wash); }
.sheet__body { padding: 1rem 1.15rem 1.35rem; }
body:has(dialog[open]) { overflow: hidden; }

.sheet--drawer {
  margin: 0 0 0 auto;
  width: min(100%, 28rem);
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}
@starting-style { .sheet--drawer[open] { opacity: 1; transform: translateX(100%); } }
.sheet--drawer .sheet__body { display: grid; gap: 1rem; }

.basket-lines { display: grid; list-style: none; }
.basket-line {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.basket-line img { width: 4rem; height: 4rem; object-fit: contain; background: var(--white); }
.basket-line__title { font-weight: 700; }
.basket-line__options { color: var(--ink-2); font-size: var(--step--1); }
.basket-line__warn { color: var(--lost); font-size: var(--step--1); font-weight: 600; }
.basket-line__note { color: var(--amber-ink); font-size: var(--step--1); }
.qty { display: inline-flex; align-items: center; margin-top: 0.45rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
.qty button { width: 2.5rem; height: 2.5rem; border: 0; background: transparent; font-size: 1.1rem; }
.qty button:hover { background: var(--wash); }
.qty output { min-width: 1.8rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-line__price { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-line__remove { display: block; min-height: 2.25rem; margin-left: auto; padding: 0; border: 0; background: none; color: var(--crest-green); text-decoration: underline; font-size: var(--step--1); }
.basket-total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-foot { display: grid; gap: 0.6rem; padding-top: 0.5rem; }
.basket-foot .fine-print { margin-top: 0; }

.sheet--viewer {
  width: 100%; height: 100%;
  max-width: 100%; max-height: 100%;
  margin: 0;
  border-radius: 0;
  background: #0b140f;
  color: var(--kit-white);
  --focus-ring: var(--amber);
}
.sheet--viewer::backdrop { background: #0b140f; }
.sheet--viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); transform: none; }
@starting-style { .sheet--viewer[open] { opacity: 0; transform: none; } }
.sheet--viewer .sheet__head { padding-inline: var(--gutter); border-bottom: 1px solid rgba(247, 246, 241, 0.14); background: transparent; }
.sheet--viewer .sheet__title { color: var(--kit-white); font-family: var(--font-text); font-size: var(--step-0); font-weight: 600; }
.sheet--viewer .sheet__close { border-color: rgba(247, 246, 241, 0.6); color: var(--kit-white); }
.sheet--viewer .sheet__close:hover { background: rgba(247, 246, 241, 0.1); }
.viewer__body { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.viewer__count { color: var(--mint); font-variant-numeric: tabular-nums; }
.viewer__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  min-height: 0;
}
.viewer__figure { display: grid; place-items: center; height: 100%; min-height: 0; padding: 1rem 0; touch-action: pan-y; }
.viewer__figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.viewer__nav {
  width: 3rem; height: 3rem;
  border: 1.5px solid rgba(247, 246, 241, 0.5);
  border-radius: 50%;
  background: rgba(11, 20, 15, 0.6);
  color: var(--kit-white);
  font-size: 1.3rem;
  line-height: 1;
}
.viewer__nav:hover { border-color: var(--amber); color: var(--amber); }
.viewer__foot { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--gutter) 1rem; color: var(--mint); font-size: var(--step--1); }
@media (max-width: 600px) {
  .viewer__stage { grid-template-columns: 1fr; padding: 0; }
  .viewer__nav { position: absolute; bottom: 4.25rem; }
  .viewer__nav[data-dir="-1"] { left: 1rem; }
  .viewer__nav[data-dir="1"] { right: 1rem; }
}

.toast {
  position: fixed;
  left: 50%; bottom: 1.25rem;
  z-index: 60;
  max-width: min(100% - 2rem, 30rem);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--pitch-deep);
  color: var(--kit-white);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}
.toast:empty { display: none; }

/* -------------------------------------------------------------- gallery */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-l) var(--space-s);
  list-style: none;
}
@media (max-width: 540px) { .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m) 0.6rem; } }
.album-card a { display: grid; gap: 0.35rem; color: var(--ink); text-decoration: none; }
.album-card__cover { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--wash); }
.album-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.album-card a:hover img { transform: scale(1.025); }
.album-card__title { margin-top: 0.2rem; font-weight: 700; line-height: 1.3; }
.album-card a:hover .album-card__title { text-decoration: underline; }
.album-card__when { color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.album-card__count { color: var(--muted); font-size: var(--step--1); }
.load-more { margin-top: var(--space-l); text-align: center; }
.js .album-card[data-beyond]:not(.is-revealed) { display: none; }

.page-head--album { padding-top: var(--space-s); }
.page-title--album { font-size: var(--step-4); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 4px;
  list-style: none;
}
@media (max-width: 540px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photo-grid a { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--wash); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.album-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: var(--space-xl);
  padding-top: var(--space-s);
  border-top: 3px solid var(--pitch);
}
.album-pager a { display: grid; max-width: 48%; color: var(--ink); font-weight: 700; text-decoration: none; }
.album-pager a[rel="next"] { margin-left: auto; text-align: right; }
.album-pager a span { color: var(--muted); font-size: var(--step--2); letter-spacing: 0.09em; text-transform: uppercase; }
.album-pager a:hover { text-decoration: underline; }

/* ----------------------------------------------------------- club page */

.club-head { background: var(--pitch); color: var(--kit-white); }
.club-head__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-m) var(--space-xl); padding-block: var(--space-l); }
.club-head__club { display: flex; align-items: center; gap: var(--space-m); }
.club-head__crest { width: clamp(72px, 10vw, 112px); height: auto; flex: none; }
.club-head__league { display: flex; align-items: center; gap: var(--space-s); padding-left: var(--space-l); border-left: 1px solid rgba(207, 224, 205, 0.35); }
.club-head__badge { width: 64px; height: 64px; flex: none; }
.club-head__league-name { color: var(--kit-white); font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.1; }
.club-head__divisions { display: grid; gap: 0.2rem; margin: 0.4rem 0 0; font-size: var(--step--1); }
.club-head__divisions div { display: flex; flex-wrap: wrap; column-gap: 0.6rem; }
.club-head__divisions dt { min-width: 5.5rem; color: var(--mint-2); }
.club-head__divisions dd { margin: 0; }
.club-head__divisions a { color: var(--kit-white); text-decoration-color: rgba(207, 224, 205, 0.45); }
@media (max-width: 760px) {
  .club-head__league { width: 100%; padding: var(--space-s) 0 0; border-left: 0; border-top: 1px solid rgba(207, 224, 205, 0.35); }
}
.club-head .page-title { color: var(--kit-white); }
.club-head .page-meta { color: var(--mint); }
.club-section { margin-top: var(--space-xl); }
.club-ground { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-l); align-items: start; }
.club-ground address { font-size: var(--step-1); color: var(--ink-2); }
.club-ground__text .label { margin-top: var(--space-l); }
.club-ground__photo { justify-self: end; max-width: 25rem; }
.club-ground__photo figcaption { margin-top: 0.35rem; color: var(--muted); font-size: var(--step--2); }
@media (max-width: 860px) { .club-ground { grid-template-columns: 1fr; } .club-ground__photo { order: -1; justify-self: start; } }
.club-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-xl); }
.club-columns p + p { margin-top: var(--space-xs); }
@media (max-width: 800px) { .club-columns { grid-template-columns: 1fr; gap: var(--space-l); } }

.map-frame {
  display: grid;
  place-content: center;
  gap: 0.25rem;
  min-height: 16rem;
  margin-top: var(--space-l);
  padding: var(--space-m);
  border: 1px solid var(--line);
  background: var(--white);
  text-align: center;
}
.map-frame .button-row { justify-content: center; }
.map-frame.is-loaded { display: block; padding: 0; border: 0; min-height: 0; }
.map-frame iframe { width: 100%; height: 26rem; border: 0; }

/* ---------------------------------------------- saved, draw desk, 404 */

.panel { padding: var(--space-m); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.panel--quiet { background: transparent; }
.panel .section-title { font-size: var(--step-2); }

.saved-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
.saved-grid > .notice { grid-column: 1 / -1; }
@media (max-width: 760px) { .saved-grid { grid-template-columns: 1fr; } }
.prefs-form fieldset { display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 0; border: 0; }
.prefs-form legend { margin-bottom: 0.4rem; font-weight: 700; }
.prefs-form label { display: grid; gap: 0.25rem; }
.prefs-form label:has(input[type="radio"]) { display: flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; }
.prefs-form input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: var(--pitch); }
.form-status { margin-top: 0.6rem; font-weight: 700; color: var(--crest-green); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--lost); }

.not-found__inner { padding-block: var(--space-xl); display: grid; gap: var(--space-s); }
.not-found .link-list { margin-top: var(--space-s); }

/* --------------------------------------------------------------- motion */

@keyframes bump {
  0%, 100% { transform: none; }
  40% { transform: scale(1.35); }
}

/* Page to page, the header stays put and the content crossfades. Firefox
   and older browsers simply navigate. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease); }
  ::view-transition-group(album-cover) { animation-duration: 320ms; animation-timing-function: var(--ease-out); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}

@media (forced-colors: active) {
  .hoops { background: CanvasText; forced-color-adjust: none; }
  .fixture__score, .scoreboard__outcome, .form__letter { border: 1px solid CanvasText; }
  .pick[aria-pressed="true"], .size:has(input:checked), .swatch:has(input:checked) { outline: 2px solid Highlight; }
}

/* ---------------------------------------------------------------- print */

/* Fixture lists print as a plain programme page. */
@media print {
  .site-header, .site-footer, .tabs__list, .switch, .shop-tools, .album-tools,
  [data-basket-open], .masthead__photos, .home-lotto, .ground__photo,
  .board__actions, .hoops, .skip-link, .standings__form, .standings__vs { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead, .match-hero, .lotto-hero, .club-head { background: none; color: #000; }
  .masthead * , .match-hero *, .lotto-hero *, .club-head * { color: #000 !important; }
  .tab-panel[hidden] { display: block !important; }
  .fixture { break-inside: avoid; padding: 0.35rem 0; }
  .fixture--won .fixture__score, .fixture--drawn .fixture__score, .fixture--lost .fixture__score { background: none; color: #000; }
  a { color: #000; text-decoration: none; }
}

/* ---------------------------------------- live league: changes since build */

.mrow.is-played-live { box-shadow: inset 4px 0 0 var(--crest-green); }
@media (prefers-reduced-motion: no-preference) {
  .is-updated { animation: live-updated 2.4s var(--ease); }
}
@keyframes live-updated {
  from { background-color: rgba(235, 149, 48, 0.28); }
  to { background-color: transparent; }
}
