/* The Stats tab of a recorded hockey game (drawn by hockey-stats.js). --home and --away are the teams'
   colours, set on .hks. */
.hks { display: grid; gap: 1.6rem; margin-top: 1.25rem; }
.hks-loading { padding: 3rem; text-align: center; color: var(--text-muted); }
.hks-kicker { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hks-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); padding: 16px 18px; min-width: 0; }
.hks-card-head { display: flex; align-items: center; gap: 8px; margin: -2px 0 12px; font-weight: 800; }
.hks-card-head::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hks-empty { color: var(--text-muted); font-size: .85rem; margin: .5rem 0; }
.hks-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .hks-two { grid-template-columns: 1fr; } }

/* hero */
.hks-hero { position: relative; overflow: hidden; padding: 22px 22px 18px; border-radius: var(--radius-lg, 14px); border: 1px solid var(--border);
    background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--home) 26%, transparent), transparent 55%),
                radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--away) 26%, transparent), transparent 55%), var(--bg-card); }
.hks-hero h2 { margin: 4px 0 4px; font-size: 1.6rem; }
.hks-hero p { margin: 0; color: var(--text-secondary); font-size: .9rem; max-width: 640px; }
.hks-teams { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 10px; font-weight: 800; }
.hks-teams span { display: flex; align-items: center; gap: 8px; }
.hks-teams span::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.hks-teams span:last-child { flex-direction: row-reverse; }
.hks-teams span:last-child img { order: -1; }
.hks-teams img { width: 26px; height: 26px; object-fit: contain; }
.hks-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .hks-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hks-kpi { padding: 12px 14px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--border); }
.hks-kpi-label { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.hks-kpi-nums { display: flex; justify-content: space-between; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.hks-kpi-nums b { font-size: 1.7rem; line-height: 1; }
.hks-kpi-nums small { font-size: .55em; margin-left: 1px; opacity: .7; }
.hks-kpi-nums .h { color: color-mix(in srgb, var(--home) 70%, var(--text)); }
.hks-kpi-nums .a { color: color-mix(in srgb, var(--away) 70%, var(--text)); }

/* split bars, which grow in */
.hks-split { display: flex; gap: 3px; height: 7px; }
.hks-split b { display: block; height: 100%; border-radius: 4px; min-width: 3px; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.hks-split b:first-child { background: var(--home); }
.hks-split b:last-child { background: var(--away); }
.is-in .hks-split b { width: var(--w); }

/* sections */
.hks-sec-head { margin-bottom: 12px; }
.hks-sec-head h2 { margin: 3px 0 4px; font-size: 1.3rem; }
.hks-sec-head p { margin: 0; color: var(--text-secondary); font-size: .88rem; max-width: 760px; }
.hks-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hks-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.hks-chip:hover { color: var(--text); border-color: var(--border-light); }
.hks-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hks-legend2 { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .75rem; font-weight: 800; }
.hks-legend2 span { display: flex; align-items: center; gap: 6px; }
.hks-legend2 span::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }

/* home vs away rows */
.hks-vs { display: grid; grid-template-columns: 58px 1fr 58px; gap: 12px; align-items: center; padding: 7px 0; }
.hks-vs + .hks-vs { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.hks-vs-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.hks-vs-v:last-child { text-align: right; }
.hks-vs-label { text-align: center; font-size: .78rem; color: var(--text-secondary); margin-bottom: 5px; }
.hks-vs-label i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-size: .62rem; font-style: normal; font-weight: 800; background: var(--bg-hover); color: var(--text-muted); cursor: help; }

/* rinks */
.hks-rink-card { padding: 10px; display: flex; align-items: center; }
.hks-rink { display: block; width: 100%; height: auto; }
.hks-sheet { fill: color-mix(in srgb, #dbe7f3 92%, var(--home) 8%); stroke: #94a3b8; stroke-width: .18; }
.hks-lines line, .hks-line-circle { stroke-width: .14; fill: none; }
.hks-line-blue { stroke: #2563eb; opacity: .75; }
.hks-line-red { stroke: #dc2626; opacity: .7; }
.hks-line-goal { stroke: #dc2626; opacity: .45; stroke-width: .08 !important; }
.hks-line-circle { stroke: #dc2626; opacity: .45; }
.hks-dz { fill: rgba(234, 88, 12, .1); stroke: rgba(234, 88, 12, .55); stroke-width: .1; stroke-dasharray: .4 .3; }
.hks-net { fill: #334155; }
.hks-zone { stroke: none; }
.hks-zone-pct { font-size: 2.4px; font-weight: 800; text-anchor: middle; fill: #0f172a; }
.hks-zone-sub { font-size: .85px; font-weight: 700; text-anchor: middle; fill: #334155; text-transform: uppercase; letter-spacing: .05px; }
.hks-dot { stroke-width: .12; cursor: pointer; }
.hks-x { stroke-width: .22; stroke-linecap: round; cursor: pointer; }
.hks-star { stroke: #fff; stroke-width: .1; cursor: pointer; }
.hks-pass { stroke-width: .14; opacity: .7; cursor: pointer; }
.hks-pass:hover, .hks-link:hover { opacity: 1; stroke-width: .3; }
.hks-map-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.hks-map-ctl .hks-chips { margin-bottom: 6px; }
.hks-select { background: var(--bg-input, var(--bg-card)); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .8rem; margin-bottom: 6px; }
.hks-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; cursor: pointer; }
.hks-map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--text-secondary); }
.hks-map-legend span { display: flex; align-items: center; gap: 6px; }
.hks-map-legend span[style]::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.hks-map-legend .hks-key { font-weight: 600; color: var(--text-muted); }

/* game flow */
.hks-flow { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); padding: 8px; }
.hks-flow-svg { display: block; width: 100%; height: auto; }
.hks-flow-line { fill: none; stroke: var(--text); stroke-width: 1.4; opacity: .55; vector-effect: non-scaling-stroke; }
.hks-flow-mid { stroke: var(--border-light); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hks-flow-period { stroke: var(--text-muted); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hks-flow-label { font-size: 11px; font-weight: 700; fill: var(--text-muted); }
.hks-flow-hit { fill: transparent; }
.hks-flow-hit:hover { fill: color-mix(in srgb, var(--text) 7%, transparent); }
.hks-flow-goal { cursor: pointer; }
.hks-flow-goal-stem { stroke-width: 1.5; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.hks-flow-goal-g { font-size: 10px; font-weight: 900; fill: #fff; text-anchor: middle; }


/* passing networks */
.hks-net-card { display: flex; flex-direction: column; }
.hks-link { stroke-linecap: round; opacity: .65; cursor: pointer; }
.hks-node { cursor: pointer; }
.hks-node-name { font-size: .78px; font-weight: 800; text-anchor: middle; fill: #0f172a; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: .25; }
.hks-mini { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 10px; }
.hks-mini span { display: flex; flex-direction: column; font-size: .74rem; color: var(--text-muted); }
.hks-mini b { font-size: 1.25rem; color: var(--text); font-variant-numeric: tabular-nums; }

/* gauges (danger zone, face-offs) */
.hks-gauge { width: 132px; height: 132px; flex-shrink: 0; }
.hks-gauge-bg { fill: none; stroke: var(--bg-hover); stroke-width: 10; }
.hks-gauge-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1s; }
.hks-gauge-num { font-size: 18px; font-weight: 900; text-anchor: middle; fill: var(--text); }
.hks-gauge-sub { font-size: 8px; font-weight: 700; text-anchor: middle; fill: var(--text-muted); text-transform: uppercase; }
.hks-dz-row { display: flex; gap: 18px; align-items: center; }
.hks-dz-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: .8rem; color: var(--text-secondary); flex: 1; }
.hks-dz-list b { display: block; font-size: 1.2rem; color: var(--text); }
.hks-dz-top { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-secondary); }
.hks-dz-top span { font-weight: 800; color: var(--text); }
@media (max-width: 480px) { .hks-dz-row { flex-direction: column; } }

/* leaderboards */
.hks-board-note { margin: 0 0 8px; font-size: .78rem; color: var(--text-muted); }
.hks-lb { display: grid; grid-template-columns: 18px 24px minmax(70px, 130px) 1fr 40px; gap: 10px; align-items: center; padding: 5px 0; }
.hks-lb img, .hks-fo-row img, .hks-pcard-head img { border-radius: 4px; image-rendering: pixelated; }
.hks-lb-rank { font-size: .75rem; font-weight: 800; color: var(--text-muted); text-align: right; }
.hks-lb-name { font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hks-lb-bar, .hks-fo-bar { height: 8px; border-radius: 4px; background: var(--bg-hover); overflow: hidden; }
.hks-lb-bar b, .hks-fo-bar b { display: block; height: 100%; border-radius: 4px; width: var(--w); }
.hks-lb-v { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* face-offs and special teams */
.hks-fo { display: flex; gap: 18px; align-items: center; }
.hks-fo .hks-gauge circle { transition: stroke-dasharray 1s; }
.hks-fo-list { flex: 1; min-width: 0; }
.hks-fo-row { display: grid; grid-template-columns: 22px minmax(60px, 120px) 1fr 40px; gap: 10px; align-items: center; padding: 4px 0; font-size: .85rem; font-weight: 700; }
.hks-fo-wl { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .hks-fo { flex-direction: column; align-items: stretch; } .hks-fo .hks-gauge { align-self: center; } }
.hks-st { display: grid; gap: 14px; align-content: start; }
.hks-st-team .hks-card-head { margin-bottom: 4px; }
.hks-st-none { display: grid; place-content: center; text-align: center; height: 100%; min-height: 140px; }
.hks-st-none p { margin: 6px auto 0; max-width: 360px; font-size: .84rem; color: var(--text-muted); }

/* player cards */
.hks-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hks-pcard { position: relative; overflow: hidden; padding: 14px; border-radius: var(--radius-lg, 14px); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, var(--bg-card)), var(--bg-card) 45%); border: 1px solid var(--border); border-top: 3px solid var(--c); }
.hks-pcard-head { display: flex; align-items: center; gap: 10px; }
.hks-pcard-name { font-weight: 800; }
.hks-pcard-team { font-size: .75rem; color: var(--text-muted); }
.hks-rating { margin-left: auto; min-width: 42px; padding: 4px 8px; border-radius: 8px; font-size: .95rem; font-weight: 900; }
.hks-radar { display: block; width: 100%; max-width: 220px; margin: 6px auto 0; }
.hks-radar-ring { fill: none; stroke: var(--border); stroke-width: .6; }
.hks-radar-axis { stroke: var(--border); stroke-width: .5; }
.hks-radar-label { font-size: 6px; font-weight: 700; fill: var(--text-muted); text-anchor: middle; }
.hks-radar-shape { fill-opacity: .3; stroke-width: 1.4; stroke-linejoin: round; }
.hks-radar circle { cursor: pointer; }
.hks-pcard-nums { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; }
.hks-pcard-nums span { display: flex; flex-direction: column; align-items: center; font-size: .66rem; color: var(--text-muted); }
.hks-pcard-nums b { font-size: 1.05rem; color: var(--text); }

/* tooltip, notes, the tables underneath */
.hks-tip { position: fixed; z-index: 400; max-width: 280px; padding: 7px 10px; border-radius: 8px; background: #0b1220; color: #e2e8f0; font-size: .78rem; line-height: 1.4; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.hks-tip small { color: #94a3b8; }
.hks-foot { margin: 1rem 0 0; text-align: center; font-size: .82rem; color: var(--text-muted); }
.hks-all { margin-top: 1.6rem; }
.hks-map-ctl .hks-select { width: auto; }
.hks-map-ctl .hks-toggle { text-transform: none; letter-spacing: 0; }
.hks-zone-sub { font-size: .75px; }
