:root {
  --ink: #102a43;
  --navy: #17324d;
  --panel: #17324d;
  --cream: #ffffff;
  --paper: #ffffff;
  --powder: #b9e7f7;
  --powder-deep: #6ec6e7;
  --gold: #e51b3e;
  --blue: #58b9df;
  --red: #e51b3e;
  --muted: #bed4df;
  --line: rgba(16,42,67,.15);
  --team-primary: var(--powder);
  --team-secondary: var(--red);
  --team-on-primary: var(--ink);
}
* { box-sizing: border-box; }
html { background: #eef9fd; }
body { margin: 0; color: var(--ink); background: linear-gradient(145deg,#f8fdff 0,#e8f7fc 58%,#dff2f9 100%); font-family: Inter, system-ui, sans-serif; min-width: 320px; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
.masthead { max-width: 1240px; margin: auto; padding: 54px 34px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 4px solid var(--team-secondary); position:relative; }
.masthead::after { content:""; position:absolute; left:34px; bottom:-10px; width:170px; height:6px; background:var(--team-primary); transform:skewX(-28deg); }
.eyebrow, .kicker { margin: 0 0 8px; color: var(--gold); font-size: .75rem; letter-spacing: .19em; font-weight: 800; }
h1, h2 { font-family: "Barlow Condensed", Impact, sans-serif; text-transform: uppercase; margin: 0; }
h1 { font-size: clamp(3.2rem, 8vw, 7rem); line-height: .78; letter-spacing: -.045em; }
h1 span { color: var(--team-primary); -webkit-text-stroke: 0; }
.season-mark { flex: 0 0 142px; width: 142px; aspect-ratio: 1; border: 2px solid var(--gold); display: grid; place-content: center; text-align: center; transform: rotate(2deg); box-shadow: 7px 7px 0 var(--gold); }
.season-mark strong { font-family: "Barlow Condensed"; font-size: 3rem; line-height: .85; }
.season-mark span { font-size: .64rem; letter-spacing: .15em; margin-top: 8px; }
main { max-width: 1240px; margin: auto; padding: 28px 34px 64px; }
.filter-panel, .panel { background: var(--paper); color: var(--ink); border-radius: 4px; box-shadow: 0 12px 30px rgba(23,50,77,.11); border:1px solid #d5e8ef; }
.filter-panel { padding: 25px; border-top: 6px solid var(--team-secondary); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.section-heading h2 { font-size: 2rem; line-height: 1; }
.section-heading .kicker { color: var(--team-secondary); margin-bottom: 4px; }
.text-button { border: 0; background: none; text-decoration: underline; color: #4b6076; font-weight: 700; padding: 8px; }
.filters { display: grid; grid-template-columns: .8fr .8fr 1.45fr 1fr 1.2fr; gap: 12px; }
label > span:not(.sr-only) { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #52677c; margin-bottom: 7px; }
select, input[type="search"], .color-button, .year-button { width: 100%; min-height: 46px; border: 1px solid #c8d0d7; background: white; color: var(--ink); border-radius: 2px; padding: 0 13px; font-weight: 650; }
select:focus, input:focus, button:focus-visible { outline: 3px solid rgba(39,125,201,.3); outline-offset: 2px; }
.component-row { display: grid; grid-template-columns: minmax(320px, 1fr) 1fr; gap: 12px; margin-top: 16px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #c8d0d7; }
.segmented button { min-height: 46px; border: 0; border-right: 1px solid #c8d0d7; color: #4d6174; background: #edf1f3; font-weight: 800; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: white; background: var(--panel); box-shadow: inset 0 -4px var(--team-secondary); }
.color-picker, .year-picker { position: relative; }
.field-label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #52677c; margin-bottom: 7px; }
.color-button, .year-button { display: flex; align-items: center; justify-content: space-between; }
.color-menu, .year-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 300px; overflow: auto; background: white; border: 1px solid #bbc5cf; box-shadow: 0 15px 35px rgba(8,20,38,.25); padding: 8px; }
.color-option, .year-option { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 2px; font-weight: 650; }
.color-option:hover, .year-option:hover { background: #edf1f4; }
.color-option input, .year-option input { accent-color: var(--navy); width: 17px; height: 17px; }
.swatch { width: 17px; height: 17px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: 0 0 17px; }
.active-colors { display: flex; flex-wrap: wrap; gap: 7px; min-height: 0; }
.active-colors:not(:empty) { margin-top: 13px; }
.chip { border: 1px solid #bcc6cf; background: white; color: var(--ink); padding: 6px 10px; border-radius: 99px; font-size: .78rem; font-weight: 750; }
.chip strong { color: #52677c; text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; }
.component-help { margin: 9px 0 0; color: #5d7184; font-size: .78rem; line-height: 1.4; }
.selected-record { margin-top:22px; display:flex; align-items:stretch; justify-content:space-between; background:#fff; border:1px solid #d5e8ef; border-left:8px solid var(--team-secondary); box-shadow:0 10px 24px rgba(23,50,77,.1); }
.selected-record-main { flex:1; display:flex; align-items:center; gap:22px; min-width:0; padding:18px 24px; }
.selected-record-main p { margin:0; color:#52677c; font-size:.74rem; line-height:1.3; letter-spacing:.12em; font-weight:900; text-transform:uppercase; }
.selected-record-main strong { margin-left:auto; color:var(--ink); font:800 clamp(2.8rem,6vw,4.8rem)/.8 "Barlow Condensed"; letter-spacing:-.03em; white-space:nowrap; }
.selected-record-meta { min-width:300px; display:grid; grid-template-columns:repeat(2,1fr); align-items:center; color:#fff; background:var(--panel); padding:14px 22px; }
.selected-record-meta div { padding-left:18px; border-left:1px solid rgba(255,255,255,.18); }
.selected-record-meta span { display:block; color:var(--muted); font-size:.66rem; letter-spacing:.11em; font-weight:800; }
.selected-record-meta strong { display:block; margin-top:4px; font:700 2rem/1 "Barlow Condensed"; }
.scoreboard { margin: 22px 0; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(420px,1fr); color:white; background: var(--panel); border: 1px solid rgba(16,42,67,.12); box-shadow: 0 14px 30px rgba(23,50,77,.14); }
.fact-main { min-height: 250px; padding: 28px 34px; background: var(--team-primary); color: var(--team-on-primary); border-left:8px solid var(--team-secondary); display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:24px; transition:background .2s,color .2s,border-color .2s; }
.fact-main p { margin: 0 0 10px; font-size: .75rem; letter-spacing: .16em; font-weight: 900; }
.fact-main h2 { max-width: 760px; font-size: clamp(2.65rem, 5.2vw, 5rem); line-height: .88; letter-spacing: -.025em; text-wrap: balance; }
.fact-main span { display:block; margin-top:13px; font-size:.82rem; line-height:1.4; font-weight:800; letter-spacing:.035em; }
.fact-button { border:2px solid currentColor; background:transparent; color:inherit; padding:10px 15px; font-size:.76rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.fact-button:hover { background:var(--team-on-primary); color:var(--team-primary); }
.score-detail { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 24px 20px 20px 28px; }
.score-detail div { border-left: 1px solid var(--line); padding-left: 18px; }
.score-detail span { color: var(--muted); display: block; font-size: .68rem; letter-spacing: .12em; font-weight: 800; }
.score-detail strong { display:block; margin-top:5px; font: 700 clamp(1.65rem,2.7vw,2.4rem)/1 "Barlow Condensed"; overflow-wrap:anywhere; }
.score-detail .win strong { color: #79d5a2; }
.score-detail .loss strong { color: #ff7a7d; }
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel { padding: 25px; }
.compact { margin-bottom: 14px; }
.sort-note { color: #65788a; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.rank-list { display: grid; gap: 4px; }
.rank-row { display: grid; grid-template-columns: minmax(105px, 1fr) 130px 46px; gap: 12px; align-items: center; padding: 9px 7px; border-bottom: 1px solid #e4e8eb; }
.rank-row:last-child { border-bottom: 0; }
.rank-name { min-width: 0; font-weight: 800; }
.rank-name-inner { display: flex; align-items: center; gap: 9px; }
.rank-record { font: 700 1.25rem "Barlow Condensed"; text-align: right; }
.rank-pct { font-size: .75rem; font-weight: 800; color: #52677c; text-align: right; }
.bar-track { grid-column: 1 / -1; height: 4px; background: #e5e9ec; }
.bar { height: 100%; background: linear-gradient(90deg,var(--team-primary),var(--team-secondary)); }
.log-panel { margin-top: 22px; }
.log-heading { align-items: center; }
.search { width: min(320px, 50%); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th { font-size: .68rem; text-align: left; letter-spacing: .12em; color: #68798a; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding: 11px 10px; }
td { padding: 13px 10px; border-bottom: 1px solid #e4e8eb; vertical-align: middle; }
.team-cell strong, .matchup strong { display: block; }
.sub { color: #647588; font-size: .78rem; margin-top: 3px; }
.result { display: inline-grid; place-content: center; width: 25px; height: 25px; color: white; font-weight: 900; margin-right: 8px; }
.result.W { background: #16714b; } .result.L { background: #ba3035; } .result.T { background: #52677c; }
.uniform-strip { display: flex; gap: 4px; }
.uniform-piece { min-width: 30px; height: 30px; border: 1px solid rgba(8,20,38,.25); display: grid; place-content: center; font-size: .58rem; font-weight: 900; color: white; text-shadow: 0 1px 2px #000; }
.uniform-piece.light { color: #182433; text-shadow: none; }
.type-pill { padding: 5px 8px; color: var(--navy); background: #e8edf1; border-left: 3px solid var(--blue); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.show-more { display: block; margin: 20px auto 0; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 11px 22px; font-weight: 800; }
footer { max-width: 1240px; margin: auto; padding: 0 34px 42px; display: flex; justify-content: space-between; color: #526f80; font-size: .8rem; }
footer a { color: var(--gold); font-weight: 700; }
.empty { padding: 28px 8px; color: #637486; }
.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; }
@media (max-width: 820px) {
  .masthead { padding-top: 36px; align-items: start; }
  .season-mark { flex-basis: 104px; width: 104px; }
  .season-mark strong { font-size: 2.2rem; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .filters label:nth-child(3), .filters label:nth-child(5) { grid-column: span 2; }
  .selected-record { flex-direction:column; }
  .selected-record-meta { min-width:0; }
  .scoreboard { grid-template-columns: 1fr; }
  .fact-main { min-height:0; }
  .insights-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .masthead { padding: 28px 16px 22px; }
  h1 { font-size: 3.25rem; }
  .season-mark { display: none; }
  main { padding: 18px 12px 48px; }
  .filter-panel, .panel { padding: 18px 14px; }
  .component-row { grid-template-columns: 1fr; }
  .selected-record-main { align-items:flex-start; flex-direction:column; gap:8px; padding:17px 18px; }
  .selected-record-main strong { margin-left:0; }
  .selected-record-meta { padding:14px 16px; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .segmented button:nth-child(2) { border-right: 0; }
  .segmented button:nth-child(-n+2) { border-bottom: 1px solid #c8d0d7; }
  .fact-main { padding: 24px 22px; }
  .fact-main h2 { font-size:clamp(2.35rem,12vw,3.7rem); }
  .score-detail { grid-template-columns:repeat(2,1fr); gap:18px 0; padding: 18px 12px; }
  .score-detail div { padding-left: 9px; }
  .score-detail strong { font-size: 1.65rem; }
  .log-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  footer { padding: 0 16px 30px; flex-direction: column; gap: 10px; }
}
