/* ==========================================================================
   Clubhouse: the club's own website and noticeboard.

   Colour comes only from the seven tenant variables (--primary, --secondary,
   --success, --warning, --danger, --dark, --light), emitted by base.html.
   Everything else is derived here, so any palette still reads:
   - an "on" ink for each surface flips to near-black or near-white by the
     surface's OKLCH lightness;
   - an "ink" version of each colour, capped in lightness, for text on paper.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---- Type ---- */
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  /* Major third from a 17px phone base (18px on a desktop). */
  --t-xs: 0.8rem;
  --t-sm: 0.889rem;
  --t-md: 1.125rem;
  --t-lg: 1.4rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.2rem;
  --t-3xl: clamp(2.2rem, 1.4rem + 3.6vw, 4rem);

  /* ---- Space (4px steps) ---- */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem;

  --r-row: 6px;
  --r-panel: 18px;
  --wrap: 78rem;

  /* ---- Derived colour ---- */
  /* On-colour: near-black on light surfaces, white on dark ones, chosen by
     the surface's relative luminance (the y of CIE XYZ, the quantity WCAG
     contrast is computed from). 0.19 is where both reach the same contrast. */
  --on-primary: color(from var(--primary) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9505) clamp(0.006, (0.19 - y) * 1000, 1) clamp(0.0065, (0.19 - y) * 1000, 1.0890));
  --on-secondary: color(from var(--secondary) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9505) clamp(0.006, (0.19 - y) * 1000, 1) clamp(0.0065, (0.19 - y) * 1000, 1.0890));
  --on-dark: color(from var(--dark) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9220) clamp(0.006, (0.19 - y) * 1000, 0.97) clamp(0.0065, (0.19 - y) * 1000, 1.0563));
  --on-warning: color(from var(--warning) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9505) clamp(0.006, (0.19 - y) * 1000, 1) clamp(0.0065, (0.19 - y) * 1000, 1.0890));
  --on-success: color(from var(--success) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9505) clamp(0.006, (0.19 - y) * 1000, 1) clamp(0.0065, (0.19 - y) * 1000, 1.0890));
  --on-danger: color(from var(--danger) xyz-d65 clamp(0.0057, (0.19 - y) * 1000, 0.9505) clamp(0.006, (0.19 - y) * 1000, 1) clamp(0.0065, (0.19 - y) * 1000, 1.0890));

  /* Text versions, dark enough for small text on paper whatever the tenant picks. */
  --primary-ink: oklch(from var(--primary) min(l, 0.46) c h);
  --secondary-ink: oklch(from var(--secondary) min(l, 0.46) c h);
  --success-ink: oklch(from var(--success) min(l, 0.45) c h);
  --danger-ink: oklch(from var(--danger) min(l, 0.47) c h);
  --warning-ink: oklch(from var(--warning) min(l, 0.45) c h);

  /* Surfaces. The board is the page; paper is what notices are printed on. */
  --paper: color-mix(in oklab, var(--light) 30%, white);
  --board: color-mix(in oklab, color-mix(in oklab, var(--light) 85%, white), var(--primary) 9%);
  --ink: oklch(from var(--dark) min(l, 0.26) min(c, 0.03) h);
  --ink-soft: color-mix(in oklab, var(--ink) 72%, var(--paper));
  --rule: color-mix(in oklab, var(--ink) 14%, transparent);
  --rule-strong: color-mix(in oklab, var(--ink) 26%, transparent);

  --primary-wash: color-mix(in oklab, var(--primary) 16%, var(--paper));
  --primary-tone: color-mix(in oklab, var(--primary) 89%, var(--on-primary));
  --secondary-wash: color-mix(in oklab, var(--secondary) 14%, var(--paper));
  --warning-wash: color-mix(in oklab, var(--warning) 30%, var(--paper));
  --success-wash: color-mix(in oklab, var(--success) 18%, var(--paper));
  --danger-wash: color-mix(in oklab, var(--danger) 14%, var(--paper));

  /* The jersey: plain tenant colour, deepening a touch towards the collar
     (the secondary band under every masthead). No stripes. */
  --jersey: linear-gradient(180deg, var(--primary) 35%, color-mix(in oklab, var(--primary) 91%, var(--on-primary)) 100%);
  /* A shield watermark in the masthead: the crest shape, two tones off the primary. */
  --shield-fill: color-mix(in oklab, var(--primary) 93%, var(--on-primary));
  --shield-trim: color-mix(in oklab, var(--primary) 86%, var(--on-primary));
  /* Height of the sticky in-page bar, so things that stick below it know where to stop. */
  --bar: 3.5rem;
  /* The collar band: secondary between thin primary pinstripes. */
  --collar: linear-gradient(180deg, var(--secondary) 0 100%);

  color-scheme: light;
}

/* ---------- Reset and base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--board);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 60rem) { body { font-size: 1.125rem; } }
main { flex: 1 0 auto; outline: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0; font-weight: 750; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s4); }
a { color: var(--primary-ink); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 3px; }
abbr[title] { text-decoration: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 60rem) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.skip-link {
  position: absolute; left: var(--s4); top: -4rem; z-index: 50;
  background: var(--paper); color: var(--ink); padding: var(--s2) var(--s4);
  border-radius: var(--r-row); font-weight: 700;
}
.skip-link:focus { top: var(--s2); }

/* ---------- Header ---------- */

.site-header {
  background: var(--primary);
  color: var(--on-primary);
  position: relative;
  z-index: 20;
}
.site-header a { color: inherit; }
.site-header__bar {
  display: flex; align-items: center; gap: var(--s4);
  min-height: 4rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s3);
  text-decoration: none; font-family: var(--f-display);
  font-weight: 800; font-size: var(--t-md); line-height: 1.1;
  margin-right: auto; padding-block: var(--s2);
  font-stretch: 85%;
}
.brand__badge {
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.9rem; flex: none;
  background: var(--on-primary); color: var(--primary);
  font-family: var(--f-display); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em;
  font-stretch: 75%;
  border-radius: 0.55rem 0.55rem 1.3rem 1.3rem;
}
.menu-button {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 700 var(--t-sm)/1 var(--f-body); color: inherit;
  background: transparent; border: 2px solid currentColor;
  border-radius: 999px; padding: 0.55rem 0.95rem; cursor: pointer;
}
.menu-button__icon, .menu-button__icon::before, .menu-button__icon::after {
  display: block; width: 1rem; height: 2px; background: currentColor; border-radius: 2px;
}
.menu-button__icon { position: relative; }
.menu-button__icon::before, .menu-button__icon::after { content: ""; position: absolute; left: 0; }
.menu-button__icon::before { top: -5px; }
.menu-button__icon::after { top: 5px; }
.menu-button[aria-expanded="true"] .menu-button__icon { background: transparent; }
.menu-button[aria-expanded="true"] .menu-button__icon::before { top: 0; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-button__icon::after { top: 0; transform: rotate(-45deg); }

.site-nav { width: 100%; }
.no-js .menu-button { display: none; }
.js .site-nav:not(.is-open) { display: none; }
.site-nav__list { list-style: none; margin: 0; padding: 0 0 var(--s3); display: grid; }
.site-nav__list a, .site-nav__account a, .linkish {
  display: block; padding: 0.8rem 0.25rem; font-weight: 700; font-size: var(--t-md);
  text-decoration: none; border-top: 1px solid color-mix(in oklab, var(--on-primary) 22%, transparent);
}
.site-nav__list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.35em; }
.site-nav__account { padding-bottom: var(--s4); }
.site-nav__account form { margin: 0; }
.linkish { background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }

@media (min-width: 64rem) {
  .menu-button { display: none; }
  .site-header__bar { flex-wrap: nowrap; min-height: 4.75rem; }
  .js .site-nav:not(.is-open), .site-nav { display: flex; align-items: center; width: auto; gap: var(--s4); }
  .site-nav__list { display: flex; padding: 0; gap: var(--s1); }
  .site-nav__list a {
    border: 0; font-size: var(--t-sm); padding: 0.5rem 0.75rem; border-radius: 999px;
  }
  .site-nav__list a:hover { background: color-mix(in oklab, var(--on-primary) 12%, transparent); }
  .site-nav__list a[aria-current="page"] {
    background: var(--on-primary); color: var(--primary); text-decoration: none;
  }
  .site-nav__account { padding: 0; display: flex; gap: var(--s2); }
  .site-nav__account a, .linkish {
    border: 2px solid currentColor; border-radius: 999px; padding: 0.4rem 0.95rem; font-size: var(--t-sm);
  }
  .brand { font-size: var(--t-lg); }
}

/* ---------- Masthead (the jersey) ---------- */

.masthead {
  background: var(--jersey);
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--on-primary);
  border-bottom: 0.6rem solid var(--secondary);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--on-primary) 18%, transparent);
}
.masthead a { color: inherit; }
/* The club shield, large and quiet, at the right of every masthead. */
.masthead::before, .hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: max(-2.5rem, calc((100vw - var(--wrap)) / 2 - 1rem)); top: 1.25rem;
  width: 9rem; height: 10rem;
  border-radius: 1rem 1rem 4.5rem 4.5rem;
  background: var(--shield-fill);
  box-shadow: inset 0 0 0 0.7rem var(--shield-fill), inset 0 0 0 1.05rem var(--shield-trim);
  transform: rotate(-6deg);
}
@media (min-width: 48rem) {
  .masthead::before { width: 14rem; height: 15.5rem; top: 1.5rem; border-radius: 1.5rem 1.5rem 7rem 7rem; right: max(1rem, calc((100vw - var(--wrap)) / 2)); }
}
.masthead--slim::before { display: none; }
.masthead__inner { padding-block: var(--s4) var(--s6); }
.masthead__main { display: flex; align-items: center; gap: var(--s4); }
.masthead__text { min-width: 0; }
.masthead__title {
  font-size: var(--t-3xl); font-weight: 800; font-stretch: 88%;
  letter-spacing: -0.02em; line-height: 0.98; text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
.masthead__meta { margin: var(--s3) 0 0; font-size: var(--t-md); font-weight: 600; }
.masthead__meta a { text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); }

.trail { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) 0; font-size: var(--t-sm); font-weight: 600; }
.trail li { display: inline-flex; align-items: center; }
.trail li + li::before {
  content: ""; width: 0.4em; height: 0.4em; margin: 0 0.6em;
  border-right: 2px solid currentColor; border-top: 2px solid currentColor;
  transform: rotate(45deg); opacity: 0.7;
}
.trail a { text-decoration: none; padding-block: 0.2rem; }
.trail a:hover { text-decoration: underline; }
.crumbs { padding-top: var(--s4); }

/* ---------- Crests ---------- */

.crest {
  --c-bg: var(--primary); --c-fg: var(--on-primary); --c-trim: var(--secondary);
  --c-tone: color-mix(in oklab, var(--c-bg) 80%, var(--c-fg));
  display: inline-grid; place-items: center; flex: none;
  width: 1.9rem; height: 2.1rem;
  border-radius: 0.3rem 0.3rem 1rem 1rem;
  background: var(--c-bg); color: var(--c-fg);
  box-shadow: inset 0 0 0 2px var(--c-trim);
  font: 800 0.72rem/1 var(--f-display); font-stretch: 75%; letter-spacing: 0.02em;
  overflow: hidden; position: relative;
}
.crest[data-c="1"] { --c-bg: var(--secondary); --c-fg: var(--on-secondary); --c-trim: var(--primary); }
.crest[data-c="2"] { --c-bg: var(--dark); --c-fg: var(--on-dark); --c-trim: var(--primary); }
.crest[data-p="1"] { background: repeating-linear-gradient(180deg, var(--c-bg) 0 22%, var(--c-tone) 22% 34%); }
.crest[data-p="2"] { background: linear-gradient(90deg, var(--c-bg) 50%, var(--c-tone) 50%); }
.crest[data-p="3"] { background: linear-gradient(135deg, var(--c-bg) 38%, var(--c-tone) 38% 62%, var(--c-bg) 62%); }
.crest > span { position: relative; }
.crest--tbc { --c-bg: var(--paper); --c-fg: var(--ink-soft); --c-trim: var(--rule-strong); background: var(--paper) !important; box-shadow: inset 0 0 0 2px var(--rule-strong); }
.crest--lg { width: 3rem; height: 3.35rem; font-size: 1.05rem; border-radius: 0.45rem 0.45rem 1.6rem 1.6rem; box-shadow: inset 0 0 0 3px var(--c-trim); }
.crest--xl { width: 4.6rem; height: 5.1rem; font-size: 1.6rem; border-radius: 0.6rem 0.6rem 2.4rem 2.4rem; box-shadow: inset 0 0 0 4px var(--c-trim), 0 0 0 3px var(--on-primary); }
@media (min-width: 60rem) { .crest--xl { width: 6rem; height: 6.7rem; font-size: 2.1rem; border-radius: 0.8rem 0.8rem 3rem 3rem; } }

/* ---------- Chips and buttons ---------- */

.chip {
  display: inline-flex; align-items: center; gap: 0.3em;
  font: 700 var(--t-xs)/1 var(--f-body);
  padding: 0.3rem 0.55rem; border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 8%, var(--paper)); color: var(--ink);
  white-space: nowrap;
}
.chip--next { background: var(--warning); color: var(--on-warning); }
.chip--won { background: var(--success-wash); color: var(--success-ink); }
.chip--lost { background: var(--danger-wash); color: var(--danger-ink); }
.chip--drew { background: var(--warning-wash); color: var(--ink); }
.chip--alert { background: var(--danger-wash); color: var(--danger-ink); }
.chip--wait { background: var(--warning-wash); color: var(--ink); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font: 700 var(--t-md)/1.2 var(--f-body); text-decoration: none;
  padding: 0.85rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--primary); color: var(--on-primary); cursor: pointer;
}
.button:hover { background: var(--primary-tone); }
.button--ink { background: var(--ink); color: var(--paper); }
.button--ink:hover { background: color-mix(in oklab, var(--ink) 85%, var(--paper)); }
.button--light { background: var(--on-primary); color: var(--primary); }
.button--light:hover { background: color-mix(in oklab, var(--on-primary) 88%, var(--primary)); }
.button--quiet { background: transparent; color: var(--primary-ink); border-color: currentColor; font-size: var(--t-sm); padding: 0.6rem 1rem; }
.button--quiet:hover { background: var(--primary-wash); }

/* ---------- Panels (the notices on the board) ---------- */

.panel {
  background: var(--paper);
  border-radius: var(--r-panel);
  padding: var(--s4);
  box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule);
}
@media (min-width: 40rem) { .panel { padding: var(--s5); } }
.panel__title {
  font-size: var(--t-xl); font-weight: 800; font-stretch: 90%;
  margin-bottom: var(--s4);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s3);
}
.panel__title small { font: 600 var(--t-sm)/1.2 var(--f-body); color: var(--ink-soft); letter-spacing: 0; }
.panel__foot { margin: var(--s4) 0 0; }
.empty { color: var(--ink-soft); margin: 0; }
.empty__lead { font: 700 var(--t-lg)/1.2 var(--f-display); color: var(--ink); margin-bottom: var(--s2); }
.rounds:has(.round) + .empty--only { display: none; }

/* ---------- In-page bar ---------- */

.jumpbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.jumpbar__inner { display: flex; align-items: center; gap: var(--s4); height: calc(var(--bar) - 1px); }
.jumpbar__where { font: 800 var(--t-md)/1 var(--f-display); white-space: nowrap; display: none; }
.jumpbar__links {
  list-style: none; margin: 0; padding: var(--s2) 0; display: flex; gap: var(--s2);
  overflow-x: auto; scrollbar-width: none; flex: 1;
}
.jumpbar__links::-webkit-scrollbar { display: none; }
.jumpbar__links a {
  display: block; white-space: nowrap; text-decoration: none; font-weight: 700; font-size: var(--t-sm);
  padding: 0.45rem 0.85rem; border-radius: 999px; color: var(--ink);
  background: color-mix(in oklab, var(--ink) 6%, var(--paper));
}
.jumpbar__links li:first-child a { background: var(--primary); color: var(--on-primary); }
.jumpbar__links a:hover { background: var(--primary-wash); }
@media (min-width: 60rem) { .jumpbar__where { display: block; } }

/* ---------- Competition page body ---------- */

.tc { padding-bottom: var(--s8); }
.tc > .wrap:first-child, .tc > .stack:first-child { margin-top: var(--s5); }
.stack { display: grid; gap: var(--s4); margin-top: var(--s5); }
@media (min-width: 60rem) { .stack { gap: var(--s5); margin-top: var(--s6); } }

.division-grid { display: grid; gap: var(--s4); margin-top: var(--s4); }
/* Desktop: fixtures down the left, the ladder on the right. The ladder's
   grid area spans every row, so when it sticks below the in-page bar it can
   only move within its own column and never covers anything. */
@media (min-width: 64rem) {
  .division-grid {
    grid-template-columns: minmax(23rem, 5fr) minmax(0, 7fr);
    grid-template-areas: "next side" "results side" "later side";
    grid-template-rows: auto auto 1fr;
    gap: var(--s5); margin-top: var(--s6); align-items: start;
  }
  .division-grid__next { grid-area: next; }
  .division-grid__ladder {
    grid-area: side; display: grid; gap: var(--s5);
    position: sticky; top: calc(var(--bar) + var(--s4));
    max-height: calc(100vh - var(--bar) - var(--s4) * 2); overflow-y: auto;
    overscroll-behavior: contain; border-radius: var(--r-panel);
    padding: 1px 1px 3px; margin: -1px -1px -3px;
  }
  .division-grid__results { grid-area: results; }
  .division-grid__later { grid-area: later; }
}
.panel--next { background: var(--paper); box-shadow: 0 0 0 3px var(--primary), 0 0 0 4px var(--rule-strong), 0 6px 0 var(--rule-strong); }

/* ---------- Rounds and fixtures ---------- */

.rounds { display: grid; gap: var(--s4); }
.round { border-radius: var(--r-row); }
.round__head {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s3);
  font: 800 var(--t-lg)/1.15 var(--f-display); font-stretch: 92%;
  padding: 0 0 var(--s2); margin: 0;
  border-bottom: 3px solid var(--ink);
}
.round__date { font: 700 var(--t-md)/1.2 var(--f-body); color: var(--ink-soft); }
.round.is-next .round__head { border-bottom-color: var(--primary); }
.round.is-next .round__date { color: var(--ink); }
details.round > summary { cursor: pointer; list-style: none; }
details.round > summary::-webkit-details-marker { display: none; }
details.round > summary::after {
  content: ""; margin-left: auto; width: 0.55rem; height: 0.55rem;
  border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s;
}
details.round:not([open]) > summary { border-bottom-width: 1px; border-bottom-color: var(--rule-strong); padding-bottom: var(--s3); }
details.round:not([open]) > summary::after { transform: rotate(-45deg); }
details.round:not([open]) .round__name { font-size: var(--t-md); }
@media (prefers-reduced-motion: reduce) { details.round > summary::after { transition: none; } }

.fx {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0 var(--s3);
  padding: var(--s3) 0; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
a.fx:hover { background: var(--primary-wash); box-shadow: -0.5rem 0 0 var(--primary-wash), 0.5rem 0 0 var(--primary-wash); }
a.fx:hover .fx__team { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.fx__when { display: flex; flex-direction: column; gap: 0.1rem; padding-top: 0.15rem; }
.fx__date { font-weight: 700; font-size: var(--t-sm); }
.fx__time { font: 800 var(--t-md)/1.15 var(--f-display); white-space: nowrap; }
.fx__place { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.25; }
.fx__sides { display: grid; gap: var(--s2); }
.fx__side { display: flex; align-items: center; gap: var(--s2); min-height: 1.95rem; }
.fx__team { flex: 1; min-width: 0; font-weight: 700; line-height: 1.2; }
.fx__score { font: 800 var(--t-xl)/1 var(--f-display); min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.fx__side.is-loser .fx__team, .fx__side.is-loser .fx__score { color: var(--ink-soft); font-weight: 500; }
.fx__side.is-loser .fx__score { font-weight: 600; }
.fx__side.is-loser .crest { opacity: 0.6; }
.fx__side.is-winner .fx__score { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.3rem; }
.fx__side.is-winner .fx__score::before {
  content: ""; width: 0; height: 0; border-block: 0.3rem solid transparent;
  border-right: 0.42rem solid var(--success-ink);
}
.fx:has(.fx__date) { grid-template-columns: minmax(0, 1fr); }
.fx:has(.fx__date) .fx__when { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); padding: 0 0 var(--s2); }
.fx:has(.fx__date) .fx__date, .fx:has(.fx__date) .fx__time { font: 800 var(--t-md)/1.2 var(--f-display); }
.fx:has(.fx__date) .fx__notes { grid-column: 1; }
.fx__side.is-tbc .fx__team { font-style: italic; font-weight: 500; color: var(--ink-soft); }
.fx__side.is-us { background: var(--warning-wash); border-radius: var(--r-row); margin-inline: -0.35rem; padding-inline: 0.35rem; }
.fx__notes { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.fx__label { font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.fx.is-bye { grid-template-columns: 4.6rem minmax(0, 1fr); color: var(--ink-soft); }
.fx.is-bye .fx__time { font: 700 var(--t-sm)/1.4 var(--f-body); color: var(--ink-soft); }
.fx.is-bye .fx__team { font-weight: 600; color: var(--ink-soft); }
.fx.is-won { box-shadow: inset 4px 0 0 var(--success); padding-left: var(--s3); }
.fx.is-lost { box-shadow: inset 4px 0 0 var(--danger); padding-left: var(--s3); }
.fx.is-drew { box-shadow: inset 4px 0 0 var(--warning); padding-left: var(--s3); }
.round__rows > .fx:last-child { border-bottom: 0; }

/* The next round is read at arm's length. */
.round.is-next .fx { padding: var(--s4) 0; }
.round.is-next .fx { grid-template-columns: 5.3rem minmax(0, 1fr); }
.round.is-next .fx__time { font-size: 1.25rem; }
.round.is-next .fx__team { font-size: var(--t-md); }

/* ---------- Ladder ---------- */

.ladder-wrap { container-type: inline-size; }
.ladder-scroll { overflow-x: auto; border-radius: var(--r-row); }
.ladder-scroll:focus-visible { outline-offset: 2px; }
.ladder {
  border-collapse: separate; border-spacing: 0; width: 100%;
  font-size: var(--t-sm); font-variant-numeric: tabular-nums;
}
.ladder th, .ladder td { padding: 0.55rem 0.4rem; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--rule); }
.ladder thead th { font: 700 var(--t-xs)/1.2 var(--f-body); color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding-block: 0.45rem; }
.ladder .ladder__pos { width: 2rem; min-width: 2rem; max-width: 2rem; font-weight: 800; font-family: var(--f-display); font-size: var(--t-md); color: var(--ink-soft); padding-left: 0.25rem; }
.ladder thead .ladder__pos { font: 700 var(--t-xs)/1.2 var(--f-body); }
.ladder .ladder__team {
  text-align: left; white-space: normal; font-weight: 700; font-size: var(--t-md);
  min-width: 9.5rem; position: sticky; left: 0; background: var(--paper); z-index: 1;
}
.ladder td.ladder__pos { position: sticky; left: 0; background: var(--paper); z-index: 2; }
.ladder td.ladder__pos + .ladder__team { left: 2rem; }
.ladder thead .ladder__pos { position: sticky; left: 0; background: var(--paper); z-index: 2; }
.ladder thead .ladder__team { left: 2rem; font-size: var(--t-xs); }
.ladder__club { display: flex; align-items: center; gap: 0.55rem; }
.ladder tbody .ladder__team a { color: var(--ink); text-decoration: none; line-height: 1.2; }
.ladder tbody .ladder__team a:hover { text-decoration: underline; }
.ladder .ladder__pts { font: 800 var(--t-md)/1 var(--f-display); background: var(--primary-wash); }
.ladder thead .ladder__pts { background: var(--primary); color: var(--on-primary); border-radius: var(--r-row) var(--r-row) 0 0; font: 700 var(--t-xs)/1.2 var(--f-body); }
.ladder .ladder__more { border-left: 2px solid var(--rule); }
.ladder td:not(.ladder__pos):not(.ladder__pts):not(.ladder__team) { color: color-mix(in oklab, var(--ink) 88%, var(--paper)); }
.ladder tbody tr:nth-child(4) td, .ladder tbody tr:nth-child(4) th { border-bottom: 2px dashed var(--rule-strong); }
.ladder tbody tr.is-us td, .ladder tbody tr.is-us th { background: var(--warning-wash); }
.ladder tbody tr.is-us .ladder__pts { background: var(--warning); color: var(--on-warning); }
.ladder tbody tr:last-child td, .ladder tbody tr:last-child th { border-bottom: 0; }
.ladder__form { display: none; }
.pips { display: inline-flex; gap: 3px; }
.pip {
  display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 4px;
  font: 800 0.65rem/1 var(--f-body); background: var(--rule); color: var(--ink);
}
/* Results sit on the ink versions (lightness capped), so white always reads. */
.pip.is-won { background: var(--success-ink); color: #fff; }
.pip.is-lost { background: var(--danger-ink); color: #fff; }
.pip.is-drew { background: var(--warning); color: var(--on-warning); }
.ladder-hint { font-size: var(--t-xs); color: var(--ink-soft); margin: var(--s2) 0 0; }
@container (min-width: 40rem) { .ladder-hint { display: none; } }
@container (min-width: 46rem) {
  .ladder th, .ladder td { padding-inline: 0.5rem; }
}
@container (min-width: 46rem) {
  .ladder .ladder__form { display: table-cell; }
}
.pools { display: grid; gap: var(--s5); }
.pool__title { font-size: var(--t-lg); margin-bottom: var(--s2); }


/* ---------- Match: the scoreboard masthead ---------- */

.masthead--match .masthead__main { display: block; }
.masthead--match .masthead__title { font-size: inherit; line-height: 1.1; letter-spacing: 0; }
.board {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start; gap: var(--s3); margin-top: var(--s2);
}
.board__team {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2);
  font: 800 var(--t-lg)/1.1 var(--f-display); font-stretch: 88%; letter-spacing: -0.01em; text-wrap: balance;
}
.board__team a { text-decoration: none; }
.board__team a:hover { text-decoration: underline; }
.board__team.is-loser .board__name { opacity: 0.78; }
.board__score {
  display: flex; align-items: center; gap: var(--s2);
  font: 800 clamp(3rem, 2rem + 6vw, 6rem)/0.9 var(--f-display); font-variant-numeric: tabular-nums;
  padding-top: 0.25rem; letter-spacing: -0.03em;
}
.board__score .is-loser { opacity: 0.6; }
.board__dash { width: 0.35em; height: 0.09em; background: currentColor; opacity: 0.6; border-radius: 2px; }
.board__vs {
  font: 800 var(--t-xl)/1 var(--f-display); padding: 0.85rem 0.25rem 0;
  font-style: italic; opacity: 0.85;
}
.board__verdict {
  margin: var(--s5) auto 0; text-align: center; width: fit-content; max-width: 100%;
  font: 800 var(--t-lg)/1.2 var(--f-display); font-stretch: 92%;
  background: var(--on-primary); color: var(--primary);
  padding: 0.55rem 1.1rem; border-radius: 999px;
}
.masthead--match .masthead__meta { text-align: center; }
.board__verdict { text-wrap: balance; }
.nowrap { white-space: nowrap; }
@media (min-width: 48rem) {
  .board__team { flex-direction: row; text-align: left; font-size: var(--t-2xl); align-items: center; }
  .board__team.is-home { flex-direction: row-reverse; text-align: right; }
  .board { align-items: center; gap: var(--s6); }
  .board__vs { padding: 0; }
}

.match-grid, .team-grid { display: grid; gap: var(--s4); margin-top: var(--s5); }
@media (min-width: 64rem) {
  .match-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s6); align-items: start; }
  .match-grid__when { grid-column: 1 / span 5; grid-row: 1; }
  .match-grid__form { grid-column: 1 / span 5; grid-row: 2; }
  .match-grid__round { grid-column: 6 / span 7; grid-row: 1 / span 3; }
  .match-grid__stats { grid-column: 1 / span 5; }
}

.when__day { font: 800 var(--t-xl)/1.1 var(--f-display); margin: 0 0 var(--s1); }
.when__dow { display: block; font: 700 var(--t-md)/1.3 var(--f-body); color: var(--ink-soft); }
.when__time { font: 800 var(--t-2xl)/1 var(--f-display); margin: 0 0 var(--s2); }
.when__time small { font: 700 var(--t-sm)/1 var(--f-body); color: var(--ink-soft); }
.when__place { font-size: var(--t-md); font-weight: 700; margin: 0; }
.when { padding-bottom: var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--rule); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); margin: 0; }
.facts dt { color: var(--ink-soft); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; }

.form-pair { display: grid; gap: var(--s4); }
@media (min-width: 40rem) { .form-pair { grid-template-columns: 1fr 1fr; } }
.form-card { background: var(--board); border-radius: 12px; padding: var(--s4); }
.form-card__name { display: flex; align-items: center; gap: var(--s2); font: 800 var(--t-md)/1.2 var(--f-display); margin-bottom: var(--s3); }
.form-card__name a { color: var(--ink); }
.form-card__pos { margin-bottom: var(--s3); font-weight: 600; color: var(--ink-soft); }
.form-card__big { font: 800 var(--t-xl)/1 var(--f-display); color: var(--ink); }
.form-card__label { margin: 0 0 var(--s1); font-size: var(--t-sm); font-weight: 700; }
.form-card__record { margin: var(--s2) 0 0; font-size: var(--t-sm); color: var(--ink-soft); }
.pips--lg { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.35rem; }
.pips--lg .pip { width: 2.1rem; height: 2.1rem; font-size: 0.85rem; border-radius: 8px; text-decoration: none; }
.pips--lg a.pip:hover { outline: 2px solid var(--ink); outline-offset: 2px; }

.stats-pair { display: grid; gap: var(--s4); }
.stats-pair h3 { font-size: var(--t-md); margin-bottom: var(--s2); }

/* ---------- Team ---------- */

.masthead--team .masthead__main { gap: var(--s4); }
@media (min-width: 60rem) { .masthead--team .masthead__main { gap: var(--s5); } }
.masthead__meta br + a { font-weight: 700; }

@media (min-width: 64rem) {
  .team-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s6); align-items: start; }
  .team-grid__next { grid-column: span 7; }
  .team-grid__last { grid-column: span 5; display: grid; gap: var(--s4); }
  .team-grid__ladder { grid-column: 1 / span 7; grid-row: 2; display: grid; gap: var(--s5); }
  .team-grid__side { grid-column: 8 / span 5; grid-row: 2 / span 2; }
  .team-grid__players { grid-column: 1 / span 7; grid-row: 3; align-self: start; }
}
.team-grid__last, .team-grid__side { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 64rem) { .team-grid__side { gap: var(--s5); } }
.panel__title--next { margin-top: var(--s6); }

.ticket {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  background: var(--paper); border-radius: var(--r-panel); overflow: hidden;
  box-shadow: 0 0 0 3px var(--primary), 0 0 0 4px var(--rule-strong), 0 6px 0 var(--rule-strong);
}
.ticket--none { grid-template-columns: 1fr; }
.ticket__stub {
  background: var(--primary); color: var(--on-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s4) var(--s2); position: relative; text-align: center;
  background-image: radial-gradient(circle at 100% 50%, var(--board) 0 0, transparent 0);
}
.ticket__stub::after {
  content: ""; position: absolute; right: -6px; top: 0; bottom: 0; width: 12px;
  background: radial-gradient(circle, var(--paper) 4px, transparent 4.5px) 0 0 / 12px 16px repeat-y;
}
.ticket__dow { font: 700 var(--t-md)/1 var(--f-body); }
.ticket__day { font: 800 3.4rem/0.95 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.ticket__mon { font: 800 var(--t-md)/1 var(--f-display); }
.ticket__body { padding: var(--s4) var(--s4) var(--s4) var(--s5); }
.ticket__title { font: 700 var(--t-md)/1.2 var(--f-body); color: var(--ink-soft); margin-bottom: var(--s1); letter-spacing: 0; }
.ticket__time { font: 800 var(--t-2xl)/1 var(--f-display); margin: 0 0 var(--s3); }
.ticket__vs { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--s2); font: 800 var(--t-lg)/1.15 var(--f-display); margin: 0 0 var(--s2); }
.ticket__vs a { color: var(--ink); }
.ticket__opp { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.ticket__v { font-style: italic; color: var(--ink-soft); }
.ticket__place { font-weight: 700; margin: 0; }
.ticket__more { margin: var(--s3) 0 0; font-weight: 700; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.when__directions { margin: var(--s3) 0 0; }
.place__more + .place__more { margin-top: var(--s2); }
.ticket__directions, .place__directions { font-weight: 700; }
.masthead__actions:empty { display: none; }
@media (min-width: 48rem) {
  .ticket { grid-template-columns: 8rem minmax(0, 1fr); }
  .ticket__day { font-size: 4.6rem; }
  .ticket__body { padding: var(--s5) var(--s5) var(--s5) var(--s6); }
  .ticket__time { font-size: 3rem; }
  .ticket__vs { font-size: var(--t-xl); }
}

.result-card { background: var(--paper); border-radius: var(--r-panel); padding: var(--s4); box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule); }
.result-card__title { font: 700 var(--t-md)/1.2 var(--f-body); color: var(--ink-soft); margin-bottom: var(--s2); }
.result-card__link {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 var(--s3);
  text-decoration: none; color: var(--ink); border-radius: 12px; padding: var(--s3) var(--s4);
  background: var(--board); border-left: 6px solid var(--rule-strong);
}
.result-card__link.is-won { border-left-color: var(--success); }
.result-card__link.is-lost { border-left-color: var(--danger); }
.result-card__link.is-drew { border-left-color: var(--warning); }
.result-card__link:hover .result-card__vs { text-decoration: underline; }
.result-card__verdict { font: 800 var(--t-xl)/1.1 var(--f-display); }
.result-card__link.is-won .result-card__verdict { color: var(--success-ink); }
.result-card__link.is-lost .result-card__verdict { color: var(--danger-ink); }
.result-card__score { font: 800 var(--t-2xl)/1 var(--f-display); justify-self: end; }
.result-card__vs { grid-column: 1 / -1; font-weight: 700; font-size: var(--t-md); margin-top: var(--s1); }
.result-card__when { grid-column: 1 / -1; color: var(--ink-soft); font-size: var(--t-sm); }

.season-form { background: var(--paper); border-radius: var(--r-panel); padding: var(--s4); box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule); }
.season-form__title { font: 700 var(--t-md)/1.2 var(--f-body); color: var(--ink-soft); margin-bottom: var(--s3); }
.record { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin: var(--s4) 0 0; }
.record div { display: flex; flex-direction: column-reverse; }
.record dt { font-size: var(--t-sm); color: var(--ink-soft); }
.record dd { margin: 0; font: 800 var(--t-xl)/1 var(--f-display); }


/* ---------- Season, competition, index ---------- */

.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s4); } }
.tile {
  display: grid; gap: var(--s1); height: 100%;
  padding: var(--s4) var(--s5) var(--s4) var(--s4); border-radius: 14px;
  background: var(--primary); color: var(--on-primary); text-decoration: none;
  position: relative;
}
.tile::after {
  content: ""; position: absolute; right: var(--s4); top: 50%; width: 0.7rem; height: 0.7rem;
  border-right: 3px solid currentColor; border-top: 3px solid currentColor; transform: translateY(-50%) rotate(45deg);
}
.tile:hover { background-color: var(--primary-tone); }
.tile:hover .tile__name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.15em; }
.tile__name { font: 800 var(--t-xl)/1.05 var(--f-display); font-stretch: 88%; padding-right: var(--s5); }
.tile__detail { font-weight: 700; }
.tile__go { font-size: var(--t-sm); opacity: 0.9; }

.runsheet__day { font: 800 var(--t-xl)/1.1 var(--f-display); margin: 0 0 var(--s4); }
.runsheet__grid { display: none; }
.slot + .slot { margin-top: var(--s4); }
.slot__time {
  font: 800 var(--t-lg)/1 var(--f-display); margin: 0 0 var(--s1); padding: var(--s2) var(--s3);
  background: var(--ink); color: var(--paper); border-radius: var(--r-row); width: fit-content;
}
.chip--division { background: var(--secondary-wash); color: var(--secondary-ink); }
@media (min-width: 64rem) {
  .runsheet:not(.runsheet--list) .runsheet__grid { display: block; overflow-x: auto; }
  .runsheet:not(.runsheet--list) .runsheet__list { display: none; }
}
.grid { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; margin: -6px; width: calc(100% + 12px); }
.grid th, .grid td { vertical-align: top; text-align: left; }
.grid thead th { font: 800 var(--t-md)/1.1 var(--f-display); padding: var(--s2) var(--s3); background: var(--primary); color: var(--on-primary); border-radius: var(--r-row); }
.grid__venue { display: block; font: 600 var(--t-xs)/1.2 var(--f-body); opacity: 0.9; }
.grid .grid__time { width: 7rem; white-space: nowrap; font: 800 var(--t-lg)/1.1 var(--f-display); padding: var(--s3) var(--s2); background: none; color: var(--ink); }
.grid thead .grid__time { font: 700 var(--t-sm)/1.1 var(--f-body); color: var(--ink-soft); vertical-align: bottom; }
.grid td { background: var(--board); border-radius: var(--r-row); padding: 0; }
.cell { display: grid; gap: 2px; padding: var(--s2) var(--s3); color: var(--ink); text-decoration: none; height: 100%; border-radius: var(--r-row); font-size: var(--t-sm); }
a.cell:hover { background: var(--primary-wash); }
a.cell:hover .cell__side span { text-decoration: underline; }
.cell__division { font-size: var(--t-xs); font-weight: 700; color: var(--secondary-ink); }
.cell__side { display: flex; justify-content: space-between; gap: var(--s2); font-weight: 700; line-height: 1.25; }
.cell__side b { font: 800 var(--t-md)/1.1 var(--f-display); }
.cell__side.is-loser { color: var(--ink-soft); font-weight: 500; }

.places { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .places { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }
.place { background: var(--board); border-radius: 14px; padding: var(--s4); }
.place__name { font-size: var(--t-xl); margin-bottom: var(--s3); }
.place__name a { color: var(--ink); }
.place__fields { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.place__more { margin: 0; font-weight: 700; }
.chip--link { text-decoration: none; font-size: var(--t-sm); padding: 0.45rem 0.8rem; background: var(--paper); box-shadow: inset 0 0 0 2px var(--rule-strong); }
.chip--link:hover { box-shadow: inset 0 0 0 2px var(--primary-ink); }

.season-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.season-row { padding: var(--s4); border-radius: 14px; background: var(--board); }
.season-row.is-current { background: var(--primary-wash); box-shadow: inset 0 0 0 2px var(--primary); }
.season-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.season-row__name { font-size: var(--t-xl); }
.season-row__name a { color: var(--ink); }
.season-row__when { color: var(--ink-soft); font-weight: 600; font-size: var(--t-sm); }
.season-row__divisions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.pill {
  display: inline-block; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule-strong);
}
.pill:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.season-row.is-current .pill { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.season-row.is-current .pill:hover { background: var(--primary-tone); }
.competition-card .panel__title a { color: var(--ink); text-decoration: none; }
.competition-card .panel__title a:hover { text-decoration: underline; }
.masthead__copy { margin-top: var(--s3); font-size: var(--t-md); max-width: 44rem; }
.masthead__copy p { margin: 0 0 var(--s2); }

/* ---------- Club ---------- */

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.section-head__title { font-size: var(--t-xl); }
.club-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .club-teams { grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: var(--s5); } }
.club-team__name { font-size: var(--t-xl); }
.club-team__name a { color: var(--ink); }
.club-team__sub { color: var(--ink-soft); font-weight: 600; margin: var(--s1) 0 var(--s3); }
.club-team__label { font: 700 var(--t-sm)/1.2 var(--f-body); color: var(--ink-soft); margin: var(--s4) 0 var(--s1); }
.club-team .fx { border-bottom: 0; }

/* ---------- Venue and ground ---------- */

.masthead__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s4); font-weight: 700; }
.masthead__chips a {
  text-decoration: none; padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 2px solid currentColor; font-size: var(--t-sm);
}
.masthead__chips a:hover { background: var(--on-primary); color: var(--primary); }
.jumpbar__links a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.jumpbar--days .jumpbar__links li:first-child a:not([aria-current]) { background: color-mix(in oklab, var(--ink) 6%, var(--paper)); color: var(--ink); }
.jumpbar__links a.is-next:not([aria-current]) { box-shadow: inset 0 0 0 2px var(--primary-ink); }
details.day > summary { margin-bottom: var(--s3); }
details.day:not([open]) > summary { margin-bottom: 0; }


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

.button--big { font-size: var(--t-md); padding: 1rem 1.5rem; }
.button--outline { background: transparent; color: inherit; border-color: currentColor; }
.button--outline:hover { background: color-mix(in oklab, currentColor 12%, transparent); }

.hero {
  background: var(--jersey); color: var(--on-primary);
  border-bottom: 0.6rem solid var(--secondary);
  position: relative; overflow: hidden; isolation: isolate;
}
@media (min-width: 56rem) { .hero::before { display: none; } }
.hero__inner { display: grid; gap: var(--s5); padding-block: var(--s6) var(--s7); align-items: center; }
.hero__title {
  font-size: clamp(2.6rem, 1.4rem + 6vw, 5.6rem); font-weight: 800; font-stretch: 82%;
  line-height: 0.92; letter-spacing: -0.03em; text-wrap: balance; max-width: 12ch;
  font-variation-settings: "opsz" 96;
}
.hero__lead { font-size: var(--t-lg); font-weight: 600; margin: var(--s4) 0 var(--s5); max-width: 30ch; line-height: 1.3; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0; }
.hero__crest { display: none; }
.hero__badge {
  display: grid; place-items: center; width: 15rem; height: 17rem;
  background: var(--on-primary); color: var(--primary);
  border-radius: 1.6rem 1.6rem 7.5rem 7.5rem;
  font: 800 4.6rem/1 var(--f-display); font-stretch: 75%; letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 0.7rem var(--on-primary), inset 0 0 0 1.1rem var(--secondary);
  transform: rotate(-4deg);
}
@media (min-width: 56rem) {
  .hero__inner { grid-template-columns: 1fr auto; padding-block: var(--s7) var(--s8); }
  .hero__crest { display: block; padding-right: var(--s6); }
}

.home { display: grid; gap: var(--s5); margin-block: var(--s5) var(--s8); }
.home__news .section-head { margin-bottom: var(--s4); }
.home__news { order: 1; } .home__about { order: 2; } .home__aside { order: 3; } .home__links { order: 4; }
@media (min-width: 64rem) {
  .home { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--s5); margin-top: var(--s6); }
  .home > * { order: 0; }
  .home__fixtures { grid-column: 1 / span 7; }
  .home__aside { grid-column: 8 / span 5; grid-template-columns: 1fr 1fr; }
  .home__aside .panel { background: var(--paper); box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule); }
  .home__news { grid-column: 1 / -1; }
  .home__about { grid-column: 1 / span 8; }
  .home__links { grid-column: 9 / span 4; align-self: start; }
}
.home__aside { display: grid; gap: var(--s4); align-content: start; }
.panel--cta { box-shadow: 0 0 0 3px var(--primary), 0 0 0 4px var(--rule-strong), 0 6px 0 var(--rule-strong); }
.panel--cta .panel__title { font-size: var(--t-2xl); }
.panel--cta p { max-width: 46ch; }
.panel--board { background: var(--primary-wash); box-shadow: none; }
.panel--board .panel__title { font-size: var(--t-lg); margin-bottom: var(--s2); }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; }
.link-list a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); font-weight: 700; color: var(--ink); text-decoration: none; }
.link-list li:last-child a { border-bottom: 0; }
.link-list a:hover { text-decoration: underline; }

.home__news .stories { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
@media (min-width: 64rem) { .home__news .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.my-team { margin-bottom: var(--s4); }
.my-team__name { font: 800 var(--t-lg)/1.2 var(--f-display); }
.my-team .ticket { margin-bottom: var(--s2); }

.masthead__actions { margin: var(--s4) 0 0; }
.follow {
  display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer;
  font: 700 var(--t-sm)/1 var(--f-body); color: inherit; background: transparent;
  border: 2px solid currentColor; border-radius: 999px; padding: 0.6rem 1rem;
}
.follow { text-decoration: none; }
.follow:hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.follow__mark {
  width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor; position: relative;
}
.follow[aria-pressed="true"] { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }
.follow[aria-pressed="true"] .follow__mark { background: currentColor; }
.follow[aria-pressed="true"] .follow__mark::after {
  content: ""; position: absolute; left: 0.22rem; top: 0.05rem; width: 0.25rem; height: 0.5rem;
  border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Content pages ---------- */

.page-body { display: grid; gap: var(--s4); margin-block: var(--s5) var(--s8); }
@media (min-width: 64rem) {
  .page-body { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s5); align-items: start; margin-top: var(--s6); }
}
.page-body__aside { display: grid; gap: var(--s4); }
.page-body__main { min-width: 0; }

.prose { max-width: 40rem; font-size: 1.0625rem; line-height: 1.65; }
@media (min-width: 60rem) { .prose { font-size: 1.15rem; } }
.prose > * > :first-child, .prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.6em 0 0.5em; line-height: 1.15; }
.prose h1 { font-size: var(--t-2xl); }
.prose h2 { font-size: var(--t-xl); }
.prose h3 { font-size: var(--t-lg); }
.prose h4 { font-size: var(--t-md); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose figure { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--primary-ink); font-weight: 700; }
.prose strong { font-weight: 750; }
.prose img { border-radius: 12px; display: block; }
.prose blockquote {
  margin-left: 0; padding: var(--s3) var(--s4); border-left: 5px solid var(--primary);
  background: var(--primary-wash); border-radius: 0 12px 12px 0; font-size: var(--t-md);
}
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); }
.prose th { border-bottom: 2px solid var(--ink); }
.prose hr { border: 0; border-top: 2px dashed var(--rule-strong); margin: 2em 0; }
.prose--small { font-size: var(--t-sm); line-height: 1.55; }
.prose--small p { margin-bottom: 0.4em; }
.prose--small ul { list-style: none; padding: 0; }

/* ---------- News ---------- */

.stories { display: grid; gap: var(--s4); }
@media (min-width: 40rem) { .stories { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--s5); } }
.story {
  background: var(--paper); border-radius: var(--r-panel); overflow: hidden; position: relative;
  box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule);
  display: flex; flex-direction: column;
}
.story:hover { box-shadow: 0 0 0 3px var(--primary); }
.story__photo { aspect-ratio: 16 / 10; background: var(--primary-wash); }
.story__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story__text { padding: var(--s4); display: grid; gap: var(--s2); }
.story--text { background: var(--primary-wash); }
.story--text .story__text { border-top: 0.6rem solid var(--primary); padding-top: var(--s5); }
.story--text .story__title { font-size: var(--t-xl); }
.story__date { margin: 0; font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.story__title { font-size: var(--t-lg); line-height: 1.15; }
.story__title a { color: var(--ink); text-decoration: none; }
.story__title a::after { content: ""; position: absolute; inset: 0; }
.story__title a:hover { text-decoration: underline; }
.story__title a:focus-visible { outline: none; }
.story:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.story__abstract { margin: 0; color: color-mix(in oklab, var(--ink) 85%, var(--paper)); }
@media (min-width: 56rem) {
  .story--lead { display: grid; grid-template-columns: 1.35fr 1fr; }
  .story--lead .story__photo { aspect-ratio: auto; min-height: 22rem; }
  .story--lead .story__text { padding: var(--s6); align-content: center; }
}
.story--lead .story__title { font-size: var(--t-2xl); }
.story--lead .story__abstract { font-size: var(--t-md); }
.news-index .section-head__title { margin-bottom: var(--s4); }
.pager { display: flex; align-items: center; gap: var(--s4); justify-content: center; font-weight: 700; }

.masthead--article .masthead__title { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); max-width: 22ch; }
.article-layout { display: grid; gap: var(--s4); margin-block: var(--s5) var(--s8); }
@media (min-width: 64rem) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s5); align-items: start; margin-top: var(--s6); }
}
.article { padding: 0; overflow: hidden; }
.article .prose { padding: var(--s4); margin-inline: auto; }
@media (min-width: 40rem) { .article .prose { padding: var(--s6); } }
.article__photo { margin: 0; }
.article__photo img { width: 100%; display: block; max-height: 36rem; object-fit: cover; }
.article__standfirst { font: 600 var(--t-lg)/1.4 var(--f-body); margin-bottom: var(--s5); padding-bottom: var(--s4); border-bottom: 2px dashed var(--rule-strong); }
.article__standfirst p { margin: 0; }
.article-aside { display: grid; gap: var(--s4); }
.related__list { list-style: none; margin: 0; padding: 0; display: grid; }
.related__list li { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.15rem; }
.related__list li:last-child { border-bottom: 0; }
.related__list a { font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.related__list a:hover { text-decoration: underline; }
.related__date { font-size: var(--t-sm); color: var(--ink-soft); }

/* ---------- Login and forms ---------- */

.masthead--slim .masthead__inner { padding-block: var(--s5); }
.login { display: grid; justify-items: center; margin-block: var(--s5) var(--s8); }
@media (min-width: 48rem) { .login { margin-top: var(--s6); } }
.login__card { width: min(100%, 30rem); padding: var(--s5); }
.login__note { color: var(--ink-soft); }
.form__field { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.form__field label { font-weight: 700; }
.form__field input, .form__field select, .form__field textarea {
  font: inherit; font-size: var(--t-md); padding: 0.75rem 0.9rem; border-radius: 10px;
  border: 2px solid var(--rule-strong); background: var(--paper); color: var(--ink); width: 100%;
}
.form__field input:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: 1px; border-color: var(--ink); }
.form__field.has-error input { border-color: var(--danger-ink); }
.form__error, .form__errors { color: var(--danger-ink); font-weight: 700; }
.form__help { font-size: var(--t-sm); color: var(--ink-soft); margin: 0; }
.form__actions { margin: var(--s5) 0 var(--s4); }
.form__actions .button { width: 100%; }
.login__links { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; margin: 0; font-weight: 700; }

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

.site-footer {
  background: var(--dark); color: var(--on-dark);
  border-top: 0.6rem solid var(--primary);
  padding: var(--s7) 0 var(--s5);
  margin-top: auto;
}
.site-footer a { color: inherit; }
.site-footer__grid { display: grid; gap: var(--s5); }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s6); } }
.site-footer h2 { font-size: var(--t-md); margin-bottom: var(--s2); }
.site-footer__chunk { font-size: var(--t-sm); line-height: 1.6; }
.site-footer__chunk p { margin: 0 0 var(--s2); }
.site-footer__chunk ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s1); }
.site-footer__brand { display: flex; align-items: center; gap: var(--s3); align-self: start; }
.site-footer__brand .brand__badge { background: var(--primary); color: var(--on-primary); }
.site-footer__name { font: 800 var(--t-lg)/1.1 var(--f-display); margin: 0; font-stretch: 85%; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3);
  margin-top: var(--s6); padding-top: var(--s4);
  border-top: 1px solid color-mix(in oklab, var(--on-dark) 20%, transparent);
  font-size: var(--t-sm);
}
.site-footer__base p { margin: 0; }

@media print {
  .site-header, .site-footer, .jumpbar, .menu-button { display: none !important; }
  .masthead { background: none; color: #000; border: 0; }
  .panel { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  body { background: #fff; }
}
