* { box-sizing: border-box; }
:root {
    --deep-purple: #28063D;
    --purple-accent: #470A6C;
    --orange: #E47503;
    --charcoal: #23282B;
    --ink: #17191b;
    --muted: #687078;
    --line: #dfe2e5;
    --paper: #ffffff;
    --ice: #f4f6f8;
    --shadow: 0 12px 34px rgba(35, 40, 43, .10);
}
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--ice); font: 1rem/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { color: white; background: var(--deep-purple); box-shadow: 0 2px 12px rgba(0,0,0,.22); position: relative; z-index: 10; }
.site-header__stripe { height: .3rem; background: var(--orange); }
.site-header__inner { min-height: 5.4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; min-width: 0; }
.brand__logo { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); }
.brand strong { display: block; font-size: 1.55rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.brand small { display: block; margin-top: .35rem; color: rgba(255,255,255,.76); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: .4rem; }
nav a { color: white; text-decoration: none; font-weight: 750; padding: .65rem .8rem; border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus-visible, nav a[aria-current="page"] { border-color: var(--orange); }
.eyebrow { margin: 0 0 .45rem; color: var(--orange); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .95; }
h2 { margin: 0; color: var(--deep-purple); font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1; }
h3 { margin: 0; font-size: 1.3rem; line-height: 1.1; }
.season-hero { color: white; background: linear-gradient(118deg, var(--deep-purple) 0 67%, var(--purple-accent) 67%); border-bottom: .35rem solid var(--orange); overflow: hidden; }
.season-hero__grid { min-height: 19rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3rem; padding-block: 3rem; position: relative; }
.season-hero__grid::after { content: "BEARS"; position: absolute; right: 0; bottom: -2.8rem; color: rgba(255,255,255,.055); font: 10rem/1 Impact, sans-serif; letter-spacing: .04em; pointer-events: none; }
.season-hero .eyebrow { color: #ff9a32; }
.season-hero__division { margin: 1rem 0 0; color: rgba(255,255,255,.8); font-size: 1.05rem; font-weight: 650; }
.record-card { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(65px, 1fr)); position: relative; z-index: 1; background: white; color: var(--deep-purple); border-radius: .3rem; box-shadow: var(--shadow); overflow: hidden; }
.record-card div { padding: 1.1rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.record-card div:first-child { border-left: 0; }
.record-card dt { color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .12em; }
.record-card dd { margin: .1rem 0 0; font: 2.35rem/1 Impact, sans-serif; }
.content-stack { display: grid; gap: 2rem; padding-block: 2.5rem 4rem; }
.content-stack > * { min-width: 0; }
.content-section, .game-overview, .summary-panel { background: var(--paper); border: 1px solid var(--line); border-radius: .35rem; box-shadow: 0 6px 24px rgba(35,40,43,.055); }
.content-section { padding: clamp(1rem, 2.5vw, 1.75rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading > p { margin: 0; color: var(--muted); font-size: .9rem; }
.table-wrap { width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: .25rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
.stats-table { min-width: 930px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td, .report-table th, .report-table td { padding: .72rem .68rem; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.stats-table thead th, .report-table thead th { color: white; background: var(--charcoal); font-size: .78rem; letter-spacing: .03em; }
.stats-table thead th:first-child, .report-table thead th:first-child { text-align: left; }
.stats-table thead button { width: 100%; padding: 0; color: inherit; background: none; border: 0; cursor: pointer; font-weight: 800; }
.stats-table tbody th { text-align: left; font-weight: 700; }
.stats-table tbody tr:nth-child(even), .report-table tbody tr:nth-child(even) { background: #f7f8f9; }
.stats-table thead th:first-child, .stats-table tbody th:first-child {
    position: sticky; left: 0; z-index: 2;
    box-shadow: 2px 0 6px rgba(35,40,43,.12);
}
.stats-table thead th:first-child { z-index: 3; background: var(--charcoal); }
.stats-table tbody th:first-child { background: var(--paper); }
.stats-table tbody tr:nth-child(even) th:first-child { background: #f7f8f9; }
.stats-table tbody tr:hover th:first-child { background: #fff4e8; }
.stats-table tbody tr:hover, .report-table tbody tr:hover { background: #fff4e8; }
.stats-table tr:last-child th, .stats-table tr:last-child td, .report-table tr:last-child td { border-bottom: 0; }
.stat-tip { border-bottom: 1px dotted rgba(255,255,255,.65); cursor: help; }
.sort-indicator::after { content: " ↕"; color: rgba(255,255,255,.5); }
th[aria-sort="ascending"] .sort-indicator::after { content: " ↑"; color: var(--orange); }
th[aria-sort="descending"] .sort-indicator::after { content: " ↓"; color: var(--orange); }
.player-link { text-decoration: none; }
.player-link:hover { color: var(--purple-accent); text-decoration: underline; }
.jersey-number { display: inline-block; min-width: 2.5rem; color: var(--orange); }
.status-badge, .pending, .strength-tag, .gwg-mark { display: inline-block; border-radius: 999px; font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.status-badge { margin-left: .35rem; padding: .15rem .4rem; color: #6b4e00; background: #fff1bd; }
.pending { padding: .15rem .45rem; color: #65521b; background: #fff4c7; }
.strength-tag { padding: .15rem .45rem; color: var(--deep-purple); background: #eee5f4; }
.gwg-mark { margin-left: .3rem; padding: .12rem .42rem; color: white; background: var(--orange); }
.empty-cell { padding: 2rem !important; color: var(--muted); text-align: center !important; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.game-card { display: flex; flex-direction: column; position: relative; background: white; border: 1px solid var(--line); border-top: .28rem solid var(--purple-accent); border-radius: .3rem; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.game-card__main { flex: 1; display: grid; gap: .45rem; padding: 1.1rem; text-decoration: none; }
.game-card__number { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.game-card h3 { padding-right: 4.5rem; color: var(--deep-purple); }
.game-card time { font-weight: 700; }
.game-card__event { color: var(--muted); font-size: .88rem; }
.result-pill { position: absolute; top: .8rem; right: .8rem; min-width: 3.8rem; padding: .25rem .5rem; color: white; background: var(--purple-accent); border-radius: .2rem; font-size: .8rem; font-weight: 850; text-align: center; }
.result-pill--w { background: #287a3f; }.result-pill--l { background: #a72d34; }.result-pill--t { background: #686d72; }
.replay-link { padding: .72rem 1.1rem; color: var(--purple-accent); background: #faf7fc; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 800; text-decoration: none; }
.replay-link:hover { color: var(--orange); }
.empty-state { grid-column: 1 / -1; padding: 2.5rem; color: var(--muted); background: #f8f9fa; border: 1px dashed #bdc2c7; border-radius: .3rem; text-align: center; }
.empty-state h3 { color: var(--deep-purple); }
.empty-state p { margin: .4rem 0 0; }
.page-banner { padding: 2.5rem 0; color: white; background: linear-gradient(110deg, var(--deep-purple), var(--purple-accent)); border-bottom: .3rem solid var(--orange); }
.page-banner h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.page-banner__detail { margin: .7rem 0 0; color: #ff9a32; font-size: 1.25rem; font-weight: 850; }
.game-overview { padding: clamp(1.1rem, 3vw, 2rem); }
.scoreboard { display: grid; grid-template-columns: 1fr auto auto auto 1fr; gap: 1rem; align-items: center; color: var(--deep-purple); text-align: center; }
.scoreboard span { font: clamp(1.25rem, 3vw, 2.2rem)/1 Impact, sans-serif; text-transform: uppercase; }
.scoreboard span:first-child { text-align: right; }.scoreboard span:last-child { text-align: left; }
.scoreboard strong { font: clamp(2.8rem, 7vw, 5rem)/1 Impact, sans-serif; }
.scoreboard em { padding: .25rem .45rem; color: white; background: var(--charcoal); border-radius: .2rem; font-size: .7rem; font-style: normal; font-weight: 850; letter-spacing: .1em; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0 0; border-top: 1px solid var(--line); }
.detail-grid div { padding: 1rem 1rem 0; }
.detail-grid dt { color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.detail-grid dd { margin: .2rem 0 0; font-weight: 700; }
.button { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1.4rem; padding: .72rem 1rem; border: 0; border-radius: .25rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.button--replay { color: white; background: var(--orange); }
.report-table { min-width: 760px; }
.report-table thead th { text-align: left; }
.report-table td { text-align: left; white-space: normal; }
.gwg-row { box-shadow: inset .25rem 0 var(--orange); }
.report-callout { margin: 1rem 0 0; padding: .8rem 1rem; color: var(--deep-purple); background: #faf6fc; border-left: .25rem solid var(--orange); }
.summary-panel { padding: clamp(1.25rem, 3vw, 2rem); color: white; background: var(--purple-accent); border-color: var(--purple-accent); }
.summary-panel h2 { color: white; }
.summary-panel > p:last-child { max-width: 850px; margin-bottom: 0; font-size: 1.05rem; line-height: 1.7; }
.profile-hero { padding: 3rem 0; color: white; background: var(--deep-purple); border-bottom: .35rem solid var(--orange); }
.profile-hero__grid { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 2.5rem; }
.profile-photo { aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; color: white; background: var(--purple-accent); border: .35rem solid var(--orange); box-shadow: var(--shadow); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo span { font: 4rem/1 Impact, sans-serif; }
.profile-meta { margin: 1rem 0 0; color: #ffad59; font-size: 1.15rem; }
.profile-bio { max-width: 720px; color: rgba(255,255,255,.85); }
.compact-game-list { display: grid; gap: .5rem; }
.compact-game-list > a { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border: 1px solid var(--line); border-left: .25rem solid var(--purple-accent); text-decoration: none; }
.compact-game-list > a:hover { background: #fff7ef; border-left-color: var(--orange); }
.compact-game-list span { display: grid; }.compact-game-list span:last-child { text-align: right; }
.compact-game-list small { color: var(--muted); }
.site-footer { padding: 1.5rem 0; color: rgba(255,255,255,.75); background: var(--charcoal); border-top: .25rem solid var(--orange); }
.site-footer .shell { display: flex; justify-content: space-between; gap: 1rem; }
@media (max-width: 850px) {
    .season-hero__grid { grid-template-columns: 1fr; gap: 2rem; }
    .record-card { width: min(100%, 390px); }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .site-header__inner { align-items: flex-start; flex-direction: column; gap: .6rem; padding-block: .8rem; }
    .brand__logo { width: 52px; height: 52px; }
    nav { width: 100%; justify-content: space-between; }
    nav a { flex: 1; text-align: center; }
    .season-hero__grid { min-height: 0; padding-block: 2.5rem; }
    .record-card div { padding: .8rem .4rem; }.record-card dd { font-size: 1.85rem; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .game-grid { grid-template-columns: 1fr; }
    .scoreboard { grid-template-columns: 1fr auto auto auto 1fr; gap: .45rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .profile-hero__grid { grid-template-columns: 110px 1fr; gap: 1.25rem; }
    .profile-photo { border-width: .2rem; }
    .compact-game-list > a { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (max-width: 620px) and (orientation: portrait) {
    .stats-table .col-position,
    .stats-table .col-p_gp,
    .stats-table .col-ppp,
    .stats-table .col-otg,
    .stats-table .col-gwg,
    .stats-table .col-ppg { display: none; }
    .stats-table { min-width: 0; width: 100%; table-layout: auto; font-size: .85rem; }
    .stats-table th, .stats-table td { padding: .55rem .4rem; }
    .stats-table .jersey-number { min-width: 1.9rem; }
    .stats-table .col-gaa,
    .stats-table .col-savepct { display: none; }
    .report-table { min-width: 0; width: 100%; table-layout: auto; font-size: .85rem; }
    .report-table th, .report-table td { padding: .5rem .4rem; }
    .report-table .col-onice { display: none; }
}
