/* Danvers Falcons Cross Country
   Look: a proper team site. Royal blue and white from the Falcons logo, bold
   condensed headlines, clean white cards, a scoreboard strip up top. */
:root {
  --royal: #18479f;
  --royal-dk: #123a85;
  --navy: #0b1f4d;
  --ink: #131a2b;
  --muted: #5b647a;
  --line: #dfe4ee;
  --bg: #f3f5f9;
  --white: #ffffff;
  --win: #1a8a4a;
  --loss: #c8322b;
  --gold: #f0b429;
  --r: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 77, .06), 0 6px 18px rgba(11, 31, 77, .07);
  --display: "Saira Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 16.5px; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--royal); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 1; margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.eyebrow, .label { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy); color: #b9c6e6; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: var(--white); text-decoration: none; margin-left: 18px; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--royal); color: var(--white); box-shadow: 0 2px 10px rgba(11, 31, 77, .25); }
.hbar { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); }
.badge { width: 82px; height: 82px; border-radius: 50%; background: var(--white); display: grid; place-items: center; margin-bottom: -22px; box-shadow: 0 3px 10px rgba(11, 31, 77, .3); border: 3px solid var(--royal); outline: 2px solid var(--white); flex: none; }
.badge img { width: 58px; height: 58px; }
.brand-text { font-family: var(--display); font-weight: 800; font-size: 28px; text-transform: uppercase; letter-spacing: .02em; line-height: .95; }
.brand-text small { display: block; font-weight: 600; font-size: 14px; letter-spacing: .28em; color: #c5d4f5; }
.nav { display: flex; align-self: stretch; }
.nav a { display: flex; align-items: center; padding: 0 18px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; color: #dbe5fb; text-decoration: none; border-bottom: 4px solid transparent; border-top: 4px solid transparent; transition: background .15s, color .15s; }
.nav a:hover { color: var(--white); background: var(--royal-dk); }
.nav a.active { color: var(--white); border-bottom-color: var(--white); }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255, 255, 255, .6); border-radius: 6px; color: var(--white); padding: 6px 14px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Scoreboard strip ---------- */
.scores { background: var(--white); border-bottom: 1px solid var(--line); }
.scores .wrap { display: flex; padding-right: 0; }
.scores-label { flex: none; display: flex; align-items: center; padding: 0 18px 0 96px; margin-left: -20px; background: var(--navy); color: var(--white); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.1; }
.scores-track { display: flex; overflow-x: auto; scrollbar-width: thin; }
.sc { flex: none; min-width: 168px; text-align: left; background: none; border: 0; border-right: 1px solid var(--line); padding: 9px 16px 10px; transition: background .15s; }
.sc:hover { background: var(--bg); }
.sc .when { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sc .who { font-family: var(--display); font-weight: 700; font-size: 19px; text-transform: uppercase; line-height: 1.15; white-space: nowrap; }
.sc .res { font-size: 14px; font-weight: 700; }
.sc .res.W { color: var(--win); } .sc .res.L { color: var(--loss); } .sc .res.up { color: var(--royal); }
.sc.next { background: #eef3fd; box-shadow: inset 0 -3px 0 var(--royal); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background: linear-gradient(115deg, var(--navy) 0%, var(--royal) 62%, #2459c2 100%); }
.hero::before { content: ""; position: absolute; top: -20%; bottom: -20%; right: 30%; width: 90px; background: rgba(255, 255, 255, .07); transform: skewX(-18deg); box-shadow: 130px 0 0 rgba(255, 255, 255, .04), 230px 0 0 rgba(255, 255, 255, .025); }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -70px; width: 420px; height: 420px; background: url(../images/falcons-logo.png) center / contain no-repeat; opacity: .1; filter: brightness(0) invert(1); }
.hero .wrap { position: relative; z-index: 1; }
.hero-home .wrap { display: grid; grid-template-columns: 1.3fr .7fr; gap: 44px; align-items: center; padding-top: 64px; padding-bottom: 96px; }
.hero .eyebrow { display: inline-block; background: var(--white); color: var(--royal); padding: 4px 12px 3px; border-radius: 4px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); margin: 18px 0 16px; letter-spacing: .005em; }
.hero p { max-width: 560px; font-size: 18px; color: #dbe5fb; margin: 0 0 26px; }
.page-banner .wrap { padding-top: 46px; padding-bottom: 46px; }
.page-banner h1 { font-size: clamp(46px, 7.5vw, 84px); margin-bottom: 0; }
.page-banner p { margin: 12px 0 0; }
.page-banner::after { width: 300px; height: 300px; right: 20px; bottom: -60px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; padding: 11px 24px 10px; border-radius: 6px; text-decoration: none; border: 2px solid var(--white); transition: background .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--white); color: var(--royal); }
.btn-primary:hover { background: #e6edfc; border-color: #e6edfc; }
.btn-ghost { background: transparent; color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.lift { transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.lift:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(11, 31, 77, .08), 0 14px 28px rgba(11, 31, 77, .13); border-color: #c3cde2; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Hero scoreboard ---------- */
.scoreboard { display: block; width: 100%; text-align: left; color: var(--ink); padding: 0; overflow: hidden; border: 0; box-shadow: 0 16px 40px rgba(5, 14, 40, .4); }
.sb-top { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: var(--white); padding: 9px 16px 8px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.sb-top span:last-child { color: #b9c6e6; font-weight: 600; }
.sb-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.sb-row img, .sb-row .dot { width: 46px; height: 46px; }
.sb-row .dot { display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); }
.sb-row .nm { font-family: var(--display); font-weight: 700; font-size: 27px; text-transform: uppercase; color: var(--muted); }
.sb-row .pts { font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-row.win .nm, .sb-row.win .pts { color: var(--ink); }
.sb-row.win .pts { color: var(--royal); }
.sb-foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; font-size: 13.5px; color: var(--muted); }
.sb-foot b { color: var(--royal); white-space: nowrap; }

/* ---------- Info strip under the hero ---------- */
.home-strip { margin-top: -46px; position: relative; z-index: 2; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.home-strip .strip { grid-template-columns: 1fr 1.6fr 1fr; }
.tile { padding: 18px 20px; border-top: 4px solid var(--royal); }
.tile .k { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; margin-top: 4px; color: var(--royal); font-variant-numeric: tabular-nums; }
.tile .d { font-size: 14px; color: var(--muted); margin-top: 4px; }
.next-game { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%; text-align: left; padding: 18px 20px; background: var(--navy); border-color: var(--navy); color: var(--white); border-top: 4px solid var(--gold); }
.next-game .k { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.next-game h3 { font-size: 36px; margin: 4px 0 4px; }
.next-game .meta { font-size: 14px; color: #c5d4f5; }
.countdown { display: flex; gap: 8px; }
.countdown div { background: rgba(255, 255, 255, .1); border-radius: 8px; padding: 8px 6px 6px; text-align: center; min-width: 58px; }
.countdown b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b9c6e6; }

/* ---------- Sections ---------- */
section.block { padding: 52px 0 0; }
section.block:last-of-type { padding-bottom: 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.section-head h2 { font-size: 40px; display: flex; align-items: center; gap: 12px; }
.section-head h2::before { content: ""; width: 10px; height: 30px; background: var(--royal); transform: skewX(-14deg); }
.section-head .more { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.section-head .more::after { content: " ›"; }
.section-head .more:hover { text-decoration: underline; }
.sub { color: var(--muted); margin: -6px 0 20px; max-width: 720px; }
.pill, .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 9px; border-radius: 4px; background: #e8eefb; color: var(--royal); white-space: nowrap; }
.tag.home { background: var(--royal); color: var(--white); }
.notice { background: #fff8e1; border: 1px solid #f2dc9a; border-left: 5px solid var(--gold); border-radius: 8px; padding: 12px 16px; font-size: 15px; margin-bottom: 28px; }
.tbd { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff3cd; color: #7a5a00; border-radius: 4px; padding: 1px 7px; }

/* ---------- Leaders ---------- */
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.leader { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-left: 6px solid var(--royal); }
.leader .big { font-family: var(--display); font-weight: 800; font-size: 72px; line-height: .9; color: var(--royal); min-width: 96px; font-variant-numeric: tabular-nums; }
.leader .cat { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.leader .who { font-family: var(--display); font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1.05; }

/* ---------- Chart cards ---------- */
.chart { padding: 20px 22px; }
.legend-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.legend-row i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 7px; vertical-align: -2px; }
.s1 { background: #0b1f4d; } .s2 { background: #18479f; } .s3 { background: #5b8be6; } .s4 { background: #a9c2f5; } .s5 { background: #7a869e; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 90px; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.bar-row .nm { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; line-height: 1.05; }
.bar-row .nm small { display: block; font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.bar-track { height: 26px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.bar-fill { display: flex; height: 100%; width: var(--w); min-width: 6px; transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.in .bar-fill { transform: scaleX(1); }
.bar-fill span { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--white); min-width: 0; overflow: hidden; }
.bar-fill span.s4 { color: var(--navy); }
.bar-row .tot { text-align: right; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; color: var(--royal); font-variant-numeric: tabular-nums; }
.bar-row .tot small { display: block; font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.chip { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; background: var(--white); color: var(--ink); border: 1.5px solid var(--line); border-radius: 6px; padding: 6px 16px 5px; transition: border-color .15s; }
.chip:hover { border-color: var(--royal); }
.chip[aria-pressed="true"] { background: var(--royal); border-color: var(--royal); color: var(--white); }
.search { flex: 1; min-width: 180px; max-width: 280px; margin-left: auto; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 6px; font: inherit; background: var(--white); }

/* ---------- Player cards ---------- */
.player { display: flex; flex-direction: column; overflow: hidden; }
.player-top { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--royal); color: var(--white); }
.jersey { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 30px; background: var(--white); color: var(--royal); }
.jersey.unknown { background: rgba(255, 255, 255, .18); color: #c5d4f5; font-size: 24px; }
.player-top h3 { font-size: 27px; }
.posline { font-size: 14px; color: #dbe5fb; margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pos { font-size: 12px; font-weight: 700; letter-spacing: .04em; background: rgba(255, 255, 255, .18); border-radius: 4px; padding: 0 7px; }
.cap { font-size: 11px; font-weight: 700; letter-spacing: .08em; background: var(--gold); color: var(--navy); border-radius: 4px; padding: 1px 7px; }
.player-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); border-bottom: 1px solid var(--line); }
.player-stats div { padding: 12px 6px 10px; text-align: center; border-right: 1px solid var(--line); }
.player-stats div:last-child { border-right: 0; }
.player-stats b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; color: var(--royal); font-variant-numeric: tabular-nums; }
.player-stats span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.player-log { padding: 10px 16px 14px; font-size: 14.5px; flex: 1; }
.player-log .row { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.player-log .row:last-child { border-bottom: 0; }
.player-log .opp { font-weight: 700; min-width: 124px; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* ---------- Schedule list ---------- */
.gamelist { overflow: hidden; }
.game { display: grid; grid-template-columns: 70px 1fr auto 20px; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 14px 20px 14px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); transition: background .15s; }
.game:last-child { border-bottom: 0; }
.game:hover { background: #f6f8fc; }
.datebox { text-align: center; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.datebox .m { background: var(--royal); color: var(--white); font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; padding: 1px 0; }
.datebox .d { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.05; }
.datebox .w { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 3px; }
.game .opp { font-family: var(--display); font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; }
.game .opp small { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-right: 8px; vertical-align: middle; }
.game .meta { font-size: 14px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.result { text-align: right; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result .wl { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; color: var(--white); font-size: 22px; margin-right: 10px; vertical-align: 3px; }
.result .wl.W { background: var(--win); } .result .wl.L { background: var(--loss); }
.result.upcoming { font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--royal); }
.result.cancelled { font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.game.is-cancelled .opp, .game.is-cancelled .datebox .d { color: var(--muted); }
.game.is-cancelled .opp { text-decoration: line-through; text-decoration-thickness: 2px; }
.game.is-cancelled .datebox .m { background: var(--muted); }
.sc .res.cx { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.chev { font-family: var(--display); font-weight: 800; font-size: 28px; color: #a4aec4; transition: transform .15s, color .15s; }
.game:hover .chev { color: var(--royal); transform: translateX(3px); }

/* ---------- Game popup ---------- */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 36px); color: var(--ink); background: var(--white); box-shadow: 0 30px 80px rgba(5, 14, 40, .5); }
dialog.modal::backdrop { background: rgba(11, 31, 77, .7); }
.modal-head { background: linear-gradient(115deg, var(--navy), var(--royal)); color: var(--white); padding: 22px 26px 24px; position: relative; }
.modal-head .eyebrow { font-size: 14px; color: #c5d4f5; padding-right: 44px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: var(--white); font-size: 16px; }
.modal-close:hover { background: rgba(255, 255, 255, .3); }
.modal-head h2 { font-size: clamp(34px, 6vw, 48px); margin-top: 10px; }
.scoreline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-top: 14px; }
.scoreline .team { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; line-height: 1; display: flex; align-items: center; gap: 10px; }
.scoreline .team img { width: 46px; height: 46px; background: var(--white); border-radius: 50%; padding: 5px; }
.scoreline .team:last-child { justify-content: flex-end; text-align: right; }
.scoreline .nums { font-family: var(--display); font-weight: 800; font-size: 66px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scoreline .nums i { font-style: normal; opacity: .5; margin: 0 8px; }
.modal-body { padding: 22px 26px 28px; }
.modal-body h4 { font-size: 18px; letter-spacing: .1em; color: var(--royal); margin: 24px 0 8px; padding-bottom: 5px; border-bottom: 2px solid var(--line); }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { margin: 0; }
.modal-body ul { margin: 0; padding-left: 18px; }
table.line { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.line th, table.line td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line); }
table.line th:first-child, table.line td:first-child { text-align: left; font-weight: 700; }
table.line th { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
table.line td:last-child { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--royal); }
.plays .row, .perf .row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.plays .q { min-width: 92px; font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.plays .sc { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 20px; white-space: nowrap; }
.perf .n { font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase; min-width: 170px; }
.srcs { display: flex; flex-wrap: wrap; gap: 8px; }
.srcs a { font-size: 14px; font-weight: 600; border: 1.5px solid var(--line); border-radius: 6px; padding: 5px 12px; text-decoration: none; }
.srcs a:hover { border-color: var(--royal); background: #eef3fd; }

/* ---------- History ---------- */
.banners { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.banner { background: var(--royal); color: var(--white); text-align: center; padding: 18px 8px 44px; clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%); border-top: 6px solid var(--navy); }
.banner img { width: 44px; height: 44px; margin: 0 auto 6px; }
.banner .y { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; }
.banner .l { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; color: #dbe5fb; }

.linechart { padding: 18px 16px 10px; }
.linechart svg { width: 100%; height: auto; display: block; overflow: visible; }
.linechart .gridl { stroke: var(--line); stroke-width: 1; }
.linechart .area { fill: var(--royal); opacity: .1; }
.linechart .ln { fill: none; stroke: var(--royal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s ease-out .1s; }
.in .linechart .ln { stroke-dashoffset: 0; }
.linechart .pt { fill: var(--white); stroke: var(--royal); stroke-width: 2.5; }
.linechart .pt.title { fill: var(--gold); stroke: var(--navy); }
.linechart text { font-family: var(--body); font-size: 12.5px; font-weight: 600; fill: var(--muted); }
.linechart text.wv { fill: var(--ink); font-weight: 700; }
.linechart .key { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0 6px; }
.linechart .key i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; border: 2.5px solid var(--royal); background: var(--white); vertical-align: -1px; }
.linechart .key i.t { background: var(--gold); border-color: var(--navy); }

.table-scroll { overflow-x: auto; }
table.records { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.records th { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--white); background: var(--royal); text-align: left; padding: 10px 14px; }
table.records th:first-child { border-radius: 9px 0 0 0; } table.records th:last-child { border-radius: 0 9px 0 0; }
table.records td { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 15.5px; }
table.records tr:nth-child(even) td { background: #f8f9fc; }
table.records .yr { font-family: var(--display); font-weight: 800; font-size: 22px; }
table.records .rec { font-family: var(--display); font-weight: 700; font-size: 21px; }
.bar { height: 10px; background: #e3e8f2; border-radius: 5px; min-width: 100px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--royal); }
.note-pill { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #fff3cd; color: #7a5a00; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }

.timeline { border-left: 3px solid var(--royal); margin-left: 8px; padding-left: 26px; }
.timeline .item { position: relative; padding-bottom: 22px; }
.timeline .item::before { content: ""; position: absolute; left: -35px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 3px solid var(--royal); }
.timeline .y { font-family: var(--display); font-weight: 800; font-size: 32px; color: var(--royal); line-height: 1; }
.timeline p { margin: 4px 0 0; }

.legend { display: flex; flex-direction: column; overflow: hidden; }
.legend .top { background: var(--royal); color: var(--white); padding: 16px 20px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.legend h3 { font-size: 34px; }
.legend .role { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c5d4f5; margin-top: 4px; }
.legend .rank { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: .9; color: rgba(255, 255, 255, .35); }
.legend .body { padding: 16px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.legend p { margin: 0 0 16px; flex: 1; }
.legend .tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Media ---------- */
.video { text-decoration: none; color: inherit; display: block; overflow: hidden; }
.thumb { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; background: linear-gradient(115deg, var(--navy), var(--royal)); overflow: hidden; }
.thumb img { position: absolute; width: 58%; right: -10%; bottom: -30%; opacity: .14; filter: brightness(0) invert(1); }
.thumb .play { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(5, 14, 40, .35); transition: transform .15s; }
.thumb .play::after { content: ""; border-left: 19px solid var(--royal); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.video:hover .play { transform: scale(1.1); }
.thumb .len { position: absolute; right: 10px; bottom: 10px; background: rgba(5, 14, 40, .75); color: var(--white); border-radius: 4px; font-size: 12.5px; font-weight: 700; padding: 1px 7px; }
.thumb .yr { position: absolute; left: 12px; top: 8px; font-family: var(--display); font-weight: 800; font-size: 28px; color: rgba(255, 255, 255, .85); }
.video .cap-txt { padding: 14px 16px 16px; }
.video .cap-txt h3 { font-size: 25px; }
.video .cap-txt span { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }
.photo { aspect-ratio: 4 / 3; overflow: hidden; position: relative; border-radius: var(--r); border: 2px dashed #b9c4dc; background: var(--white); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; padding: 12px; }
.photo.has-img { border: 0; padding: 0; box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; inset: auto 0 0 0; background: linear-gradient(transparent, rgba(5, 14, 40, .85)); color: var(--white); padding: 24px 12px 10px; font-size: 14px; text-align: left; }
figure { margin: 0; }
.cta { padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(115deg, var(--navy), var(--royal)); color: var(--white); border: 0; }
.cta h3 { font-size: 38px; }
.cta p { margin: 6px 0 0; color: #dbe5fb; }

.quicklinks a { display: block; padding: 24px 24px 26px; text-decoration: none; color: var(--white); background: var(--royal); border-color: var(--royal); }
.quicklinks a:hover { background: var(--royal-dk); }
.quicklinks h3 { font-size: 36px; }
.quicklinks p { margin: 8px 0 0; font-size: 15px; color: #dbe5fb; }
.quicklinks .arrow { float: right; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; transition: transform .15s; }
.quicklinks a:hover .arrow { transform: translateX(5px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c6e6; font-size: 15px; border-top: 6px solid var(--royal); }
.foot-top { display: flex; align-items: center; gap: 18px; padding-top: 36px; padding-bottom: 24px; }
.foot-top .badge { margin: 0; outline: 0; border: 0; }
.foot-top .go { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; text-transform: uppercase; color: var(--white); }
.foot-top .go small { display: block; font-size: 16px; font-weight: 600; letter-spacing: .2em; color: #b9c6e6; margin-top: 4px; }
.foot-bot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 18px; padding-bottom: 30px; }
.site-footer a { color: var(--white); }
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; font-weight: 600; }

/* ---------- Motion (kept subtle) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-home .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; padding-bottom: 80px; }
  .g3, .g4, .strip { grid-template-columns: repeat(2, 1fr); }
  .home-strip .strip { grid-template-columns: 1fr 1fr; }
  .home-strip .next-game { grid-column: 1 / -1; order: -1; }
  .leaders { grid-template-columns: 1fr; }
  .banners { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .topbar span:first-child { display: none; }
  .topbar .wrap { justify-content: flex-end; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--royal-dk); flex-direction: column; padding: 6px 0 10px; box-shadow: 0 10px 20px rgba(11, 31, 77, .3); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 22px; border: 0; }
  .nav a.active { background: var(--navy); }
  .hbar { height: 62px; }
  .badge { width: 66px; height: 66px; margin-bottom: -16px; }
  .badge img { width: 46px; height: 46px; }
  .brand-text { font-size: 23px; }
  .brand-text small { font-size: 12px; }
  .scores-label { padding-left: 20px; font-size: 13px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4, .strip { grid-template-columns: repeat(2, 1fr); }
  .hero::after { width: 260px; height: 260px; }
  .game { grid-template-columns: 60px 1fr; gap: 10px 14px; padding: 12px; }
  .game .result { grid-column: 2; text-align: left; font-size: 28px; }
  .game .chev { display: none; }
  .game .opp { font-size: 26px; }
  .search { max-width: none; margin: 4px 0 0; flex-basis: 100%; }
  .scoreline .nums { font-size: 46px; }
  .scoreline .team { font-size: 19px; }
  .scoreline .team img { display: none; }
  .tile .v { font-size: 44px; }
  .perf .n { min-width: 120px; }
  .bar-row { grid-template-columns: 1fr 70px; }
  .bar-row .nm { grid-column: 1 / -1; }
  .section-head h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Cross country: boys + girls results ---------- */
.sb-row.xc .dot { font-size: 24px; }
.sb-row .dot.W { background: var(--win); border-color: var(--win); color: var(--white); }
.sb-row .dot.L { background: var(--loss); border-color: var(--loss); color: var(--white); }
.sb-row .nm small { display: block; font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 2px; }
.sb-row.xc .pts { font-size: 46px; }
.sc .res span.W { color: var(--win); } .sc .res span.L { color: var(--loss); }
.result.xc { display: grid; gap: 6px; font-size: 25px; }
.result.xc small { font-family: var(--body); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; vertical-align: 3px; }
.result.xc .wl { width: 25px; height: 25px; border-radius: 5px; font-size: 17px; margin-right: 7px; vertical-align: 2px; }
.datebox.tbd-date .m { background: var(--muted); }
.datebox.tbd-date .d { font-size: 24px; line-height: 1.4; color: var(--muted); }
.modal-res { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.modal-res span { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .05em; text-transform: uppercase; background: rgba(255, 255, 255, .14); border-radius: 6px; padding: 4px 12px 3px; }
.modal-res b { font-weight: 800; margin-left: 4px; }
.modal-res .low { background: none; padding: 0 4px; font-size: 14px; letter-spacing: .1em; color: #c5d4f5; }
.modal-body .fine { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- Finish-place grid ---------- */
.place-grids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.chart h3 { font-size: 28px; margin-bottom: 10px; }
table.places { width: 100%; border-collapse: collapse; }
table.places th { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding: 4px 6px 8px; text-align: center; white-space: nowrap; }
table.places th:first-child { text-align: left; color: var(--muted); font-size: 13px; }
table.places th small { display: block; font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .02em; text-transform: none; color: var(--muted); }
table.places td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: center; }
table.places td.nm { text-align: left; font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase; line-height: 1.05; white-space: nowrap; }
table.places td.nm small { display: block; font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.pl { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-family: var(--display); font-weight: 800; font-size: 20px; background: #e8eefb; color: var(--royal); font-variant-numeric: tabular-nums; }
.pl.top { background: var(--royal); color: var(--white); }
.pl.p1 { background: var(--gold); color: var(--navy); }
.pl.ran { background: var(--bg); color: var(--muted); font-size: 15px; }
.pl.none { background: none; color: #b4bccd; }
.place-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); margin: -6px 0 16px; }
.place-key .pl { width: 20px; height: 20px; border-radius: 5px; font-size: 12px; margin-right: 6px; vertical-align: -4px; }
.player-stats b.dim { color: #a4aec4; font-size: 22px; line-height: 32px; }

/* ---------- History + media tweaks ---------- */
.banner-title { font-size: 24px; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.banners + .banner-title { margin-top: 26px; }
.banners { grid-template-columns: repeat(8, 1fr); }
.banner .l { min-height: 2.6em; }
.legend .rank { font-size: 34px; line-height: 1; }
.thumb.news { aspect-ratio: 16 / 7; }
.thumb.news .yr { font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 980px) {
  .place-grids { grid-template-columns: 1fr; }
  .banners { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .game .result.xc { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 22px; }
  .banners { grid-template-columns: repeat(3, 1fr); }
  .brand-text small { letter-spacing: .2em; }
}

/* ---------- Race-by-race grid: time with a place pill under it ---------- */
table.places td { vertical-align: top; }
table.places td.nm { vertical-align: middle; }
.tm { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm.none { color: #b4bccd; }
table.places .pl { width: auto; height: auto; padding: 1px 7px 0; border-radius: 4px; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.place-key .pl { width: auto; height: auto; padding: 1px 7px 0; border-radius: 4px; font-size: 12px; font-style: normal; }
.player-stats b.pr { font-size: 25px; line-height: 32px; }
table.alltime td small { color: var(--muted); font-size: 12px; font-weight: 600; margin-left: 4px; }
table.alltime td { padding-top: 6px; padding-bottom: 6px; }
table.alltime .yr { color: var(--muted); width: 36px; }
.place-grids > .card { min-width: 0; }
.tag.special { background: var(--gold); color: var(--navy); }
