/* 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; } }

/* ---- v2 features ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* my team */
.myteam select { font: inherit; font-weight: 700; font-size: .9rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); max-width: 140px; }
body.has-team .myteam select { background: var(--team, var(--outfield)); color: #fff; border-color: transparent; }
@media (max-width: 760px) { .myteam { order: 2; margin-left: auto; } .menu-btn { order: 3; margin-left: 0; } }
.fx li.mine { box-shadow: inset 4px 0 0 var(--team, var(--outfield)); background: color-mix(in srgb, var(--team, #1B5E3C) 7%, transparent); }
.next.mine { box-shadow: inset 0 6px 0 var(--team, var(--clay)); }
/* ticker */
.ticker { background: var(--turf-ink); color: #DCE8DF; font-size: .88rem; overflow: hidden; white-space: nowrap; }
.ticker:empty { display: none; }
.ticker .wrap { display: flex; gap: 26px; padding: 7px 0; overflow-x: auto; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.ticker a { color: #fff; text-decoration: none; }
.ticker a:hover { text-decoration: underline; }
.ticker b { color: var(--clay); font-weight: 700; margin-right: 6px; }
/* scoreboard countdown */
.count div { background: #0B1F15; border: 2px solid #2B5640; border-radius: 4px; position: relative; overflow: hidden; perspective: 300px; }
.count div::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #061109; }
.count b { color: #F3EBD3; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.count b.flip { animation: flip .5s ease-in-out; transform-origin: 50% 60%; }
@keyframes flip { 0% { transform: rotateX(0); } 45% { transform: rotateX(-88deg); } 55% { transform: rotateX(88deg); } 100% { transform: rotateX(0); } }
/* when pill + calendar */
.fx .when { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--chalk); border: 1px solid var(--line); color: var(--turf-ink); margin-top: 4px; }
.fx .cal { font: inherit; font-size: .8rem; font-weight: 700; color: var(--outfield); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fx .cal:hover { color: var(--ball); }
@media (max-width: 640px) {
  .fx { border-top: 0; display: grid; gap: 12px; }
  .fx li { grid-template-columns: 1fr auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; gap: 6px 12px; }
  .fx .d { grid-row: 1; grid-column: 2; text-align: right; }
  .fx .d b { font-size: 1.6rem; display: inline; } .fx .d small { display: block; }
  .fx .m { grid-row: 1; grid-column: 1; }
  .fx .t { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
  .fx .t b { font-size: 1.9rem; }
  .fx .t small { flex-basis: 100%; }
  .fx li.mine { box-shadow: inset 0 4px 0 var(--team, var(--outfield)); }
}
/* worm chart */
.worm { margin: 18px 0 0; }
.worm svg { width: 100%; height: auto; background: #FBFCFA; border: 1px solid var(--line); border-radius: 8px; }
.key { display: inline-block; width: 18px; height: 4px; vertical-align: middle; margin: 0 4px 0 10px; border-radius: 2px; }
.key.k1 { background: var(--outfield); } .key.k2 { background: var(--ball); } .key.k3 { background: var(--clay-2); }
/* venues */
.venue { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.venue h3 { margin-top: 4px; }
.ground { width: 200px; }
@media (max-width: 640px) { .venue { grid-template-columns: 1fr; } .ground { width: 150px; } }
@media (max-width: 760px) {
  .top .wrap { gap: 8px; }
  .brand { font-size: 1.4rem; }
  .myteam select { max-width: 112px; padding: 7px 6px; }
  .menu-btn { padding: 8px 10px; }
}
@media (max-width: 380px) { .top .wrap { width: calc(100% - 20px); } .brand { font-size: 1.2rem; gap: 6px; } .myteam select { max-width: 96px; font-size: .82rem; } .menu-btn { font-size: .9rem; padding: 7px 8px; } }
/* team links */
.teamlinks{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}
.teamlinks a{display:inline-block;padding:.45rem .8rem;border:1.5px solid var(--outfield,#1B5E3C);border-radius:999px;text-decoration:none;font-weight:700}
.teamlinks a:hover,.teamlinks a:focus-visible{background:var(--outfield,#1B5E3C);color:#F4F7F2}
.next .tba{display:block;margin-top:.35rem;font-size:.9rem;opacity:.9}
/* newsletter */
.nl{padding:2.5rem 0}
.nl-card{display:grid;gap:1rem 2rem;grid-template-columns:1.2fr 1fr;align-items:center;background:var(--turf-ink);color:var(--chalk);border-radius:14px;padding:1.6rem}
.nl-card h2{margin:0 0 .4rem;color:var(--chalk)}.nl-card p{margin:0}
.nl-form{display:flex;gap:.5rem;flex-wrap:wrap}
.nl-form input{flex:1 1 200px;padding:.75rem .9rem;border-radius:8px;border:0;font:inherit}
.nl-form button{padding:.75rem 1.1rem;border:0;border-radius:8px;background:var(--clay);color:var(--ink);font:inherit;font-weight:700;cursor:pointer}
.nl-form button:hover,.nl-form button:focus-visible{background:var(--clay-2)}
.nl-fine{grid-column:1/-1;font-size:.85rem;opacity:.85}.nl-fine a{color:var(--chalk)}
@media (max-width:700px){.nl-card{grid-template-columns:1fr}}
/* affiliate box */
.aff-box{border:1.5px solid var(--line);border-radius:12px;padding:1.2rem 1.4rem;background:var(--paper)}
.aff-box h2{margin:0 0 .6rem;font-size:1.3rem}
.aff-links{list-style:none;padding:0;margin:0 0 .6rem;display:flex;flex-wrap:wrap;gap:.5rem}
.aff-links a{display:inline-block;padding:.45rem .8rem;border-radius:8px;background:var(--chalk);border:1px solid var(--line);font-weight:700;text-decoration:none}
.aff-note{font-size:.8rem;color:var(--muted);margin:0}
