/* SA20 Schedule design tokens. Night match, broadsheet clarity. */
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 */
:root {
  --ink: #0a1f1a;
  --ink-2: #133028;
  --ink-3: #1c3d33;
  --paper: #f7f4ec;
  --paper-2: #efe9db;
  --chip: #fffdf8;
  --gold: #c8952b;
  --gold-2: #e7c56a;
  --gold-ink: #7a5610; /* AA on paper */
  --turf: #1a6b43;     /* AA on paper and chip */
  --danger: #9b2c2c;
  --line: #d8d0be;
  --muted: #5a5344;
  --cream: #f6f1e6;
  --radius: 10px;
  --radius-sm: 6px;
  --gold-tint: #fbf3df;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(10,31,26,.06), 0 4px 14px rgba(10,31,26,.06);
  --shadow-hover: 0 2px 4px rgba(10,31,26,.08), 0 10px 24px rgba(10,31,26,.10);
  --space-1: .5rem; --space-2: .75rem; --space-3: 1rem; --space-4: 1.5rem; --space-5: 2.5rem;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--turf); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--gold-2); color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--gold-2); color: var(--ink); padding: .5rem 1rem; z-index: 99; border-radius: var(--radius-sm); font-weight: 600; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
header.site { background: var(--ink); color: var(--cream); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { color: var(--cream); text-decoration: none; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; min-width: 0; letter-spacing: -.01em; }
.brand:hover { color: var(--gold-2); text-decoration: none; }
.brand small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); margin-top: .2rem; }
nav.primary { display: flex; flex-wrap: wrap; gap: .25rem; margin-left: auto; }
nav.primary a { color: var(--cream); text-decoration: none; padding: .45rem .7rem; border-radius: 999px; font-size: .95rem; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
nav.primary a:hover { background: rgba(246,241,230,.12); color: #fff; }
nav.primary a[aria-current="page"] { background: var(--gold-2); color: var(--ink); text-decoration: none; font-weight: 600; }

/* Hero */
.hero { background: radial-gradient(120% 140% at 100% 0%, var(--ink-3) 0%, var(--ink) 60%); color: var(--cream); position: relative; }
.hero::after { content: ""; display: block; height: 4px; background: var(--gold); }
.hero .wrap { padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { color: var(--cream); }
.hero .lede { color: rgba(246,241,230,.92); }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-style: normal; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; min-width: 0; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 1rem; line-height: 1.1; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin: 0 0 .75rem; padding-top: .25rem; }
h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: .6rem; }
footer.site h2::before { display: none; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
p { margin: .6rem 0; text-wrap: pretty; }
ul, ol { padding-left: 1.25rem; }
li { margin: .25rem 0; }
.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.6; max-width: 46rem; }
.muted { color: var(--muted); }
.hero .muted, .hero a { color: var(--cream); }
.hero a:hover { color: var(--gold-2); }

/* Layout and sections */
main .wrap { padding-top: 1rem; padding-bottom: 3rem; }
main > .wrap > section, main .wrap > section { margin-top: var(--space-5); }
main .wrap > section:first-child { margin-top: var(--space-4); }
section > p, section > ul:not(.fixture-list):not(.link-list), section > ol { max-width: 50rem; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.75rem 0; }
.facts div { border: 1px solid rgba(246,241,230,.16); background: rgba(19,48,40,.85); padding: .9rem 1.1rem; border-radius: var(--radius); border-top: 3px solid var(--gold); }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(246,241,230,.8); }
.facts dd { margin: .2rem 0 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--cream); font-variant-numeric: tabular-nums; }

/* Cards */
.callout, .note { border-radius: var(--radius); padding: 1.1rem 1.35rem; margin: 1.25rem 0; }
.callout { border: 1px solid var(--gold); border-left: 6px solid var(--gold); background: var(--gold-tint); }
.note { border: 1px solid var(--line); border-left: 6px solid var(--turf); background: var(--chip); }
.callout > :first-child, .note > :first-child { margin-top: 0; }
.callout > :last-child, .note > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; background: var(--chip); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 1rem 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .95rem; }
th, td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: var(--cream); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:not(.day-row):nth-child(even) { background: rgba(239,233,219,.4); }
tbody tr:not(.day-row):hover { background: #f6eed6; }
tbody th { font-weight: 600; }
td a { font-weight: 600; }
tr.day-row td { background: var(--paper-2); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--line); }
caption { text-align: left; color: var(--muted); font-size: .88rem; padding: .75rem .9rem; caption-side: top; }

/* Lists */
.fixture-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .6rem; }
.fixture-list li { margin: 0; background: var(--chip); border: 1px solid var(--line); border-left: 4px solid var(--turf); border-radius: var(--radius-sm); padding: .8rem 1rem; box-shadow: var(--shadow); transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.fixture-list li:hover { box-shadow: var(--shadow-hover); border-left-color: var(--gold); transform: translateY(-1px); }
.fixture-list li a { font-weight: 600; }
ul.link-list { list-style: none; padding: 0; margin: .75rem 0; }
ul.link-list li { margin: .4rem 0; }
main ul.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
main ul.link-list li { margin: 0; }
main ul.link-list a { display: block; height: 100%; padding: .7rem .95rem; background: var(--chip); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, color .15s ease; }
main ul.link-list a:hover { border-color: var(--gold); color: var(--turf); box-shadow: var(--shadow); }
.team-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .45rem; vertical-align: middle; box-shadow: 0 0 0 1px rgba(10,31,26,.2); }

/* Bars */
.bar-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; font-weight: 600; }
.bar-track { height: .55rem; background: var(--paper-2); border-radius: 999px; margin: .3rem 0 1rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar-fill { height: .55rem; background: linear-gradient(90deg, var(--turf), #2a8a5b); border-radius: 999px; }

.crumbs { font-size: .88rem; color: var(--muted); margin: 1.25rem 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--turf); }
svg.diagram { width: 100%; height: auto; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Footer */
footer.site { background: var(--ink); color: var(--cream); margin-top: 4rem; border-top: 3px solid var(--gold); }
footer.site .wrap { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 2.5rem; }
footer.site a { color: var(--cream); text-decoration-color: rgba(246,241,230,.4); }
footer.site a:hover { color: var(--gold-2); text-decoration-color: currentColor; }
footer.site h2 { color: var(--gold-2); margin-top: 0; font-size: 1.05rem; font-family: var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
footer.site .fine { border-top: 1px solid rgba(255,255,255,.15); padding: 1.1rem 1.25rem; text-align: center; font-size: .82rem; color: rgba(246,241,230,.8); }
footer.site .fine a { color: var(--gold-2); }

/* Reserved ad slots: fixed size, empty until ads arrive. */
.ad-slot { height: 90px; max-width: 728px; margin: 1.75rem auto; border: 1px dashed var(--line); background: var(--paper-2); border-radius: var(--radius-sm); }
@media (max-width: 640px) {
  .ad-slot { height: 250px; max-width: 300px; }
  header.site { position: static; }
  nav.primary { margin-left: 0; width: 100%; flex-wrap: wrap; }
  nav.primary a { white-space: nowrap; padding: .5rem .75rem; }
  .hero .wrap { padding-top: 2rem; padding-bottom: 2rem; }
  th, td { padding: .6rem .7rem; }
  .table-wrap table { min-width: 46rem; }
  .table-wrap caption { position: sticky; left: 0; max-width: calc(100vw - 2.5rem); }
}
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  footer.site .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .fixture-list li:hover { transform: none; }
  .match-card:hover { transform: none; }
}
@media print {
  header.site, footer.site, .ad-slot, nav.primary { display: none; }
  .table-wrap, .fixture-list li { box-shadow: none; }
}

/* Logos */
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-mark { width: 48px; height: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); flex: none; display: block; }
.team-tag { display: inline-flex; align-items: center; gap: .5rem; vertical-align: middle; }
.team-logo { width: 28px; height: 28px; object-fit: contain; flex: none; background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 0 0 1px var(--line); }
.matchup { display: inline-flex; align-items: center; gap: .35rem; }
.matchup .team-logo + .team-logo { margin-left: -.55rem; }
.matchup span { margin-left: .35rem; }
.fixture-list .matchup { vertical-align: middle; }
.logo-strip { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.logo-strip li { margin: 0; }
.logo-strip a { display: grid; place-items: center; width: 64px; height: 64px; background: var(--cream); border-radius: 50%; border: 2px solid transparent; transition: border-color .15s ease, transform .15s ease; }
.logo-strip a:hover { border-color: var(--gold-2); transform: translateY(-2px); }
.strip-logo { width: 46px; height: 46px; object-fit: contain; }
.team-hero { display: flex; align-items: center; gap: 1rem; background: var(--chip); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); max-width: 30rem; }
.team-hero p { margin: 0; font-size: 1.1rem; }
.team-crest { width: 80px; height: 80px; object-fit: contain; flex: none; }
@media (max-width: 640px) { .logo-strip a { width: 52px; height: 52px; } .strip-logo { width: 38px; height: 38px; } }
.brand span { line-height: 1; }

/* Homepage: centred hero, countdown, match cards */
.hero .wrap { text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .facts { text-align: left; }
.hero .logo-strip { justify-content: center; }
.countdown { border: 1px solid rgba(246,241,230,.25); border-left: 6px solid var(--gold); background: rgba(19,48,40,.85); border-radius: var(--radius); padding: 1.1rem 1.35rem; margin-top: 1.5rem; text-align: left; }
.countdown p { margin: .3rem 0; }
.countdown-label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(246,241,230,.8); }
.countdown-time { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--gold-2); }
.hero .countdown a { color: var(--gold-2); font-weight: 600; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.section-sub { color: var(--muted); margin-top: -.35rem; margin-bottom: 1.25rem; font-size: .95rem; }
.match-card { background: var(--chip); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.match-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--gold); }
.match-card p { margin: .35rem 0; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.stage-chip { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.stage-chip--league { background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); }
.stage-chip--playoff { background: var(--ink); color: var(--cream); }
.stage-chip--final { background: var(--gold); color: var(--ink); }
.card-teams { margin: .25rem 0 .5rem; }
.card-team { display: flex; align-items: center; gap: .7rem; margin: .55rem 0; }
.card-team strong { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; }
.card-team--tbc strong { color: var(--muted); }
.card-logo { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.card-vs { margin: .15rem 0 .15rem calc(44px + .7rem); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-date { color: var(--ink); }
.card-venue { color: var(--muted); }
.card-time { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.card-cta { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); }
.card-cta a { display: flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.card-cta a:hover { text-decoration: underline; }
.match-card--playoff { background: var(--gold-tint); }
.match-card--final { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.match-card--final .card-meta { color: rgba(246,241,230,.75); }
.match-card--final .card-venue { color: rgba(246,241,230,.75); }
.match-card--final .card-time { color: var(--gold-2); }
.match-card--final .card-cta { border-top-color: rgba(246,241,230,.25); }
.match-card--final .card-cta a { color: var(--gold-2); }
.match-card--final .card-cta a:hover { color: #fff; }
.match-card.is-next { border-color: var(--gold); border-width: 2px; box-shadow: var(--shadow-hover); }
