/* Pitchside: daylight-ground palette. See DESIGN.md */
:root {
  --outfield: #1B5E3C; --outfield-2: #207046; --turf-ink: #0F3824;
  --chalk: #F4F7F2; --paper: #FFFFFF; --clay: #D8B77E; --clay-2: #C9A466;
  --ball: #C42B32; --sky: #D6EAF5; --ink: #14211A; --muted: #56665D; --line: #D5DED7;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chalk); color: var(--ink); font: 17px/1.6 var(--body); }
img, svg { max-width: 100%; display: block; }
a { color: var(--outfield); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ball); }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.prose { max-width: 72ch; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: 0.005em; color: var(--turf-ink); margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-top: 1.6em; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--turf-ink); text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.brand i { width: 14px; height: 14px; border-radius: 50%; background: var(--ball); box-shadow: inset -3px -2px 0 rgba(0,0,0,.18); position: relative; }
.brand i::after { content: ""; position: absolute; inset: 2px 6px; border-left: 1px dashed rgba(255,255,255,.8); }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--chalk); color: var(--outfield); }
.menu-btn { display: none; margin-left: auto; font: inherit; font-weight: 700; padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
}

/* hero: mowed outfield + 22-yard strip */
.hero { color: #fff; background:
  repeating-linear-gradient(90deg, var(--outfield) 0 90px, var(--outfield-2) 90px 180px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.14), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; padding: 48px 0 40px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { font-size: 1.15rem; max-width: 52ch; color: #E6F1E9; }
.strip { position: relative; margin: 30px 0 4px; background: linear-gradient(180deg, var(--clay) 0%, var(--clay-2) 100%); border-radius: 6px; padding: 26px clamp(16px, 5vw, 64px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.strip::before, .strip::after { content: ""; position: absolute; top: 10px; bottom: 10px; width: 3px; background: rgba(255,255,255,.9); }
.strip::before { left: clamp(8px, 3vw, 40px); }
.strip::after { right: clamp(8px, 3vw, 40px); }
.next { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; background: var(--turf-ink); color: #fff; border-radius: 8px; padding: 18px 22px; }
.next .tag { font-weight: 700; color: var(--clay); font-size: .9rem; }
.next .teams { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1; }
.next .teams span { color: var(--clay); font-size: .55em; padding: 0 .3em; }
.next .meta { color: #C9D8CD; }
.count { display: flex; gap: 6px; }
.count div { background: #0A2618; border: 1px solid #23503A; border-radius: 6px; min-width: 62px; text-align: center; padding: 6px 4px 4px; }
.count b { display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.count small { font-size: .72rem; color: #9DB8A6; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } }

/* sections */
section { padding: 36px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--outfield); }
a.card:hover h3 { color: var(--outfield); }
.card h3 { margin-bottom: .25em; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .k { font-weight: 700; color: var(--ball); font-size: .85rem; }

/* fixtures */
.fx { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fx li { display: grid; grid-template-columns: 74px 1fr minmax(170px, auto); gap: 4px 18px; padding: 14px 4px; border-bottom: 1px solid var(--line); align-items: center; }
.fx .d { text-align: center; line-height: 1; }
.fx .d b { display: block; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: var(--turf-ink); }
.fx .d small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.fx .m b { font-size: 1.05rem; }
.fx .m .fmt { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--sky); color: var(--turf-ink); margin-left: 6px; vertical-align: 2px; }
.fx .m .fmt.Test { background: #F1E5CF; }
.fx .m .fmt.T20I { background: #F6D9DA; }
.fx .m a { color: inherit; text-decoration: none; }
.fx .m a:hover { color: var(--outfield); text-decoration: underline; }
.fx .t { text-align: right; }
.fx .t b { font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.fx .t small { display: block; color: var(--muted); }
.fx .past { opacity: .5; }
@media (max-width: 640px) { .fx li { grid-template-columns: 56px 1fr; } .fx .t { grid-column: 2; text-align: left; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.chips button { font: inherit; font-weight: 700; font-size: .9rem; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 6px 14px; cursor: pointer; color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--turf-ink); color: #fff; border-color: var(--turf-ink); }

/* answer + tables */
.answer { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--outfield); border-radius: var(--r); padding: 16px 20px; margin: 18px 0 8px; font-size: 1.05rem; }
.answer strong:first-child { color: var(--outfield); }
.table-wrap { overflow-x: auto; margin: 12px 0 20px; }
table { border-collapse: collapse; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); font-size: .97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #EAF1EC; font-weight: 700; color: var(--turf-ink); }
tbody tr:last-child td { border-bottom: 0; }

/* page header (inner pages) */
.ph { background: repeating-linear-gradient(90deg, var(--outfield) 0 90px, var(--outfield-2) 90px 180px); color: #fff; }
.ph .wrap { padding: 34px 0 30px; }
.ph h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 22ch; }
.ph p { color: #E6F1E9; max-width: 62ch; margin: 0; }
.crumbs { font-size: .88rem; margin-bottom: 10px; color: #CFE3D5; }
.crumbs a { color: #fff; }
.updated { font-size: .85rem; color: #CFE3D5; margin-top: 10px !important; }

/* tools */
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 18px 0; }
.tool .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 12px; }
.tool label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.tool input, .tool select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #B9C6BD; border-radius: 8px; background: #fff; }
.tool input:focus, .tool select:focus { border-color: var(--outfield); outline: 2px solid rgba(27,94,60,.25); }
.tool fieldset { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; margin: 0 0 12px; }
.tool legend { font-weight: 700; padding: 0 6px; color: var(--turf-ink); }
.out { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-top: 8px; }
.out div { background: var(--turf-ink); color: #fff; border-radius: 8px; padding: 12px 14px; }
.out b { display: block; font-family: var(--display); font-size: 2.1rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.out small { color: #B9D0C0; }
.note { font-size: .92rem; color: var(--muted); }
.btn { font: inherit; font-weight: 700; background: var(--outfield); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--turf-ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--outfield); border: 1px solid var(--outfield); }
.pt td input { width: 70px; padding: 6px 8px; }
.pt td:first-child input { width: 140px; }

/* faq */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin: 8px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }

/* timeline of events */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.events a { display: grid; grid-template-columns: 150px 1fr; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; text-decoration: none; color: inherit; }
.events a:hover { border-color: var(--outfield); }
.events .when { font-weight: 700; color: var(--ball); }
.events b { color: var(--turf-ink); }
@media (max-width: 560px) { .events a { grid-template-columns: 1fr; gap: 2px; } }

/* field diagram */
.diagram { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 16px 0; }

footer { background: var(--turf-ink); color: #C9D8CD; padding: 36px 0 30px; margin-top: 40px; font-size: .95rem; }
footer a { color: #fff; }
footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
footer h4 { font-family: var(--display); font-size: 1.3rem; color: #fff; margin: 0 0 8px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: 4px 0; }
.ad { margin: 24px auto; min-height: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
