/* =============================================================
   Wadebridge Cricket Club · The Pavilion End
   Direction A design system. Every token traces to provenance:
   scorebook (rules, figures), honours boards (gold discipline),
   scoreboard tins (score display, motion), second-innings light
   (palette cast), boundary rope (density grammar).
   ============================================================= */

/* ---------- Fonts (self-hosted, latin subsets) ---------- */
@font-face {
	font-family: 'Archivo';
	src: url('../fonts/archivo-var-latin.woff2') format('woff2');
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'JetBrains Mono';
	src: url('../fonts/jetbrains-mono-var-latin.woff2') format('woff2');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	/* Colour: hex fallbacks first, oklch below */
	--white:        #faf9f5;  /* cricket white */
	--paper:        #f4f1e8;  /* scorebook cream */
	--ink:          #2b1418;  /* maroon-cast ink */
	--ink-soft:     #6b4a50;
	--leather:      #4b1a24;  /* ball-leather maroon */
	--leather-deep: #35111a;
	--dusk:         #1c0d11;  /* estuary dusk: match-centre surface */
	--gold:         #c9a24a;  /* honours only */
	--gold-deep:    #7d6120;  /* honours gold on light surfaces */
	--tin:          #17140f;  /* scoreboard plate */
	--tin-plate:    #221e18;
	--tin-face:     #f5f2e9;
	--crimson:      #b02a35;  /* the ball: live signals */
	--crimson-soft: #e0616b;

	--rule:      rgba(75, 26, 36, 0.16);   /* scorebook hairline on light */
	--rule-dark: rgba(245, 242, 233, 0.14); /* hairline on dusk */

	/* Type */
	--font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

	/* Space: 4px base */
	--s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
	--s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

	--wrap: 1240px;
	--gutter: clamp(20px, 4vw, 48px);
	--strip-h: 46px;

	--ease-tin: cubic-bezier(.4, 0, .2, 1);
	--ease-out: cubic-bezier(.16, 1, .3, 1);
}
@supports (color: oklch(50% 0 0)) {
	:root {
		--white:        oklch(98% 0.005 95);
		--paper:        oklch(95.5% 0.013 92);
		--ink:          oklch(23% 0.045 20);
		--ink-soft:     oklch(44% 0.04 18);
		--leather:      oklch(30% 0.08 16);
		--leather-deep: oklch(24% 0.065 16);
		--dusk:         oklch(17% 0.03 18);
		--gold:         oklch(72% 0.105 85);
		--gold-deep:    oklch(46% 0.085 82);
		--tin:          oklch(18% 0.012 70);
		--tin-plate:    oklch(23% 0.014 70);
		--tin-face:     oklch(95.5% 0.012 92);
		--crimson:      oklch(48% 0.16 22);
		--crimson-soft: oklch(64% 0.14 22);
	}
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 16.5px;
	line-height: 1.55;
	font-weight: 420;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--leather); }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 2.5px solid var(--crimson); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--leather); color: var(--white); }
.sr-only {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; top: -60px; left: var(--s4);
	background: var(--ink); color: var(--white);
	padding: var(--s3) var(--s4); z-index: 200;
	transition: top 160ms var(--ease-out);
}
.skip-link:focus { top: var(--s4); }

@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	html { scroll-behavior: smooth; }
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 620; line-height: 1.04; letter-spacing: -0.022em; margin: 0 0 var(--s4); text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 78px); font-variation-settings: 'wdth' 112; letter-spacing: -0.03em; }
h2 { font-size: clamp(27px, 3.2vw, 44px); font-variation-settings: 'wdth' 108; }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 17px; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s4); }
.lede { font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.5; color: var(--ink-soft); max-width: 58ch; }
.small { font-size: 14px; }

/* Honours voice: painted capitals, wide-tracked. Gold only where earned. */
.board-caps {
	font-variation-settings: 'wdth' 122;
	font-weight: 560;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 12.5px;
}
.overline, .rule-head .meta {
	font-variation-settings: 'wdth' 122;
	font-weight: 560;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 12.5px;
	color: var(--ink-soft);
}
.figures { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- Section grammar (rope: in play vs outfield) ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-tight { padding-block: clamp(40px, 5vw, 72px); }
.section-paper { background: var(--paper); }
.section-dusk { background: var(--dusk); color: var(--tin-face); }
.section-dusk .lede { color: rgba(245, 242, 233, 0.75); }

/* Ledger head: hairline rule, title left, meta or action right.
   One of several openers; never the only one. */
.rule-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: var(--s5); flex-wrap: wrap;
	border-top: 1px solid var(--rule);
	padding-top: var(--s4);
	margin-bottom: clamp(28px, 4vw, 48px);
}
.rule-head h2 { margin: 0; }
.rule-head .meta { align-self: baseline; }
.section-dusk .rule-head { border-top-color: var(--rule-dark); }
.section-dusk .rule-head .meta { color: rgba(245, 242, 233, 0.6); }

/* ---------- Buttons: painted signage, not pills ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
	font-weight: 540; font-size: 15px; letter-spacing: 0.01em;
	padding: 13px 22px; border-radius: 3px;
	border: 1px solid transparent;
	text-decoration: none;
	transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.btn-primary { background: var(--leather); color: var(--white); }
.btn-primary:hover { background: var(--leather-deep); color: var(--white); }
.btn-live { background: var(--crimson); color: #fff; }
.btn-live:hover { background: #8f2029; color: #fff; }
.btn-ghost { border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--leather); color: var(--leather); }
.section-dusk .btn-ghost, .on-dark.btn-ghost { border-color: var(--rule-dark); color: var(--tin-face); }
.section-dusk .btn-ghost:hover, .on-dark.btn-ghost:hover { border-color: var(--tin-face); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- The tin strip (signature, site-wide, sticky) ---------- */
.tin-strip {
	position: sticky; top: 0; z-index: 90;
	background: var(--tin); color: var(--tin-face);
	min-height: var(--strip-h);
	border-bottom: 1px solid rgba(245, 242, 233, 0.08);
}
.tin-strip a {
	display: flex; align-items: center; gap: var(--s3);
	max-width: var(--wrap); margin-inline: auto; padding: 7px var(--gutter);
	text-decoration: none; color: inherit;
	font-family: var(--font-mono); font-variant-numeric: tabular-nums;
	font-size: 13px; letter-spacing: 0.04em;
	white-space: nowrap; overflow: hidden;
}
.tin-strip a:hover { color: #fff; }
.tin-strip .live-dot {
	width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
	background: var(--crimson-soft);
}
.tin-strip[data-state="live"] .live-dot { animation: pulse 1.8s ease infinite; }
@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(224, 97, 107, 0.55); }
	70% { box-shadow: 0 0 0 7px rgba(224, 97, 107, 0); }
	100% { box-shadow: 0 0 0 0 rgba(224, 97, 107, 0); }
}
.tin-strip .strip-label {
	font-family: var(--font-sans);
	font-variation-settings: 'wdth' 122; font-weight: 560;
	text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px;
	color: rgba(245, 242, 233, 0.66);
}
.tin-strip .strip-score { display: inline-flex; align-items: center; gap: 3px; }
.tin-strip .strip-cta {
	margin-left: auto;
	font-family: var(--font-sans); font-size: 12.5px; font-weight: 560;
	letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--tin-face);
	border-bottom: 1px solid rgba(245, 242, 233, 0.4);
	padding-bottom: 1px;
}
@media (max-width: 640px) {
	.tin-strip .strip-hide-sm { display: none; }
}

/* Tin digit cells: painted plates, discrete swaps */
.tin {
	position: relative; display: inline-block; overflow: hidden;
	background: var(--tin-plate);
	border-radius: 3px;
	padding: 2px 5px;
	box-shadow: inset 0 1px 0 rgba(245, 242, 233, 0.07), inset 0 -6px 10px rgba(0, 0, 0, 0.35);
	font-weight: 640;
	min-width: 1.25em; text-align: center;
}
.tin.is-flipping .tin-digit { animation: tinSwap 260ms var(--ease-tin); }
@keyframes tinSwap {
	0%   { transform: translateY(0); opacity: 1; }
	45%  { transform: translateY(-105%); opacity: 0; }
	50%  { transform: translateY(105%); opacity: 0; }
	100% { transform: translateY(0); opacity: 1; }
}
.tin-digit { display: block; }
.tin-sep { padding-inline: 1px; opacity: 0.65; }

/* ---------- Masthead ---------- */
.masthead { background: var(--white); border-bottom: 1px solid var(--rule); }
.masthead-row {
	display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
	padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 640; font-size: 19px; letter-spacing: -0.015em; font-variation-settings: 'wdth' 108; }
.brand-est {
	font-variation-settings: 'wdth' 122; font-weight: 540;
	text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px;
	color: var(--ink-soft);
}
.nav-primary ul { list-style: none; display: flex; gap: clamp(14px, 1.8vw, 26px); margin: 0; padding: 0; }
.nav-primary a {
	text-decoration: none; font-size: 14.5px; font-weight: 500;
	color: var(--ink-soft); padding-block: 6px;
	border-bottom: 2px solid transparent;
	transition: color 160ms ease, border-color 160ms ease;
}
.nav-primary a:hover { color: var(--ink); }
.nav-primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--leather); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px; }
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 980px) {
	.nav-primary { display: none; }
	.nav-toggle { display: inline-flex; }
}
.drawer {
	display: none; background: var(--white); border-bottom: 1px solid var(--rule);
}
.drawer.is-open { display: block; }
.drawer ul { list-style: none; margin: 0; padding: var(--s4) var(--gutter) var(--s6); }
.drawer a {
	display: block; padding: 13px 0; text-decoration: none;
	font-size: 21px; font-weight: 600; letter-spacing: -0.015em;
	border-bottom: 1px solid var(--rule);
}
.drawer a[aria-current="page"] { color: var(--leather); }

/* Dusk chrome: match centre and any estuary-dusk page */
.theme-dusk { background: var(--dusk); }
.theme-dusk .masthead { background: var(--dusk); border-bottom-color: var(--rule-dark); }
.theme-dusk .brand, .site-footer .brand { color: var(--tin-face); text-decoration: none; }
.theme-dusk .brand-est, .site-footer .brand-est { color: rgba(245, 242, 233, 0.55); }
.theme-dusk .nav-primary a { color: rgba(245, 242, 233, 0.7); }
.theme-dusk .nav-primary a:hover { color: var(--tin-face); }
.theme-dusk .nav-primary a[aria-current="page"] { color: var(--tin-face); border-bottom-color: var(--gold); }
.theme-dusk .nav-toggle { color: var(--tin-face); border-color: var(--rule-dark); }
.theme-dusk .drawer { background: var(--dusk); border-bottom-color: var(--rule-dark); }
.theme-dusk .drawer a { color: var(--tin-face); border-bottom-color: var(--rule-dark); }
.theme-dusk .drawer a[aria-current="page"] { color: var(--gold); }
.theme-dusk .skip-link { background: var(--tin-face); color: var(--ink); }

/* Small layout helpers that keep inline styles out of markup */
.split-stretch { align-items: stretch; }
.board-fill { height: 100%; }
.mc-dim { color: rgba(245, 242, 233, 0.5); }
.mc-lede { color: rgba(245, 242, 233, 0.8); }
.mc-strong { color: var(--tin-face); font-weight: 560; }
.mc-detail-row .figs { font-family: var(--font-sans); font-weight: 420; }
.mc-link { display: inline-block; color: rgba(245, 242, 233, 0.75); }
.row-link { text-decoration: none; }
.no-gap { margin: 0; }
.mc-board .mc-result .mc-panel { max-width: 560px; }
.mc-panel .btn { margin-top: var(--s4); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--dusk); color: var(--tin-face); overflow: clip; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-photo::after {
	content: ""; position: absolute; inset: 0;
	/* evening light falls from the west: one direction only */
	background:
		linear-gradient(75deg, rgba(28, 13, 17, 0.9) 0%, rgba(28, 13, 17, 0.6) 36%, rgba(28, 13, 17, 0.22) 62%, rgba(60, 40, 16, 0.16) 100%),
		linear-gradient(0deg, rgba(28, 13, 17, 0.92) 0%, rgba(28, 13, 17, 0.3) 42%, rgba(28, 13, 17, 0) 72%);
}
.hero-inner {
	position: relative; z-index: 1;
	display: flex; flex-direction: column; justify-content: flex-end;
	min-height: min(88vh, 780px);
	padding-block: clamp(48px, 7vw, 88px);
}
.hero-kick {
	font-variation-settings: 'wdth' 122; font-weight: 560;
	text-transform: uppercase; letter-spacing: 0.18em; font-size: 12.5px;
	color: rgba(245, 242, 233, 0.85);
	margin-bottom: var(--s4);
}
.hero h1 { max-width: 13ch; margin-bottom: var(--s5); }
.hero .lede { color: rgba(245, 242, 233, 0.82); margin-bottom: var(--s6); }

/* The scoreboard unit standing in the hero */
.hero-board {
	background: var(--tin); border-radius: 6px;
	border: 1px solid rgba(245, 242, 233, 0.1);
	box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
	padding: var(--s5) var(--s5) var(--s4);
	max-width: 560px;
	margin-top: var(--s6);
}
.hero-board .board-line {
	display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
	font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.hero-board .board-head {
	display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
	margin-bottom: var(--s3);
}
.hero-board .board-caps { color: rgba(245, 242, 233, 0.6); }
.hero-board .tin { font-size: clamp(26px, 4vw, 40px); padding: 3px 8px; }
.hero-board [data-tins] { display: inline-flex; align-items: center; gap: 3px; }
.hero-board .tin-sep { font-size: clamp(17px, 2.6vw, 26px); opacity: 0.55; padding-inline: 2px; }
.hero-board .board-vs { font-size: 15px; color: rgba(245, 242, 233, 0.85); }
.hero-board .board-sub {
	margin-top: var(--s3); padding-top: var(--s3);
	border-top: 1px solid rgba(245, 242, 233, 0.1);
	display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap;
	font-size: 13px; color: rgba(245, 242, 233, 0.66);
}
.hero-board .board-sub a { color: inherit; }
.badge-live {
	display: inline-flex; align-items: center; gap: 7px;
	background: var(--crimson); color: #fff;
	font-family: var(--font-sans);
	font-variation-settings: 'wdth' 122; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px;
	padding: 4px 9px; border-radius: 3px;
}
.badge-live .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
[data-state="live"] .badge-live .live-dot { animation: pulse 1.8s ease infinite; }

/* ---------- Ledger rows (fixtures, results) ---------- */
.ledger { border-top: 1px solid var(--rule); }
.ledger-row {
	display: grid;
	grid-template-columns: 76px minmax(90px, 0.6fr) 2fr 1fr auto;
	gap: var(--s4); align-items: center;
	padding: var(--s4) var(--s2);
	border-bottom: 1px solid var(--rule);
}
.ledger-row:hover { background: color-mix(in srgb, var(--leather) 3%, transparent); }
.date-tab { line-height: 1.05; }
.date-tab .d { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 640; display: block; }
.date-tab .m {
	font-variation-settings: 'wdth' 122; font-weight: 560;
	text-transform: uppercase; letter-spacing: 0.13em; font-size: 10.5px;
	color: var(--ink-soft);
}
.side-tag {
	font-variation-settings: 'wdth' 122; font-weight: 580;
	text-transform: uppercase; letter-spacing: 0.11em; font-size: 11px;
	color: var(--leather);
}
.ledger-row .match { font-weight: 560; font-size: 16.5px; letter-spacing: -0.012em; }
.ledger-row .venue { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.ledger-row .when { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; }
.ledger-row .score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14.5px; font-weight: 560; }
.ledger-row .outcome { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.res-mark {
	display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; border-radius: 3px;
	font-family: var(--font-mono); font-size: 12px; font-weight: 640;
}
.res-w { background: rgba(46, 106, 63, 0.14); color: #2e6a3f; }
.res-l { background: rgba(176, 42, 53, 0.12); color: var(--crimson); }
.res-a, .res-d { background: rgba(43, 20, 24, 0.08); color: var(--ink-soft); }
@media (max-width: 760px) {
	.ledger-row { grid-template-columns: 56px 1fr auto; row-gap: 2px; }
	.ledger-row .side-col { grid-column: 2; }
	.ledger-row .match-col { grid-column: 2; }
	.ledger-row .tail-col-wide { grid-column: 2; }
	.ledger-row .tail-col { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
	.ledger-row .tail-col:empty { display: none; }
	.date-tab { grid-row: 1 / span 3; }
	.date-tab .d { font-size: 22px; }
}

/* Filter chips (kept honest: buttons, not links) */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.chip-row button {
	background: none; border: 1px solid var(--rule); border-radius: 3px;
	padding: 7px 13px; font-size: 13.5px; font-weight: 520;
	transition: all 160ms ease;
}
.chip-row button[aria-pressed="true"] { background: var(--leather); border-color: var(--leather); color: var(--white); }
.chip-row button:hover { border-color: var(--leather); }

/* ---------- Match centre (estuary dusk) ---------- */
.mc-surface { background: var(--dusk); color: var(--tin-face); }
.mc-surface .rule-head { border-top-color: var(--rule-dark); }
.mc-board { padding-block: clamp(40px, 6vw, 72px); }
.mc-scoreline { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.mc-scoreline .tin { font-size: clamp(52px, 10vw, 108px); padding: 4px 14px; border-radius: 6px; }
.mc-scoreline .tin-sep { font-size: clamp(34px, 6.4vw, 68px); font-weight: 560; align-self: center; opacity: 0.55; padding-inline: 4px; }
[data-mc-badge] .board-caps { color: rgba(245, 242, 233, 0.6); }
.mc-overs { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(18px, 2.4vw, 26px); color: rgba(245, 242, 233, 0.75); padding-bottom: clamp(8px, 1.4vw, 18px); }
.mc-teams { margin-bottom: var(--s5); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.mc-teams h1 { margin: 0; font-size: clamp(24px, 3.4vw, 40px); }
.mc-meta {
	display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
	margin-top: var(--s4);
	font-size: 14px; color: rgba(245, 242, 233, 0.66);
}
.mc-meta .figures { color: rgba(245, 242, 233, 0.85); }

.mc-grid {
	display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5);
	padding-bottom: clamp(48px, 6vw, 80px);
}
.mc-panel {
	background: rgba(245, 242, 233, 0.045);
	border: 1px solid var(--rule-dark);
	border-radius: 6px; padding: var(--s5);
}
.mc-panel h2, .mc-panel h3 {
	font-variation-settings: 'wdth' 122; font-weight: 560;
	text-transform: uppercase; letter-spacing: 0.15em; font-size: 12px;
	color: rgba(245, 242, 233, 0.6);
	margin-bottom: var(--s4);
}
.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-12 { grid-column: 1 / -1; }
@media (max-width: 900px) { .col-7, .col-5 { grid-column: 1 / -1; } }

.crease-row {
	display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3);
	padding: 10px 0; border-bottom: 1px solid var(--rule-dark);
	font-size: 15px; align-items: baseline;
}
.crease-row:last-child { border-bottom: 0; }
.crease-row .name { font-weight: 540; }
.crease-row .name .star { color: var(--gold); }
.crease-row .figs { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 15px; }
.crease-row .rate { font-family: var(--font-mono); font-size: 12.5px; color: rgba(245, 242, 233, 0.55); }
.mc-note { font-size: 13.5px; color: rgba(245, 242, 233, 0.6); margin: var(--s3) 0 0; }

/* Recent overs: scorebook symbols */
.overs-track { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); }
.over-group { display: flex; align-items: center; gap: 6px; }
.over-group .over-no {
	font-family: var(--font-mono); font-size: 11.5px;
	color: rgba(245, 242, 233, 0.5); margin-right: 3px;
}
.ball {
	width: 26px; height: 26px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-family: var(--font-mono); font-variant-numeric: tabular-nums;
	font-size: 12.5px; font-weight: 560;
	background: rgba(245, 242, 233, 0.07);
	border: 1px solid rgba(245, 242, 233, 0.1);
	color: rgba(245, 242, 233, 0.85);
}
.ball.b-dot { color: rgba(245, 242, 233, 0.45); }
.ball.b-4 { background: var(--tin-face); color: var(--tin); border-color: var(--tin-face); }
.ball.b-6 { background: var(--tin-face); color: var(--crimson); border-color: var(--tin-face); font-weight: 700; }
.ball.b-w { background: var(--crimson); color: #fff; border-color: var(--crimson); }
.ball.b-ex { border-style: dashed; }

/* Updated stamp */
.updated-stamp {
	display: inline-flex; align-items: center; gap: var(--s2);
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
	color: rgba(245, 242, 233, 0.55);
}
.updated-stamp .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crimson-soft); }

/* Countdown (upcoming state) */
.count-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.count-cell { text-align: center; }
.count-cell .tin { font-size: clamp(34px, 6vw, 56px); padding: 4px 10px; border-radius: 5px; }
.count-cell .count-label {
	display: block; margin-top: 7px;
	font-variation-settings: 'wdth' 122; font-weight: 540;
	text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px;
	color: rgba(245, 242, 233, 0.55);
}

/* State visibility switches */
[data-mc-state] .mc-live, [data-mc-state] .mc-upcoming, [data-mc-state] .mc-result { display: none; }
[data-mc-state="live"] .mc-live { display: block; }
[data-mc-state="innings-break"] .mc-live { display: block; }
[data-mc-state="upcoming"] .mc-upcoming { display: block; }
[data-mc-state="result"] .mc-result { display: block; }

/* ---------- Stream facade ---------- */
.stream-facade {
	position: relative; aspect-ratio: 16 / 9;
	background: var(--tin) center / cover no-repeat;
	border-radius: 6px; overflow: hidden;
	border: 1px solid rgba(245, 242, 233, 0.1);
}
.stream-facade img.facade-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.stream-facade::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(10deg, rgba(23, 20, 15, 0.82), rgba(23, 20, 15, 0.12) 55%);
	pointer-events: none;
}
.stream-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.facade-play {
	position: absolute; inset: 0; z-index: 2;
	display: flex; align-items: center; justify-content: center;
	background: none; border: 0;
}
.facade-play .play-disc {
	width: 76px; height: 76px; border-radius: 50%;
	background: var(--crimson); color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 16px 36px -10px rgba(176, 42, 53, 0.65);
	transition: transform 200ms var(--ease-out);
}
.facade-play:hover .play-disc { transform: scale(1.06); }
.facade-play svg { width: 28px; height: 28px; margin-left: 3px; }
.facade-title {
	position: absolute; left: var(--s5); right: var(--s5); bottom: var(--s4); z-index: 2;
	font-weight: 600; font-size: clamp(16px, 2vw, 21px); letter-spacing: -0.015em;
	color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
	pointer-events: none;
}
.facade-badge { position: absolute; top: var(--s4); left: var(--s4); z-index: 2; pointer-events: none; }

.replay-list { display: flex; flex-direction: column; gap: var(--s3); }
.replay {
	display: grid; grid-template-columns: 104px 1fr; gap: var(--s3); align-items: center;
	text-decoration: none;
	border: 1px solid var(--rule-dark); border-radius: 5px; overflow: hidden;
	background: rgba(245, 242, 233, 0.03);
	transition: border-color 160ms ease, background 160ms ease;
}
.replay:hover { border-color: rgba(245, 242, 233, 0.3); background: rgba(245, 242, 233, 0.06); color: inherit; }
.replay img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: 100%; }
.replay .replay-meta { padding: var(--s2) var(--s3) var(--s2) 0; }
.replay .replay-title { font-size: 14px; font-weight: 540; line-height: 1.3; display: block; }
.replay time { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: rgba(245, 242, 233, 0.55); }
.on-light .replay { border-color: var(--rule); background: #fff; }
.on-light .replay:hover { border-color: var(--leather); }
.on-light .replay time { color: var(--ink-soft); }

/* ---------- Honours boards (statistics) ---------- */
.board {
	background: linear-gradient(173deg, #241a12 0%, #1d1510 60%, #191009 100%);
	color: var(--tin-face);
	border-radius: 6px;
	border: 1px solid rgba(201, 162, 74, 0.28);
	padding: clamp(24px, 3.4vw, 40px);
	position: relative;
}
.board::before {
	content: ""; position: absolute; inset: 10px;
	border: 1px solid rgba(201, 162, 74, 0.22);
	border-radius: 3px; pointer-events: none;
}
.board-title {
	text-align: center; color: var(--gold);
	font-variation-settings: 'wdth' 122; font-weight: 580;
	text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px;
	margin-bottom: var(--s5);
}
.board-roll { list-style: none; margin: 0; padding: 0; }
.board-roll li {
	display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3);
	align-items: baseline;
	padding: 11px 2px;
	border-bottom: 1px solid rgba(201, 162, 74, 0.16);
	font-size: 15px;
}
.board-roll li:last-child { border-bottom: 0; }
.board-roll .rank { font-family: var(--font-mono); font-size: 12px; color: rgba(201, 162, 74, 0.75); }
.board-roll .name {
	font-variation-settings: 'wdth' 114; font-weight: 560;
	letter-spacing: 0.06em; text-transform: uppercase; font-size: 13.5px;
	color: var(--gold);
}
.board-roll .fig { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--tin-face); }
.board-roll .fig .sub { font-weight: 400; font-size: 12px; color: rgba(245, 242, 233, 0.55); margin-left: 6px; }
.board-roll li:first-child .fig { color: var(--gold); }

/* Records board rows */
.records-row {
	display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4);
	padding: 13px 2px; border-bottom: 1px solid rgba(201, 162, 74, 0.16);
	align-items: baseline;
}
.records-row:last-child { border-bottom: 0; }
.records-row .what { font-size: 14px; color: rgba(245, 242, 233, 0.75); }
.records-row .who { font-variation-settings: 'wdth' 114; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; color: var(--gold); font-weight: 560; }
.records-row .fig { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 640; font-size: 19px; }

/* ---------- Sortable season tables (scorebook) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table caption { text-align: left; padding-bottom: var(--s3); }
.stats-table th { text-align: right; padding: 0; border-bottom: 1.5px solid var(--ink); }
.stats-table th:nth-child(2) { text-align: left; }
.stats-table th button, .stats-table th .th-plain {
	display: inline-flex; align-items: center; gap: 5px; width: 100%;
	justify-content: flex-end;
	background: none; border: 0; padding: 10px 8px;
	font-variation-settings: 'wdth' 122; font-weight: 580;
	text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px;
	color: var(--ink-soft);
}
.stats-table th:nth-child(2) button, .stats-table th:nth-child(2) .th-plain { justify-content: flex-start; }
.stats-table th button:hover { color: var(--ink); }
.stats-table th[aria-sort] button { color: var(--ink); }
.stats-table th button .arrow { font-size: 9px; opacity: 0; transition: opacity 120ms; }
.stats-table th[aria-sort="descending"] .arrow.down, .stats-table th[aria-sort="ascending"] .arrow.up { opacity: 1; }
.stats-table td {
	padding: 11px 8px; border-bottom: 1px solid var(--rule);
	font-family: var(--font-mono); font-variant-numeric: tabular-nums;
	text-align: right; white-space: nowrap;
}
.stats-table td.player { font-family: var(--font-sans); font-weight: 540; text-align: left; white-space: nowrap; }
.stats-table td.rank { color: var(--ink-soft); font-size: 12px; }
.stats-table tbody tr:hover { background: color-mix(in srgb, var(--leather) 3.5%, transparent); }
.stats-table .lead td { font-weight: 640; }
@media (max-width: 640px) {
	.stats-table .col-sec { display: none; }
	.stats-table { font-size: 13px; }
	.stats-table td { padding-inline: 6px; }
	.stats-table td.player { white-space: normal; }
	.stats-table th button, .stats-table th .th-plain { padding-inline: 6px; }
}

/* ---------- Cards that are not cards: photo plates ---------- */
.plate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: var(--s5); }
.plate { text-decoration: none; display: block; }
.plate figure { margin: 0; position: relative; overflow: hidden; border-radius: 5px; }
.plate img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 500ms var(--ease-out); }
.plate:hover img { transform: scale(1.025); }
.plate .plate-body { padding: var(--s4) 2px 0; border-bottom: 1px solid var(--rule); padding-bottom: var(--s4); }
.plate h3 { margin-bottom: 4px; font-size: 20px; }
.plate .side-tag { display: block; margin-bottom: 6px; }
.plate p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ---------- Split feature (photo + text) ---------- */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); align-items: center; }
.split > .split-media { grid-column: 1 / span 6; grid-row: 1; }
.split > .split-copy { grid-column: 8 / -1; grid-row: 1; }
.split > .split-lead { grid-column: 1 / span 6; grid-row: 1; }
.split-media img { border-radius: 5px; width: 100%; object-fit: cover; }
@media (max-width: 860px) {
	.split > .split-media, .split > .split-copy, .split > .split-lead { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--dusk); color: rgba(245, 242, 233, 0.78); }
.footer-grid {
	display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s6);
	padding-block: clamp(48px, 6vw, 72px) var(--s6);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
	font-variation-settings: 'wdth' 122; font-weight: 560;
	text-transform: uppercase; letter-spacing: 0.16em; font-size: 11.5px;
	color: var(--gold); margin-bottom: var(--s4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer a { text-decoration: none; color: rgba(245, 242, 233, 0.78); font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: 14px; max-width: 30ch; color: rgba(245, 242, 233, 0.6); }
.footer-bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3);
	border-top: 1px solid var(--rule-dark);
	padding-block: var(--s5);
	font-size: 12.5px; color: rgba(245, 242, 233, 0.45);
}

/* ---------- Reveal on scroll (subtle, one direction) ---------- */
/* Content is visible by default; motion is layered on only where safe.
   Scroll-driven when supported; an IntersectionObserver path (html.io-reveal,
   set by JS) elsewhere. No JS and no support: everything simply shows. */
@media (prefers-reduced-motion: no-preference) {
	html.io-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
	html.io-reveal .reveal.is-in { opacity: 1; transform: none; }
	@supports (animation-timeline: view()) {
		.reveal { animation: rise both; animation-timeline: view(); animation-range: entry 0% entry 42%; }
		@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	}
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	html { scroll-behavior: auto; }
}

/* ---------- Page heads (interior pages, varied) ---------- */
.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 48px); }
.page-head .overline { display: block; margin-bottom: var(--s3); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-top: var(--s3); }

/* ---------- Forms (support / juniors enquiry surfaces) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: 13.5px; font-weight: 560; }
.field input, .field select, .field textarea {
	border: 1px solid var(--rule); border-radius: 3px; background: #fff;
	padding: 12px 13px; font: inherit; font-size: 15px; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
	outline: 2.5px solid var(--crimson); outline-offset: 1px; border-color: transparent;
}
.field .hint { font-size: 12.5px; color: var(--ink-soft); }
.field.is-error input { border-color: var(--crimson); }
.field .error-msg { font-size: 13px; color: var(--crimson); font-weight: 540; }
.form-note {
	border: 1px solid var(--rule); border-left: 3px solid var(--gold);
	background: var(--paper); border-radius: 3px;
	padding: var(--s4); font-size: 14px;
}

/* ---------- Utilities ---------- */
.mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); } .mt-7 { margin-top: var(--s7); }
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
figcaption.credit {
	font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
	color: var(--ink-soft); padding-top: 6px; text-align: right;
}
.section-dusk figcaption.credit, .mc-surface figcaption.credit { color: rgba(245, 242, 233, 0.45); }
