/* ============================================================
   Melbourne Punters Cricket Club
   Design system: "Form Guide"
   The club is called Punters, so the visual language is borrowed
   from the bookmaker's form guide and the suburban manual
   scoreboard: slat-textured boards, saddlecloth numbers, tabular
   mono numerals, and a six-box form line that encodes real
   recent-performance data.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Ground: a deepened version of the crest's own cyan (#00AEC7),
     same hue family rather than the unrelated bottle-green it was. */
  --pitch:     #06272E;
  --pitch-2:   #0A333C;
  --pitch-3:   #124451;
  --pitch-line:#1C5464;

  /* Paper: cool near-white, matching the crest's white ground */
  --paper:     #F0F2F1;
  --paper-2:   #E4E8E7;
  --paper-line:#CBD3D2;

  --chalk:     #F5F8F8;
  --ash:       #8FAEB6;
  --ash-deep:  #4E6D76;

  /* Accents taken from the club crest: crimson, orange and cyan.
     --claret/--amber keep their names so nothing downstream renames;
     the values are now the crest's own red and orange, deepened just
     enough to hold 4.5:1 against the paper and pitch backgrounds. */
  --claret:    #C41E32;
  --claret-lo: #A0182A;
  --amber:     #F5821F;
  --amber-lo:  #D06A12;
  /* The crest's cyan — used for the crest ring and quiet highlights. */
  --cyan:      #00AEC7;
  --cyan-lo:   #0090A6;

  /* Two families, not three. Archivo carries the headlines; Inter does
     everything else including figures — its tabular numerals align as
     well as a monospace without the technical noise. --mono is kept as
     a token name so label rules downstream don't all need renaming. */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "Inter", system-ui, -apple-system, sans-serif;

  --sp-section: clamp(4.25rem, 7.5vw, 8.5rem);
  /* The gutter scales with the viewport rather than sitting at a fixed
     28px, so the margin grows in proportion on a big screen instead of
     the content running hard to the edge. The max-width is set high
     enough that it only engages on very large displays — it stops the
     page becoming a 2500px-wide slab without ever making it a narrow
     centred column. */
  --gutter: clamp(20px, 4.5vw, 80px);
  --maxw: 2040px;
  /* Prose still needs a readable measure even when the page is wide. */
  --measure: 62ch;
  --r: 4px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Every figure on the site is tabular, so columns of numbers line up
   the way a monospace would without importing a third family. */
.tbl, .num, .stat__v, .plate__v, .tally__v, .fixture__day,
.ranked__v, .bline__key b, .player__cap, .board__foot b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--pitch);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--amber); color: var(--pitch);
  padding: .75rem 1.25rem; font-weight: 700;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- 3. Typography ---------- */
.d1, .d2, .d3, .d4 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 105%;          /* Archivo is variable-width; a touch expanded reads confident */
  line-height: .95;
  letter-spacing: -.025em;     /* heavy Archivo tightens well at display sizes */
  text-transform: uppercase;
  margin: 0;
}
.d1 { font-size: clamp(2.9rem, 8.6vw, 7.6rem); }
.d2 { font-size: clamp(2.05rem, 5vw, 4rem); }
.d3 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.d4 { font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.1; letter-spacing: -.015em; }
/* For headings with a long unbreakable word — "ACKNOWLEDGEMENT" is 15
   characters and overruns a split column at full .d2 size. */
.d2--long { font-size: clamp(1.5rem, 3.1vw, 2.5rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--claret);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--claret);
  flex: none;
  /* Sits on the first line's optical centre, so a wrapped label
     doesn't leave the rule floating between two lines. */
  margin-top: .52em;
}
.on-pitch .eyebrow { color: var(--amber); }
.on-pitch .eyebrow::before { background: var(--amber); }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: var(--measure);
  color: var(--ash-deep);
}
/* Long-form body copy keeps its measure on a wide page. */
.prose p { max-width: var(--measure); }
.on-pitch .lede { color: var(--ash); }
/* The hero is .hero, not .section.on-pitch, so it never picked up the
   light override above and was rendering the dark-background grey on a
   dark background — 2.82:1. */
.hero .lede { color: #B7CCD2; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); position: relative; }
.section.is-tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.section.on-pitch {
  background: var(--pitch);
  color: var(--chalk);
}
/* Slat texture — the horizontal timber of a manual scoreboard */
.section.on-pitch::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.028) 0 1px,
    transparent 1px 46px
  );
  pointer-events: none;
}
.section.on-pitch > * { position: relative; z-index: 1; }

/* Scorebook grid for paper sections */
.section.on-book {
  background-color: var(--paper-2);
  background-image:
    linear-gradient(to right, rgba(6,39,46,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(6,39,46,.055) 1px, transparent 1px);
  background-size: 30px 30px;
}

.grid { display: grid; gap: clamp(1.25rem, 2vw, 2.25rem); }
/* minmax(0,…) rather than 1fr so wide children — tables above all —
   can shrink instead of forcing the row past the viewport. */
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Cards size themselves, so a wide page adds columns rather than
   stretching each card. */
.g-auto { grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); }
.g-auto-lg { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
}

.stack-lg > * + * { margin-top: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s, color .18s, border-color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--claret); color: var(--chalk); }
.btn--primary:hover { background: var(--claret-lo); }

.btn--amber { background: var(--amber); color: var(--pitch); }
.btn--amber:hover { background: var(--amber-lo); }

.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: var(--amber); border-color: var(--amber); color: var(--pitch); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- 6. Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--pitch);
  color: var(--chalk);
  border-bottom: 1px solid var(--pitch-line);
}
.masthead__bar {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .8rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mark {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: inherit;
  margin-right: auto;
}
/* Crest slot. The crest is drawn for a white ground, so it sits on a
   white chip — that keeps every colour in the mark true and gives the
   darker teal lettering something to read against.
   The ball-and-seam below is a fallback for when no crest file exists;
   `img + .mark__seam` hides it whenever the image is present, and the
   image removes itself on error, which brings the fallback back. */
.mark__badge {
  position: relative;
  /* 52px, not 40: the crest carries banners and fine lettering, and
     below about 50px it collapses into a coloured smudge. */
  width: 52px; height: 52px; flex: none;
  background: #FFFFFF;
  border-radius: 9px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.28);
}
.mark__badge img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
}
.mark__badge img + .mark__seam { display: none; }
.mark__seam {
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--claret);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.35);
}
/* The seam: two stitched arcs of a cricket ball */
.mark__seam::before,
.mark__seam::after {
  content: "";
  position: absolute; inset: 4px 0;
  border-left: 1.5px dashed var(--paper-2);
  left: 50%;
  transform: translateX(-50%);
}
.mark__seam::after { inset: 8px 0; opacity: .5; }

.mark__text { line-height: 1; }
.mark__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  text-transform: uppercase;
  display: block;
}
.mark__sub {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .07em;
  color: var(--ash);
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: .15rem; }
/* :not(.btn) so the Join CTA keeps its own button styling — plain
   `.nav a` (0,1,1) outranks `.btn--amber` (0,1,0) and would otherwise
   force white text on amber, a teal hover, and amber-on-amber text
   when aria-current lands on it. */
.nav a:not(.btn) {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .55rem .62rem;
  border-radius: var(--r);
  color: var(--chalk);
  opacity: .78;
  transition: opacity .15s, background-color .15s;
  white-space: nowrap;
}
.nav a:not(.btn):hover { opacity: 1; background: var(--pitch-3); }
.nav a:not(.btn)[aria-current="page"] {
  opacity: 1;
  color: var(--amber);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--pitch-line);
  color: var(--chalk);
  border-radius: var(--r);
  padding: .5rem .8rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- 7. Scoreboard (hero signature) ---------- */
.hero {
  background: var(--pitch);
  color: var(--chalk);
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
}
/* Team artwork, dimmed right back so it reads as atmosphere rather
   than a second headline — the burst across the middle of the image
   says "TOGETHER WE RISE!" and must not compete with the page's type. */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../img/hero-team.jpg");
  background-size: cover;
  background-position: center 42%;
  opacity: .16;
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(96deg, var(--pitch) 0%, rgba(6,39,46,.9) 30%, rgba(6,39,46,.66) 60%, rgba(6,39,46,.72) 100%),
    radial-gradient(120% 90% at 82% 8%, rgba(245,130,31,.12), transparent 55%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 46px);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 2; }

@media (max-width: 900px) {
  .hero::after {
    /* smaller file on small screens — 118KB instead of 250KB */
    background-image: url("../img/hero-team-sm.jpg");
    /* A portrait viewport crops a landscape image to its horizontal
       centre, which is exactly where the burst sits. Panning left puts
       the players in frame instead of the lettering. */
    background-position: 22% center;
    opacity: .3;
  }
  .hero::before {
    background:
      linear-gradient(to bottom, rgba(6,39,46,.94) 0%, rgba(6,39,46,.72) 30%, rgba(6,39,46,.66) 70%, rgba(6,39,46,.86) 100%),
      repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 46px);
  }
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
}

.hero__title { margin-bottom: 1.4rem; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.hero__title em {
  font-style: normal;
  color: var(--amber);
}

.board {
  background: var(--pitch-2);
  border: 1px solid var(--pitch-line);
  border-radius: var(--r);
  padding: 1.4rem;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.9);
}
.board__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ash);
  border-bottom: 1px solid var(--pitch-line);
  padding-bottom: .8rem;
  margin-bottom: 1.1rem;
  gap: 1rem;
}
.board__plates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.plate {
  background: var(--pitch);
  border: 1px solid var(--pitch-line);
  border-radius: 3px;
  padding: .85rem .4rem .6rem;
  text-align: center;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.4);
}
.plate__v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  color: var(--amber);
  line-height: 1;
  display: block;
}
.plate__k {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: .45rem;
  display: block;
}
.board__foot {
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--pitch-line);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.board__foot b { color: var(--chalk); font-weight: 700; }

/* ---------- 8. Boundary line (signature device) ----------
   A single bar split by the player's real fours-to-sixes ratio.
   It encodes something true and specific about this club: a
   hard-tennis-ball T10 side where several players hit more sixes
   than fours. Claret = fours, amber = sixes. */
.bline { margin-top: .2rem; }
.bline__bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-2);
}
.on-pitch .bline__bar { background: var(--pitch-3); }
.bline__4 { background: var(--claret); }
.bline__6 { background: var(--amber); }
.bline__4, .bline__6 {
  transform-origin: left;
  transition: flex-grow .5s var(--ease);
}
.bline__key {
  display: flex;
  gap: 1rem;
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ash-deep);
}
.on-pitch .bline__key { color: var(--ash); }
.bline__key span { display: flex; align-items: center; gap: .38rem; }
.bline__key i {
  width: 8px; height: 8px; border-radius: 2px; flex: none;
  background: var(--claret);
}
.bline__key span + span i { background: var(--amber); }
.bline__key b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pitch);
}
.on-pitch .bline__key b { color: var(--chalk); }

/* ---------- 9. Cards ---------- */
.card {
  background: var(--chalk);
  border: 1px solid var(--paper-line);
  border-radius: var(--r);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
}
.on-pitch .card {
  background: var(--pitch-2);
  border-color: var(--pitch-line);
}

/* Player card — photo-led, with the cap number worn on the image */
.player {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--chalk);
  border: 1px solid var(--paper-line);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow .28s var(--ease), border-color .28s;
}
.on-pitch .player { background: var(--pitch-2); border-color: var(--pitch-line); }

.player:hover, .player:focus-within {
  box-shadow: 0 26px 50px -30px rgba(6,39,46,.6);
  border-color: var(--pitch-line);
}

/* ---- photo ---- */
.player__shot {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--pitch);
  overflow: hidden;
}
.player__shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform .6s var(--ease);
}
.player:hover .player__shot img { transform: scale(1.04); }

/* Monogram stands in until a real photo is dropped in. It is a
   designed state, not a broken-image placeholder. */
.player__mono {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 30% 15%, var(--pitch-3), var(--pitch) 70%);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  letter-spacing: .02em;
  color: rgba(245,247,242,.16);
  user-select: none;
}
.player__shot::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,39,46,.94) 0%, rgba(6,39,46,.28) 42%, transparent 70%);
  pointer-events: none;
}

.player__id {
  position: absolute; left: 1rem; right: 1rem; bottom: .95rem;
  z-index: 1;
}
.player__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.02rem, 1.2vw, 1.24rem);
  line-height: .92;
  text-transform: uppercase;
  color: var(--chalk);
  margin: 0 0 .3rem;
}
.player__role {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
}

/* Cap number, worn top-left like a shirt number */
.player__cap {
  position: absolute; top: .8rem; left: .8rem; z-index: 1;
  min-width: 38px; height: 38px;
  display: grid; place-items: center;
  padding: 0 .5rem;
  border-radius: 3px;
  background: rgba(6,39,46,.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,247,242,.18);
  color: var(--chalk);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: .82rem;
}
.player__cap.is-skipper { background: var(--claret); border-color: var(--claret); }

/* ---- body ---- */
.player__body {
  padding: 1.15rem 1.15rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}
.player__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: .55rem .4rem;
  padding-bottom: .95rem;
  border-bottom: 1px solid var(--paper-line);
}
.on-pitch .player__stats { border-bottom-color: var(--pitch-line); }
.player__note {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ash-deep);
  margin: 0;
  margin-top: auto;
}
.on-pitch .player__note { color: var(--ash); }

.player__link {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--claret);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
}
.on-pitch .player__link { color: var(--amber); }
.player__link:hover { opacity: .75; }

.player__none {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ash-deep);
  padding: .5rem 0;
}
.stat__v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  display: block;
  line-height: 1.1;
}
.stat__k {
  font-family: var(--mono);
  font-size: .53rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash-deep);
  display: block;
  margin-top: .2rem;
}

.badge {
  position: absolute; top: .8rem; right: .8rem; z-index: 1;
  border-radius: 3px;
  background: var(--amber);
  color: var(--pitch);
  font-family: var(--mono);
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .6rem;
}

/* ---------- 10. Big stat blocks ---------- */
.tally { border-top: 2px solid currentColor; padding-top: 1rem; }
.tally__v {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  line-height: .85;
  display: block;
}
.on-pitch .tally__v { color: var(--amber); }
.tally__k {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ash-deep);
  margin-top: .6rem;
  display: block;
}
.on-pitch .tally__k { color: var(--ash); }

/* ---------- 11. Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .8rem;
}
.tbl th {
  text-align: left;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ash-deep);
  padding: .7rem .8rem;
  border-bottom: 2px solid var(--pitch);
  white-space: nowrap;
}
.tbl td {
  padding: .85rem .8rem;
  border-bottom: 1px solid var(--paper-line);
  white-space: nowrap;
}
.tbl td:first-child, .tbl th:first-child { padding-left: 0; }
.tbl tbody tr:hover td { background: rgba(206,27,51,.06); }
.tbl .is-name { font-family: var(--body); font-weight: 600; white-space: normal; }
.tbl .is-lead { color: var(--claret); font-weight: 700; }

.on-pitch .tbl th { color: var(--ash); border-bottom-color: var(--amber); }
.on-pitch .tbl td { border-bottom-color: var(--pitch-line); }
.on-pitch .tbl tbody tr:hover td { background: rgba(245,165,36,.07); }

.tbl__cap {
  caption-side: bottom;
  text-align: left;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .06em;
  color: var(--ash-deep);
  padding-top: .9rem;
  white-space: normal;
}
.on-pitch .tbl__cap { color: var(--ash); }

/* ---------- 11b. Ranked bars ---------- */
.ranked {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 40px;
  align-items: center;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.on-pitch .ranked { border-bottom-color: var(--pitch-line); }
.ranked__name { font-weight: 600; font-size: .92rem; }
.ranked__track {
  height: 10px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.on-pitch .ranked__track { background: var(--pitch-3); }
.ranked__fill {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}
.ranked__v { text-align: right; font-size: .92rem; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .22rem .5rem;
  border-radius: 2px;
}
.pill--w { background: var(--amber); color: var(--pitch); }
.pill--l { background: var(--paper-2); color: var(--ash-deep); }
.on-pitch .pill--l { background: var(--pitch-3); color: var(--ash); }
.pill--t { background: var(--claret); color: var(--chalk); }

/* ---------- 12. Fixture rows ---------- */
.fixture {
  display: grid;
  grid-template-columns: 86px minmax(0,1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.on-pitch .fixture { border-bottom-color: var(--pitch-line); }
.fixture:first-child { border-top: 1px solid var(--paper-line); }
.on-pitch .fixture:first-child { border-top-color: var(--pitch-line); }

.fixture__date {
  font-family: var(--mono);
  text-align: center;
  border-right: 1px solid var(--paper-line);
  padding-right: 1rem;
  line-height: 1.1;
}
.on-pitch .fixture__date { border-right-color: var(--pitch-line); }
.fixture__day { display: block; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fixture__mon { display: block; font-size: .58rem; letter-spacing: .085em; text-transform: uppercase; color: var(--ash-deep); }
.on-pitch .fixture__mon { color: var(--ash); }

.fixture__opp { font-family: var(--display); font-weight: 700; font-size: 1.18rem; line-height: 1.15; letter-spacing: -.015em; text-transform: uppercase; }
.fixture__meta { font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ash-deep); margin-top: .4rem; }
.on-pitch .fixture__meta { color: var(--ash); }

.fixture.is-next { background: rgba(245,165,36,.09); padding-inline: 1rem; margin-inline: -1rem; }

/* ---------- 13. Page header ---------- */
.pagehead {
  background: var(--pitch);
  color: var(--chalk);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.pagehead::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 46px);
}
.pagehead > * { position: relative; }
.pagehead .lede { color: var(--ash); margin-top: 1.4rem; }

.crumb {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1.4rem;
}
.crumb a { text-decoration: none; opacity: .8; }
.crumb a:hover { opacity: 1; color: var(--amber); }

/* ---------- 14. Timeline / values ---------- */
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--paper-line);
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
}
.on-pitch .rule-list li { border-bottom-color: var(--pitch-line); }
.rule-list li:first-child { border-top: 1px solid var(--paper-line); }
.on-pitch .rule-list li:first-child { border-top-color: var(--pitch-line); }
.rule-list dt, .rule-list .k {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  line-height: 1.15;
}
.rule-list .k-mono {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--claret);
  font-weight: 700;
}
.on-pitch .rule-list .k-mono { color: var(--amber); }

/* ---------- 15. Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--pitch-2);
  display: grid;
  place-items: center;
  border: 1px solid var(--pitch-line);
}
.shot.is-tall { aspect-ratio: 3 / 4; }
.shot.is-wide { grid-column: span 2; aspect-ratio: 8 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot__ph {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: center;
  padding: 1rem;
}
.shot__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .7rem .85rem;
  background: linear-gradient(to top, rgba(6,39,46,.92), transparent);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--chalk);
}

/* ---------- 16. Forms ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field > span {
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ash-deep);
  margin-bottom: .45rem;
}
.on-pitch .field > span { color: var(--ash); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--paper-line);
  border-radius: var(--r);
  background: var(--chalk);
  color: var(--pitch);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--claret);
  outline: none;
  box-shadow: 0 0 0 3px rgba(206,27,51,.16);
}
.form-note {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--ash-deep);
  line-height: 1.6;
}

/* ---------- 17. Footer ---------- */
.foot {
  background: var(--pitch);
  color: var(--chalk);
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.75rem;
  border-top: 4px solid var(--claret);
}
.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--pitch-line);
}
.foot h4 {
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .55rem; }
.foot a { text-decoration: none; color: var(--ash); font-size: .9rem; transition: color .15s; }
.foot a:hover { color: var(--chalk); }
.foot__bar {
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ash-deep);
}
/* Remove this chip once the placeholder data is replaced. */
.demo-chip {
  border: 1px solid var(--pitch-line);
  border-radius: 2px;
  padding: .25rem .5rem;
  color: var(--ash);
}

/* ---------- 18. Motion ----------
   Every hidden state is scoped to .js so the page is fully
   readable with JavaScript off, blocked, or still loading. */
.js [data-anim] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-anim].is-in { opacity: 1; transform: none; }

/* Board plates drop in like slotted number tiles */
.js .plate { opacity: 0; transform: translateY(-12px); }
.is-boarded .plate {
  animation: slot .5s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 260ms);
}
@keyframes slot {
  from { opacity: 0; transform: translateY(-14px) scaleY(.86); }
  to   { opacity: 1; transform: none; }
}

.js .hero__title .line > span {
  transform: translateY(105%);
  animation: rise .9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 110ms);
}
@keyframes rise { to { transform: none; } }

/* The boundary bar fills from the left when it scrolls into view */
.js .bline__bar > * { transform: scaleX(0); }
.js .is-in .bline__bar > *,
.js .bline.is-in .bline__bar > * {
  animation: sweep .6s var(--ease) forwards;
  animation-delay: 120ms;
}
@keyframes sweep { to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .js [data-anim] { opacity: 1; transform: none; }
  .js .plate { opacity: 1; transform: none; }
  .js .bline__bar > * { transform: none; }
  .js .hero__title .line > span { transform: none; }
  .player:hover .player__shot img { transform: none; }
}

/* ---------- 19. Responsive ---------- */
@media (max-width: 1320px) {
  .nav a:not(.btn) { padding: .5rem .4rem; font-size: .69rem; letter-spacing: .05em; }
  .masthead__bar { gap: 1rem; }
}

@media (max-width: 1100px) {
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--pitch-2);
    border-bottom: 1px solid var(--pitch-line);
    padding: .75rem var(--gutter) 1.25rem;
    gap: 0;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .85rem .25rem; font-size: .78rem; border-bottom: 1px solid var(--pitch-line); }
  .nav a:not(.btn)[aria-current="page"] { box-shadow: none; }
  .nav-toggle { display: block; }
  .masthead { position: relative; }
  .masthead__bar { position: relative; }

  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero__grid { align-items: start; }
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot.is-wide { grid-column: span 2; }
}

@media (max-width: 620px) {
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .g-auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .g-auto-lg { grid-template-columns: minmax(0, 1fr); }
  .ranked { grid-template-columns: minmax(0, 1fr) 34px; }
  .ranked__track { grid-column: 1 / -1; order: 3; }
  .foot__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .rule-list li { grid-template-columns: 1fr; gap: .4rem; }
  .fixture { grid-template-columns: 64px minmax(0,1fr); }
  .fixture > :last-child { grid-column: 1 / -1; }
  .board__plates { grid-template-columns: repeat(2, 1fr); }
  .player__stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .shot.is-wide { grid-column: span 1; aspect-ratio: 4/3; }
  .fbox { width: 26px; height: 26px; font-size: .62rem; }
}

@media (max-width: 400px) {
  .masthead__bar { gap: .75rem; }
  .mark__badge { width: 44px; height: 44px; border-radius: 8px; padding: 2px; }
  .mark__name { font-size: 1.08rem; }
  .mark__sub { font-size: .52rem; letter-spacing: .1em; }
  .nav-toggle { padding: .45rem .6rem; font-size: .66rem; }
}

/* ---------- 21. Ethos & ticked lists ---------- */
.ethos__body {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.55;
  margin: 0;
}
.on-pitch .ethos__body { color: var(--chalk); }

.ticked { list-style: none; }
ul.ticked-list { list-style: none; margin: 0; padding: 0; }
ul.ticked-list .ticked {
  position: relative;
  padding: .7rem 0 .7rem 2rem;
  border-bottom: 1px solid var(--paper-line);
  font-size: .98rem;
}
.on-pitch ul.ticked-list .ticked { border-bottom-color: var(--pitch-line); }
ul.ticked-list .ticked::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: 1.15rem;
  width: 11px; height: 6px;
  /* Claret on light: the crest cyan only reaches 2.4:1 on paper, so it
     is reserved for dark surfaces where it clears 5.8:1. */
  border-left: 2px solid var(--claret);
  border-bottom: 2px solid var(--claret);
  transform: rotate(-45deg);
}
.on-pitch ul.ticked-list .ticked::before {
  border-left-color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- 22. Acknowledgement of Country ----------
   Given plainly in type. No artwork: the dot-painting style used by
   other cricket bodies is an Aboriginal artist's copyrighted work and
   is not ours to reproduce. */
.ack {
  margin: 0 0 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--pitch-line);
  max-width: 78ch;
}
.ack__label {
  margin: 0 0 .55rem;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--amber);
}
.ack__body {
  margin: 0;
  font-size: .84rem;
  line-height: 1.7;
  color: var(--ash);
}

.ack-full p {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  max-width: var(--measure);
}
.ack-full p:first-child { color: var(--chalk); }

/* ---------- 23. Next-page control ----------
   Sits at the end of every page's main content. A link the reader
   chooses, not a scroll-triggered jump. */
.pagenext {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2.25rem, 4.5vw, 3.75rem) var(--gutter);
  background: var(--pitch-2);
  border-top: 1px solid var(--pitch-line);
  color: var(--chalk);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background-color .3s var(--ease);
}
.pagenext::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.028) 0 1px, transparent 1px 46px);
  pointer-events: none;
}
.pagenext:hover { background: var(--pitch-3); }

.pagenext__inner {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  flex: 1;
  min-width: 0;
}
.pagenext__label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .5rem;
}
.pagenext__title {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.pagenext__blurb {
  display: block;
  margin-top: .6rem;
  font-size: .94rem;
  color: var(--ash);
  max-width: 48ch;
}
.pagenext__arrow {
  position: relative;
  flex: none;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--amber);
  transition: transform .3s var(--ease);
}
.pagenext:hover .pagenext__arrow { transform: translateX(10px); }

@media (prefers-reduced-motion: reduce) {
  .pagenext:hover .pagenext__arrow { transform: none; }
}

@media (max-width: 620px) {
  .pagenext { gap: 1rem; }
}

/* ---------- 24. Partner wall ----------
   Dark tiles: sponsor marks are usually supplied light or single
   colour, and New Paradise Biryani's yellow (#F8DC20) measures well
   under 2:1 on white but clears 9:1 on the pitch ground. */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(.85rem, 1.6vw, 1.25rem);
}
.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 190px;
  padding: 1.5rem 1.25rem;
  background: var(--pitch-2);
  border: 1px solid var(--pitch-line);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--chalk);
  text-align: center;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
a.partner:hover { border-color: var(--amber); background: var(--pitch-3); }

.partner img {
  max-width: 82%;
  max-height: 96px;
  width: auto;
  object-fit: contain;
}
.partner__name {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.3;
}
.partner__tier {
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--amber);
}

.partner.is-empty,
.partner.is-open {
  border-style: dashed;
  color: var(--ash);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.partner.is-open { color: var(--amber); border-color: rgba(245,130,31,.45); }
.partner.is-open:hover { background: var(--pitch-3); border-color: var(--amber); }

/* ---------- 25. Back to top ---------- */
.totop {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  /* clears the iOS browser chrome and any home indicator */
  bottom: calc(clamp(14px, 2.4vw, 28px) + env(safe-area-inset-bottom, 0px));
  z-index: 90;

  /* 48px square — comfortably over the 44px touch-target minimum */
  width: 48px; height: 48px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--pitch-line);
  border-radius: 50%;
  background: rgba(10,51,60,.92);
  backdrop-filter: blur(8px);
  color: var(--amber);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;

  opacity: 0;
  /* visibility, not opacity alone: opacity-0 would leave the button in
     the tab order while invisible. It is stepped rather than
     transitioned — instantly on show, delayed until the fade finishes
     on hide — so the button is never waiting on a transition to become
     visible. */
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              background-color .2s, border-color .2s,
              visibility 0s linear .25s;
}
.totop.is-in {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              background-color .2s, border-color .2s,
              visibility 0s linear 0s;
}
.totop:hover { background: var(--claret); border-color: var(--claret); color: var(--chalk); }
.totop:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  .totop { transition: opacity .001ms, visibility .001ms; transform: none; }
  .totop.is-in { transform: none; }
}

@media print { .totop { display: none; } }


/* ---------- Laneway demo bar ----------
   Present only in the copy hosted inside laneway.studio. Frames the
   site as an in-progress studio project and gives a way back out. */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 1rem;
  padding: .7rem var(--gutter);
  background: #1A1917; color: #F5F7F2;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em;
  text-align: center;
}
.demo-bar__tag {
  background: var(--amber); color: #1A1917;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: 2px; font-size: .6rem;
}
.demo-bar__txt { opacity: .72; }
.demo-bar a { color: #F5F7F2; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.demo-bar a:hover { color: var(--amber); }

@media (max-width: 560px) {
  .demo-bar { font-size: .62rem; gap: .4rem .75rem; }
  .demo-bar__txt { display: none; }
}
