/* Stacked Analytics: dashboard styles. */
:root, [data-theme='light'] {
  /* ice: cool whites and greys, the accent (named gold for its old colour) an ice blue */
  --bg1: #ffffff; --bg2: #f1f5f9; --bg3: #e5ecf2;
  --fg1: #0f1720; --fg2: #55616d; --fg3: #84919d;
  --border: #dbe3ea;
  --accent: #1b84c2; --accent-soft: rgba(27, 132, 194, 0.12);
  --gold: #1f7fbf; --gold-soft: rgba(31, 127, 191, 0.13); --on-gold: #ffffff;
  --good: var(--accent);   /* a number better than expected */
  --danger: #b8412e; --danger-soft: rgba(184, 65, 46, 0.12);
  --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08);
  --away: var(--chart-1); --home: var(--chart-2);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  /* tiers, and every percentile colour (meters, Stacked Score rings): Elite a lighter green, High a deeper green, Mid yellow, Low orange, Poor red. Deep enough to read on white here, lifted for
     the dark theme below */
  --t-elite: #2fb84a; --t-high: #0b5e2a; --t-mid: #a87b00; --t-low: #cf6414; --t-poor: #c8392b;   /* on white, Elite a bright green and High a deep one (as in the dark theme), far enough apart to tell even as small dots */
  --luck-high: #d9480f; --luck-low: #1971c2;   /* luck running high or low: the hot and cold streak colours */
  --shot-goal: #f2590c; --shot-miss: #1a9e8a;   /* shot maps and their legends */
  --hover-bg: rgba(0, 0, 0, .06);   /* a button under the pointer */
}
[data-theme='light'] { --gold: #1f7fbf; --gold-soft: rgba(31, 127, 191, 0.13); --accent: #1b84c2; --accent-soft: rgba(27, 132, 194, 0.12); --on-gold: #ffffff; }
[data-theme='dark'] {
  --gold: #7cc8f0; --accent: #5ab8ea; --on-gold: #0b1219;
  --bg1: #0b1219; --bg2: #111a23; --bg3: #16212c;
  --fg1: #e8eef3; --fg2: #b5c2ce; --fg3: #8c9aa8;   /* explanations (fg2, fg3) lifted so they read on the dark background */
  --border: #1f2c38;
  --ring-disc: #15283a;   /* the Stacked Score badge: a navy with the site's blue in it, not black */
  --accent-soft: rgba(90, 184, 234, 0.16); --gold-soft: rgba(124, 200, 240, 0.15); --danger-soft: rgba(184, 65, 46, 0.2);
  --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439);
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --t-elite: #86efac; --t-high: #16a34a; --t-mid: #e6c13f; --t-low: #f08c3c; --t-poor: #f0645a;
  --luck-high: #ff922b; --luck-low: #74c0fc;
  --shot-goal: #ff8a3d; --shot-miss: #2bbf9e;
  --hover-bg: rgba(255, 255, 255, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: 0; -webkit-font-smoothing: antialiased;
  background: var(--bg1); color: var(--fg1); font-size: 14px;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* the public preview's banner, under the top bar */
#page-scroll { display: contents; }   /* a computer: as if it weren't there (a phone: the part that scrolls, below) */
.preview-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px;
  background: var(--gold-soft); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--fg1); text-align: center; }
.preview-bar .btn { height: 30px; }
.preview-ctas { display: inline-flex; gap: 8px; }
@media (min-width: 721px) { .preview-bar { flex-wrap: nowrap; } .preview-ctas { flex: none; } }
/* the preview's Sign In, in the top bar after the tabs: on a computer its middle at the screen's middle (the page sets
   its left margin), else just past the tabs */
.top .nav-signin { flex: none; height: 34px; padding: 0 16px; font-weight: 600; }
@media (max-width: 720px) { .top .nav-signin { margin-left: auto; height: 32px; padding: 0 12px; } .top .nav-signin + .top-right { margin-left: 0; } }   /* a phone: beside the theme switch, the tabs along the bottom */
a.btn { text-decoration: none; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 24px;
  background: #0b1219; border-bottom: 1px solid #1f2c38; color: #e8eef3; }
.top .brand-mark { color: #e8eef3; }
.top .chip-muted { background: #16212c; color: #6b7885; }
.top .seg { background: #16212c; } .top .seg button { color: #a3b0bc; } .top .seg button:hover { color: #e8eef3; }
.top .seg button:hover:not([data-active='true']):not(:disabled) { background: none; }   /* the header nav keeps its own hover: lighter text, no fill */
.top .seg button[data-active='true'] { background: #0b1219; color: #e8eef3; }
.top .status { color: #6b7885; }
.theme-toggle { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  color: #a3b0bc; transition: color .2s, transform .18s ease-out; }
.theme-toggle:hover { color: #e8eef3; transform: translateY(-1px); }
.theme-toggle:active { transform: scale(.99); }
.theme-toggle svg { animation: icon-in .3s cubic-bezier(.16, 1, .3, 1) both; }
.theme-toggle svg.moon { animation-name: icon-in-moon; }
@keyframes icon-in { from { transform: rotate(-90deg) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes icon-in-moon { from { transform: rotate(90deg) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.theme-toggle .ray { stroke-dasharray: 2; stroke-dashoffset: 2; animation: ray .25s ease forwards; }
@keyframes ray { to { stroke-dashoffset: 0; } }
.brand { display: flex; align-items: center; gap: 10px; position: relative; isolation: isolate; }
/* behind the logo, the Home banner's lift: a lighter navy that fades into the bar, so the lit puck reads on it */
.brand::before { content: ''; position: absolute; z-index: -1; left: -24px; right: -24px; top: 50%; height: 64px; transform: translateY(-50%); pointer-events: none;
  background: radial-gradient(closest-side, #1c3247, rgba(23, 41, 58, .6) 55%, transparent); }
.brand-mark { font-weight: 600; font-size: 15px; }
.brand-logo { height: 45px; width: auto; margin: -3px 0 -6px; display: block; flex: none; }   /* the Home logo, its puck shadow hanging below the wordmark's line */
.brand-logo.logo-l { display: none; }   /* the dark-lettering logo, for the light header on a phone */   /* the logo (puck and wordmark), sized to sit inside the bar without clipping */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status { font-size: 12px; color: var(--fg3); display: inline-flex; align-items: center; gap: 6px; }

/* Segmented control, buttons, chips */
.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg3); border-radius: 8px; }
.seg button { padding: 5px 12px; font-size: 13px; font-weight: 500; border-radius: 6px; color: var(--fg2); transition: color .15s, background .15s; }
.seg button:hover:not([data-active='true']):not(:disabled) { background: var(--hover-bg); }   /* hover lights the button, not its text */
.seg button[data-active='true'] { background: var(--bg1); color: var(--fg1); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.seg button:disabled { opacity: .4; cursor: default; }   /* a span with no games for this player or club */
/* a card's tabs, then its season and span, on one line: a thin rule between them (on a phone they wrap, with no rule) */
.toolbar.card-tools { flex-wrap: nowrap; }
.bar-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }
@media (max-width: 900px) { .toolbar.card-tools { flex-wrap: wrap; } .bar-sep { display: none; } }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: var(--bg3); border: 1px solid var(--border); transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg2); }
.btn-ghost:hover { background: var(--hover-bg); }
.icon { width: 32px; padding: 0; justify-content: center; }
.chip { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip-muted { background: var(--bg3); color: var(--fg3); font-weight: 500; }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-hot { background: color-mix(in srgb, #e8590c 16%, transparent); color: #d9480f; }   /* a hot streak: luck and finishing running high */
.chip-cold { background: color-mix(in srgb, #1c7ed6 16%, transparent); color: #1971c2; }  /* a cold streak */
[data-theme='dark'] .chip-hot { color: #ffc078; background: color-mix(in srgb, #ff922b 26%, transparent); } [data-theme='dark'] .chip-cold { color: #a5d8ff; background: color-mix(in srgb, #4dabf7 26%, transparent); }   /* brighter on the navy, where a deep blue sank in */
.chip-good { background: color-mix(in srgb, #d4a017 18%, transparent); color: #a8790a; }   /* winning with the play to match: gold */
.chip-bad { background: color-mix(in srgb, #5c940d 18%, transparent); color: #4d7c0f; }   /* losing and earning it: stink green */
[data-theme='dark'] .chip-good { color: #fcc419; } [data-theme='dark'] .chip-bad { color: #94d82d; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.dot.live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 101, .55); } 50% { box-shadow: 0 0 0 5px rgba(31, 138, 101, 0); } }
select, input[type=search] { font: inherit; font-size: 13px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--fg1); }
/* every dropdown looks the same closed (the filters panel's too) with one chevron; on a computer it opens the site's menu */
select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select.dd-open { border-color: var(--fg3); }
/* dark: every closed drop-down, search box and the month picker in a deeper shade of the tooltips' slate, with a softer ice edge */
[data-theme='dark'] select, [data-theme='dark'] input[type=search] { background-color: #142029; border-color: rgba(124, 200, 240, .22); color: #c4d1dc; }
[data-theme='dark'] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a9c4d8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
[data-theme='dark'] input[type=search]::placeholder { color: #8fa3b5; }
[data-theme='dark'] .month-nav { background: #142029; box-shadow: inset 0 0 0 1px rgba(124, 200, 240, .22); }
[data-theme='dark'] .month-nav button { color: #c4d1dc; }
[data-theme='dark'] .month-nav select { background: #1c2b3a; background-image: none; color: #e8eef3; }
/* a drop-down under the pointer: a slight ice-blue edge and wash */
select:hover:not(:disabled) { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); transition: border-color .15s, box-shadow .15s; }
.month-nav select:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent), 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), 0 1px 2px rgba(0, 0, 0, .12); }
.dd-menu { position: fixed; z-index: 120; overflow-y: auto; padding: 5px; border-radius: 12px; background: var(--bg1);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .12), 0 8px 10px -6px rgba(0, 0, 0, .1); }
/* on the dark theme the open menu matches the tooltips: a lighter navy, an ice edge, brighter text */
[data-theme='dark'] .dd-menu { background: #1c2b3a; border-color: rgba(124, 200, 240, .35); color: #d3dee8;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5), 0 8px 10px -6px rgba(0, 0, 0, .5); }
[data-theme='dark'] .dd-item { color: #d3dee8; }
[data-theme='dark'] .dd-item:hover { background: rgba(124, 200, 240, .14); color: #ffffff; }
[data-theme='dark'] .dd-item[aria-selected='true'] { color: #ffffff; }
[data-theme='dark'] .dd-group { color: #9fb3c4; }
.dd-item { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 0 12px 0 6px; border: 0; border-radius: 8px;
  background: none; color: var(--fg1); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; cursor: pointer; }
.dd-item:hover { background: var(--bg3); }
.dd-item[aria-selected='true'] { font-weight: 600; }
.dd-item:disabled { color: var(--fg3); cursor: default; }
.dd-check { width: 16px; text-align: center; color: var(--accent); }
.dd-group { padding: 8px 12px 4px 28px; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--fg3); }
input[type=search] { width: 200px; }

/* Layout */
main { padding: 20px 24px 40px; max-width: 1480px; margin: 0 auto; }
/* every page's header: the title and its line, then the toolbar under them, in the same place on every page (it
   used to sit beside the title when there was room, so it jumped up on pages with a short subtitle, like Goalies) */
.section-head { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 4px 0 14px; }
.section-head > .toolbar { justify-content: flex-start; }
.h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.8px; font-weight: 500; margin: 0; }
/* the (i) is on the word. A stretched heading would make the whole row the hover and focus target. */
h2.sub-tip, .h2.sub-tip { width: fit-content; max-width: 100%; }
.sub { font-size: 13px; color: var(--fg3); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adv-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 0 4px; width: 100%; border-top: 1px solid var(--border); margin-top: 8px; }
.adv-filters[hidden], .adv-filters[style*="display:none"] { display: none !important; }
.af-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--fg3); min-width: 110px; }
.af-field span { font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.af-field input { min-width: 110px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--fg1); font-size: 13px; }
.af-field select { min-width: 110px; }   /* the filters' dropdowns as every other on the site */
.af-note { flex: 1 1 220px; margin: 0 0 2px; font-size: 12px; color: var(--fg3); align-self: center; }
#adv-toggle[data-active='true'] { background: var(--bg3); }
.empty { padding: 40px; text-align: center; color: var(--fg3); border: 1px dashed var(--border); border-radius: 12px; }
.empty code { font-family: 'Geist Mono', monospace; color: var(--fg2); }
.fade { animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Cards */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.title { font-size: 15px; font-weight: 600; line-height: 1.2; }

/* Picks strip */

/* Game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.game { cursor: pointer; transition: transform .15s, border-color .15s; }
.game:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--fg3) 40%, var(--border)); }
.game[data-open='true'] { border-color: var(--gold); }
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 16px 6px; gap: 8px; }
.team { display: flex; align-items: center; gap: 10px; }
.team.home { justify-content: flex-end; text-align: right; }
.team img { width: 40px; height: 40px; }
.team .ab { font-weight: 600; font-size: 16px; }
.team .nm { font-size: 12px; color: var(--fg3); }
.big { font-size: 32px; font-weight: 500; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.mid { text-align: center; }
.mid .state { font-size: 12px; color: var(--fg2); display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.bars { padding: 8px 16px 4px; display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 44px 1fr 118px 1fr 44px; align-items: center; gap: 8px; font-size: 12px; }
.bar .v { font-family: 'Geist Mono', monospace; color: var(--fg1); }
.bar .v.r { text-align: right; }
.bar .lab { text-align: center; color: var(--fg3); white-space: nowrap; }
.bt { height: 8px; display: flex; }
.bt.l { justify-content: flex-end; }
.bt i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.bt.l i { background: var(--away); } .bt.r i { background: var(--home); }
.bars { position: relative; }
.bar { border-radius: 6px; padding: 1px 0; }
.bar:hover { background: color-mix(in srgb, var(--fg3) 12%, transparent); }
.flow { padding: 6px 8px 0; }
.flow-legend { display: flex; justify-content: space-between; padding: 0 12px 10px; font-size: 11px; color: var(--fg3); }
/* shadcn chart container, tooltip and legend */
.chart { position: relative; font-size: 12px; }
.chart-svg { width: 100%; height: 150px; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart .tick { fill: var(--fg3); font-size: 11px; font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif; }
.chart .ln { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .ln.away { stroke: var(--away); } .chart .ln.home { stroke: var(--home); }
.chart .dot { stroke: var(--bg2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .dot.away { fill: var(--away); } .chart .dot.home { fill: var(--home); }
.chart .cursor { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* xG flow: labels and goal dots are HTML over the stretched SVG, so they keep their shape at any card width */
.fl-y, .fl-x { position: absolute; color: var(--fg3); font-size: 11px; line-height: 1; white-space: nowrap; pointer-events: none; font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif; }
.fl-y { transform: translate(-100%, -50%); }
.fl-x { bottom: 4px; transform: translateX(-50%); }
.fl-goal { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; z-index: 2;
  background: var(--away); box-shadow: 0 0 0 2px var(--bg2), 0 0 0 3.5px var(--fg1); transition: transform .15s ease; }
.fl-goal::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }   /* a bigger target for a finger */
.fl-goal:hover, .fl-goal:focus-visible { transform: translate(-50%, -50%) scale(1.45); outline: none; }
.fl-goal.home { background: var(--home); }
/* each flow line's club at its right end, in its colour (text in the away club's full colour, not the tint) */
.fl-end { position: absolute; font-size: 11px; font-weight: 700; line-height: 1; pointer-events: none; white-space: nowrap; transform: translate(-100%, -130%);
  text-shadow: 0 0 3px var(--bg2), 0 0 3px var(--bg2); }
.fl-end.down { transform: translate(-100%, 40%); }
.fl-end.away { color: var(--away-ink, var(--away)); } .fl-end.home { color: var(--home); }
.bar-head { font-weight: 700; padding-bottom: 2px; }
.bar-head:hover { background: none; }
.gsheet .flowchart .chart-svg { height: 240px; }   /* the game sheet is wide; a taller chart keeps the lines from flattening */
.chart-tip { position: absolute; top: 6px; z-index: 5; display: grid; gap: 6px; min-width: 8rem; padding: 6px 10px; border-radius: 8px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent); background: var(--bg1); font-size: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1); }
[data-theme='dark'] .chart-tip { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5), 0 8px 10px -6px rgba(0, 0, 0, .5); }
/* stat definitions (data-info): one tooltip, the same card style, above everything including the player card */
.info-tip { position: fixed; z-index: 100; max-width: 300px; padding: 8px 11px; border-radius: 8px; pointer-events: none; font-size: 12px; line-height: 1.45;
  color: var(--fg2); background: var(--bg1); border: 1px solid color-mix(in srgb, var(--border) 50%, transparent); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1); }
/* on the dark theme the tooltip is a lifted, lighter navy with an ice edge and brighter text, so it stands off the tables */
[data-theme='dark'] .info-tip { color: #d3dee8; background: #1c2b3a; border-color: rgba(124, 200, 240, .35);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5), 0 8px 10px -6px rgba(0, 0, 0, .5); }
[data-theme='dark'] .info-tip b { color: #ffffff; }
.info-tip b { display: block; color: var(--fg1); font-weight: 600; margin-bottom: 3px; }
[data-info] { cursor: pointer; outline: none; }   /* the pointing hand, as on any button */
/* a heading's tooltip opens on its words only, not the empty width beside them */
h2[data-info], .h2[data-info], .title[data-info] { width: fit-content; max-width: 100%; }
/* a keyboard or TV remote: a ring that shows where it is (a mouse click shows none) */
[data-info]:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
/* a dropdown: no green ring once it's been tapped or clicked, just its border darkening (TV mode keeps its ring, below) */
select:focus, select:focus-visible { outline: none; }
select:focus-visible { border-color: var(--fg3); }
.radar text[data-info]:hover { fill: var(--fg1); }
.ring[data-info]:focus-visible, .tier[data-info]:hover { outline: 1px solid var(--border); outline-offset: 2px; border-radius: 999px; }
.tt-label { font-weight: 500; color: var(--fg1); }
.tt-row { display: flex; align-items: center; gap: 8px; line-height: 1; }
.tt-row i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.tt-row span { color: var(--fg3); flex: 1; }
.tt-row b { font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; color: var(--fg1); font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 12px 14px; font-size: 12px; color: var(--fg2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }

/* Detail */
.detail { grid-column: 1 / -1; }
.detail .card-head .sub b { color: var(--fg1); font-weight: 500; }
.tbl-wrap { overflow-x: auto; }
/* above a wide table: its top scroll bar, and the copy of its header row that stays under the site's top bar */
.tbl-sticky { position: sticky; top: var(--top-h, 64px); z-index: 5; }
.tbl-top { overflow-x: auto; overflow-y: hidden; background: var(--bg2); }   /* as tall as the browser's own scroll bar */
.tbl-top > div { height: 1px; }
.tbl-top[hidden], .tbl-float[hidden] { display: none; }
.tbl-float { position: absolute; left: 0; right: 0; top: 100%; overflow: clip; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .35); }
.tbl-float table { table-layout: fixed; }
.modal .tbl-sticky { top: 0; }   /* in a card, the sheet scrolls: stay at its top */
tr.tbl-more td { text-align: center; padding: 10px; }
tr.tbl-more .btn { margin: 0 auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; z-index: 1; background: var(--bg2); padding: 8px 10px; font-size: 11px; font-weight: 500; color: var(--fg3);
  text-align: center; white-space: nowrap; border-bottom: 1px solid var(--border); user-select: none; }
.t th.sortable { cursor: pointer; } .t th[data-sorted] { color: var(--fg1); } .t th.sortable:hover { background-color: color-mix(in srgb, var(--fg3) 14%, var(--bg2)); }
.t th.l, .t td.l { text-align: left; }
.t td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border); color: var(--fg2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: var(--bg3); }
.t tbody tr.dim td { color: var(--fg3); }
.t tbody tr.dim .n { color: var(--fg2); }
.t .sec td { background: var(--bg1); color: var(--fg1); text-align: left; font-weight: 600; font-size: 12px; padding: 7px 12px; }
.t .sec td span { color: var(--fg3); font-weight: 400; margin-left: 6px; }
.who { display: flex; align-items: center; gap: 10px; }
.who img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; object-position: top; background: var(--bg3); flex: none; }
.who .n { color: var(--fg1); font-weight: 500; }
.who .m { font-size: 11px; color: var(--fg3); }
.x { color: var(--fg1); font-weight: 500; }
.x small { color: var(--fg3); font-weight: 400; margin-left: 3px; font-size: 11px; }
.x.up { color: var(--good); } .x.down { color: var(--danger); }
.pos { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 5px;
  font-size: 10px; font-weight: 600; color: #fff; }
.pos-C { background: #3d6fb4; } .pos-L { background: #2f8f6a; } .pos-R { background: #8a5cb8; } .pos-D { background: #b86a2e; } .pos-G { background: #6b7885; }

/* Season */
.cell { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.cell .val { color: var(--fg1); font-weight: 500; }
.cell .val.up { color: var(--good); } .cell .val.down { color: var(--danger); }
.cell .rk { font-size: 10px; color: var(--fg3); }
.tier { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }
.tier-Elite { --tc: var(--t-elite); } .tier-High { --tc: var(--t-high); } .tier-Mid { --tc: var(--t-mid); } .tier-Low { --tc: var(--t-low); } .tier-Poor { --tc: var(--t-poor); }
.tier-NA { --tc: var(--fg3); }   /* a stat with nothing in it yet */
/* luck isn't graded: running high is a warning (it tends to come down), running low tends to bounce back */
.tier-LuckHigh { --tc: var(--luck-high); } .tier-LuckMid { --tc: var(--fg3); } .tier-LuckLow { --tc: var(--luck-low); }
/* on the dark theme, the luck tags as bright as the Hot and Cold tags */
[data-theme='dark'] .tier.tier-LuckHigh { color: #ffc078; background: color-mix(in srgb, #ff922b 26%, transparent); }
[data-theme='dark'] .tier.tier-LuckLow { color: #a5d8ff; background: color-mix(in srgb, #4dabf7 26%, transparent); }
.tier { color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, transparent); }
.rk-pill { margin-top: 2px; }   /* a table cell's tier, under its number */
.cell[data-info] { cursor: default; }
/* the player and comparison banners are dark in both themes, so the Stacked Score rings on them take the lifted colours */
.hero:not(.hero-light), .cmp-hero { --t-elite: #86efac; --t-high: #22c55e; --t-mid: #e6c13f; --t-low: #f08c3c; --t-poor: #f0645a; }
.legend { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--fg3); flex-wrap: wrap; }

.foot { padding: 20px 24px 32px; font-size: 12px; color: var(--fg3); text-align: center; border-top: 1px solid var(--border); }


/* Clickable player names */
.link { padding: 0; font: inherit; color: var(--fg1); font-weight: 500; text-align: left; cursor: pointer; }
.link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Predictions */
.pred { padding: 4px 16px 6px; }
.pred-top { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.pred-top span:last-child { text-align: right; }
.wp { display: flex; height: 8px; gap: 2px; }
.wp.big { height: 10px; }
.wp i { display: block; height: 100%; border-radius: 4px; }
.pred-sub { text-align: center; font-size: 12px; color: var(--fg3); margin: 6px 0 2px; }
.pred .bars { padding: 6px 0 4px; }
.pred-form { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--fg3); padding: 4px 0 2px; flex-wrap: wrap; }
.pred-form b { color: var(--fg1); font-weight: 600; }
.pred-mini { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 2px 16px 6px; font-size: 11px; color: var(--fg3); }
.sub-head { background: var(--bg1); }

/* Totals row */
.t tr.tot td { background: var(--bg1); color: var(--fg1); font-weight: 600; border-top: 1px solid var(--border); }

/* Player card */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); display: flex; justify-content: center;
  align-items: flex-start; padding: 40px 16px; overflow-y: auto; animation: fade .2s ease both; }
.sheet { width: min(980px, 100%); background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.hero { position: relative; overflow: hidden; color: #fff; --fg2: rgba(255, 255, 255, .78); border-bottom: 1px solid var(--border); }
.hero.hero-light { color: #161513; --fg2: rgba(22, 21, 19, .72); }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(115deg, var(--team) 0%, var(--team) 48%, var(--alt, var(--team)) 140%); }
.hero-logo { position: absolute; right: -40px; top: -50px; width: 300px; height: 300px; object-fit: contain; opacity: .26; pointer-events: none; user-select: none; }
.hero-light .hero-logo { opacity: .2; }   /* the logo made for its background, in its own colours (heroLogo) */
/* the banner itself doesn't animate (the card fades in as a whole), and its club logos stay hidden until their image has
   loaded, then appear at their final strength in one step: phones were drawing them at full strength first */
.hero:not(.still) :is(.hero-logo, .team-crest, .hero-crest):not(.in) { visibility: hidden; }
.hero.still .ring-v { animation: none; }
.hero-row { position: relative; display: flex; align-items: flex-end; gap: 20px; padding: 44px 24px 0; min-height: 184px; }
.hero-shot { width: min(172px, 30vw); height: min(172px, 30vw); object-fit: cover; object-position: top; flex: none;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)) drop-shadow(0 6px 16px rgba(0, 0, 0, .65));   /* a tight edge and a soft cast, so a jersey in the club's own colour still stands off its banner */
  -webkit-mask-image: linear-gradient(180deg, black 76%, transparent 100%); mask-image: linear-gradient(180deg, black 76%, transparent 100%); }   /* a longer fade at the bottom edge than the hard cut the photo has */
/* room at the sides for that shadow (the fade's mask cuts off anything past the box), taken back by the margin */
.hero-shot:not(.team-crest) { width: calc(min(172px, 30vw) + 28px); padding: 0 14px; margin: 0 -14px; }
.hero-main { min-width: 0; flex: 1; display: flex; align-items: flex-end; gap: 24px; padding-bottom: 20px; }
.hero-text { min-width: 0; }
.hero-kick { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--fg2); }
.hero-kick .pos { letter-spacing: 0; }
.hero-crest { width: 16px; height: 16px; object-fit: contain; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5)); }
.hero-name { font-weight: 700; line-height: .95; letter-spacing: -.03em; font-size: clamp(24px, 3vw, 34px); margin-top: 6px; }
.hero-name > span { display: block; }   /* first name, then surname: each its own line (the number's and cross's spans inside stay inline) */
.hero-name .hero-num { display: inline-block; white-space: nowrap; font-weight: 700; opacity: .6; letter-spacing: 0; font-variant-numeric: tabular-nums; }   /* the number kept whole: on a phone, #34 drops below the name, not #3 over 4 */
.hero-line { font-size: 12.5px; margin-top: 8px; color: var(--fg2); }
.hero-role { font-size: 12.5px; margin-top: 3px; font-weight: 600; color: var(--fg1); }   /* his line or pair and special-teams units, under the season line */
.hero:not(.hero-light) .hero-role { color: #fff; }
.hero .ring { flex: none; margin-bottom: 2px; }
/* a card's close button: big enough to see and to hit, on a disc so it reads on any club's colours */
.hero-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; font-weight: 700;
  color: inherit; background: rgba(0, 0, 0, .22); }
.hero-x:hover { background: rgba(0, 0, 0, .34); color: inherit; }
.hero-light .hero-x { background: rgba(255, 255, 255, .6); }
.hero-light .hero-x:hover { background: rgba(255, 255, 255, .8); }
.hero-cmp { position: absolute; top: 15px; right: 58px; height: 30px; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: inherit; }
.hero-share { position: absolute; top: 15px; right: 150px; height: 30px; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: inherit; text-decoration: none; }
:is(.tsheet, .lsheet) .hero-share { right: 60px; }   /* a club's or a line's card has no Compare button beside it */
:is(.hero-cmp, .hero-share, .hero-x) .ic { display: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }   /* the icons: a phone only */   /* the share card (ui/card.html) */
.hero-light .hero-cmp, .hero-light .hero-share { background: rgba(0, 0, 0, .08); border-color: rgba(0, 0, 0, .15); }
.ring { position: relative; width: 88px; flex: none; display: flex; flex-direction: column; align-items: center; }
.ring svg { display: block; overflow: visible; }
/* one badge everywhere: the ring on a disc of the site's own card colour (navy in dark mode, white in light) with an
   ice-blue edge, the number in the site's text colour, so it reads the same on every club's banner and in every card */
.ring-bg { fill: var(--ring-disc, var(--bg1)); stroke: color-mix(in srgb, #7cc8f0 45%, transparent); stroke-width: 1.5px; }
.ring-tr { stroke: color-mix(in srgb, var(--fg3) 28%, transparent); }
.ring-n b { color: var(--fg1); }
.ring-v { animation: draw 1.1s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes draw { from { stroke-dashoffset: var(--c); } }
.ring-n { position: absolute; left: 0; right: 0; top: 0; height: 88px; display: grid; place-items: center; }
.ring-n b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.ring-l { font-size: 11px; font-weight: 500; margin-top: 6px; opacity: .8; white-space: nowrap; }
.sheet-body { padding: 18px 22px 24px; }
/* team card: the club's crest where a player card has the headshot; the player card's club opens it */
.hero-shot.team-crest { object-fit: contain; object-position: center; -webkit-mask-image: none; mask-image: none; padding: 14px 8px 24px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
.hero-team { display: inline-flex; align-items: center; gap: 8px; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.hero-team:hover { background: rgba(255, 255, 255, .16); }
.hero-light .hero-team:hover { background: rgba(0, 0, 0, .08); }
.t-lineage { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--bg1); border: 1px solid var(--border); font-size: 13px; color: var(--fg2); }
.t-lineage .link { font-weight: 600; }
.t-top { margin-top: 14px; }


/* game sheet: a game opened over the page. The banner runs from the away club's colour to the home club's, darkening
   toward the score in the middle; each club's logo sits faint behind its own end */
.gsheet { width: min(1200px, 100%); }
.ghero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 30px 28px 26px;
  color: #fff; --fg2: rgba(255, 255, 255, .8); --fg3: rgba(255, 255, 255, .7);
  background: linear-gradient(90deg, var(--ga) 0%, color-mix(in srgb, var(--ga) 55%, #000) 44%, color-mix(in srgb, var(--gh) 55%, #000) 56%, var(--gh) 100%); }
.gh-team { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.gh-team.h { flex-direction: row-reverse; text-align: right; }
.gh-crest { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.gh-ab { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.gh-nm { font-size: 13px; color: var(--fg2); margin-top: 4px; }
.gh-mid { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.gh-score { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1; display: flex; gap: 12px; }
.gh-score span { opacity: .5; font-weight: 400; }
.gh-mid .state { color: var(--fg2); font-size: 12px; }
.gh-venue { font-size: 11px; color: var(--fg3); }
.ghero .hero-x { z-index: 1; }
/* broadcasters: a line under the score on a game's tile and across the bottom of its card's banner (tvLine) */
.gtv { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; padding: 2px 16px 10px; font-size: 11px; line-height: 1.3; color: var(--fg2); }
.gtv-k { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: var(--fg3); margin-right: 5px; }
.gtv-c { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 5px; }
.gtv-c > b { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; color: var(--fg3); margin-right: 1px; }
.gtv-n { padding: 1px 7px; border-radius: 999px; background: var(--bg3); color: var(--fg1); font-weight: 600; white-space: nowrap; }
.gtv-n i { font-style: normal; font-weight: 500; font-size: 9.5px; color: var(--fg3); margin-left: 4px; }
.gh-tv { grid-column: 1 / -1; padding: 0; margin-top: -4px; position: relative; }
.gh-tv .gtv-n { background: rgba(0, 0, 0, .28); color: #fff; }
.gh-tv .gtv-n i { color: rgba(255, 255, 255, .7); }
.gsum { margin-bottom: 14px; }
/* game sheet tabs (Game, then each club) and a club's tab: its numbers for and against, and its share of each */
button.gh-team { font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; transition: background .15s; }
button.gh-team.h { text-align: right; }
button.gh-team:hover { background: rgba(255, 255, 255, .1); }
.gtabs button { display: inline-flex; align-items: center; gap: 6px; }
.gtabs img { width: 16px; height: 16px; object-fit: contain; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.tm-card .card-head { flex-wrap: wrap; }
.tm-card .seg button { white-space: nowrap; }
.tm-body { padding: 10px 16px 14px; display: grid; gap: 7px; }
.tm-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(70px, 1.2fr) 52px 48px; align-items: center; gap: 10px; font-size: 12px; }
.tm-head { font-size: 11px; color: var(--fg3); font-weight: 600; }
.tm-l { color: var(--fg2); }
.tm-f { text-align: right; color: var(--fg1); }
.tm-a { color: var(--fg2); }
.tm-s { text-align: right; }
.tm-bar { position: relative; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--fg3) 22%, transparent); overflow: hidden; }
.tm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tc, var(--fg2)); animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
.tm-bar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--fg3); opacity: .6; }   /* even */

.gsheet .detail { margin-top: 0; }
.meters { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.mh { font-size: 12px; font-weight: 600; color: var(--fg1); margin-bottom: 2px; }
.meter { display: grid; grid-template-columns: 112px 1fr 64px 86px 60px; align-items: center; gap: 10px; font-size: 12px; }
.ml { color: var(--fg2); }
.mt { height: 8px; background: color-mix(in srgb, var(--c, var(--fg3)) 20%, transparent); border-radius: 999px; overflow: hidden; }
.mt i { display: block; height: 100%; border-radius: 999px; background: var(--c, var(--fg3)); animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.mv { color: var(--fg1); text-align: right; }
.mr { color: var(--fg3); font-size: 11px; }
@media (min-width: 900px) { .sheet-body > .meters { display: inline-grid; width: calc(50% - 12px); vertical-align: top; margin-right: 12px; } }

/* Player card: compare button */

/* Comparison */
.cmp-pick { position: relative; }
.cmp-in { width: 250px; }
.cmp-who { display: flex; gap: 6px; align-items: center; min-width: 0; }   /* a player's search and his own season */
.cmp-season { max-width: 150px; }
/* a search box with a finder under it on a table's toolbar (Players, Newcomers): the box keeps the toolbar's size */
.toolbar:has(.q-pick) { position: relative; }
.q-pick > input[type=search] { width: 200px; }
/* the players matching the search, under its box */
.cmp-hits { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: max(100%, 300px); max-height: min(360px, 55vh); overflow-y: auto; margin: 0; padding: 4px;
  list-style: none; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overscroll-behavior: contain; }
.cmp-hits li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nm b" "m b"; align-items: center; column-gap: 10px;
  padding: 8px 10px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.cmp-hits li[aria-selected="true"], .cmp-hits li:hover { background: var(--bg3); }
.cmp-hits .nm { grid-area: nm; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-hits .m { grid-area: m; font-size: 12px; color: var(--fg3); }
.cmp-hits b { grid-area: b; font-size: 15px; font-variant-numeric: tabular-nums; }
.cmp-hits li.none { display: block; min-height: 0; color: var(--fg3); cursor: default; font-size: 13px; }
.cmp-hits li.none:hover { background: none; }
.cmp-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  outline: 2px solid color-mix(in srgb, var(--tf) 60%, transparent); outline-offset: -2px; transition: outline-color .3s; }
.cmp-hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; min-height: 180px;
  background: linear-gradient(90deg, var(--ta) 0%, color-mix(in srgb, var(--ta) 45%, #000) 46%, var(--tbm, color-mix(in srgb, var(--tb) 45%, #000)) 54%, var(--tb) 100%); color: #fff; }
.cmp-side { position: relative; display: grid; grid-template-columns: 130px 1fr auto; align-items: end; gap: 12px; padding: 18px 18px 0; color: #fff; text-align: left;
  overflow: hidden; }
/* the focused side is marked by its "In focus" chip and the other side dimming, not by an underline: a white strip
   along its bottom read as that side standing shorter than the other */
.cmp-side:not(.on) .cmp-txt, .cmp-side:not(.on) .ring { opacity: .72; transition: opacity .25s; }
.cmp-side:not(.on):hover .cmp-txt, .cmp-side:not(.on):hover .ring { opacity: 1; }
.cmp-side .focus-chip { position: absolute; top: 10px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #0b1219; }
.cmp-side.a .focus-chip { left: 12px; } .cmp-side.b .focus-chip { right: 12px; }
.cmp-side:not(.on) .focus-chip { visibility: hidden; }
.cmp-side { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cmp-side:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.cmp-side.b { grid-template-columns: auto 1fr 130px; text-align: right; }
.cmp-side.b .cmp-shot { order: 3; } .cmp-side.b .cmp-txt { order: 2; } .cmp-side.b .ring { order: 1; }
.cmp-side.b .hero-kick { justify-content: flex-end; }
/* the banners are always dark enough for white, so the small lines stay light in both themes */
.cmp-side .hero-kick, .cmp-side .hero-line { color: rgba(255, 255, 255, .82); }
.cmp-side .ring { align-self: center; margin-bottom: 10px; }
/* the club logo sits behind the player's head: layered under the photo, so the face stays clear of it */
.cmp-logo { position: absolute; top: -26px; width: 200px; height: 200px; opacity: .2; pointer-events: none; z-index: 0; }
.cmp-side.a .cmp-logo { left: -30px; } .cmp-side.b .cmp-logo { right: -30px; }
.cmp-side > .cmp-shot, .cmp-side > .cmp-txt, .cmp-side > .ring { position: relative; z-index: 1; }
.cmp-side > .focus-chip { z-index: 2; }
.cmp-shot { width: 130px; height: 150px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)) drop-shadow(0 6px 16px rgba(0, 0, 0, .65)); animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.cmp-txt { padding-bottom: 18px; min-width: 0; }
.cmp-name { font-size: 28px; line-height: 32px; letter-spacing: -.8px; font-weight: 500; margin: 6px 0 4px; }
.cmp-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; background: rgba(0, 0, 0, .25); min-width: 92px; }
.cmp-vs span { font-size: 26px; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.cmp-vs small { font-size: 9px; opacity: .75; }
.cmp-vs b { font-size: 12px; font-weight: 500; opacity: .8; margin: 6px 0; }
.cmp-body { padding: 16px 20px 22px; }
/* Compare in the cards' colours: the body runs from the first side's club tint to the second's, the card edged in both */
[data-theme='dark'] .cmp-card { background: linear-gradient(90deg, color-mix(in srgb, var(--ta) 17%, #0b0e12), color-mix(in srgb, var(--tb) 17%, #0b0e12));
  border-color: color-mix(in srgb, color-mix(in srgb, var(--ta) 50%, var(--tb)) 34%, #1e252e); }
[data-theme='light'] .cmp-card { background: linear-gradient(90deg, color-mix(in srgb, var(--ta) 7%, #ffffff), color-mix(in srgb, var(--tb) 7%, #ffffff));
  border-color: color-mix(in srgb, color-mix(in srgb, var(--ta) 50%, var(--tb)) 24%, #e3e7ec); }
.cmp-card .h2h:hover { background: color-mix(in srgb, var(--tf) 14%, transparent); }
.h2h-wrap { display: grid; gap: 2px; }
.h2h { display: grid; grid-template-columns: 170px 1fr 110px 1fr 170px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 12px; }
.h2h:hover { background: var(--bg3); }
.h2h-group { margin: 12px 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg3); }
.h2h-group:first-child { margin-top: 0; }
.h2h .hl { text-align: center; color: var(--fg2); font-weight: 500; }
.h2h .ha { display: flex; align-items: baseline; gap: 8px; }
.h2h .hz { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; flex-direction: row-reverse; }
.h2h .cv { font-size: 14px; color: var(--fg1); font-weight: 600; }
.h2h .cr { font-size: 10px; color: var(--fg3); }
.hb { height: 8px; background: color-mix(in srgb, var(--c, var(--fg3)) 20%, transparent); border-radius: 999px; overflow: hidden; display: flex; }
.hb.l { justify-content: flex-end; }
.hb i { display: block; height: 100%; border-radius: 999px; animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; }
.hb.l i { transform-origin: right; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; }
.rc { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.rc .rz { text-align: right; }
.rc .rbar { grid-column: 1 / -1; display: flex; gap: 2px; height: 6px; margin-top: 2px; }
.rc .rbar i { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.rc .rl { color: var(--fg3); font-size: 12px; text-align: center; }
.focus-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; padding-left: 10px; border-left: 4px solid; }
.focus-head img { width: 34px; height: 34px; }
/* the names over the two columns: only on narrow screens, pinned under the top bar while the stats scroll */
.cmp-colhead { display: none; }
@media (max-width: 900px) {
  /* the two players stay side by side, as narrow mirrored cards: the first player's numbers sit under him on the left,
     the second's on the right, all the way down. Each card: photo and ring on top, the name and lines under them */
  .cmp-card { overflow: clip; }   /* clip, not hidden: hidden would stop the names below from staying pinned */
  .cmp-hero { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: 0; }
  /* align-content: start keeps each side's photo and ring at the top, level with the other side's: from the bottom, a
     side whose text ran a line longer had its photo pushed up */
  .cmp-side, .cmp-side.b { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'shot ring' 'txt txt'; align-items: end; align-content: start; gap: 6px 8px;
    padding: 34px 12px 0; text-align: left; }
  .cmp-side.b { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'ring shot' 'txt txt'; text-align: right; }
  .cmp-side > .cmp-shot { grid-area: shot; } .cmp-side > .cmp-txt { grid-area: txt; } .cmp-side > .ring { grid-area: ring; }
  .cmp-side.a > .ring { justify-self: end; } .cmp-side.b > .ring { justify-self: start; }
  .cmp-side .ring { align-self: end; margin: 0 0 4px; }
  .cmp-shot { width: 76px; height: 86px; }
  .cmp-logo { width: 140px; height: 140px; top: -14px; }
  .cmp-name { font-size: 17px; line-height: 20px; margin: 4px 0 3px; overflow-wrap: anywhere; }
  .cmp-side .hero-kick { font-size: 9.5px; letter-spacing: .06em; gap: 4px; }
  .cmp-side .hero-line { font-size: 11px; }
  .cmp-txt { padding-bottom: 12px; }
  .cmp-vs { min-width: 0; padding: 0 6px; }
  .cmp-vs span { font-size: 22px; }
  .cmp-vs small { font-size: 8px; text-align: center; }
  .cmp-in { width: 100%; }
  .cmp-colhead { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; position: sticky; top: var(--top-h, 0px); z-index: 3;
    margin: 0 -12px 6px; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
  .cmp-colhead span { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--c); }
  .cmp-colhead span:last-child { justify-content: flex-end; }
  .cmp-colhead i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .cmp-colhead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cmp-colhead .sub { font-size: 11px; font-weight: 500; }
  /* each stat on two lines: the numbers and the stat's name, then the two percentiles as one bar split at the middle,
     the first player's growing left and the second's right */
  .h2h { grid-template-columns: minmax(0, 1fr) 42px 42px minmax(0, 1fr); grid-template-areas: "ha hl hl hz" "bl bl br br"; row-gap: 6px; }
  .h2h .ha { grid-area: ha; } .h2h .hl { grid-area: hl; } .h2h .hz { grid-area: hz; }
  .h2h .hb.l { grid-area: bl; } .h2h .hb.r { grid-area: br; }
  .h2h .ha { flex-direction: column; align-items: flex-start; gap: 1px; }
  .h2h .hz { flex-direction: column; align-items: flex-end; gap: 1px; }
}

/* Games: date picker */
#night { max-width: 290px; }
.cal-wrap { position: relative; }
.cal-btn { width: 32px; padding: 0; justify-content: center; }
.cal { position: absolute; right: 0; top: 40px; z-index: 30; width: 300px; padding: 12px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); animation: fade .15s ease both; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-weight: 600; font-size: 14px; }
.cal-head .btn:disabled { opacity: .3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid em { font-style: normal; font-size: 10px; color: var(--fg3); text-align: center; padding: 2px 0 4px; }
.cal-grid span, .cal-grid button { position: relative; height: 34px; border-radius: 7px; font-size: 12px; display: flex; align-items: center; justify-content: center; color: var(--fg3); }
.cal-grid button { color: var(--fg1); background: var(--bg3); font-weight: 500; transition: background .12s, transform .12s; }
.cal-grid button:hover { background: var(--gold-soft); transform: translateY(-1px); }
.cal-grid button i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 8px; color: var(--gold); font-weight: 600; }
.cal-grid .today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-grid .sel { background: var(--fg1); color: var(--bg1); }
.cal-grid .sel i { color: var(--bg1); }
.cal-foot { display: flex; gap: 6px; margin-top: 10px; }
.cal-foot select { flex: 1; }
.cal-note { font-size: 11px; color: var(--fg3); margin-top: 8px; text-align: center; }

/* Player card: Advanced / Microstats */
.adv-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 16px; align-items: stretch; }
/* Radar Stats left (half), lines/tandem + Metrics stacked on the right — same layout scales down on a phone */
.adv-top.adv-split { grid-template-columns: 1fr 1fr; }
.chart-card { overflow: hidden; }
.adv-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
/* the player card on a computer keeps its width; its overview is compact enough that Impact, the radar and his line with
   the % stats all show when the card opens: the four Impact tiles two by two in the left half, its six bars
   stacked in the right half, and the projection under the radar */
@media (min-width: 721px) {
  .ov-top { display: flex; flex-direction: column; }
  .ov-top > .proj-card { order: 1; }
  .ov-top > .impact:not(.proj-card) .imp-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 12px 16px; }
  .ov-top .imp-tiles.imp-full { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 84px; gap: 8px; }
  .ov-top .imp-tiles.imp-full .imp-tile { padding: 7px 10px; gap: 0; justify-content: space-between; }
  .ov-top .imp-tiles.imp-full .imp-tile b { font-size: 28px; }
  .ov-top .imp-tiles.imp-full .imp-s { font-size: 10.5px; white-space: nowrap; }
  .ov-top .imp-tiles.imp-full .imp-l { font-size: 11.5px; white-space: nowrap; }
  .ov-top .imp-bars { align-content: space-between; gap: 4px; }
  .ov-top .imp-row { grid-template-columns: 96px minmax(0, 1fr) 40px 74px; gap: 8px; }
  .ov-top .card-head.sub-head { padding: 9px 14px; }
}
/* a screen up to 1080 high (a 1080p monitor's browser, a laptop): a slimmer banner, less space around the cards */
@media (min-width: 721px) and (max-height: 1080px) {
  .psheet .hero-row { padding-top: 12px; min-height: 0; }
  .psheet .hero-shot { width: 140px; height: 140px; }
  .psheet .hero-shot:not(.team-crest) { width: 168px; }
  .psheet .hero-main { padding-bottom: 12px; }
  .psheet .sheet-body { padding-top: 12px; }
  .psheet .sheet-body > .toolbar { margin-bottom: 10px !important; }
  .modal:has(> .psheet) { padding-top: 20px; }
  .psheet .ov-top > .impact:not(.proj-card) { margin-bottom: 12px; }
  .psheet .adv-side .dc-js .dc-j .jsy { max-height: 112px; }
  .psheet .adv-side .meters { gap: 3px; margin-bottom: 4px; }
}
/* and on a computer's screen that short, the whole card a size smaller, its arrows and bottom bar sized to match */
@media (min-width: 1100px) and (max-height: 1080px) {
  .psheet { zoom: .9; }
  #card-nav .card-arrow.prev { left: max(4px, calc(50% - 441px - 56px)); }
  #card-nav .card-arrow.next { right: max(4px, calc(50% - 441px - 56px)); }
  #card-nav .card-bar { width: min(882px, calc(100vw - 24px)); }
}
.adv-side > .card { margin-bottom: 0; }
.adv-side .dc-body { padding: 8px 12px 10px; align-content: start; }
.pg-by { display: block; font-size: 11px; color: var(--fg3); }
/* hurt today (app.js injuries): a white cross on red beside his name, amber day to day; bigger in the card's banner */
.inj { display: inline-block; width: 14px; height: 14px; margin-left: 5px; border-radius: 4px; vertical-align: -2px; flex: none;
  background: var(--inj-ic) center / 100% 100% no-repeat, var(--inj-c, var(--t-poor)); }   /* the white icon over the colour, both the badge's own (app.js injBadge) */
.inj-gtd { --inj-c: var(--t-mid); }   /* yellow: a game-time decision, questionable, close to returning */
.inj-dtd { --inj-c: var(--t-low); }   /* orange: day to day, out a game or two */
.inj-up { --inj-c: var(--t-high); }   /* green: called up */
.inj-big { width: 22px; height: 22px; margin-left: 8px; border-radius: 6px; vertical-align: 4px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.hero-tail { display: inline-flex; align-items: center; white-space: nowrap; }   /* the number, then the cross: on a phone they wrap as one, never apart */
.hero-tail .inj-big { vertical-align: 0; }
/* a name cut short in a table (…, a phone's narrow column): the name shrinks inside its span and the cross stays whole
   beside it (markInjured wraps the name in .n-t); Thompson's cross was cut off with the end of his name (Oct 2026) */
.n:not(.who-s):has(> .inj) { display: inline-flex !important; align-items: center; }
.n:has(> .inj) > .n-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .who-box > .who-s:has(> .inj) { display: flex !important; align-items: center; } }
@media (max-width: 720px) { .inj-big { width: 17px; height: 17px; margin-left: 6px; border-radius: 5px; vertical-align: 3px; } }
.dc-news { padding: 8px 12px 0; font-size: 12px; color: var(--fg2); }
.dc-news b { color: var(--fg1); }
.dc-news.out b { color: var(--danger); }
.dc-news-t { display: block; margin-top: 2px; color: var(--fg3); font-size: 11.5px; }
.adv-side .dc-row { grid-template-columns: auto 1fr; gap: 8px; align-items: center; }
.adv-side .dc-js { gap: 8px; flex-wrap: nowrap; justify-content: flex-start; }
.adv-side .dc-j { padding: 2px; }
.adv-side .dc-j img, .adv-side .dc-num { width: 48px; height: 40px; }
.adv-side .dc-p { min-height: 12px; font-size: 9px; }
/* the jerseys fill the box: each an equal share of the row (a line's three, a pair's two at a forward's width), up to
   150 tall */
.adv-side .dc-js { width: 100%; justify-content: center; }   /* a pair or a tandem centred */
.adv-side .dc-j { flex: 0 1 calc((100% - 16px) / 3); max-width: none; min-width: 0; }
.adv-side .dc-js .dc-j .jsy { width: 100%; height: auto; max-height: 150px; }
.dc-card.dc-phone .dc-js { width: 100%; flex-wrap: nowrap; gap: 8px; justify-content: center; }
.dc-card.dc-phone .dc-j { flex: 0 1 calc((100% - 16px) / 3); max-width: none; min-width: 0; }
.dc-card.dc-phone .dc-js .dc-j .jsy { width: 100%; height: auto; max-height: 150px; }
.dc-card.dc-phone .dc-p { font-size: 11px; }
.adv-side .dc-p { font-size: 11px; }
/* Metrics under the jerseys: compact meters so the half-column stays readable */
.adv-side .card-head.sub-head { padding: 8px 12px; }
.adv-side .adv-pct-body { padding: 6px 10px 2px; }
.adv-side .meters { gap: 4px; margin-bottom: 6px; }
.adv-side .mh { font-size: 10px; margin-bottom: 2px; }
.adv-side .adv-pct-body .meter { grid-template-columns: 68px minmax(0, 1fr) 38px 52px 36px; gap: 3px 5px; font-size: 11px; }
.adv-side .adv-pct-body .meter .mt { height: 6px; }
.adv-side .tier { font-size: 9px; padding: 0 4px; }
/* the % stats beside the radar, and the Micro card in the Microstats side column: narrower meters (no separate tier column width) */
.adv-pct-body { padding: 12px 16px 2px; }
.adv-pct-body .meters { margin-bottom: 12px; }
.adv-pct-body .meter { grid-template-columns: 96px 1fr 52px 78px 48px; gap: 8px; }
.radar { width: 100%; max-height: 330px; display: block; margin: 4px auto 8px; }
.radar .rg { fill: none; stroke: var(--border); }
.radar .rp { fill-opacity: .55; stroke-width: 2; }
.radar .tick { fill: var(--fg3); font-size: 11px; font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif; }
.micro-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 6px; }
/* a player card tab with one or two cards side by side (On-ice, Luck, Micro, Environment) */
/* the Advanced tab's parts: a smaller row of tabs under the main ones */
.seg.sub-seg { margin: 0 0 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.seg.sub-seg button { font-size: 12px; padding: 4px 12px; }
/* the line combination: beside the radar on a wider screen; on a phone, at the top of the overview instead */
.dc-card.dc-phone { display: none; }
.dc-j img.dc-photo { object-fit: contain; object-position: bottom; }   /* a 2025-26 photo where there's no jersey (the preview) */
@media (max-width: 720px) { .dc-card.dc-phone { display: block; } .dc-card.dc-wide { display: none; } }
.tab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 6px; align-items: start; }
.tab-grid > .card { margin-bottom: 0; min-width: 0; }
.env-club { display: flex; align-items: center; gap: 12px; padding: 12px 16px 4px; }
.env-club img { width: 40px; height: 40px; object-fit: contain; }
.env-club > div { flex: 1; min-width: 0; }
.env-vs { padding: 12px 16px 16px; grid-template-columns: repeat(3, 1fr); }
.micro-side { display: grid; gap: 14px; align-content: start; }
.shotmap { width: 100%; display: block; padding: 10px 12px 0; }
.shotmap { --ice: #f8fbfd; --boards: #b9c4cd; --rink-red: #d2353c; --rink-blue: #2f63b8; --crease: rgba(84, 156, 222, .28); }
[data-theme='dark'] .shotmap { --ice: #1a232b; --boards: #4a5866; --rink-red: #ef5b61; --rink-blue: #5b8fe0; --crease: rgba(91, 143, 224, .26); }
.shotmap .rink { fill: var(--ice); stroke: var(--boards); stroke-width: 3; }
.shotmap .rink-red { fill: none; stroke: var(--rink-red); stroke-width: 2; }   /* faceoff circles, hash marks, trapezoid: bold red */
.shotmap .rink-red.thin { stroke-width: 1.2; }
.shotmap .rink-dot { fill: var(--rink-red); }
.shotmap .rink-blue { stroke: var(--rink-blue); stroke-width: 6; }   /* the blue line, a foot wide */
.shotmap .rink-goal { stroke: var(--rink-red); stroke-width: 2.2; }
.shotmap .crease { fill: var(--crease); stroke: var(--rink-red); stroke-width: 1.6; }
.shotmap .net { fill: color-mix(in srgb, var(--fg3) 18%, transparent); stroke: var(--fg2); stroke-width: 1.6; }
/* the scoring-chance zones: a faint tint inside thin dashed red lines */
.shotmap .zone-md { fill: color-mix(in srgb, var(--rink-red) 4%, transparent); stroke: color-mix(in srgb, var(--rink-red) 55%, transparent); stroke-width: 1; stroke-dasharray: 4 3; }
.shotmap .zone-hd { fill: color-mix(in srgb, var(--rink-red) 9%, transparent); stroke: color-mix(in srgb, var(--rink-red) 70%, transparent); stroke-width: 1; stroke-dasharray: 4 3; }
.shotmap .shot-s { fill-opacity: .55; stroke: var(--ice); stroke-width: .8; }
.shotmap .shot-g { fill-opacity: .95; stroke: var(--ice); stroke-width: 1.2; }
.hbars { display: grid; gap: 8px; }
.hb-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 12px; }
.hb-l { color: var(--fg2); text-transform: capitalize; }
.hb-t { height: 10px; }
.hb-t i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.hb-v { color: var(--fg1); font-size: 11px; white-space: nowrap; }
.deploy .dp-bar { display: flex; height: 14px; gap: 2px; }
.deploy .dp-bar i { display: block; height: 100%; border-radius: 4px; }
.deploy .chart-legend { justify-content: flex-start; flex-wrap: wrap; padding: 10px 0 0; }
@media (max-width: 900px) {
  .adv-top:not(.adv-split), .micro-grid { grid-template-columns: 1fr; }
  /* mobile: Radar | Metrics on top, Goalies tandem full-width under both */
  .adv-top.adv-split {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'radar metrics' 'goalies goalies';
    gap: 8px;
    align-items: start;
  }
  .adv-top.adv-split > .chart-card { grid-area: radar; }
  .adv-top.adv-split > .adv-side { display: contents; }
  .adv-top.adv-split .adv-pct { grid-area: metrics; }
  .adv-top.adv-split .dc-card { grid-area: goalies; }
  .adv-top.adv-split .radar { max-height: 260px; margin: 0 auto 4px; }
  .adv-top.adv-split .radar .tick { font-size: 10px; }
  .adv-top.adv-split .pct-card { grid-column: 1 / -1; }   /* the Impact percentiles card across both columns, not squeezed into one */
}
}

.ns { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 999px; background: var(--bg3); color: var(--fg3); vertical-align: 1px; }
.meter.unscored .ml { color: var(--fg3); }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 7px; border-radius: 999px; font-weight: 700; font-size: 12px;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

/* Impact (JFresh-style) */
.impact { margin-bottom: 16px; }
.imp-body { padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }   /* a wide table inside scrolls, not the card */
/* the Advanced tab's top row: the line combination, then Impact taking about three quarters */
.card-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 14px; margin-bottom: 16px; align-items: stretch; }
.card-top > .card { margin-bottom: 0; }
.card-top .dc-body { padding: 10px 12px 12px; align-content: start; }
.card-top .dc-row { grid-template-columns: 1fr; gap: 6px; }
.card-top .dc-js { gap: 2px; flex-wrap: nowrap; justify-content: space-between; }
.card-top .dc-j { padding: 3px 2px 2px; }
.card-top .dc-j img, .card-top .dc-num { width: 52px; height: 44px; }
@media (max-width: 900px) { .card-top { grid-template-columns: 1fr; } .card-top .dc-js { justify-content: flex-start; } }
/* the card's the depth chart line combination: jersey on top, surname under it; his own lit up */
.dc-card { margin-bottom: 16px; }
.dc-body { padding: 10px 16px 12px; display: grid; gap: 10px; }
.dc-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; }
.dc-l { font-size: 12px; font-weight: 600; color: var(--fg2); }
/* under each line and unit: where it comes from (game data, its tooltip saying why; a writer's tweet), then the news */
.dc-why { grid-column: 1 / -1; font-size: 11.5px; color: var(--fg3); line-height: 1.35; }
.dc-why > span[data-info] { border-bottom: 1px dotted var(--fg3); cursor: help; }
.dc-why-n { display: block; color: var(--fg2); }
.dc-js.n4 .dc-p, .dc-js.n5 .dc-p { font-size: 9.5px; }   /* a power-play or penalty-kill unit: four or five across */
/* a club's projected lineup (the player card's Lines tab): its sections two across, one on a phone; every jersey the same
   size, five to a row at most */
.lu-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 12px; }
.lu-head b { font-size: 16px; }
.lu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
@media (max-width: 900px) { .lu-grid { grid-template-columns: 1fr; } }
.lu-card .dc-row { grid-template-columns: 34px 1fr; }
.lu-card .dc-js { flex-wrap: nowrap; gap: 6px; }
.lu-card .dc-j { flex: 0 1 calc((100% - 24px) / 5); max-width: 92px; min-width: 0; }
.lu-card .dc-js .dc-j .jsy { width: 100%; height: auto; max-height: 100px; }
.lu-card .dc-p { font-size: 10.5px; white-space: normal; overflow-wrap: anywhere; }   /* every name in full: a long one smaller, a hyphenated one over two lines */
.lu-card .dc-p[data-long] { font-size: 9px; letter-spacing: -.1px; }
/* a phone: the unit's label over its row, so five across have the width, and the surname still whole */
@media (max-width: 720px) { .lu-card .dc-row { grid-template-columns: 1fr; gap: 4px; } .lu-card .dc-js { gap: 4px; } .lu-card .dc-j { flex-basis: calc((100% - 16px) / 5); } .lu-card .dc-p { font-size: 9px; letter-spacing: -.1px; white-space: normal; line-height: 1.15; text-align: center; }
  .lu-card .dc-p[data-long] { font-size: 8px; } }   /* Ekman-Larsson over two lines at the hyphen; Blankenburg (over nine letters) smaller */
.lu-grid.lu-one { grid-template-columns: 1fr; }
.lu-all { margin-left: auto; font-size: 13px; }   /* the player card's: the club's whole lineup on its team card */
/* the game card's Lines: the away club beside the home club at every width; the team card's: its sections two across at
   every width. On a phone either is scaled down to fit (lu-scaled): tighter cards and smaller type, three jerseys a row
   (a five-man unit three over two, a four-man one two over two), the unit's label over its row */
.lu-view { margin: 0 0 12px; }
/* a finished game's ice time, by strength: the two clubs side by side, one under the other on a phone */
.toi-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; margin-top: 4px; }
@media (max-width: 720px) { .toi-pair { grid-template-columns: minmax(0, 1fr); } }
.toi-body { padding: 6px 14px 12px; }
.toi-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 52px 46px 46px; gap: 6px; align-items: center; padding: 3px 0; font-size: 12.5px; }
.toi-row.toi-one { grid-template-columns: minmax(0, 1fr) 60px; }
.toi-row > :not(:first-child) { text-align: right; }
.toi-row > button { text-align: left; justify-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.toi-row span { color: var(--fg2); }
.toi-head { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg3); border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.toi-head span { color: var(--fg3); }
.toi-grp { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg3); margin: 8px 0 2px; }
.lu-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
.lu.lu-scaled > .lu-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .lu-pair, .lu.lu-scaled > .lu-grid { gap: 0 10px; } }
@media (max-width: 720px) {
  .lu-pair, .lu.lu-scaled > .lu-grid { gap: 0 6px; }
  .lu-scaled .lu-head { gap: 2px 6px; margin-bottom: 8px; }
  .lu-scaled .lu-head b { font-size: 13px; }
  .lu-scaled .lu-head .sub { font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
  .lu-scaled .lu-card { margin-bottom: 8px; border-radius: 10px; }
  .lu-scaled .lu-card .card-head { padding: 7px 8px; }
  .lu-scaled .lu-card .card-head .title { font-size: 12.5px; }
  .lu-scaled .lu-card .card-head .sub { font-size: 9.5px; }
  .lu-scaled .lu-card .dc-body { padding: 6px 5px 8px; gap: 8px; }
  .lu-scaled .lu-card .dc-row { gap: 2px; }
  .lu-scaled .lu-card .dc-l { font-size: 10px; }
  .lu-scaled .lu-card .dc-js { flex-wrap: wrap; justify-content: center; gap: 2px; }
  .lu-scaled .lu-card .dc-j { flex: 0 0 calc((100% - 4px) / 3); max-width: none; padding: 2px 1px; }
  .lu-scaled .lu-card .dc-js.lu-n4 { width: 67%; margin: 0 auto; }   /* a penalty-kill unit two over two, the jerseys the same size */
  .lu-scaled .lu-card .dc-js.lu-n4 .dc-j { flex-basis: calc((100% - 2px) / 2); }
  .lu-scaled .lu-card .dc-p { font-size: 8px; }
  .lu-scaled .lu-card .dc-p[data-long] { font-size: 7px; }
  .lu-scaled .dc-why { font-size: 7.5px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }   /* a source and a long handle (@ChrisJohnstonTSN) stay in their column */
  .lu-scaled .lu-out { font-size: 10px; gap: 4px; } .lu-scaled .lu-out span { font-size: 8.5px; overflow-wrap: anywhere; }
}
.lu-out { display: grid; gap: 6px; font-size: 12.5px; }
.lu-out > div { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.lu-out span { color: var(--fg3); }
.dc-js { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-j { display: grid; justify-items: center; gap: 2px; padding: 4px 4px 3px; border-radius: 10px; border: 1px solid transparent; opacity: .82; transition: opacity .15s, background .15s; max-width: 72px; }
button.dc-j:hover { opacity: 1; background: var(--bg3); }
.dc-j.me { opacity: 1; border-color: var(--gold); background: var(--gold-soft); }
.dc-j img { width: 64px; height: 54px; object-fit: contain; display: block; }
.dc-p { font-size: 10px; font-weight: 600; color: var(--fg2); min-height: 12px; text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-num { display: grid; place-items: center; width: 64px; height: 54px; font-size: 20px; }
/* moving between player cards: where he is in the list, top left of the banner; the card fades out where it is and the
   next fades in, and the end of the list gives a small nudge */
/* while a card is open, the page behind it gets a layer of its own: otherwise every frame of a card animating (a swipe,
   the ring drawing in) re-recorded the whole page behind, 60,000 objects with a season table, about 150 ms a frame on
   a phone. With it, changing cards has no long frames at all */
body.modal-open main { will-change: transform; }
html, body { overscroll-behavior-x: none; }   /* a sideways swipe moves between cards; it never takes the browser back a page */
.modal { overscroll-behavior: contain; }
.sheet { will-change: transform; }
.sheet.enter { opacity: 0; }
.sheet.nudge { animation: card-nudge .3s ease both; }
@keyframes card-nudge { 30% { transform: translateX(-10px); } 60% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) {
  .sheet.nudge, .fade, .dot.live, .theme-toggle svg, .theme-toggle .ray { animation: none; }
  .sheet { transition: none !important; }
  .btn, .game, .theme-toggle { transition: none; }
}
.card-nav { position: fixed; inset: 0; z-index: 50; pointer-events: none; }   /* above its card, under anything opened over it */
.card-nav button { pointer-events: auto; font: inherit; color: inherit; }
/* the arrows: a plain chevron at the middle of each side, outside the card where there's room, over its edge on a phone.
   None past either end of the list */
.card-arrow { position: fixed; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; display: grid; place-items: center; border: 0; border-radius: 10px;
  background: rgba(11, 18, 25, .5); color: #fff !important; font-size: 34px !important; font-weight: 300; line-height: 1; cursor: pointer; transition: background .15s; }
.card-arrow:hover:not(:disabled) { background: rgba(11, 18, 25, .8); }
.card-arrow:disabled { visibility: hidden; }
.card-arrow.prev { left: max(4px, calc(50% - 490px - 56px)); }
.card-arrow.next { right: max(4px, calc(50% - 490px - 56px)); }
/* the game card is wider: its arrows sit outside its edges, and it gives up some width when the screen is too narrow
   for both */
#game-nav .card-arrow.prev { left: max(4px, calc(50% - 600px - 56px)); }
#game-nav .card-arrow.next { right: max(4px, calc(50% - 600px - 56px)); }
@media (min-width: 1100px) { body:has(#game-nav) .gsheet { width: min(1200px, calc(100vw - 136px)); } }
/* the bar along the bottom: the previous name at the left, the next at the right, where it is in the list between */
.card-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(980px, calc(100vw - 24px)); display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 6px; border-radius: 12px;
  background: rgba(11, 18, 25, .94); color: #e8eef3; border: 1px solid #24313d; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
#game-nav .card-bar { width: min(1200px, calc(100vw - 136px)); }
.card-bar b { font-size: 12px; font-weight: 600; color: #9fb0bf; font-variant-numeric: tabular-nums; }
.card-bar button { display: grid; justify-items: start; align-content: center; min-width: 0; height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.card-bar button:last-child { justify-items: end; text-align: right; }
.card-bar button:hover:not(:disabled), .card-bar button:active:not(:disabled) { background: rgba(255, 255, 255, .08); }
.card-bar button:disabled { cursor: default; }
.card-bar small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #9fb0bf; }
.card-bar span { max-width: 100%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal:has(+ .card-nav) { padding-bottom: 76px; }   /* the card's end clears the bar */
/* light mode: the bar is light too */
[data-theme='light'] .card-bar { background: rgba(255, 255, 255, .97); color: var(--fg1); border-color: var(--border); }
[data-theme='light'] .card-bar small, [data-theme='light'] .card-bar b { color: var(--fg3); }
[data-theme='light'] .card-bar button:hover:not(:disabled), [data-theme='light'] .card-bar button:active:not(:disabled) { background: var(--bg3); }
@media (max-width: 1099px) {
  /* a phone: the bar runs edge to edge along the bottom, and the arrows sit over the card's edges */
  .card-bar, #game-nav .card-bar { left: 0; right: 0; bottom: 0; width: auto; transform: none; border-radius: 0; border-width: 1px 0 0; box-shadow: none;
    padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
  .card-arrow { width: 32px; height: 56px; font-size: 30px !important; background: rgba(11, 18, 25, .42); }
  .modal:has(+ .card-nav) { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* no blur behind cards here: the card covers the screen, and redrawing a blur under a card that moves cost about
     240 ms a frame (at phone speed) against 33 without it: it was what made swiping stutter */
  .modal { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 0, 0, .7); }
}
/* Lines: each combination's names, one under the other on a phone */
.ln-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ln-who > span { color: var(--fg3); }
.ln-who.ln-jerseys { flex-wrap: nowrap; gap: 4px; }
/* a line's players on the Lines sheets: jersey (or headshot) over the surname */
.ln-j { display: grid; justify-items: center; gap: 1px; width: 78px; padding: 3px 2px 2px; border-radius: 8px; transition: background .15s; }
.ln-j:hover { background: var(--hover-bg); }
.ln-j-pic { display: grid; place-items: end center; width: 46px; height: 38px; }
.ln-j-pic img { width: 46px; height: 38px; object-fit: contain; display: block; }
.ln-j-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--fg1); line-height: 1.2; }
.ln-who .chip { margin-left: 4px; }
.ln-club { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 6px 0 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg1); color: var(--fg2); font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.ln-club img { width: 16px; height: 16px; }
.ln-club:hover { background: var(--bg3); color: var(--fg1); }
.ln-lead { margin: 0; font-size: 13px; color: var(--fg3); }
@media (max-width: 720px) {
  .ln-who { flex-direction: column; align-items: flex-start; gap: 1px; }
  .ln-who > span { display: none; }
  .ln-who .chip { margin: 2px 0 0; }
  .ln-who.ln-jerseys { flex-direction: row; align-items: flex-end; gap: 0; }
  .ln-j { width: 50px; } .ln-j-pic, .ln-j-pic img { width: 36px; height: 30px; } .ln-j-n { font-size: 10px; }
  .ln-club { margin-bottom: 2px; }
}
.plays-like { color: var(--accent); font-weight: 600; }
.imp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.imp-tile { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--bg1); }
.imp-tile b { font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.imp-l { font-size: 12px; font-weight: 600; color: var(--fg2); }
.imp-s { font-size: 11px; color: var(--fg3); }
.imp-bars { display: grid; gap: 8px; }
.imp-row { display: grid; grid-template-columns: 110px 1fr 48px 86px; align-items: center; gap: 10px; font-size: 12px; }
.imp-cl { color: var(--fg2); }
.imp-pv { color: var(--fg1); text-align: right; }
.imp-gv { color: var(--fg3); font-size: 11px; text-align: right; }
/* QoT and QoC under Impact's parts: who the player played with and against, set apart by a rule */
.imp-row:not(.imp-ctx) + .imp-ctx { border-top: 1px solid var(--border); padding-top: 8px; }
.ln-ctx { margin: 0 14px 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.war-card { margin-bottom: 16px; }
.war-body { padding: 14px 16px 8px; }

/* point charts: running total and lollipop (pointChart). Thin 2px marks, 10px dots with a surface ring, a solid zero line
   over a dashed grid, values in text colours; the dot's hit area is larger than the dot */
.pchart { position: relative; padding-left: 38px; font-size: 11px; }
.pc-plot { position: relative; height: 100%; margin-right: 10px; }
.pc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pc-plot .grid { stroke: var(--border); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.pc-plot .zero { stroke: var(--fg3); stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pc-line { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pc-area { fill-opacity: .12; stroke: none; }
.pc-stem { stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pc-dot { position: absolute; width: 24px; height: 24px; transform: translate(-50%, -50%); display: grid; place-items: center; cursor: default; outline: none; }
.pc-dot i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg2); transition: transform .15s; }
.pc-dot:hover i, .pc-dot:focus-visible i { transform: scale(1.35); }
.pc-val { position: absolute; transform: translateX(-50%); font-family: 'Geist Mono', ui-monospace, monospace; color: var(--fg2); white-space: nowrap; pointer-events: none; }
.pc-end { color: var(--fg1); font-weight: 600; transform: translate(12px, -50%); }   /* just right of the last dot */
.pchart-line .pc-plot { margin-right: 84px; }
.pc-x { position: absolute; bottom: 4px; transform: translateX(-50%); color: var(--fg3); white-space: nowrap; }
.pc-y { position: absolute; left: 0; width: 30px; text-align: right; transform: translateY(-50%); color: var(--fg3); font-family: 'Geist Mono', ui-monospace, monospace; }
.pchart .chart-tip { white-space: nowrap; }
.imp-note { font-size: 12px; color: var(--fg3); margin: 0 0 12px; }
@media (max-width: 720px) { .imp-tiles { grid-template-columns: repeat(2, 1fr); } }
/* My Picks: four tiles a row (two on a phone), each label and line under it on one line, so every number lines up */
.imp-tiles.mp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mp-tiles .imp-tile { min-width: 0; }
.mp-tiles .imp-l, .mp-tiles .imp-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .imp-tiles.mp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .mp-tiles .imp-tile { padding: 9px 9px; } .mp-tiles .imp-l { font-size: 11px; } .mp-tiles .imp-s { font-size: 10.5px; } }   /* "MoneyPuck Log Loss" on a 360px phone */
/* the Impact tiles on a phone: one short row of four across the top of a player's, goalie's or club's card (Overall,
   Offence, Defence, WAR), the Impact card below keeping its bars; hidden on a wider screen, where the card shows them */
.imp-bar { display: none; }
@media (max-width: 720px) {
  .imp-tiles.imp-full { display: none; }
  .imp-tiles.imp-bar, .imp-tiles.imp-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .imp-bar { margin-bottom: 12px; }
  .imp-bar .imp-tile, .imp-row4 .imp-tile { padding: 6px 6px 7px; border-radius: 8px; align-items: center; text-align: center; gap: 1px; min-width: 0; }
  .imp-bar .imp-tile b, .imp-row4 .imp-tile b { font-size: 22px; }
  .imp-bar .imp-l, .imp-row4 .imp-l { font-size: 10.5px; line-height: 1.15; }
  .imp-bar .imp-pos { display: none; }
  .imp-bar .imp-tile { padding-left: 3px; padding-right: 3px; }
  .imp-bar .imp-rank, .imp-row4 .imp-rank { white-space: nowrap; letter-spacing: -0.2px; }
  .imp-bar .imp-s { font-size: 9px; }   /* "12th of 443" in the bar; "forwards" on a wider screen and in the tooltip */
  .imp-bar.imp-2l .imp-l { min-height: 2.3em; display: flex; align-items: flex-end; justify-content: center; }   /* every number on one line */   /* the bar keeps this season's WAR; the 3-year figure is on a wider screen */
  .imp-bar .imp-s, .imp-row4 .imp-s { font-size: 9.5px; line-height: 1.2; }
}

/* Type: Montserrat (Google Fonts) for all text, bold for headings, names and scores; it is naturally wide, so no
   font-stretch is needed. Numbers in tables and charts stay in Geist Mono so columns line up. */
.h2, .title, .hero-name, .cmp-name, .gh-ab, .gh-score, .big, .imp-tile b, .ring-n b { font-stretch: 118%; letter-spacing: 0; }
.h2, .cmp-name, .title { font-weight: 700; }
.seg button { font-weight: 600; }

/* Home: the landing page */
.brand[role='link'] { cursor: pointer; border-radius: 8px; }
.brand[role='link']:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn-primary:hover { background: color-mix(in srgb, var(--gold) 88%, #fff); }
/* the hero follows the theme, and so does the logo: grey lettering on the dark theme, dark lettering on the light one */
.home-hero { display: grid; justify-items: center; text-align: center; gap: 18px; padding: 40px 16px 34px; margin-bottom: 16px; border-radius: 16px;
  background: radial-gradient(900px 400px at 50% 35%, var(--bg1) 0%, var(--bg2) 70%); border: 1px solid var(--border); color: var(--fg1); }
[data-theme='dark'] .home-hero { background: radial-gradient(900px 400px at 50% 35%, #17293a 0%, #0b1219 70%); color: #e8eef3; }
[data-theme='dark'] .home-hero .home-lede { color: #9fb0bf; }
.home-logo { width: min(620px, 100%); height: auto; }   /* the puck's lighting and shadow are in the image */
[data-theme='dark'] .home-logo { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35)) drop-shadow(0 0 28px rgba(124, 200, 240, .12)); }
.on-dark, .on-light { display: block; }
[data-theme='dark'] .on-light, :root:not([data-theme='dark']) .on-dark { display: none; }
.home-lede { max-width: 620px; margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg2); }
.home-go { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.home-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 3fr; gap: 16px; align-items: start; }
.home-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-pad { padding: 16px; }
.home-games { display: grid; padding: 6px; }
.home-game { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; text-align: left; color: var(--fg1); }
.home-game:hover { background: var(--bg3); }
.home-teams { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.home-teams img { width: 22px; height: 22px; object-fit: contain; }
.home-right { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.home-fav { font-weight: 600; color: var(--fg1); }
.home-score { font-size: 14px; font-weight: 600; }
.home-more { margin: 2px 8px 10px; }
.home-list { list-style: none; margin: 0; padding: 6px 12px 12px; display: grid; gap: 2px; }
.home-list li { display: grid; grid-template-columns: 18px 36px 1fr auto; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; }
.home-list li:hover { background: var(--bg3); }
.home-rank { color: var(--fg3); font-size: 12px; text-align: right; }
.home-mug { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--bg3); }
.home-who { display: grid; min-width: 0; }
.home-who .n { font-weight: 600; font-size: 14px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-who .sub { font-size: 12px; }
.home-pill { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .home-top { grid-template-columns: 1fr; } .home-hero { padding-top: 24px; } }

/* Tables: the name column (and the rank before it) stays put while the numbers scroll sideways */
.stick-1 tr:not(.sec) > :first-child, .stick-2 tr:not(.sec) > :nth-child(-n+2) { position: sticky; left: 0; z-index: 1; background: var(--bg2); }
.stick-1 thead th:first-child, .stick-2 thead th:nth-child(-n+2) { z-index: 2; }
.stick-2 tr:not(.sec) > :first-child { width: 40px; min-width: 40px; max-width: 40px; }
.stick-2 tr:not(.sec) > :nth-child(2) { left: 39px; }   /* 1px over the # column: Safari can leave a hairline seam between pinned cells that scrolled text shows through */
/* a game log pins its date first, not a #: wide enough for "Oct 19, 25" */
.stick-2.log-t tr:not(.sec) > :first-child { width: 92px; min-width: 92px; max-width: 92px; white-space: nowrap; }
.stick-2.log-t tr:not(.sec) > :nth-child(2) { left: 91px; }
.stick-1 tr:not(.sec) > :first-child, .stick-2 tr:not(.sec) > :nth-child(2) { box-shadow: inset -1px 0 var(--border); }
.stick-1 tbody tr:hover > :first-child, .stick-2 tbody tr:hover > :nth-child(-n+2) { background: var(--bg3); }
.t tr.tot > td:first-child { background: var(--bg1); }

/* Nav icons and the short Compare label only show on a phone, in the tab bar */
#tabs svg { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#tabs .sm { display: none; }
.seg.grp .sm { display: none; }   /* the Players tabs: Skaters, and F/D on a phone */

/* Tablets: the tabs take their own row under the logo */
@media (max-width: 1020px) and (min-width: 721px) {
  .top { flex-wrap: wrap; row-gap: 10px; }
  #tabs { order: 3; width: 100%; justify-content: space-between; }
  #tabs button { flex: 1; }
}

/* the update prompt: above everything, clear of the phone's tab bar */
#update-bar { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 20px; z-index: 90;   /* centred with margins: the fade-in animates transform */
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px; border-radius: 12px; background: #0b1219; color: #e8eef3; border: 1px solid #2e3e4c; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-size: 13px; font-weight: 500;
  animation: fade .3s ease both; }
#update-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phones */
@media (max-width: 720px) {
  /* a slim top bar (logo, status, theme) and the tabs in a bar along the bottom, in thumb reach. The top bar drops its
     blur here: a backdrop filter would pin the fixed tab bar to the top bar instead of the screen */
  /* the tab bar itself is moved out of the top bar onto the page (app.js) */
  .top { gap: 10px; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); background: #0b1219; backdrop-filter: none; }
  /* the top bar stays dark in light mode too, as on a wider screen (the bottom tab bar follows the theme) */
  .brand-logo { height: 34.5px; margin: 0 0 -2.5px; }
  .brand::before { left: -16px; right: -16px; height: 50px; }
  .top-right { gap: 4px; min-width: 0; }
  .top .status { min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the screen in three rows: the top bar, the page's scrolling part (#page-scroll, app.js) and the tab bar. Only the
     middle one scrolls, so neither bar is sticky or fixed: iPhone Safari's toolbar, growing and shrinking as a page
     scrolled, slid a sticky top bar half out of view and left the tab bar floating over the page */
  html, body { height: 100%; overflow: hidden; }
  body { height: 100dvh; display: flex; flex-direction: column; }
  .top { position: relative; flex: none; }
  #page-scroll { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; }
  #page-scroll > main { width: 100%; min-width: 0; margin-left: 0; margin-right: 0; box-sizing: border-box; flex: 1 0 auto; }
  #page-scroll > * { flex-shrink: 0; }
  .tbl-sticky, .cmp-colhead { top: 0; }   /* the top bar sits above the scrolling part, not over it */
  #tabs { position: relative; z-index: 20; flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border-radius: 0;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: #0b1219; border-top: 1px solid rgba(124, 200, 240, .16); }
  /* the tab bar: dark (as the top bar), the tabs a cool grey, the open one ice blue on a faint ice pill; white in light mode (below) */
  #tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 6px 0 5px; border-radius: 10px;
    font-size: 10px; font-weight: 600; letter-spacing: 0; color: #a3b0bc; }
  #tabs button[data-active='true'] { background: rgba(124, 200, 240, .14); box-shadow: none; color: #7cc8f0; }
  #tabs button:hover:not([data-active='true']):not(:disabled) { background: none; }   /* a tap leaves no grey behind (it used to inherit this from the top bar) */
  /* light mode: white, the open tab the light theme's ice blue on a pale ice pill */
  [data-theme='light'] #tabs { background: #ffffff; border-top-color: color-mix(in srgb, var(--gold) 22%, var(--border)); }
  [data-theme='light'] #tabs button { color: #55616d; }
  [data-theme='light'] #tabs button[data-active='true'] { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
  #tabs svg { display: block; }
  #tabs .lg { display: none; } #tabs .sm { display: inline; }
  .seg.grp { display: flex !important; width: 100%; }
  .seg.grp button { flex: 1 1 auto; padding: 5px 6px; }   /* five tabs on one row */
  .seg.grp .lg { display: none; } .seg.grp .sm { display: inline; }

  main { padding: 14px 12px 28px; }
  .h2 { font-size: 24px; line-height: 30px; }
  .section-head { margin-bottom: 12px; }
  .toolbar { width: 100%; }
  .toolbar > select, .toolbar > input[type=search], .toolbar input.cmp-in { flex: 1 1 140px; width: auto; min-width: 0; }
  /* the two searches side by side with "vs" between, the season and swap on the row under; a search's list opens
     across the whole width, under both boxes */
  .toolbar:has(.cmp-pick) { position: relative; }
  .toolbar .cmp-who { flex: 1 1 calc(50% - 22px); flex-direction: column; align-items: stretch; gap: 6px; }
  .toolbar .cmp-who .cmp-season { max-width: none; width: 100%; }
  .toolbar .cmp-pick { min-width: 0; position: static; }
  .toolbar .q-pick { flex: 1 1 140px; } .toolbar .q-pick > input[type=search] { width: 100%; }
  .toolbar .cmp-pick .cmp-in { width: 100%; }
  .toolbar .cmp-pick .cmp-hits { left: 0; right: 0; top: 36px; width: auto; }
  input[type=search] { font-size: 16px; }   /* 16px: an iPhone zooms the page in on any smaller box it types into */
  #night { max-width: none; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; white-space: nowrap; }
  .seg.span-seg { display: flex; flex-wrap: wrap; overflow: visible; }   /* a log's Last 5 ... All: on two rows rather than cut off */
  .seg.span-seg button { flex: 1 1 auto; padding: 5px 8px; }
  .card-head { flex-wrap: wrap; padding: 12px 14px; }
  .info-tip { max-width: calc(100vw - 24px); }
  #update-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }

  /* home */
  .home-hero { padding: 26px 14px 22px; gap: 14px; margin-bottom: 12px; }
  /* Safari can paint fading layers black inside the scroller: no fade-ins here */
  #page-scroll .fade { animation: none; }
  .home-lede { font-size: 14px; }
  .home-grid, .home-top { gap: 12px; }

  /* games */
  .games { grid-template-columns: 1fr; gap: 10px; }
  .big { font-size: 26px; } .team img { width: 32px; height: 32px; }
  .bar { grid-template-columns: 34px minmax(0, 1fr) 100px minmax(0, 1fr) 34px; gap: 6px; font-size: 11px; }
  .pred { padding: 4px 12px 6px; }
  .pred-top { grid-template-columns: 64px 1fr 64px; font-size: 13px; }
  .flow-legend { gap: 8px; }
  .gsheet .flowchart .chart-svg { height: 170px; }

  /* tables: tighter cells, smaller photos; the season tables drop the Team column (the name cell shows the team) */
  .t td, .t th { padding: 7px 8px; }
  .t .hide-sm { display: none; }
  .teams-card .who .m { display: none; }   /* the club's abbreviation and crest are enough in the pinned column */
  .who { gap: 8px; }
  .who img { width: 24px; height: 24px; border-radius: 6px; }
  .stick-2 tr:not(.sec) > :nth-child(2) .n { display: block; max-width: 124px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stick-1 tr:not(.sec) > :first-child .n { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

  /* cards over the page (player, game): the whole screen, rounded cards inside */
  .modal { padding: 0; }
  .sheet { border-radius: 0; border: 0; min-height: 100vh; min-height: 100dvh; }
  .sheet-body { padding: 12px 12px 28px; }

  /* player card banner: photo, name and a smaller Stacked Score ring side by side */
  .hero-row { padding: 20px 12px 0; gap: 10px; min-height: 0; }   /* the Compare and close buttons sit over the ring's column, not the text's: no band kept clear across the top */
  .hero-shot { width: 118px; height: 118px; }
  .hero-shot:not(.team-crest) { width: 146px; }
  .hero-shot.team-crest { padding: 8px 4px 14px; }
  .t-top { grid-template-columns: 1fr; }
  .hero-main { flex-direction: row; align-items: flex-end; gap: 8px; padding-bottom: 14px; }
  .hero-text { flex: 1; }
  .hero-kick { font-size: 10px; letter-spacing: .1em; gap: 6px; }
  .hero-kick .hero-gp { flex-basis: 100%; }   /* games and ice time always on a line of their own: a player's header the same height whatever his club's letters (it wrapped for some and not others, moving the ring) */
  .hero-name { font-size: 22px; overflow-wrap: anywhere; }
  .hero-line { font-size: 12px; }
  .hero-logo { width: 210px; height: 210px; right: -30px; top: -30px; }
  .hero .ring, .cmp-side .ring { width: 64px; }
  .hero .ring svg, .cmp-side .ring svg { width: 64px; height: 64px; }
  .hero .ring-n, .cmp-side .ring-n { height: 64px; }
  .hero .ring-n b, .cmp-side .ring-n b { font-size: 20px; }
  .hero .ring-l, .cmp-side .ring-l { font-size: 9px; margin-top: 6px; }   /* clear of the ring's disc, which reaches past the ring itself */

  /* game sheet banner: the two clubs either side of the score, as on a wide screen, just smaller */
  .ghero { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; padding: 44px 12px 18px; }
  .gh-team, .gh-team.h { flex-direction: column; text-align: center; gap: 6px; }
  .gh-crest { width: 64px; height: 64px; }
  .gh-ab { font-size: 22px; }
  .gh-nm { display: none; }
  .gh-mid { max-width: 44vw; }
  .gh-score { font-size: 32px; gap: 8px; }
  .gh-venue { font-size: 10px; }
  .tm-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .dc-body { padding: 10px 12px 12px; }
  .dc-row { grid-template-columns: 1fr; gap: 4px; }
  .dc-js { gap: 2px; }
  .dc-j { padding: 3px 2px 2px; }
  .dc-j img, .dc-num { width: 56px; height: 47px; }
  /* Advanced split on a phone: Radar | Metrics, Goalies under both */
  .adv-top.adv-split { gap: 8px; margin-bottom: 10px; }
  .adv-top.adv-split .card-head.sub-head { padding: 6px 8px; }
  .adv-top.adv-split .radar { max-height: 240px; }
  .adv-top.adv-split .radar .tick { font-size: 9px; }
  .adv-top.adv-split .dc-body { padding: 8px 10px 10px; }
  .adv-top.adv-split .dc-row { grid-template-columns: 1fr; gap: 6px; justify-items: center; text-align: center; }
  .adv-top.adv-split .dc-js { gap: 18px; justify-content: center; width: 100%; }
  .adv-top.adv-split .dc-j img, .adv-top.adv-split .dc-num { width: 72px; height: 60px; }
  .adv-top.adv-split .dc-j .jsy { height: 96px; }
  .adv-top.adv-split .dc-num { font-size: 22px; }
  .adv-top.adv-split .adv-pct .card-head.sub-head { padding: 6px 8px; }
  .adv-top.adv-split .adv-pct-body { padding: 4px 6px 0; }
  .tm-body { padding: 10px 14px 12px; gap: 9px; }
  .tm-row { grid-template-columns: 44px minmax(0, 1fr) 44px 40px; grid-template-areas: 'l l l s' 'f b a s'; gap: 3px 8px; }
  .tm-row > .tm-l { grid-area: l; } .tm-row > .tm-f { grid-area: f; } .tm-row > .tm-bar { grid-area: b; } .tm-row > .tm-a { grid-area: a; } .tm-row > .tm-s { grid-area: s; align-self: center; }
  .tm-head { grid-template-areas: 'f b a s'; }
  .tm-head > span:first-child { display: none; } .tm-head > span:nth-child(3) { grid-area: b; }

  /* meters: the label, value, rank and tier on one line, the bar full width under them */
  .meters { gap: 9px; }
  .meter, .adv-pct-body .meter { grid-template-columns: minmax(0, 1fr) 56px 84px 44px; grid-template-areas: 'l v r t' 'b b b b'; gap: 4px 8px; }
  .meter > .ml { grid-area: l; } .meter > .mt { grid-area: b; } .meter > .mv { grid-area: v; } .meter > .mr { grid-area: r; text-align: right; }
  .meter > span:last-child { grid-area: t; text-align: right; }
  /* Metrics under the jerseys: label + value + bar only, so the half-column fits */
  .adv-side .meters { gap: 3px; margin-bottom: 2px; }
  .adv-side .adv-pct-body .meter {
    grid-template-columns: minmax(0, 1fr) 34px; grid-template-areas: 'l v' 'b b'; gap: 2px 4px; font-size: 10px;
  }
  .adv-side .adv-pct-body .meter > .ml { grid-area: l; }
  .adv-side .adv-pct-body .meter > .mt { grid-area: b; height: 5px; }
  .adv-side .adv-pct-body .meter > .mv { grid-area: v; font-size: 10px; }
  .adv-side .adv-pct-body .meter > .mr,
  .adv-side .adv-pct-body .meter > span:last-child { display: none; }
  .imp-body { padding: 12px; }
  .imp-tiles { gap: 8px; }
  .imp-tile b { font-size: 28px; }
  .imp-row { grid-template-columns: minmax(0, 1fr) 48px 80px; grid-template-areas: 'l p g' 'b b b'; gap: 4px 8px; }
  .imp-row > .imp-cl { grid-area: l; } .imp-row > .mt { grid-area: b; } .imp-row > .imp-pv { grid-area: p; } .imp-row > .imp-gv { grid-area: g; }
  .hb-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'l v' 'b b'; gap: 4px 8px; }
  .hb-row > .hb-l { grid-area: l; } .hb-row > .hb-t { grid-area: b; } .hb-row > .hb-v { grid-area: v; }
  .adv-pct-body { padding: 12px 14px 2px; }
  .war-body { padding: 12px 8px 6px; }
  .pchart-line .pc-plot { margin-right: 70px; }

  /* comparison */
  .cmp-side, .cmp-side.b { padding: 32px 10px 0; gap: 6px; }
  .cmp-shot { width: 64px; height: 74px; }
  .cmp-side .ring { width: 54px; }
  .cmp-side .ring svg { width: 54px; height: 54px; }
  .cmp-side .ring-n { height: 54px; }
  .cmp-side .ring-n b { font-size: 17px; }
  .cmp-side .ring-l { display: none; }
  .cmp-name { font-size: 16px; line-height: 19px; }
  .cmp-side .focus-chip { top: 8px; font-size: 9px; }
  .cmp-side.a .focus-chip { left: 10px; } .cmp-side.b .focus-chip { right: 10px; }
  .cmp-vs { padding: 0 4px; }
  .cmp-vs span { font-size: 20px; }
  .cmp-body { padding: 12px 12px 18px; }
  #cmp-tab { width: 100%; }
  #cmp-tab button { flex: 1 1 auto; padding: 5px 6px; font-size: 12px; }
  /* a player card's five tabs fit across a phone: no sideways scrolling */
  #card-tab { width: 100%; }
  #card-tab button { flex: 1 1 auto; padding: 5px 4px; font-size: 12px; }
  .seg.sub-seg button { padding: 4px 10px; }
  #cmp-tab .fn { display: none; }
  .h2h { grid-template-columns: minmax(0, 1fr) 40px 40px minmax(0, 1fr); gap: 6px; padding: 7px 0; }
  .h2h .hl { font-size: 11px; overflow-wrap: anywhere; }
  .h2h-group { margin-left: 0; margin-right: 0; }
  .recent { grid-template-columns: 1fr; }
  .rc { padding: 6px 0; }
}

/* Teams: Projections. The chosen club's sum (carried over + roster + coach = projection) and its players in and out */
.proj-build { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 4px 0 0; }
.proj-coachline { font-size: 12px; color: var(--fg2); }
.proj-coachline .m { color: var(--fg3); }
.proj-roster-card { margin-bottom: 16px; }
.empty-line { font-size: 12px; color: var(--fg3); padding: 4px 0; }
.gk-stat { font-size: 11px; color: var(--fg2); }
.pb-step { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg3); min-width: 120px; }
.pb-step > span:first-child { font-size: 11px; font-weight: 600; color: var(--fg2); }
.pb-step .x { font-size: 20px; font-weight: 700; }
.pb-op { align-self: center; color: var(--fg3); font-size: 18px; font-weight: 600; }
/* a club's roster on its Projection tab: goalies, added, gone, injured reserve, two by two (one column on a phone) */
.proj-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; column-gap: 28px; padding: 12px 16px 16px; }
.mv-row.gk-row { grid-template-columns: minmax(0, 1fr) auto auto 44px; }
.mv-row.gk-row > span { white-space: nowrap; }
.pred-goalies { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0 2px; font-size: 12px; color: var(--fg2); }
.pg-label { font-size: 11px; color: var(--fg3); }
.pg-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pg-link { cursor: pointer; } .pg-link:hover b { text-decoration: underline; text-underline-offset: 2px; }   /* a starter opens his player card */
.pg-mug { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--bg3); border: 1px solid var(--border); flex: none; }
.pg-mug.logo { object-fit: contain; padding: 4px; }
.pg-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg1); }
.pred-goalies .chip { font-size: 10px; padding: 1px 6px; flex: none; }
.chip-conf { background: color-mix(in srgb, var(--t-high) 18%, transparent); color: var(--t-high); }
.chip-proj { background: color-mix(in srgb, #d4a017 18%, transparent); color: #a8790a; }   /* a projected starter: gold in either theme */
[data-theme='dark'] .chip-proj { color: #f6c86e; background: rgba(246, 200, 110, 0.16); box-shadow: inset 0 0 0 1px rgba(246, 200, 110, 0.32); }
/* the name on its own line, the status and the confirming account under it: a long account is cut short, never over
   the name or the other side's goalie */
.pg-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pg-txt b { max-width: 100%; line-height: 1.2; }
.pg-meta { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.pg-meta .pg-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-side:last-child .pg-txt { align-items: flex-end; }
.pg-side:last-child .pg-meta { flex-direction: row-reverse; }
.pg-side:last-child { flex-direction: row-reverse; justify-content: flex-start; text-align: right; }
@media (max-width: 720px) {
  .pred-goalies { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pg-label { display: none; }
  .pg-txt b { white-space: normal; }
}
.mv-h { font-weight: 600; font-size: 13px; margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mv-h .sub { font-weight: 400; font-size: 11px; }
.mv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 13px; }
.mv-row .mv-n { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-row .x { text-align: right; }
.proj-coach { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.proj-roster { font: inherit; }
@media (max-width: 720px) {
  .proj-moves { grid-template-columns: 1fr; gap: 14px; }
  .proj-build { padding: 10px 12px 2px; }
  .pb-step { min-width: 0; flex: 1 1 40%; }
  .pb-op { display: none; }
}

/* your pick on a game card: two team buttons and how sure; after puck drop, the pick and how it went */
.my-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 2px; font-size: 12px; }
.mp-l { font-size: 11px; color: var(--fg3); margin-right: 2px; }
.mp-t { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2);
  color: var(--fg1); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.mp-t img, .mp-pk img, .mp-game img { width: 16px; height: 16px; }
.mp-t:hover { border-color: color-mix(in srgb, var(--fg3) 50%, var(--border)); }
.mp-t[data-active=true] { background: var(--gold-soft); border-color: var(--gold); color: var(--fg1); }
.mp-conf { height: 30px; font-size: 12px; }
.mp-conf:disabled { opacity: .45; }
.mp-msg { color: var(--danger, #c0392b); font-size: 11px; }
.mp-pk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mp-res { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg3); color: var(--fg2); }
.mp-res.ok { background: color-mix(in srgb, var(--t-high) 18%, transparent); color: var(--t-high); }
.mp-res.no { background: color-mix(in srgb, var(--t-poor) 16%, transparent); color: var(--t-poor); }
.mp-game { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.mp-cal { padding-top: 14px; display: grid; gap: 4px; max-width: 520px; }
.mp-cal-row { display: grid; grid-template-columns: 80px 80px 80px 1fr; gap: 10px; font-size: 12px; padding: 4px 0; border-top: 1px solid var(--border); }
.mp-cal-row .m { color: var(--fg3); }
@media (max-width: 480px) { .mp-cal-row { grid-template-columns: 54px 82px 74px 1fr; gap: 6px; font-size: 11.5px; } .mp-cal-row .m { white-space: nowrap; } }
.pred-adjust { display: flex; justify-content: space-between; gap: 6px; padding-top: 6px; }
.pa-side { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pa-side + .pa-side { justify-content: flex-end; }
.pred-adjust .chip { font-size: 10px; padding: 1px 7px; }

@media (max-width: 400px) {   /* the narrowest phones (iPhone SE): a player card's and the comparison's tabs a little tighter still */
  #card-tab button, #cmp-tab button { padding: 5px 2px; font-size: 11px; letter-spacing: -.01em; }
  #cmp-tab button { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* the Glossary tab: sections of terms, two columns on a wide screen */
.gloss { columns: 2 420px; column-gap: 16px; }
.gloss-sec { break-inside: avoid; margin-bottom: 12px; }
.gloss-sec summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; color: var(--fg1); }
.gloss-sec summary::-webkit-details-marker { display: none; }
.gloss-sec summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--fg3); border-bottom: 2px solid var(--fg3); transform: rotate(45deg); transition: transform .15s; }
.gloss-sec[open] summary::after { transform: rotate(-135deg); }
.gloss-sec[open] summary { border-bottom: 1px solid var(--border); }
.gloss-n { font-size: 12px; font-weight: 500; color: var(--fg3); }
.gloss-sec dl { margin: 0; padding: 4px 16px 12px; }
.gloss-sec dt { margin-top: 10px; font-weight: 600; font-size: 14px; color: var(--fg1); }
.gloss-sec dd { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--fg2); }

/* a line's card: the open button in the Lines table, and its members on the card */
.ln-open { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg2); color: var(--fg2); cursor: pointer; vertical-align: middle; }
.ln-open:hover { background: var(--hover-bg); color: var(--fg1); }
.t th.ln-open-col, .t td.ln-open-col { width: 44px; min-width: 44px; padding-left: 4px; padding-right: 4px; text-align: center; }   /* the line card's button, beside the names */
.ln-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ln-mems { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; padding: 12px 16px 16px; }
/* a member: jersey (this season) or headshot, name, then position and score */
.ln-mem { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg1);
  color: var(--fg1); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.ln-mem:hover { background: var(--bg3); }
.ln-pic { display: grid; place-items: end center; width: 84px; height: 72px; }
.ln-pic img { width: 84px; height: 72px; object-fit: contain; display: block; }
.ln-pic img.ln-mug { object-position: bottom; border-radius: 10px; }
.ln-pic:has(.jsy) { width: auto; height: auto; }   /* a jersey sets its own size (a headshot keeps the box) */
.ln-mem b { font-weight: 600; font-size: 14px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.ln-meta { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 720px) {
  .ln-mems { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; padding: 10px 12px 12px; }
  .ln-mem { padding: 10px 4px 8px; gap: 5px; }
  .ln-pic, .ln-pic img { width: 68px; height: 58px; }
  .ln-pic:has(.jsy) { width: auto; height: auto; }
  .ln-mem b { font-size: 12.5px; }
  .ln-meta { gap: 6px; }
}
.ln-hero-name { display: flex; flex-wrap: wrap; column-gap: .35em; }
.ln-hero-name .ln-n:not(:last-child)::after { content: '·'; margin-left: .35em; opacity: .6; }   /* after a name, except a row's last: a name that wraps takes its dot with it */
@media (max-width: 720px) { .ln-hero-name { font-size: 19px; line-height: 1.1; } }
/* the column labels over a projection's Added / Gone / Goalies lists */
.mv-row.mv-head { border-top: 0; padding: 0 0 2px; font-size: 11px; font-weight: 600; color: var(--fg3); }
.mv-row.mv-head > span:last-child { text-align: right; }
/* the Schedule view: a day's games as rows */
.sc-day { margin-bottom: 12px; }
.sc-day .card-head { display: flex; justify-content: space-between; align-items: center; }
.sc-today { border-color: color-mix(in srgb, var(--chart-1) 45%, var(--border)); }
.sc-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.sc-row.sc-open { cursor: pointer; }
.sc-row.sc-open:hover { background: var(--bg3); }
.sc-time { color: var(--fg2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.sc-match { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sc-team img { width: 22px; height: 22px; }
.sc-team.won button { color: var(--fg1); } .sc-final { font-weight: 700; }
.sc-row > :last-child { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }
.sc-odds { display: inline-flex; align-items: center; gap: 8px; }
.sc-bar { display: inline-flex; width: 90px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg3); }
.sc-bar i { display: block; height: 100%; }
@media (max-width: 720px) { .sc-row { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; } .sc-time { font-size: 11px; white-space: nowrap; } .sc-match { gap: 6px; } .sc-bar { width: 44px; } }
/* game logs: the underlying numbers sit in a shaded block to the right of the NHL's box score */
.t td.log-adv, .t th.log-adv { background: color-mix(in srgb, var(--chart-1) 6%, transparent); }
.t td.log-adv:not(.log-adv + .log-adv), .t th.log-adv:not(.log-adv + .log-adv) { border-left: 2px solid color-mix(in srgb, var(--chart-1) 35%, var(--border)); }
.log-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* a night or schedule still to come: when its projections were made */
.proj-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--t-mid) 45%, var(--border)); border-radius: 10px;
  background: color-mix(in srgb, var(--t-mid) 10%, transparent); font-size: 13px; color: var(--fg1); }
.chip-streak { display: inline-flex; align-items: center; gap: 3px; }
/* the Schedule's month picker between its back and forward arrows */
.month-nav { align-items: stretch; }
/* the month: its own raised segment between the arrows (a menu of months), no chevron; the arrows plain either side */
.month-nav select { border: 0; background: var(--bg1); background-image: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); border-radius: 6px;
  font-weight: 600; font-size: 13px; color: var(--fg1); padding: 5px 18px; text-align: center; text-align-last: center; min-width: 130px; cursor: pointer;
  -webkit-appearance: none; appearance: none; margin: 0 4px; }
.month-nav button { font-size: 16px; line-height: 1; padding: 5px 12px; }
.month-nav button:disabled { opacity: .35; cursor: default; }
.proj-note.near { border-color: color-mix(in srgb, var(--t-high) 40%, var(--border)); background: color-mix(in srgb, var(--t-high) 8%, transparent); }
/* the Schedule's days: drop-downs like the Glossary's sections */
details.sc-day > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; color: var(--fg1); }
details.sc-day > summary::-webkit-details-marker { display: none; }
details.sc-day > summary::after { content: ''; margin-left: 4px; width: 8px; height: 8px; border-right: 2px solid var(--fg3); border-bottom: 2px solid var(--fg3); transform: rotate(45deg); transition: transform .15s; }
details.sc-day[open] > summary::after { transform: rotate(-135deg); }
details.sc-day[open] > summary { border-bottom: 1px solid var(--border); }
details.sc-day > summary .gloss-n { margin-left: auto; }
.sc-day { scroll-margin-top: 84px; }   /* the jump to today stops below the sticky top bar */
/* the Schedule calendar: a month of weeks, Sunday first, the current week highlighted. A week opens as a card over the
   page (.wsheet): its days along the top, the chosen day's games under them */
.scal { overflow: hidden; }
.scal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 10px 8px 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--fg3); text-align: center; border-bottom: 1px solid var(--border); }
.scal-w { border-bottom: 1px solid var(--border); scroll-margin-top: 84px; }
.scal-w:last-child { border-bottom: 0; }
.scal-w.now { background: color-mix(in srgb, var(--fg1) 7%, transparent); box-shadow: inset 0 0 0 2px var(--fg2); border-radius: 4px; }   /* the current week */
.scal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 6px 8px; cursor: pointer; transition: background-color .15s; }
.scal-row:hover { background: color-mix(in srgb, var(--fg3) 9%, transparent); }
.scal-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.scal-d { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px 2px; border-radius: 8px; font-size: 11px; color: var(--fg2); min-width: 0; }
.scal-d.out { opacity: .4; }
/* the preview: days after today, locked (their games are for members) */
.scal-d.locked { color: var(--fg3); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--fg3) 9%, transparent) 6px 7px); cursor: default; }
.scal-d.locked .lock-ic, .wk-day.locked .lock-ic { opacity: .7; margin-top: 4px; }
.home-week { margin-bottom: 10px; gap: 4px; } .home-week .wk-day { padding: 6px 1px; } .home-week .wk-day b { font-size: 15px; }
.home-res-h { margin: 2px 0 0; font-size: 12px; }
.wk-day.locked { color: var(--fg3); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--fg3) 9%, transparent) 6px 7px); }
.scal-dn { font-size: 12px; font-weight: 700; color: var(--fg2); }
.scal-d.today .scal-dn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fg1); color: var(--bg1); }
.scal-n { font-size: 17px; line-height: 1.1; color: var(--fg1); font-variant-numeric: tabular-nums; }
.scal-m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* the week's card */
.wsheet { width: min(760px, 100%); }
.whead { position: relative; display: flex; align-items: center; gap: 10px; padding: 18px 56px 18px 16px; color: #fff;
  background: linear-gradient(115deg, #111a23 0%, #1c2b38 100%); border-bottom: 2px solid rgba(255, 255, 255, .55); }
.whead .wk-t { flex: 1; min-width: 0; text-align: center; }
.wk-kick { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }
.wk-title { font-size: clamp(18px, 3vw, 24px); font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.whead .btn { color: #fff; }
.whead .btn:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.wk-step { font-size: 20px; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg1); color: var(--fg1); font: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, background-color .15s; }
.wk-day b { font-size: 18px; line-height: 1.1; }
.wk-dw { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fg3); }
.wk-n { font-size: 11px; color: var(--fg2); white-space: nowrap; }
.wk-day:hover:not(:disabled) { border-color: var(--fg3); }
.wk-day.on { border-color: var(--fg2); background: color-mix(in srgb, var(--fg1) 10%, var(--bg1)); }
.wk-day.today b { text-decoration: underline; text-underline-offset: 3px; }
.wk-day:disabled { opacity: .45; cursor: default; }
.wk-dayname { font-weight: 700; font-size: 15px; margin: 0 2px 8px; }
.wk-games .sc-row:first-child { border-top: 0; }
@media (max-width: 720px) {
  .scal-row { gap: 2px; padding: 4px; }
  .scal-d { min-height: 54px; padding: 4px 0; font-size: 10px; }
  .scal-d .scal-m { display: none; }   /* a phone: just the count */
  .whead { padding: 14px 48px 14px 8px; gap: 4px; }
  .wk-days { gap: 3px; }
  .wk-day { padding: 6px 0; border-radius: 8px; }
  .wk-day b { font-size: 16px; }
  .wk-dw { font-size: 10px; }
  .wk-nw { display: none; }   /* a phone: the count alone */
}
/* the Games view's date between its previous- and next-day arrows */
.night-nav { display: inline-flex; align-items: center; gap: 6px; }
.night-step { font-size: 18px; line-height: 1; min-width: 34px; }
.night-step:disabled { opacity: .35; cursor: default; }
/* dark theme: the gold chips ("1st Line Today", New) were dim brown on brown; a brighter gold, a firmer backing */
[data-theme='dark'] .chip-gold { color: #f6c86e; background: rgba(246, 200, 110, 0.16); box-shadow: inset 0 0 0 1px rgba(246, 200, 110, 0.32); }
/* Lines, All Teams: each line's club crest ahead of it */
.ln-crest { width: 22px; height: 22px; flex: none; }
/* a hot or cold tag raised beside a Stacked Score, like an exponent: in the sheets after the score, on a card's ring at its top right */
.t th.streak-col, .t td.streak-col { padding-left: 4px; padding-right: 4px; white-space: nowrap; text-align: center; vertical-align: middle; }   /* the hot and cold tags' own column, after the score */
.chip.streak-sup { font-size: 9.5px; padding: 1px 5px 1px 4px; line-height: 1.3; gap: 2px; vertical-align: middle; }
.chip.streak-sup svg { width: 9px; height: 9px; }
/* the streak's flame or snowflake inside a Good or Bad tag, in its own colour */
.streak-also { display: inline-grid; place-items: center; width: 12px; height: 12px; margin-left: .6px; border-radius: 50%; font-style: normal; flex: none; color: #fff; }
.streak-also svg { width: 8px !important; height: 8px !important; }
.chip.streak-sup svg.ic-hot { width: 4.125px; } .chip.streak-sup svg.ic-cold { width: 6.375px; }   /* cropped icons: 9px tall, their own width */
.streak-also svg.ic-hot { width: 3.667px !important; } .streak-also svg.ic-cold { width: 5.667px !important; }
/* every icon the same 3.2px from its word (the star's points and the letters' own spacing differ), and the tag's
   contents centred: even padding either side */
.chip.chip-streak.streak-sup { padding-left: 5px; padding-right: 5px; }
.ring-badge .chip.chip-streak.streak-sup { padding-left: 6px; padding-right: 6px; }
.chip.streak-sup > svg.ic-good { margin-right: -.1px; } .chip.streak-sup > svg.ic-bad { margin-right: -.3px; } .chip.streak-sup > svg.ic-hot { margin-right: 0; } .chip.streak-sup > svg.ic-cold { margin-right: .8px; }
.chip.chip-streak.streak-sup:has(.streak-also) { padding-left: 4.5px; padding-right: 5.5px; }
.ring-badge .chip.chip-streak.streak-sup:has(.streak-also) { padding-left: 5.5px; padding-right: 6.5px; }
.streak-also-hot { background: #e8590c; } .streak-also-cold { background: #1c7ed6; }
/* every tag the same width, with or without that icon */
.chip.chip-streak.streak-sup { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 66px; }
.ring-badge .chip.chip-streak.streak-sup { width: 72px; }
/* the word centred on its capital letters, level with the icons (a text box keeps room for descenders under the
   letters, which sat the word high); a browser without text-box trimming gets an equivalent nudge */
.chip-streak svg { display: block; flex: none; }
.chip-streak .tag-l { line-height: 1; text-box: trim-both cap alphabetic; }
.chip-streak.streak-sup:not(.ring-badge *) .tag-l { transform: translateY(.5px); }   /* the table's smaller size rounds half a pixel high: down by that */
@supports not (text-box: trim-both cap alphabetic) { .chip-streak .tag-l { position: relative; top: .06em; } }
.ring { position: relative; }
.ring-badge { position: absolute; top: 0; left: calc(100% + 6px); }   /* like an exponent: level with the ring's top, just off it to the right */   /* off the ring, a little to its right, like an exponent */
.ring-badge .chip.streak-sup { transform: none; font-size: 10.5px; padding: 2px 6px 2px 5px; }
.hero .ring-badge .chip-hot { background: #e8590c; color: #fff; }   /* on a club-coloured hero, light ones too (Boston's gold): solid, so it reads on any colour */
.hero .ring-badge .chip-cold { background: #1c7ed6; color: #fff; }
.hero:not(.hero-light) .ring-badge .chip-good { background: #e0a800; color: #1f1a05; }
.hero:not(.hero-light) .ring-badge .chip-bad { background: #5c940d; color: #fff; }
.hero.hero-light .ring-badge .chip-good { background: #1f1a05; color: #fcc419; }   /* gold on a light (often gold) club colour: on dark */
.hero.hero-light .ring-badge .chip-bad { background: #4d7c0f; color: #fff; }
@media (max-width: 720px) { .ring-badge { top: auto; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; } }   /* a phone: the ring sits at the screen's edge, so the tag goes over it, centred */
/* a card's header on a phone: the Hot / Cold / Good / Bad tag shrinks to its icon, a small round badge at the ring's top
   right, like an exponent; a tap gives its explanation (its tooltip) */
@media (max-width: 720px) {
  .hero .ring-badge { top: -3px; right: -7px; left: auto; bottom: auto; transform: none; z-index: 1; }
  .hero .ring-badge .chip.chip-streak.streak-sup { width: 22px; height: 22px; padding: 0; border-radius: 50%; justify-content: center; gap: 0;
    box-shadow: 0 0 0 2px var(--ring-disc, var(--bg1)); }
  .hero .ring-badge .tag-l, .hero .ring-badge .streak-also { display: none; }
  .hero .ring-badge .chip.streak-sup svg { height: 12px; width: auto; margin: 0; }
  /* the Compare button: small, level with the close button */
  /* a phone: Share and Compare as round icon buttons (the Compare tab's arrows; a box with an arrow out for Share) */
  .psheet .hero-x { top: 10px; right: 10px; }
  .hero-cmp { top: 10px; right: 50px; }
  .hero-share { top: 10px; right: 90px; }
  :is(.tsheet, .lsheet) .hero-share { right: 50px; }
  /* the three the same: a 32px disc with the same fill and edge, a 15px stroked icon in each */
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .22); color: inherit; }
  :is(.psheet, .tsheet, .lsheet) .hero-light :is(.hero-cmp, .hero-share, .hero-x) { background: rgba(255, 255, 255, .4); border-color: rgba(0, 0, 0, .15); }
  :is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) > span { display: none; }
  :is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) .ic { display: block; width: 15px; height: 15px; }
  :is(.hero-cmp, .hero-share) > span { display: none; }
  :is(.hero-cmp, .hero-share) .ic { display: block; }
  .hero-x { top: 8px; right: 8px; width: 38px; height: 38px; font-size: 19px; }
}
/* the header row over the rows (and the frozen left columns) as they scroll under it; its frozen corner over both */
.t thead th { z-index: 2; }
.t.stick-1 thead tr > th:first-child, .t.stick-2 thead tr > th:nth-child(-n+2) { z-index: 3; }
/* the projection's coach line: the head coach on the left, when the projections were made on the right */
.proj-coachline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.proj-asof { color: var(--fg3); }

/* scroll bars in the theme's colours: thin, a muted thumb on a clear track (dark ones in the dark theme) */
:root, [data-theme='light'] { color-scheme: light; }
[data-theme='dark'] { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg3) 70%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--fg3) 60%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--fg2); }
/* a card holding a table: clip its corners without making it a scroll box (overflow: hidden would), so the pinned
   header and top scroll bar stick to the page, not to the card */
.card:has(> .tbl-sticky), .chart-card:has(> .tbl-sticky) { overflow: clip; }

/* comparing two players from a club with a dark colour: the second banner light, dark text, the regular logo */
.cmp-side.cmp-light { color: #15171b; }
.cmp-side.cmp-light .cmp-logo { opacity: .22; }
.cmp-side.cmp-light .hero-kick, .cmp-side.cmp-light .hero-line { color: #15171b; }
/* its ring sits at the club-colour end of the banner (blue for Toronto): white, as on the first player's */
.cmp-side.cmp-light .ring-l { color: #fff; }
/* a schedule row whose game card is on its way */
.sc-row.sc-loading { opacity: .55; cursor: progress; }
.sc-row.sc-loading .sc-time::after { content: ' · Loading…'; }
/* Comparison, before two players are chosen: ready-made matchups, in the style of Home's top lists */
.cx-h { margin: 22px 0 12px; font-size: 18px; }
.cx-top { margin-bottom: 16px; }
.cx-list { display: grid; gap: 6px; padding: 8px 10px 12px; }
.cx-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; padding: 8px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg1); text-align: left; color: var(--fg1); cursor: pointer; transition: background .15s, transform .15s; }
.cx-pair:hover { background: var(--hover-bg); transform: translateY(-1px); }
.cx-who { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.cx-who.b { grid-template-columns: auto minmax(0, 1fr) 36px; text-align: right; }
.cx-who.b > .home-mug { order: 3; } .cx-who.b > span { order: 2; } .cx-who.b > .home-pill { order: 1; }
.cx-who > span { display: grid; min-width: 0; }
.cx-who b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-who .sub { font-size: 11px; }
.cx-who .home-pill { font-size: 16px; }
.cx-vs { font-size: 11px; color: var(--fg3); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .cx-top { grid-template-columns: 1fr; } }
/* Compare's sub tabs (Skaters, Goalies, Teams, Multi) over its own search row */
.section-head > .toolbar + .toolbar { margin-top: -4px; }
/* Teams: the club's crest where a player's headshot goes, and on the matchup list */
.cmp-crest { object-fit: contain; object-position: center; padding: 10px 4px 22px; box-sizing: border-box; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.cx-crest { object-fit: contain; border-radius: 0; background: none; }
.cx-top-1 { grid-template-columns: minmax(0, 620px); }
/* Multi: the table of picked players or clubs */
.mx-pick .cmp-in { width: 270px; }
.mx-kind-l { display: inline-flex; align-items: center; gap: 6px; }
.mx-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mx-quick .btn { padding: 4px 10px; font-size: 12px; }
.mx-cats { justify-content: space-between; margin-bottom: 10px; }
.mx-who { position: relative; padding-right: 26px; }
/* the remove button: an X on a grey disc, plain to see in either theme without shouting; red under the pointer */
.mx-del { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center; padding: 0;
  border: 1px solid color-mix(in srgb, var(--fg3) 45%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--fg3) 22%, var(--bg1));
  color: var(--fg1); font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.mx-del:hover, .mx-del:focus-visible { background: var(--t-poor); border-color: var(--t-poor); color: #fff; }
.mx-lead .val, .mx-lead-key { font-weight: 800; color: var(--fg1); box-shadow: inset 0 -2px 0 var(--accent); }
.cmp-hits li.mx-all .nm { color: var(--accent, var(--fg1)); }
.cmp-hits li.mx-done { opacity: .55; }
.cmp-hits .mx-n { font-size: 13px; color: var(--fg3); }
@media (max-width: 720px) {
  .mx-pick { flex: 1 1 100%; } .mx-pick .cmp-in { width: 100%; }
  .mx-kind-l { flex: 1 1 100%; } .mx-kind-l select { flex: 1; }
}
/* stat sheets: the columns every category shares keep one width, so switching categories (Individual, On-Ice, ...;
   Shares, Per Game, Finishing; forward lines, pairs, units) only changes the stat columns, which take the rest. Kept
   tight, so more stats fit before the sheet scrolls sideways */
@media (min-width: 721px) {
  .sheet-players th, .sheet-teams th, .sheet-lines th { box-sizing: border-box; }
  .sheet-players :is(th, td), .sheet-teams :is(th, td), .sheet-lines :is(th, td) { padding-left: 7px; padding-right: 7px; }
  .sheet-players th[data-k="name"], .sheet-teams th[data-k="team"] { width: 180px; min-width: 180px; max-width: 180px; }
  .sheet-players td:nth-child(2) .n, .sheet-teams td:nth-child(2) .m { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-players th[data-k="team"] { width: 48px; min-width: 48px; }
  .sheet-players th[data-k="gp"], .sheet-teams th[data-k="gp"], .sheet-lines th[data-k="gp"] { width: 40px; min-width: 40px; }
  .sheet-players th[data-k="toigp"], .sheet-lines th[data-k="toi"] { width: 62px; min-width: 62px; }
  .sheet-players th[data-k="score"], .sheet-teams th[data-k="score"], .sheet-lines th[data-k="score"] { width: 84px; min-width: 84px; white-space: normal; line-height: 1.25; }   /* "Stacked Score" on two lines */
  .sheet-players th[data-k="streak"], .sheet-teams th[data-k="streak"], .sheet-lines th[data-k="streak"] { width: 58px; min-width: 58px; }
  .sheet-players th[data-k="war"] { width: 54px; min-width: 54px; }
  .sheet-players th[data-k="g"], .sheet-players th[data-k="a"], .sheet-players th[data-k="p"] { width: 34px; min-width: 34px; }
  .sheet-players th[data-k="sa"], .sheet-players th[data-k="ga"] { width: 46px; min-width: 46px; }
  .sheet-players th[data-k="gsax"] { width: 58px; min-width: 58px; }
  .sheet-teams th[data-k="rec"] { width: 76px; min-width: 76px; }
  .sheet-teams th[data-k="pts"] { width: 44px; min-width: 44px; }
  .sheet-teams th[data-k="ptsp"] { width: 58px; min-width: 58px; }
  .sheet-teams th[data-k="proj"] { width: 64px; min-width: 64px; }
  /* the players column: just wide enough for its jerseys (--ln-n of them: 2 a pair, 3 a line, 4 or 5 a unit) */
  .sheet-lines th[data-k="line"] { width: calc(var(--ln-n, 3) * 82px + 14px); min-width: calc(var(--ln-n, 3) * 82px + 14px); }
  .sheet-lines th[data-k="team"] { width: 52px; min-width: 52px; }
  .sheet-lines th[data-k="slot"] { width: 52px; min-width: 52px; }
}
/* a phone: no fixed widths (they'd fill the screen with the name column); the name cells stay narrow so the stats
   start on screen, and the sheet scrolls sideways for the rest */
@media (max-width: 720px) {
  .sheet-players :is(th, td), .sheet-teams :is(th, td), .sheet-lines :is(th, td) { padding-left: 6px; padding-right: 6px; }
  .sheet-players td:nth-child(2) .n { display: block; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* a club's full name stays hidden here: its crest and abbreviation are enough (.teams-card .who .m) */
  .sheet-players th[data-k="score"], .sheet-teams th[data-k="score"], .sheet-lines th[data-k="score"] { white-space: normal; line-height: 1.25; min-width: 64px; }
  .sheet-lines .ln-who { font-size: 12.5px; line-height: 1.3; min-width: 92px; }
}
/* the stat-sheet pages use more of a wide screen */
main:has(.sheet-players, .sheet-teams, .sheet-lines) { max-width: 1600px; }   /* a little wider than the usual 1480 */
/* Lines: the line's cell opens its card */
.lines-card td:has(> .ln-who) { cursor: pointer; }
.lines-card tbody tr:hover td:has(> .ln-who) { background: var(--bg3); }   /* solid, as on the other sheets: it's pinned, and the stats scroll under it */
/* the light/dark button over an open card: the header's button, in the same spot, above the card's dimmed backdrop */
.theme-float { position: fixed; z-index: 60; display: none; background: #16212c; color: #d3dde6; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.theme-float:hover { color: #fff; }
body.modal-open .theme-float { display: inline-flex; }
@media (max-width: 720px) { body.modal-open .theme-float { display: none; } }   /* a phone's card fills the screen: its own corner buttons are there */

/* Couch and TV. html[data-tv] is set in the page head for an Android TV (and other television) browser,
   and for a large screen with a remote: no hover, a coarse pointer. Bigger type and targets, a focus ring
   a remote can see, overscan padding, and no blur over the page (that blur is what stutters on a TV GPU). */
html[data-tv] { scroll-padding-top: 96px; }
html[data-tv] body { font-size: 18px; }
html[data-tv] main { max-width: min(1760px, calc(100vw - 48px)); padding: 28px 48px 72px; }
html[data-tv] .top { gap: 20px; row-gap: 10px; padding: 16px 40px; background: #0b1219; flex-wrap: wrap; }
html[data-tv] .brand-logo { height: 56px; margin-bottom: -4px; }
html[data-tv] .seg button { padding: 10px 16px; font-size: 16px; min-height: 44px; }
@media (max-width: 1240px) {   /* too narrow for one row: the tabs get a row of their own, the buttons stay up by the logo */
  html[data-tv] #tabs { order: 3; width: 100%; justify-content: space-between; }
  html[data-tv] #tabs button { flex: 1; }
}
html[data-tv] .btn, html[data-tv] select, html[data-tv] input[type=search] { height: 44px; font-size: 16px; }
html[data-tv] .btn { padding: 0 16px; }
html[data-tv] .theme-toggle { width: 44px; height: 44px; }
html[data-tv] .h2 { font-size: 40px; line-height: 48px; }
html[data-tv] .sub { font-size: 16px; }
html[data-tv] .title { font-size: 18px; }
html[data-tv] .info-tip { font-size: 16px; line-height: 1.45; max-width: min(420px, calc(100vw - 32px)); }
html[data-tv] .sub-tip::after { width: 22px; height: 22px; margin-left: 8px; font-size: 13px; }
html[data-tv] h2.sub-tip::after { vertical-align: 8px; }
html[data-tv] table.t { font-size: 16px; }
html[data-tv] .t th { font-size: 13px; padding: 12px 14px; }
html[data-tv] .t td { padding: 12px 14px; }
html[data-tv] .who img { width: 36px; height: 36px; }
html[data-tv] .chip { height: 26px; font-size: 13px; padding: 0 10px; }
html[data-tv] .status { font-size: 15px; }
html[data-tv] .foot { font-size: 15px; padding: 28px 48px 48px; }
html[data-tv] .games { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 18px; }
html[data-tv] .home-lede { font-size: 22px; }
html[data-tv] button:focus-visible, html[data-tv] a:focus-visible, html[data-tv] select:focus-visible,
html[data-tv] input:focus-visible, html[data-tv] [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
html[data-tv] .modal { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 0, 0, .72); }
html[data-tv] .t tbody tr, html[data-tv] .game, html[data-tv] .btn, html[data-tv] .theme-toggle { transition: none; }
html[data-tv] .btn:hover, html[data-tv] .game:hover, html[data-tv] .theme-toggle:hover { transform: none; }
html[data-tv] .dot.live { animation: none; }
/* the season list a remote can actually move through. The browser's own menu does not take a D-pad. */
.tv-menu { position: fixed; z-index: 200; max-width: min(420px, calc(100vw - 16px)); max-height: min(60vh, 520px);
  display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: var(--bg1); color: var(--fg1);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.tv-menu-list { overflow: auto; min-height: 0; flex: 1; }
.tv-menu-q { width: 100%; margin-bottom: 6px; flex: none; }
.tv-opt { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 16px; }
.tv-opt[data-on='true'] { background: var(--accent-soft); font-weight: 600; }
.tv-opt:hover, .tv-opt:focus-visible { background: var(--bg3); }
.tv-menu-empty { padding: 10px 12px; color: var(--fg3); }

/* a phone: the # column only as wide as a three-digit rank (smaller digits), so the stats get the room */
@media (max-width: 720px) {
  .stick-2 tr:not(.sec) > :first-child { width: 30px; min-width: 30px; max-width: 30px; padding-left: 6px !important; padding-right: 2px !important; }
  .stick-2 tr:not(.sec) > :first-child, .stick-2 tr:not(.sec) > :first-child .mono { font-size: 11px; }
  .stick-2 tr:not(.sec) > :nth-child(2) { left: 29px; }   /* still 1px over the # column (no seam) */
  .stick-2.log-t tr:not(.sec) > :first-child { width: 74px; min-width: 74px; max-width: 74px; }
  .stick-2.log-t tr:not(.sec) > :nth-child(2) { left: 73px; }
}
/* a sort's arrow; on a phone every sortable heading keeps the arrow's room (unseen), so moving the arrow to another
   heading changes no column's width and nothing shifts */
.sort-ar.off { display: none; }
@media (max-width: 720px) { .sort-ar.off { display: inline; visibility: hidden; } }
/* the slim name only shows on a phone table scrolled sideways (below) */
.who-box > .who-s { display: none !important; }
.who-box > span.who-s { color: var(--fg1); font-weight: 500; }   /* a slim name that opens no card (a prospect with no NHL games) reads as the rest */
/* a sortable table on a phone, scrolled sideways (tableScrollers): the pinned columns slim down so more stats show,
   eased over a quarter second rather than in one frame. Each name crossfades to its slim version as its cell narrows,
   and each Streak tag shrinks to its icon; the stats glide left into the room it makes */
@media (max-width: 720px) {
  .tbl-wrap, .tbl-sticky { --ease: .45s cubic-bezier(.33, 0, .2, 1); }   /* expanding: the same as collapsing */
  /* collapsing: gentle at the start, then an even glide (no rush in the middle) */
  .tbl-wrap.tbl-compact { --ease: .45s cubic-bezier(.33, 0, .2, 1); }
  /* a name cell: the full version (headshot, name, team line) and the slim one (surname) both stay put; the cell's
     width eases from one to the other (set by tableScrollers) while they crossfade. The full one keeps the row's height */
  .who-box { position: relative; overflow: hidden; transition: width var(--ease); }
  .who-box > .who { width: max-content; transition: opacity var(--ease); }
  /* the full player name column one fixed width (a headshot and a name as long as "Nathan MacKinnon"; a longer one
     ends in an ellipsis): its width no longer follows which players a sort brings up, so the columns after it don't shift */
  .sheet-players .who-box > .who { width: var(--full-w, 160px); }
  .sheet-players .who-box > .who > div { min-width: 0; flex: 1; }
  .sheet-players .who-box > .who .n { max-width: 100% !important; }
  .who-box > .who-s { max-width: var(--slim-max, 96px) !important; overflow: hidden; text-overflow: ellipsis; }   /* no wider than "MacKinnon" (tableScrollers measures it) */
  .who-box > .who-s { display: block !important; position: absolute; left: 0; top: 50%; transform: translateY(-50%); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--ease); }
  .tbl-compact .who-box > .who { opacity: 0; pointer-events: none; }
  .tbl-compact .who-box > .who-s { opacity: 1; pointer-events: auto; }
  .tbl-compact .who-box:not([style*='width']) > .who-s { position: static; transform: none; }   /* redrawn while slim: sized by the slim one */
  .tbl-compact .who-box:not([style*='width']) > .who { position: absolute; }
  .tbl-compact td:nth-child(2) .n { max-width: 96px; }
  /* Streak: the tag narrows to a round badge around its main icon; its word and any second icon fold away */
  .tbl-wrap .chip.chip-streak.streak-sup { transition: width var(--ease), padding var(--ease); }
  .tbl-wrap .chip-streak .tag-l, .tbl-wrap .chip-streak .streak-also { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 40px; transition: max-width var(--ease), opacity var(--ease), margin var(--ease); }
  .tbl-wrap .chip-streak.streak-sup .tag-l { transform: none; }   /* as a block it already sits level: no half-pixel nudge here */
  .tbl-compact .chip.chip-streak.streak-sup { width: 18px; padding: 0 !important; }   /* the tag's own height: nothing moves up or down */
  .tbl-compact .chip-streak .tag-l, .tbl-compact .chip-streak .streak-also { max-width: 0; opacity: 0; margin: 0 !important; }
  .tbl-compact .chip-streak > svg { margin: 0 !important; }
  .t th.streak-col, .t td.streak-col { transition: padding var(--ease); }
  .tbl-compact .t th.streak-col, .tbl-compact .t td.streak-col, .tbl-compact.t th.streak-col { padding-left: 4px; padding-right: 4px; }
  /* its heading: "Streak" folds into "Stk" */
  th.streak-col .hl-f { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; max-width: 4em; transition: max-width var(--ease), opacity var(--ease); }
  th.streak-col > span:first-child::after { content: 'Stk'; display: inline-block; vertical-align: bottom; overflow: hidden; max-width: 0; opacity: 0; transition: max-width var(--ease), opacity var(--ease); }
  .tbl-compact th.streak-col .hl-f { max-width: 0; opacity: 0; }
  .tbl-compact th.streak-col > span:first-child::after { max-width: 2em; opacity: 1; }
}
/* a touch screen's tooltip: a short note at the top right, under the header (over a card, under its own corner buttons),
   fading in and out. As wide as its text needs, up to about two thirds of the screen */
.info-tip.as-note { left: auto; right: max(10px, env(safe-area-inset-right)); top: calc(var(--top-h, 56px) + 4px); width: max-content;
  max-width: min(260px, 68vw); padding: 4px 8px; border-radius: 7px; font-size: clamp(10px, 2.7vw, 11.5px); line-height: 1.3;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; }
.info-tip.as-note[hidden] { display: none; }
.info-tip.as-note { pointer-events: auto; }   /* a tap on the note closes it, and only that (until it's gone, fading out too) */
.info-tip.as-note b { display: inline; margin-right: 5px; font-size: inherit; }   /* the heading runs into the text, saving a line */
.info-tip.as-note.show { opacity: 1; transform: none; }
body.modal-open .info-tip.as-note { top: calc(env(safe-area-inset-top) + 46px); }   /* over a card, under its own corner buttons */
/* a table redrawn by a sort goes straight back to the state it was in */
.tbl-instant, .tbl-instant *, .tbl-instant *::before, .tbl-instant *::after { transition: none !important; }   /* the pseudo-elements too ("Stk") */
/* the floating header copy follows the real one's widths frame by frame: no easing of its own */
.tbl-sticky * { transition: none !important; }
/* it slides with the table on every frame of a sideways swipe: on its own layer, so that's a move, not a repaint */
.tbl-float > table, .tbl-float th[style*='translateX'] { will-change: transform; }
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .tbl-wrap *, .tbl-sticky * { transition: none !important; }
}

/* the account page: who's signed in, and their API keys */
.acct { display: grid; gap: 16px; max-width: 760px; }
.acct-body { padding: 14px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-keys { display: grid; gap: 12px; justify-content: stretch; }
.acct-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-who b { font-weight: 600; word-break: break-all; }
.acct-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--gold-soft, var(--bg3)); color: var(--gold); font-weight: 700; font-size: 17px; }
.acct-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--fg3); }
.key-form { display: flex; gap: 8px; flex-wrap: wrap; }
.key-form input { flex: 1 1 220px; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg1); color: var(--fg1); font: inherit; }
.key-err { color: #e5534b; font-size: 13px; min-height: 0; }
.key-err:empty { display: none; }
.key-new { border: 1px solid var(--gold); border-radius: 10px; padding: 12px; background: var(--gold-soft, transparent); display: grid; gap: 8px; }
.key-new p { margin: 0; font-size: 13px; color: var(--fg2); }
.key-premium { display: grid; gap: 10px; justify-items: start; }
.key-premium p { margin: 0; font-size: 13px; color: var(--fg2); }
.key-premium .key-list { justify-self: stretch; }
.key-copy { display: flex; gap: 8px; align-items: center; }
.key-copy code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg1); border: 1px solid var(--border); font-size: 12.5px; word-break: break-all; user-select: all; }
.key-ex { margin: 0; padding: 10px; border-radius: 8px; background: var(--bg1); border: 1px solid var(--border); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; color: var(--fg2); }
.key-list { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 12px; border-top: 1px solid var(--border); }
.key-row:first-child { border-top: 0; }
.key-row.off { opacity: .55; }
.key-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.key-main b { font-weight: 600; }
.key-hint { font-size: 12px; color: var(--fg3); }
.key-meta { grid-column: 1; font-size: 12px; color: var(--fg3); }
.key-row > .btn, .key-row > .chip { grid-column: 2; grid-row: 1 / span 2; }
.key-help summary { cursor: pointer; font-size: 13px; color: var(--fg2); font-weight: 600; }
.key-help p { font-size: 13px; color: var(--fg2); margin: 8px 0; }
.key-help code { font-size: 12px; }
.key-help ol { margin: 8px 0; padding-left: 18px; font-size: 13px; color: var(--fg2); line-height: 1.6; }
.key-routes { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12.5px; margin: 10px 0; }
.key-routes code { white-space: nowrap; color: var(--fg1); }
.key-routes span { color: var(--fg2); }
@media (max-width: 640px) { .key-routes { grid-template-columns: 1fr; gap: 2px; } .key-routes span { margin-bottom: 6px; } }

/* a player's NHLe on his card: each recent season outside the NHL, its league's factor and what it comes to over 84 games */
.nhle-seasons { display: grid; gap: 2px; margin-top: 12px; font-size: 13px; }
.nhle-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 60px 50px 60px 50px; gap: 8px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--border); }
.nhle-row > :nth-child(n + 3) { text-align: right; }
@media (max-width: 720px) { .nhle-row { grid-template-columns: 58px minmax(0, 1fr) 48px 40px 50px 40px; gap: 4px; font-size: 12px; } }


/* the login card (openLogin): the /join page as it is, in a player card's shape (its width, its rounded frame); the
   page's own colours and glow, its logo, its two boxes */
.login-sheet { position: relative; --lg-bg: #ffffff; --lg-glow: #eaf2f8; --lg-card: #f3f7fa; --lg-line: #e3e3e3; --lg-gold: #1f7fbf; --lg-gold-hi: #186ca3; --lg-on: #ffffff; --lg-ok: #15803d; --lg-bad: #c8392b;
  background: radial-gradient(900px 500px at 50% 30%, var(--lg-glow) 0%, var(--lg-bg) 65%); background-color: var(--lg-bg); }
[data-theme='dark'] .login-sheet { --lg-bg: #0b1219; --lg-glow: #16212c; --lg-card: #111a23; --lg-line: #1c2b38; --lg-gold: #7cc8f0; --lg-gold-hi: #a3dbf7; --lg-on: #0b1219; --lg-ok: #4ade80; --lg-bad: #f0645a; }
.login-sheet .hero-x { z-index: 2; color: var(--fg2); background: var(--bg3); }
.login-sheet .hero-x:hover { background: var(--hover-bg); color: var(--fg1); }
.login-page { display: grid; place-items: center; padding: 56px 16px 40px; }
.login-hero { display: grid; justify-items: center; gap: 22px; text-align: center; width: 100%; max-width: 560px; }
.login-logo { width: min(560px, 100%); height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .12)); }
[data-theme='dark'] .login-logo { filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .45)); }
[data-theme='dark'] .login-logo.on-light, [data-theme='light'] .login-logo.on-dark { display: none; }
.login-tag { margin: 0; font-size: 16px; line-height: 1.6; color: var(--fg2); }
.login-box { width: 100%; display: grid; gap: 12px; padding: 20px; border: 1px solid var(--lg-line); border-radius: 14px; background: var(--lg-card); text-align: left; }
.login-box .login-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--fg1); }   /* not an h2: headings are title-cased site-wide, this keeps the page's own wording */
.login-box p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fg2); }
.login-box form { display: grid; gap: 10px; }
.login-row { display: flex; gap: 10px; flex-wrap: wrap; }
.login-row input { flex: 1 1 200px; min-width: 0; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--lg-line); background: var(--lg-bg); color: var(--fg1); font: inherit; font-size: 16px; font-weight: 500; }
.login-row input:focus { outline: 2px solid var(--lg-gold); outline-offset: 0; border-color: transparent; }
.login-row input.code { letter-spacing: .12em; text-transform: uppercase; }
.login-pw { position: relative; flex: 1 1 200px; min-width: 0; display: flex; }
.login-pw input { flex: 1; padding-right: 48px; }
.login-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--fg3); cursor: pointer; }
.login-eye:hover, .login-eye[aria-pressed='true'] { color: var(--fg1); }
.login-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--lg-gold); color: var(--lg-on);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s; }
.login-btn:hover { transform: translateY(-1px); background: var(--lg-gold-hi); }
.login-btn:disabled { opacity: .6; cursor: default; transform: none; }
.login-stay { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 14px; color: var(--fg2); cursor: pointer; user-select: none; }
.login-stay input { width: 18px; height: 18px; margin: 0; accent-color: var(--lg-gold); cursor: pointer; }
.login-msg { font-size: 14px; font-weight: 600; min-height: 1.4em; }
.login-msg.ok { color: var(--lg-ok); } .login-msg.error { color: var(--lg-bad); } .login-msg.pending { color: var(--lg-gold); }
.login-small { margin: 0; font-size: 13px; color: var(--fg3); }
.login-small a { color: var(--fg2); }
@media (max-width: 520px) { .login-hero { gap: 18px; } .login-box { padding: 16px; } .login-btn { width: 100%; } .login-page { padding-top: 64px; } }
/* Compare: on a ready-made matchup, arrows to the one before and after, and where it is in the list */
.cx-nav { align-items: center; }
.cx-nav .btn { height: 30px; padding: 0 12px; font-size: 16px; }
.cx-at { padding: 0 8px; font-size: 12px; color: var(--fg2); white-space: nowrap; }

/* goal replay (a goal dot on the xG chart): the NHL's tracking of the seconds before the goal, on a rink */
.replay-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.replay-card { width: min(920px, 100%); background: var(--bg1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.replay-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.replay-title { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 15px; color: var(--fg1); }
.replay-sub { font-weight: 500; font-size: 12.5px; color: var(--fg3); }
.replay-x { background: none; border: 0; color: var(--fg2); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.replay-x:hover { background: var(--bg3); }
.replay-body { padding: 12px 14px 14px; }
.replay-body .empty { padding: 30px 6px; }
.replay-rink { width: 100%; height: auto; display: block; }
.rk-ice { fill: #f4f8fb; } .rk-boards { fill: none; stroke: #9aa7b3; stroke-width: 10; }
.rk-red { stroke: #d6404a; } .rk-blue { stroke: #3d74c5; }
.rk-crease { fill: rgba(91, 160, 230, .35); stroke: #d6404a; stroke-width: 3; } .rk-net { fill: none; stroke: #d6404a; stroke-width: 5; }
.rk-line-r { fill: none; stroke: #d6404a; stroke-width: 3; opacity: .7; } .rk-line-b { fill: none; stroke: #3d74c5; stroke-width: 3; opacity: .7; }
.rk-dot { fill: #d6404a; }
[data-theme='dark'] .rk-ice { fill: #dfe7ee; }
.rp-p circle { fill: var(--away); stroke: #fff; stroke-width: 5; }
.rp-p.home circle { fill: var(--home); }
.rp-p.scorer circle { stroke: #f5c542; stroke-width: 11; }
.rp-p text { fill: #fff; font: 700 30px 'Montserrat', ui-sans-serif, system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.rp-puck { fill: #111; stroke: #fff; stroke-width: 4; }
.rp-trail { fill: none; stroke: #111; stroke-opacity: .35; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.replay-ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.replay-ctl > button { background: var(--bg3); border: 1px solid var(--border); color: var(--fg1); border-radius: 8px; min-width: 36px; height: 32px; cursor: pointer; font-size: 13px; }
.rp-seek { flex: 1; accent-color: var(--gold); min-width: 0; }
.rp-clock { font-size: 12px; color: var(--fg2); width: 42px; text-align: right; }
.replay-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--fg2); align-items: center; }
.replay-key > span { display: inline-flex; align-items: center; gap: 6px; }
.replay-src { margin-left: auto; color: var(--fg3); }
.replay-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--away); flex: none; }
.replay-dot.home { background: var(--home); } .replay-dot.puck { background: #111; box-shadow: 0 0 0 1.5px #fff; }
.replay-dot.ring { background: transparent; box-shadow: inset 0 0 0 2.5px #f5c542; }
@media (max-width: 720px) {
  .replay-modal { padding: 8px; align-items: flex-start; padding-top: calc(env(safe-area-inset-top) + 56px); }
  .replay-body { padding: 10px; } .rp-speed button { padding: 4px 7px; } .replay-src { margin-left: 0; }
}

/* in-game win probability: the chance now (under the pre-game call on a live card) and its chart in the game sheet */
.wp-mini { padding-top: 0; }
.wp-wrap { padding-top: 6px; }
.wp-head { font-size: 12px; font-weight: 600; color: var(--fg2); padding: 0 6px 4px; }
.wpchart { position: relative; }
.wp-area { stroke: none; } .wp-area.home { fill: var(--home); opacity: .22; } .wp-area.away { fill: var(--away); opacity: .22; }
.chart .wp-ln { stroke: var(--fg2); }
/* the sides and the 50% line labelled inside the chart (the home side at the top left, the away side at the bottom left,
   50% at the right end of its line), so nothing hangs past the card on a phone */
.wp-lab { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.wp-lab.hi { transform: translate(4px, 2px); }
.wp-lab.lo { transform: translate(4px, calc(-100% - 2px)); }
.wp-lab.mid { transform: translate(-100%, calc(-100% - 3px)); font-weight: 500; letter-spacing: 0; }
@media (max-width: 720px) { .wpchart .fl-goal { width: 7px; height: 7px; box-shadow: 0 0 0 1.5px var(--bg2), 0 0 0 2.5px var(--fg1); } }   /* a phone's narrower chart: goals a minute or two apart stay two dots */

/* the Players tab's custom date range: two dates and Show, beside the range menu */
.custom-range { display: inline-flex; align-items: center; gap: 6px; }
.custom-range[hidden] { display: none; }
.custom-range input[type="date"] { height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg1); color: var(--fg1); font: inherit; font-size: 13px; }

/* the methodology page (#methodology) */
.methods { display: grid; gap: 14px; max-width: 820px; }
.method-body { padding: 14px 16px 16px; }
.method p { margin: 0 0 10px; line-height: 1.55; color: var(--fg2); font-size: 14px; }
.method p:last-child { margin-bottom: 0; }
.method .mp-cal { padding-top: 4px; }

/* a club's jersey (drawJersey): an SVG drawn on the template; each place it shows sets its height, the width follows.
   Bigger on the player card, where the name bar can be read */
.jsy { display: block; height: 54px; width: auto; aspect-ratio: 800 / 890; margin: 0 auto; overflow: visible; }
[data-theme='dark'] .jsy { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .45)); }   /* a black jersey's edge on the dark page */
.dc-j .jsy { height: 104px; } .adv-side .dc-j .jsy { height: 76px; } .card-top .dc-j .jsy { height: 88px; }
.ln-j-pic .jsy { height: 38px; } .ln-pic .jsy { height: 128px; }
@media (max-width: 720px) { .dc-j .jsy { height: 90px; } .card-top .dc-j .jsy { height: 76px; } .ln-j-pic .jsy { height: 30px; } .ln-pic .jsy { height: 96px; } }
/* a jersey drawn before its lettering's fonts are in (jersey.js, data-jw): the name and number hidden until they are,
   3 seconds at most, then shown in the fallback (drawn again in the club's font when it comes) */
.jsy[data-jw] text { animation: jsy-wait 3s; }
@keyframes jsy-wait { from, to { visibility: hidden; } }

/* the jerseys' lettering fonts (ui/brand/FONT-LICENSES.txt), fetched only when a jersey in one is drawn */
@font-face { font-family: 'J Stacks Vancouver'; src: url(/brand/font-canucks.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Washington'; src: url(/brand/font-caps.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Tampa Bay'; src: url(/brand/font-bolts.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks St Louis'; src: url(/brand/font-blues.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks New York Islanders'; src: url(/brand/font-isles.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks San Jose'; src: url(/brand/font-sharks.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Pittsburgh'; src: url(/brand/font-pens.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Nashville'; src: url(/brand/font-preds.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks New York Rangers'; src: url(/brand/font-rangers.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks New Jersey'; src: url(/brand/font-devils.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Florida'; src: url(/brand/font-cats.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Montreal'; src: url(/brand/font-habs.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Minnesota Home'; src: url(/brand/font-wildhome.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Dallas'; src: url(/brand/font-stars.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Chicago'; src: url(/brand/font-hawks.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Detroit'; src: url(/brand/font-wings.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Buffalo'; src: url(/brand/font-sabres.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Boston'; src: url(/brand/font-bruins.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Seattle Numbers'; src: url(/brand/font-krakennum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Toronto Numbers'; src: url(/brand/font-leafsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Winnipeg Numbers'; src: url(/brand/font-jetsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Washington Numbers'; src: url(/brand/font-capsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Vegas Numbers'; src: url(/brand/font-knightsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Anaheim Numbers'; src: url(/brand/font-ducksnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Carolina Numbers'; src: url(/brand/font-canesnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Nashville Numbers'; src: url(/brand/font-predsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Florida Numbers'; src: url(/brand/font-catsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Columbus Numbers'; src: url(/brand/font-jacketsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Colorado Numbers'; src: url(/brand/font-avsnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks San Jose Numbers'; src: url(/brand/font-sharksnum.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Anaheim'; src: url(/brand/font-ducks.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Carolina'; src: url(/brand/font-canes.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Colorado'; src: url(/brand/font-avs.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Edmonton'; src: url(/brand/font-oilers.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Stacks Philadelphia'; src: url(/brand/font-flyers.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J College'; src: url(/brand/font-college.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J College Bold'; src: url(/brand/font-collegeb.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J College Condensed'; src: url(/brand/font-collegec.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Varsity Team'; src: url(/brand/font-varsity.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Freshman'; src: url(/brand/font-freshman.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Pop Warner'; src: url(/brand/font-popwarner.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Delta Block'; src: url(/brand/font-deltablock.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Fortzilla'; src: url(/brand/font-fortzilla.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Fortzilla Italic'; src: url(/brand/font-fortzillai.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Sports Jersey'; src: url(/brand/font-sportsjersey.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Bombardier'; src: url(/brand/font-bombardier.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Team MVP'; src: url(/brand/font-teammvp.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Signwood'; src: url(/brand/font-signwood.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Team Athletics'; src: url(/brand/font-teamathletics.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J College Slab'; src: url(/brand/font-collegeslab.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Sports World'; src: url(/brand/font-sportsworld.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J FM College Team'; src: url(/brand/font-fmcollegeteam.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Versa Versa'; src: url(/brand/font-versa.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Bou College'; src: url(/brand/font-boucollege.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Staubach'; src: url(/brand/font-staubach.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Hollywood Hills'; src: url(/brand/font-hollywoodhills.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Canucks Four'; src: url(/brand/font-cfour.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Block'; src: url(/brand/font-block.woff2?v=1792808689) format('woff2'); font-display: swap; }
@font-face { font-family: 'J Delta Block Italic'; src: url(/brand/font-deltablocki.woff2?v=1792808689) format('woff2'); font-display: swap; }

/* ---------- Stacked Fantasy (fantasy.js): the owner's Fantasy tab ---------- */
/* its tab: on a computer set apart after the others (a thin rule before it), purple when open; on a phone it takes the
   Glossary's place in the tab bar */
#tabs .fan-tab { position: relative; margin-left: 14px; }
#tabs .fan-tab::before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 1px; background: #2a3644; }
.top .seg button.fan-tab[data-active='true'] { background: #1a1230; color: #d6bcff; }
.top .seg button.fan-tab:hover { color: #d6bcff; }
@media (max-width: 1020px) and (min-width: 721px) { #tabs .fan-tab { margin-left: 10px; } }
@media (max-width: 720px) {
  body.is-owner #tabs [data-tab='glossary'] { display: none; }
  #tabs .fan-tab { margin-left: 0; } #tabs .fan-tab::before { display: none; }
  #tabs button.fan-tab[data-active='true'] { background: rgba(179, 140, 245, .16); color: #c4a1ff; }
  [data-theme='light'] #tabs button.fan-tab[data-active='true'] { background: rgba(122, 63, 209, .12); color: #7a3fd1; }
  body.fan #tabs { border-top-color: rgba(179, 140, 245, .2); }
}
/* a word that something took (fantasy.js toast): near the bottom, over the page, for a moment */
.fan-toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 12px; background: #7a3fd1; color: #fff; box-shadow: 0 10px 28px rgba(20, 8, 50, .35);
  text-align: center; animation: fan-toast-in .18s ease-out; transition: opacity .35s, transform .35s; }
.fan-toast b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.fan-toast span { font-size: 12px; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan-toast.out { opacity: 0; transform: translate(-50%, 8px); }
@keyframes fan-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .fan-toast { animation: none; transition: none; } }
/* the league menu (fantasy.js leagueBar): on a computer, the league's name in the page's head is the menu; on a phone, a
   bar of its own above the tab bar, only while Fantasy is open */
#fan-lbar { display: none; }
.fan-lsel-d { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a48ad6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 2px center / 9px 6px no-repeat; border: 0; border-bottom: 1px dashed currentColor; padding: 0 16px 0 2px; margin: 0; cursor: pointer; max-width: 260px; }
.fan-lname { display: none; }
@media (max-width: 720px) {
  body.fan #fan-lbar:not([hidden]) { display: flex; flex: none; position: relative; z-index: 19; align-items: center; padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    background: #120d20; border-top: 1px solid rgba(179, 140, 245, .2); }
  #fan-lbar label { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9a8db8; }
  #fan-lbar select { flex: 1; min-width: 0; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #ece4ff;
    -webkit-appearance: none; appearance: none; background: #1d1830 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a48ad6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px 8px no-repeat; border: 1px solid rgba(179, 140, 245, .28); border-radius: 9px; padding: 7px 34px 7px 10px; }
  [data-theme='light'] body.fan #fan-lbar:not([hidden]) { background: #f5f2fa; border-top-color: #e2dbee; }
  [data-theme='light'] #fan-lbar label { color: #7a6e96; }
  [data-theme='light'] #fan-lbar select { color: #1a1230; background-color: #ffffff; border-color: #d9cfeb; }
  .fan-lsel-d { display: none; } .fan-lname { display: inline; }   /* a phone: the bar is the menu */
}
/* the phone's Fantasy menu (fantasy.js pickMenu): the six views in two columns, over the tab bar by the Fantasy icon */
.fan-menu { position: fixed; z-index: 60; width: min(300px, calc(100vw - 16px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 6px;
  border-radius: 16px; background: #1d1830; border: 1px solid rgba(179, 140, 245, .22); box-shadow: 0 12px 32px rgba(0, 0, 0, .45); animation: fan-menu-in .14s ease-out; }
.fan-menu button { padding: 13px 8px; border: 0; border-radius: 11px; background: transparent; color: #cfc6e4; font: inherit; font-size: 15px; font-weight: 600; text-align: center; cursor: pointer; }
.fan-menu button:active { background: rgba(179, 140, 245, .1); }
.fan-menu button[data-active='true'] { background: #0f0b1c; color: #fff; }
[data-theme='light'] .fan-menu { background: #f5f2fa; border-color: #e2dbee; box-shadow: 0 12px 32px rgba(40, 20, 80, .18); }
[data-theme='light'] .fan-menu button { color: #4a3d66; }
[data-theme='light'] .fan-menu button[data-active='true'] { background: #ffffff; color: #1a1230; box-shadow: 0 1px 3px rgba(40, 20, 80, .15); }
@keyframes fan-menu-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fan-menu { animation: none; } }
/* the purple theme, while it's open: the site's colours with a purple hue in place of the ice blue */
[data-theme='light'] body.fan {
  --bg2: #f5f2fa; --bg3: #ebe5f4; --border: #e2dbee;
  --accent: #7a3fd1; --accent-soft: rgba(122, 63, 209, 0.12); --gold: #7a3fd1; --gold-soft: rgba(122, 63, 209, 0.13); --on-gold: #ffffff;
}
[data-theme='dark'] body.fan {
  --bg1: #0f0b18; --bg2: #151022; --bg3: #1c162d; --border: #2a2140; --ring-disc: #24163a;
  --accent: #b38cf5; --accent-soft: rgba(179, 140, 245, 0.16); --gold: #c4a1ff; --gold-soft: rgba(196, 161, 255, 0.15); --on-gold: #140b24;
}
body.fan .top { background: #110c1c; border-bottom-color: #2a2040; }
body.fan .top .seg { background: #1a1428; }
@media (max-width: 720px) { body.fan .top, [data-theme='dark'] body.fan #tabs { background: #110c1c; } }

/* the page: a header (title, team, week), the four views as one full-width row of tabs, then the view */
.fan-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fan-head .h2 { display: flex; align-items: center; gap: 10px; }
.fan-head .h2 img { height: 30px; width: 30px; object-fit: contain; }
.fan-week { display: flex; align-items: center; gap: 6px; }
.fan-week select { min-width: 190px; }
.fan-mu-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 12px 14px; margin-bottom: 12px; }
.fan-mu-bar label, .fan-mu-bar .fan-mu-wk { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fan-mu-bar label > span, .fan-mu-bar .fan-mu-wk > span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg3); }
.fan-mu-bar select { min-width: 180px; }
.fan-mu-bar .fan-mu-swap { padding-left: 10px; padding-right: 10px; }
.fan-mu-bar .fan-mu-wk { margin-left: auto; }
.fan-mu-bar .fan-mu-save { align-self: flex-end; }
.seg.fan-views { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; max-width: 720px; margin-bottom: 14px; }
.seg.fan-views button { text-align: center; }
.fan-sh { font-size: 14px; font-weight: 700; margin: 18px 2px 8px; color: var(--fg1); }
.fan-panel { padding: 14px 16px; margin-bottom: 14px; }
.fan-panel h3 { margin: 0 0 6px; font-size: 15px; }
.fan-panel h4 { margin: 0 0 8px; font-size: 13px; color: var(--fg2); }
.fan-panel p { margin: 4px 0 10px; color: var(--fg2); font-size: 13px; }
.fan-flash { border-color: var(--accent); }
.fan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fan-note { display: block; color: var(--fg3); font-size: 12px; white-space: normal; line-height: 1.35; }
td .fan-note { min-width: 260px; max-width: 420px; }
.fan-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.fan-facts > div { display: contents; } .fan-facts b { color: var(--fg2); font-weight: 600; } .fan-facts span { color: var(--fg1); }

/* the nights: a tile each, tapped on and off; the quick picks beside the count */
.fan-nights { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px; }
.fan-night { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center; background: var(--bg1); color: var(--fg1); cursor: pointer; font: inherit; }
.fan-night:disabled { cursor: default; opacity: .4; }
.fan-night:not(:disabled):hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.fan-night.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fan-night:not(.on) b, .fan-night:not(.on) span { opacity: .55; }
.fan-night i { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.fan-night b { display: block; font-size: 13px; }
.fan-night span { display: block; font-size: 11px; color: var(--fg3); }
.fan-night span em { font-style: normal; }
.fan-night.light { background: color-mix(in srgb, var(--t-elite) 14%, var(--bg1)); border-color: color-mix(in srgb, var(--t-elite) 40%, var(--border)); }
.fan-night.past:not(.on) { opacity: .45; }
.fan-night.today b { color: var(--accent); }
.fan-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.fan-bar .seg { flex: none; }
.fan-presets { justify-content: space-between; }
.fan-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fan-chips button { border: 1px solid var(--border); background: var(--bg1); color: var(--fg2); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fan-chips button:hover { border-color: var(--accent); color: var(--accent); }
.fan-tools input[type=search] { flex: 1; min-width: 160px; max-width: 280px; }
.fan-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg2); }
.btn.fan-link { margin-left: auto; }

/* a club's week in a table: a column a night, the opponent's crest over the date */
.fan-days { display: inline-grid; grid-template-columns: repeat(7, 34px); gap: 4px; vertical-align: middle; }
.fan-dh > span { text-align: center; font-size: 11px; } .fan-dh > span.light { color: var(--t-elite); }
.fan-wd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 0 2px; border-radius: 7px; }
.fan-wd img, .fan-wd b { width: 24px; height: 24px; display: block; object-fit: contain; }
.fan-wd b { line-height: 20px; text-align: center; font-weight: 400; color: var(--fg3); opacity: .45; }
.fan-wd small { font-family: var(--mono, ui-monospace, monospace); font-size: 10px; line-height: 12px; color: var(--fg3); }
.fan-wd.heavy small { color: var(--fg2); }
.fan-wd.light small { color: var(--t-elite); font-weight: 700; }
.fan-wd.off { opacity: .4; }   /* a game on a night left out above: the picker is the signal, so no ring here */
.fan-wd.past { opacity: .4; }
/* ...and the same week smaller, under a name in Waivers and Compare */
.fan-mini { display: inline-flex; gap: 3px; margin: 3px 0 0 -2px; padding: 0 2px; }   /* his game nights alone: up to five */
.fan-mini .fan-wd { width: 32px; }
.fan-mini .fan-wd { padding: 1px 0; border-radius: 5px; gap: 0; }
.fan-mini .fan-wd img, .fan-mini .fan-wd b { width: 24px; height: 24px; line-height: 24px; }
.fan-mini .fan-wd small { font-size: 10px; line-height: 11px; }
.fan-tag { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.fan-tag.mine { background: var(--accent); color: var(--on-gold); }
.fan-tag.taken { background: var(--bg3); color: var(--fg3); }

/* lists: a player a row, photo and name, his numbers on the right, his week under */
.fan-list { padding: 0; overflow: hidden; }
.fan-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 9px 14px; border-top: 1px solid var(--border); }
.fan-list > .fan-item:first-child, .fan-list > :first-child { border-top: 0; }
.fan-item:not(:has(> :first-child:is(.fan-slot, input))) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.fan-mug { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--bg3); display: block; }
.fan-who { min-width: 0; }
.fan-who .n { font-weight: 600; font-size: 14px; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.fan-who .m { font-size: 12px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan-nums { display: flex; gap: 14px; }
.fan-nums > span { display: flex; flex-direction: column; align-items: flex-end; min-width: 44px; }
.fan-nums b { font-family: var(--mono, ui-monospace, monospace); font-size: 14px; }
.fan-nums i { font-style: normal; font-size: 10px; color: var(--fg3); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.fan-iw { grid-template-columns: repeat(7, 36px); }
.fan-slot { min-width: 34px; text-align: center; font-size: 11px; font-weight: 700; padding: 3px 4px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.fan-slot.bn { background: var(--bg3); color: var(--fg3); }
.fan-item.ghost { opacity: .6; }
.fan-item.picked { background: var(--accent-soft); }
.fan-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

/* Lineup: the team, then each night's games against the spots */
.fan-sum-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fan-big { text-align: right; } .fan-big b { display: block; font-size: 26px; font-family: var(--mono, ui-monospace, monospace); color: var(--accent); }
.fan-big span { font-size: 11px; color: var(--fg3); }
.fan-nts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.fan-nt { border: 1px solid var(--border); border-radius: 10px; padding: 6px 2px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.fan-nt b { font-size: 12px; } .fan-nt span { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; font-weight: 700; }
.fan-nt i, .fan-nt em { font-style: normal; font-size: 10px; color: var(--fg3); }
.fan-nt.open { border-color: var(--t-elite); background: color-mix(in srgb, var(--t-elite) 12%, var(--bg1)); } .fan-nt.open i { color: var(--t-elite); font-weight: 700; }
.fan-nt.over i { color: var(--t-poor); font-weight: 700; }
.fan-nt.past { opacity: .45; }
.fan-nt.today { box-shadow: inset 0 0 0 1px var(--accent); }

/* Matchup: the two sides, the categories, the Maximizer's swaps */
.fan-vs { display: grid; grid-template-columns: minmax(0, 1fr) var(--fan-mid, 104px) minmax(0, 1fr); align-items: center; gap: 10px; margin: 6px 0 8px; }
.fan-vs em { text-align: center; }
/* a category matchup: each value under its team's box, the category between them (the board's own columns) */
.fan-catgrid { margin: 2px 0 8px; }
.fan-catrow { display: grid; grid-template-columns: minmax(0, 1fr) var(--fan-mid, 104px) minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.fan-catrow > span { text-align: center; font-size: 14px; }
.fan-catrow > span.win { color: var(--t-high); font-weight: 700; }
.fan-catrow > b { text-align: center; font-size: 13px; }
.fan-catrow > b i { display: block; font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--fg3); }
.fan-catrow > b i.fan-exp-flip { color: var(--accent); font-weight: 600; }
/* Experiments: each team's tried adds and drops */
.fan-exp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fan-exp-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fan-exp-side h4 { margin: 0; font-size: 14px; }
.fan-exp-side select { width: 100%; }
.fan-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fan-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg2); }
.fan-chip.add { color: var(--t-high); } .fan-chip.drop { color: var(--t-poor); }
.fan-chip button { padding: 0 4px; color: var(--fg3); }
/* a roster's injured reserve: under the roster, its own heading */
.fan-ir-h { padding: 8px 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t-poor); background: var(--bg2); border-top: 1px solid var(--border); }
.fan-ir-h span { color: var(--fg3); margin-left: 4px; }
.fan-wrange { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.fan-wrange select { min-width: 150px; }
.fan-lu-acts { display: inline-flex; align-items: center; gap: 6px; }
.fan-ir-t { padding: 2px 7px; font-size: 11px; font-weight: 700; min-height: 0; color: var(--fg3); }
.fan-ir-t.on { background: var(--t-poor); border-color: var(--t-poor); color: #fff; }
.fan-exp-was { margin: 0 0 6px; text-align: center; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.fan-vs > div { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--bg2); min-width: 0; }
.fan-vs > div span { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan-vs > div b { font-size: 28px; font-family: var(--mono, ui-monospace, monospace); }
.fan-vs > div i { font-style: normal; font-size: 11px; color: var(--fg3); }
.fan-vs > div.lead { background: var(--accent-soft); } .fan-vs > div.lead b { color: var(--accent); }
.fan-vs em { font-style: normal; font-size: 12px; color: var(--fg3); }
/* Compare: two players side by side (their search boxes as the dashboard's), the scoring's stats under them, or a table */
.fan-cmp-bar .cmp-in { width: 220px; max-width: 100%; }
.fan-cmp-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.fan-cmp-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: start; margin-bottom: 0; }
.fan-cmp-side .fan-mug { width: 56px; height: 56px; grid-row: 1 / 3; }
.fan-cmp-side .fan-who .n { font-size: 16px; font-weight: 700; }
.fan-cmp-side .fan-nums { grid-column: 2; display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px 18px; }
.fan-cmp-side .fan-nums > span { align-items: flex-start; }
.fan-cmp-side .fan-nums > span.lead b { color: var(--accent); }
.fan-cmp-side .fan-nums > span.lead i { color: var(--accent); }
.fan-cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.fan-cmp-table th, .fan-cmp-table td { padding: 6px 10px; text-align: right; border-top: 1px solid var(--border); white-space: nowrap; }
.fan-cmp-table th { font-size: 11px; color: var(--fg3); text-transform: uppercase; letter-spacing: .04em; border-top: 0; }
.fan-cmp-table .l { text-align: left; }
.fan-cmp-table td.win { font-weight: 800; color: var(--accent); }
.fan-cmp-table tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.fan-cmp-table .fan-note { font-size: 10px; }
.fan-cmp-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 14px; }
.fan-cmp-chip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); color: var(--fg1); text-align: left; cursor: pointer; font: inherit; }
.fan-cmp-chip:hover { background: var(--bg3); }
.fan-cmp-chip span { display: flex; flex-direction: column; min-width: 0; } .fan-cmp-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fan-cmp-chip i { font-style: normal; font-size: 11px; color: var(--fg3); }
.fan-cmp-del { color: var(--fg3); font-size: 12px; } .fan-cmp-del:hover { color: var(--fg1); }
.fan-best { font-weight: 800; color: var(--fg1); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 720px) { .fan-cmp-sides { grid-template-columns: 1fr; } .fan-cmp-bar .cmp-in { width: 100%; } .fan-cmp-bar .cmp-pick { flex: 1 1 100%; } .fan-cmp-bar > .sub { display: none; }
  .fan-cmp-sum .fan-big b { font-size: 20px; white-space: nowrap; } .fan-cmp-side .fan-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fan-cats td.win { color: var(--t-high); font-weight: 700; }
.fan-idea { border-top: 1px solid var(--border); padding: 6px 0; }
.fan-list > .fan-idea:first-child { border-top: 0; }
.fan-swap { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; }
.fan-swap .fan-item { border: 0; padding: 4px 0 4px 6px; }
.fan-swap > span { font-weight: 800; font-size: 16px; text-align: center; }
.fan-swap .add { color: var(--t-elite); } .fan-swap .drop { color: var(--t-poor); }
.fan-gain { padding: 2px 0 6px 28px; font-size: 13px; color: var(--fg2); }
.fan-gain b { color: var(--accent); }

/* League: the managers, a trade, the settings */
details.fan-mgr { border-top: 1px solid var(--border); }
.fan-list > details.fan-mgr:first-child { border-top: 0; }
details.fan-mgr > summary { list-style: none; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
details.fan-mgr > summary::-webkit-details-marker { display: none; }
details.fan-mgr[open] > summary { background: var(--bg2); }
.fan-rank { font-family: var(--mono, ui-monospace, monospace); font-weight: 700; color: var(--fg3); text-align: center; }
.fan-mgr-name { min-width: 0; } .fan-mgr-name b { font-size: 14px; } .fan-mgr-name i { display: block; font-style: normal; font-size: 12px; color: var(--fg3); }
details.fan-mgr .fan-list { border-top: 1px solid var(--border); }
.fan-trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.fan-trade-cols .fan-list { border: 1px solid var(--border); border-radius: 10px; max-height: 420px; overflow-y: auto; }
.fan-trade-cols .fan-item { padding: 7px 10px; }
.fan-verdict { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.fan-verdict h4 { font-size: 18px; color: var(--fg1); margin: 10px 0 8px; }
.fan-scale { position: relative; height: 34px; border-radius: 999px; margin-top: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--t-poor) 45%, transparent), var(--bg3) 40%, var(--bg3) 60%, color-mix(in srgb, var(--t-elite) 45%, transparent));
  display: flex; justify-content: space-between; align-items: center; padding: 0 12px; font-size: 11px; color: var(--fg2); font-weight: 600; }
.fan-scale i { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 2px var(--bg1); }
details.fan-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.fan-fold > summary::-webkit-details-marker { display: none; }
details.fan-fold > summary::after { content: '›'; font-size: 20px; color: var(--fg3); transition: transform .15s; }
details.fan-fold[open] > summary::after { transform: rotate(90deg); }
details.fan-fold > summary h3 { margin: 0; }
details.fan-fold[open] > summary { margin-bottom: 10px; }
/* League and Lineups: the under-construction tag, a greyed-out fold, the saved leagues, roster spots, the naming card, the roster builder */
.fan-uc { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
  background: color-mix(in srgb, #f59f00 20%, transparent); color: #c77c00; }
[data-theme='dark'] .fan-uc { color: #ffc34d; }
.fan-fold.fan-off { opacity: .5; cursor: not-allowed; user-select: none; }
.fan-off-h { display: flex; align-items: center; } .fan-off-h h3 { margin: 0; }
.fan-sub { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg3); }
.fan-sub:first-child { margin-top: 0; }
.fan-saved-list { display: grid; gap: 8px; }
.fan-saved { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
.fan-saved.cur { border: 2px solid var(--accent); padding: 9px 11px; }
.fan-saved-t { min-width: 0; } .fan-saved-t p { margin: 4px 0 0; font-size: 12px; } .fan-saved .fan-row { flex: none; margin: 0; }
.fan-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 6px; }
.fan-slots h3 { flex-basis: 100%; font-size: 13px; color: var(--fg2); margin: 8px 0 0; }
.fan-slots label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.fan-slots input[type=number] { width: 52px; }
.fan-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(8, 6, 16, .6); }
.fan-modal-card { width: min(420px, 100%); margin: 0; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.fan-modal-l { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg2); margin-top: 6px; }
.fan-modal-l input { font-size: 15px; padding: 8px 10px; }
.fan-modal-btns { justify-content: flex-end; margin-top: 4px; }
.fan-lu-teams { display: grid; gap: 6px; }
details.fan-lu-team { border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
details.fan-lu-team[open] { border-color: var(--accent); }
details.fan-lu-team > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 12px; }
details.fan-lu-team > summary::-webkit-details-marker { display: none; }
.fan-lu-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan-lu-edit { padding: 0 12px 10px; border-top: 1px solid var(--border); }
.fan-lu-edit > .fan-row { margin: 10px 0 8px; } .fan-lu-name { width: 200px; }
.fan-lu-edit .fan-list .fan-item:first-child { border-top: 0; }
.fan-lu-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border); }
.fan-lu-row:first-child { border-top: 0; } .fan-lu-row > div { min-width: 0; } .fan-lu-row .fan-note { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .fan-saved { flex-direction: column; align-items: stretch; } .fan-lu-name { width: 100%; } details.fan-lu-team > summary { grid-template-columns: minmax(0, 1fr) auto; } details.fan-lu-team > summary .fan-nums { display: none; } }
.fan-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 18px; }
.fan-set h3 { grid-column: 1 / -1; font-size: 13px; color: var(--fg2); margin: 12px 0 4px; }
.fan-set label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.fan-set label span { flex: 1; }
.fan-set label.off span, .fan-set label.off input[type=number] { opacity: .45; }
.fan-set label.na { display: none; }
.fan-set input[type=number] { width: 72px; }
.fan-plan-row { display: grid; grid-template-columns: 44px 120px 1fr; gap: 8px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.fan-list > .fan-plan-row:first-child { border-top: 0; }
.fan-plan-row .link { margin-right: 6px; }

@media (max-width: 720px) {
  .fan-head { margin-bottom: 10px; }
  .fan-head .h2 { font-size: 22px; } .fan-head .h2 img { height: 24px; width: 24px; }
  .fan-head > div:first-child { width: 100%; }
  .fan-week { width: 100%; } .fan-week select { min-width: 0; flex: 1; }
  .fan-mu-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .fan-mu-bar select { min-width: 0; width: 100%; }
  .fan-mu-bar .fan-mu-wk { grid-column: 1 / -1; margin-left: 0; }
  .fan-mu-bar .fan-mu-save { grid-column: 1 / -1; }
  .seg.fan-views { display: none; }   /* a phone: the views are in the tab bar's Fantasy menu (fantasy.js pickMenu) */
  #fan-body .tbl-sticky { top: var(--fan-tabs-h, 0px); z-index: 4; }   /* a table's header row parks under the tabs, not behind them */
  .seg.fan-views button { padding-left: 2px; padding-right: 2px; font-size: 12.5px; }
  .fan-nights { gap: 4px; } .fan-night { padding: 6px 2px; } .fan-night b { font-size: 12px; } .fan-night span em { display: none; }
  .fan-presets .fan-note { flex-basis: auto; }
  .fan-tools .seg { flex: 1; } .fan-tools .seg button { flex: 1; }
  .fan-cmp-tools .seg { flex-basis: 100%; }   /* Compare: Skaters, Goalies and Multi get the row to themselves */
  .fan-cmp-scoring { display: none; }   /* the league and its scoring are in the page's header already */
  #fan-avail { flex-basis: 100%; }
  .fan-item .fan-nums > span:nth-child(3) { display: none; }   /* a phone's row: two numbers, the name kept readable */
  .fan-tools input[type=search] { max-width: none; flex-basis: 100%; }
  .btn.fan-link { margin-left: 0; }
  .fan-mini { margin-top: 2px; gap: 2px; } .fan-mini .fan-wd { width: 24px; }
  .fan-mini .fan-wd img, .fan-mini .fan-wd b { width: 20px; height: 20px; line-height: 20px; }
  .fan-mini .fan-wd small { font-size: 9px; line-height: 10px; }
  .fan-item { padding: 9px 12px; gap: 4px 8px; }
  .fan-item .fan-iw { grid-column: 1 / -1; }
  .fan-nums { gap: 10px; } .fan-nums > span { min-width: 36px; } .fan-nums b { font-size: 13px; }
  .fan-mug { width: 30px; height: 30px; }
  .fan-nts { gap: 3px; } .fan-nt em { display: none; }
  .fan-trade-cols { grid-template-columns: 1fr; }
  .fan-trade-cols .fan-list { max-height: 300px; }
  .fan-facts { grid-template-columns: 1fr; gap: 2px; } .fan-facts span { margin-bottom: 6px; }
  .fan-plan-row { grid-template-columns: 40px 1fr; } .fan-plan-row > div { grid-column: 1 / -1; }
  .fan-vs > div b { font-size: 24px; }
  .fan-vs, .fan-catrow { --fan-mid: 76px; gap: 8px; }
  .fan-exp { grid-template-columns: minmax(0, 1fr); }
  .fan-out .fan-nums i { display: none; }   /* a phone: the dash alone, so the name keeps its room */
}
@media (max-width: 370px) { .seg.grp button { font-size: 12px; } }   /* the Players tabs on narrower phones */
@media (max-width: 340px) { .seg.grp button { padding: 5px 3px; } .imp-bar .imp-s { font-size: 8px; } }

/* ---- the player, team and line cards in the share card's look (ui/card.css): the banner the club's colour with a glow
   where the player is, the panes a tint of the club's colour on the theme's base, the tiles edged in their tier, the
   radar in the club's second colour. The game card keeps its own look. --team and the radar colours
   are set on the sheet (renderCard, renderTeamCard, renderLineCard: radarInks) ---- */
:is(.psheet, .tsheet, .lsheet) { --tint: 9%; --radar: var(--radar-light, var(--chart-1)); }
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) { --tint: 18%; --radar: var(--radar-dark, var(--chart-1)); }
/* the banner */
:is(.psheet, .tsheet, .lsheet) .hero { border-bottom: 0; }
:is(.psheet, .tsheet, .lsheet) .hero-bg { background: radial-gradient(560px 440px at 14% 8%, color-mix(in srgb, var(--team) 78%, #fff) 0%, transparent 70%), var(--team); }
:is(.psheet, .tsheet, .lsheet) .hero-kick { font-size: 11.5px; letter-spacing: .14em; }
:is(.psheet, .tsheet, .lsheet) .hero-kick .pos { background: rgba(0, 0, 0, .25); border-radius: 6px; }
:is(.psheet, .tsheet, .lsheet) .hero-name { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.035em; }   /* 40 at most: a goalie's longer name and number stay on one line beside the ring and logo */
.psheet .hero-name { font-size: var(--nm-size, clamp(28px, 3.2vw, 40px)); }   /* fitPlayerName sets --nm-size when the surname and number would wrap */
.psheet .hero-name.one-line > span { white-space: nowrap; }   /* the whole name and the number on one line (fitPlayerName sizes it) */
.psheet .hero-name .hero-num { opacity: .6; font-weight: 700; }
.psheet .hero-tail-m { display: none; }   /* the injury cross in the kick line: a phone only */
/* the lines under the name, in the share card's order: position, club and number above the name; games, ice time and
   scoring under it; then the line and units with the age */
.psheet .hero-line { font-size: 13px; font-weight: 500; }
.psheet .hero-line .hl-i, .psheet .hero-line .hl-a, .psheet .hero-line .hl-b { white-space: nowrap; }
:is(.tsheet, .lsheet) .hero-line .hl-i { white-space: nowrap; }   /* a club's rank phrase wraps whole, not leaving its last word alone */
.psheet .hero-role { font-size: 13px; }
:is(.psheet, .tsheet, .lsheet) .hero-x { background: rgba(0, 0, 0, .28); }
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share) { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .22); }
/* Share, Compare and Close on every screen as on a phone: three 32px discs with the same fill and edge and a 15px icon in
   each, in a row from the corner (Close, Compare, Share on a player's card; Close, Share on a club's or a line's) */
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .22); color: inherit; font-size: 0; }
:is(.psheet, .tsheet, .lsheet) .hero-light :is(.hero-cmp, .hero-share, .hero-x) { background: rgba(255, 255, 255, .4); border-color: rgba(0, 0, 0, .15); }
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x):hover { background: rgba(0, 0, 0, .34); color: inherit; }
:is(.psheet, .tsheet, .lsheet) .hero-light :is(.hero-cmp, .hero-share, .hero-x):hover { background: rgba(255, 255, 255, .6); }
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) > span { display: none; }
:is(.psheet, .tsheet, .lsheet) :is(.hero-cmp, .hero-share, .hero-x) .ic { display: block; width: 15px; height: 15px; }
:is(.psheet, .tsheet, .lsheet) .hero-x { top: 14px; right: 14px; }
:is(.psheet, .tsheet, .lsheet) .hero-cmp { top: 14px; right: 54px; }
:is(.psheet, .tsheet, .lsheet) .hero-share { top: 14px; right: 94px; }
:is(.tsheet, .lsheet) .hero-share { right: 54px; }
:is(.tsheet, .lsheet) .hero-logo { display: none; }   /* no ghost crest behind a club's or a line's crest */
@media (max-width: 720px) { :is(.psheet, .tsheet, .lsheet) .hero-x { top: 10px; right: 10px; } :is(.psheet, .tsheet, .lsheet) .hero-cmp { top: 10px; right: 50px; } :is(.psheet, .tsheet, .lsheet) .hero-share { top: 10px; right: 90px; } :is(.tsheet, .lsheet) .hero-share { right: 50px; } }
/* the ring: bigger, no disc, the number bold */
:is(.psheet, .tsheet, .lsheet) .hero .ring { width: 124px; }
:is(.psheet, .tsheet, .lsheet) .hero .ring > svg { width: 124px; height: 124px; }
:is(.psheet, .tsheet, .lsheet) .hero .ring-n { height: 124px; }
:is(.psheet, .tsheet, .lsheet) .hero .ring-n b { color: inherit; font-size: 46px; font-weight: 800; letter-spacing: -.04em; }
.ring.ring-dec .ring-n b { transform: scale(.72); }   /* a Fantasy Score's one decimal (app.js ring digits): four characters in the ring */
:is(.psheet, .tsheet, .lsheet) .hero .ring-l { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
:is(.psheet, .tsheet, .lsheet) .hero .ring-bg { fill: rgba(0, 0, 0, .22); stroke: none; }
:is(.psheet, .tsheet, .lsheet) .hero-light .ring-bg { fill: rgba(255, 255, 255, .3); }
:is(.psheet, .tsheet, .lsheet) .hero .ring-tr { stroke: rgba(255, 255, 255, .2); }
:is(.psheet, .tsheet, .lsheet) .hero-light .ring-tr { stroke: rgba(0, 0, 0, .15); }
/* the player card, as the share card: the club's logo faded behind the headshot (in the headshot's own box, so it
   follows it), the player's details in the middle, the ring at the right under the Share, Compare and close buttons.
   The row is a grid with an equal share of the spare width either side of the headshot and either side of the text */
.psheet .hero-shot-wrap { position: relative; display: flex; align-items: flex-end; }
.psheet .hero-logo { left: 50%; right: auto; top: 50%; --logo-box: 400px; transform: translate(-50%, calc(-50% - 20px - var(--logo-lift, 0) * var(--logo-box) * var(--logo-k, 1))) scale(var(--logo-k, 1)); width: 400px; height: 400px; opacity: calc(.3 * var(--ghost-a, 1));   /* --logo-lift and --ghost-a: teams.js ghostVars */   /* centred behind the head and raised a little, as on the share card; sized so every club's reads the same (teams.js LOGO_FIT) */
  -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 74%); mask-image: linear-gradient(180deg, #000 52%, transparent 74%); }   /* gone before the headshot's own fade, so it doesn't show through it */
.psheet .hero-light .hero-logo { opacity: calc(.22 * var(--ghost-a, 1)); }
.psheet .hero-shot { position: relative; z-index: 1; }
.psheet .hero-row { padding-top: 52px; min-height: 300px; }
@media (min-width: 721px) {
  .psheet .hero-row { display: grid; grid-template-columns: 34px auto 1fr minmax(0, 46%) 2fr auto; align-items: end; padding-left: 0; padding-right: 84px; gap: 0; }   /* the headshot a fixed margin in, so its centre (and the team card's crest) sit at the same x */   /* the headshot centred between the edge and the text; more of the spare width before the ring, so both sit to the left */
  .psheet .hero-main { display: contents; }
  .psheet .hero-shot-wrap { grid-column: 2; }
  .psheet .hero-text { grid-column: 4; align-self: center; padding-bottom: 0; }   /* the details centred on the banner's height as well as across their column */
  .psheet .hero .ring { grid-column: 6; align-self: center; margin-bottom: 0; transform: translateY(-2px); }   /* its number level with the name line */
}
/* the hot or cold tag at every width as on a phone: its icon alone in a small round badge at the ring's top right, lapping over it */
.psheet .hero .ring-badge { top: 2px; right: 2px; left: auto; bottom: auto; transform: none; z-index: 1; }
.psheet .hero .ring-badge .chip.chip-streak.streak-sup { width: 26px; height: 26px; padding: 0; border-radius: 50%; justify-content: center; gap: 0; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
.psheet .hero .ring-badge .tag-l, .psheet .hero .ring-badge .streak-also { display: none; }
.psheet .hero .ring-badge .chip.streak-sup svg { height: 14px; width: auto; margin: 0; }
.psheet .hero-shot:not(.team-crest) { width: calc(min(240px, 30vw) + 28px); height: min(240px, 30vw); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }
/* the team and line cards: one crest, big, at the left, with the name and the ring centred on it; no watermark */
/* the crest in a fixed box (so the banner is one height and the columns sit the same for every club), the artwork scaled
   inside it so every club's reads the same size (teams.js LOGO_FIT); the ghost is placed from the crest's centre and scaled
   the same way, so it sits the same way behind every club's crest */
:is(.tsheet, .lsheet) .hero-shot-wrap { position: relative; width: 290px; height: 290px; flex: none; }   /* the crest scaled by its art (crestScale 0.92, 0.62): a round one about half the banner's height, every club alike */
:is(.tsheet, .lsheet) .hero-logo { display: block; left: 50%; right: auto; top: 50%; width: 400px; height: 400px; opacity: .14; transform: translate(calc(-50% - 56px), calc(-50% - 64px)) scale(var(--logo-k, 1)); }
:is(.tsheet, .lsheet) .hero-light .hero-logo { opacity: .1; }
:is(.tsheet, .lsheet) .hero-shot.team-crest { position: relative; z-index: 1; width: 100%; height: 100%; padding: 8px; margin: 0; transform: scale(var(--logo-k, 1)); }

:is(.tsheet, .lsheet) .hero-row { align-items: center; gap: 28px; padding: 44px 24px 20px; min-height: 0; }
:is(.tsheet, .lsheet) .hero-main { align-items: center; gap: 40px; padding-bottom: 0; }
:is(.tsheet, .lsheet) .hero .ring { margin-bottom: 0; }
/* on a computer, laid out as the player card: the crest, the details and the ring each centred in an equal share of the
   spare width, the ring under the close button and level with the name */
@media (min-width: 721px) {
  :is(.tsheet, .lsheet) .hero-row { display: grid; grid-template-columns: 9px auto 1fr minmax(0, 46%) 2fr auto; align-items: center; padding: 24px 92px 24px 0; gap: 0; height: 340px; }   /* the crest's centre on the player headshot's centre; the ring in from the edge */   /* the player card's columns: more of the spare width before the ring, so the text sits nearer the crest */   /* one height for every club; the same padding above and below, so the crest, the text and the ring centre on the banner's height */
  :is(.tsheet, .lsheet) .hero-main { display: contents; }
  :is(.tsheet, .lsheet) .hero-shot-wrap { grid-column: 2; }
  :is(.tsheet, .lsheet) .hero-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% + var(--ny, 0px))); width: 44%; grid-column: auto; }   /* --ny (centreHeroName): the name's own middle on the banner's middle */
  :is(.tsheet, .lsheet) .hero .ring { grid-column: 6; transform: translateY(9.5px); }   /* the disc (not the block with its label) level with the name */
}
/* the hot or cold tag as the player card's: its icon alone in a round badge at the ring's top right */
:is(.tsheet, .lsheet) .hero .ring-badge { top: 2px; right: 2px; left: auto; bottom: auto; transform: none; z-index: 1; }
:is(.tsheet, .lsheet) .hero .ring-badge .chip.chip-streak.streak-sup { width: 26px; height: 26px; padding: 0; border-radius: 50%; justify-content: center; gap: 0; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
:is(.tsheet, .lsheet) .hero .ring-badge .tag-l, :is(.tsheet, .lsheet) .hero .ring-badge .streak-also { display: none; }
:is(.tsheet, .lsheet) .hero .ring-badge .chip.streak-sup svg { height: 14px; width: auto; margin: 0; }
.lsheet .ln-hero-name { font-size: var(--ln-size, 34px); font-weight: 700; align-items: baseline; flex-wrap: nowrap; white-space: nowrap; }   /* one line: fitLineNames sets the size */
.lsheet .ln-hero-name.wrap { white-space: normal; line-height: 1.1; }   /* names too long even small: one a line, each centred */
.lsheet .ln-hero-name.wrap .ln-row { display: block; text-align: center; }   /* a row of names (renderLineCard: 3, 2 + 2, 3 + 2) */
.lsheet .ln-hero-name.wrap .ln-n { display: block; }
.lsheet .ln-hero-name.wrap .ln-n::after { content: none; }
.tsheet .hero-name { font-size: var(--nm-size, clamp(28px, 3.2vw, 40px)); }
.tsheet .hero-name.one-line > span { white-space: nowrap; }
:is(.tsheet, .lsheet) .hero-kick { flex-wrap: nowrap; white-space: nowrap; justify-content: center; }
/* the block sits on the banner's middle (hero-text is placed from the banner's centre), every line centred on that axis;
   a line's three names in three columns so the middle name, not the whole string, is on the axis */
:is(.tsheet, .lsheet) .hero-text { display: grid; justify-content: center; justify-items: center; text-align: center; }
.lsheet .ln-hero-name { display: grid; grid-template-columns: 1fr; }   /* the rows of names, one under another */
/* each row centred on its own: three names put the middle one on the centre line; two names centre by their extent */
.lsheet .ln-hero-name:not(.wrap) .ln-row { display: grid; column-gap: .35em; justify-items: start; }
.lsheet .ln-hero-name:not(.wrap) .ln-row.r1 { grid-template-columns: 1fr; justify-items: center; }
.lsheet .ln-hero-name:not(.wrap) .ln-row.r3 { grid-template-columns: 1fr auto 1fr; }
.lsheet .ln-hero-name:not(.wrap) .ln-row.r3 > .ln-n:first-child { justify-self: end; }
.lsheet .ln-hero-name:not(.wrap) .ln-row.r2 { display: flex; justify-content: center; column-gap: .9em; }   /* two names centred by their full extent (under a row of three, on its middle name); the dot hangs in the gap, taking no width */
.lsheet .ln-hero-name:not(.wrap) .ln-row.r2 > .ln-n:first-child { position: relative; }
.lsheet .ln-hero-name:not(.wrap) .ln-row.r2 > .ln-n:first-child::after { position: absolute; left: calc(100% + .45em); top: 0; margin-left: 0; transform: translateX(-50%); }
/* the panes: a tint of the club's colour, the head a touch deeper */
:is(.psheet, .tsheet, .lsheet) .sheet-body .card { background: color-mix(in srgb, var(--team) var(--tint), var(--bg2)); border-color: color-mix(in srgb, var(--team) 30%, var(--border)); border-radius: 14px; }
:is(.psheet, .tsheet, .lsheet) .sheet-body .card :is(.card-head, .sub-head) { background: color-mix(in srgb, var(--team) calc(var(--tint) + 8%), var(--bg2)); border-bottom-color: color-mix(in srgb, var(--team) 30%, var(--border)); }
:is(.psheet, .tsheet, .lsheet) .mt { background: color-mix(in srgb, var(--c, var(--fg3)) 16%, transparent); }
/* the tiles: a deeper tint, ringed all round in the tier's colour (--c, set in the markup); the number plain */
:is(.psheet, .tsheet, .lsheet) .imp-tile, .lsheet .ln-mem { background: color-mix(in srgb, var(--team) calc(var(--tint) + 10%), var(--bg1)); border: 2.5px solid var(--c, var(--border)); border-radius: 12px; }
:is(.psheet, .tsheet, .lsheet) .imp-tile b { color: var(--fg1); font-weight: 600; letter-spacing: -.02em; }
.lsheet .ln-mem:hover { background: color-mix(in srgb, var(--team) calc(var(--tint) + 18%), var(--bg1)); }
/* the line's member boxes the colour of the pane heads (a club's own heads on the dark theme, as radarInks sets them) */
.lsheet .ln-mem { background: color-mix(in srgb, var(--hue) 20%, var(--bg2)); }   /* a lighter shade of the heads' colour */
[data-theme='dark'] .lsheet .ln-mem { background: color-mix(in srgb, var(--head-dark, color-mix(in srgb, var(--hue) 38%, var(--bg2))) 72%, #ffffff); }
.lsheet .ln-mem:hover { filter: brightness(1.08); }
/* the radar: the club's second colour, bold, its labels in the text colour */
:is(.psheet, .tsheet, .lsheet) .radar .rp { fill-opacity: .55; stroke-width: 3.5; stroke-linejoin: round; }
:is(.psheet, .tsheet, .lsheet) .radar circle { stroke: var(--bg2); stroke-width: 1.5; }
:is(.psheet, .tsheet, .lsheet) .radar .rg { stroke: color-mix(in srgb, var(--fg3) 40%, transparent); }
/* the web is filled the colour of the pane headers: the club's second colour tinted into the pane */
:is(.psheet, .tsheet, .lsheet) .radar polygon.rg { fill: color-mix(in srgb, var(--hue) 38%, var(--bg2)); }
/* and its lines cut in the pane's own colour: dark on the dark theme's lighter web, light on the light theme's darker one */
:is(.psheet, .tsheet, .lsheet) .radar .rg { stroke: var(--bg2); stroke-width: 1.6; }
/* a club's own dark-theme web where radarInks sets one (New Jersey's near-black, red lines) */
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) .radar polygon.rg { fill: var(--web-dark, color-mix(in srgb, var(--hue) 38%, var(--bg2))); }
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) .radar .rg { stroke: var(--web-line-dark, var(--bg2)); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) .radar polygon.rg { fill: var(--web-light, color-mix(in srgb, var(--hue) 38%, var(--bg2))); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) .radar .rg { stroke: var(--web-line-light, var(--bg2)); }
/* and the radar itself near solid over it */
:is(.psheet, .tsheet, .lsheet) .radar .rp { fill-opacity: .82; }
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) .radar .rp { fill-opacity: var(--radar-op-dark, .82); }   /* a black radar near solid (radarInks) */
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) .radar .rp { fill-opacity: var(--radar-op-light, .82); }
:is(.psheet, .tsheet, .lsheet) .radar .tick { fill: var(--fg1); font-size: 11.5px; font-weight: 500; }
:is(.psheet, .tsheet, .lsheet) .pc-stem { stroke-width: 3; }
/* the player card's top panel: the four Impact tiles in a pane, with his line combination in a matching pane beside
   them (the two the same height, their heads alike), then the percentiles in their own pane in the side column */
.psheet .imp-top .imp-body.imp-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 16px; align-items: stretch; }
.psheet .imp-left { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; gap: 8px; padding-bottom: 10px; }
.psheet .imp-left .imp-tiles.imp-full { grid-auto-rows: minmax(76px, 1fr); margin: 0 14px; }   /* the tiles fill the pane's height, inset as the line pane's jerseys are */
.psheet .imp-left .imp-note { margin: 0 14px; font-size: 12px; color: var(--fg2); }
.psheet .imp-left .imp-note .plays-like { color: var(--fg1); }
.psheet .imp-split :is(.dc-card, .imp-pane) { background: color-mix(in srgb, var(--team) calc(var(--tint) + 10%), var(--bg1)); border: 1px solid color-mix(in srgb, var(--team) 30%, var(--border)); border-radius: 12px; margin: 0; }
.psheet .imp-split :is(.dc-card, .imp-pane) .card-head { background: transparent; border: 0; padding: 10px 14px 0; }
.psheet .imp-split .dc-news { padding-top: 6px; }
.psheet .imp-split .dc-body { padding: 6px 14px 10px; }
.psheet .imp-split .dc-row { grid-template-columns: 48px 1fr; }
.psheet .imp-split .dc-js { justify-content: center; gap: 10px; flex-wrap: nowrap; }   /* a pair or a tandem centred, as a line is */
.psheet .imp-split .dc-j { max-width: none; flex: 0 1 calc((100% - 20px) / 3); min-width: 0; }
.psheet .imp-split .dc-js .dc-j .jsy { width: 100%; height: auto; max-height: 150px; }
.psheet .imp-split .dc-j img { width: 100%; height: auto; max-height: 150px; }
.psheet .imp-split .dc-p { font-size: 11px; }
.psheet .pct-card .imp-body { padding: 12px 16px 14px; }
/* the whole card is the club's colour (on the site and in Stacked Fantasy alike; after the cards' own rules above, so
   it wins over them): its bases, tabs, borders and
   accent are shades of --team (deep on dark, pale on light), the panes and tiles tinted deeper on top as elsewhere */
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) {
  --bg1: color-mix(in srgb, var(--team) 12%, #07090c); --bg2: color-mix(in srgb, var(--team) 17%, #0b0e12); --bg3: color-mix(in srgb, var(--team) 27%, #10141a);
  --border: color-mix(in srgb, var(--team) 34%, #1e252e); --ring-disc: color-mix(in srgb, var(--team) 28%, #0b0e12);
  --accent: color-mix(in srgb, var(--team) 45%, #ffffff); --accent-soft: color-mix(in srgb, var(--team) 32%, transparent);
  --gold: var(--accent); --gold-soft: var(--accent-soft); --on-gold: #0b0e12;
}
/* its second colour (--sec, radarInks: Calgary's gold, Carolina's grey) draws the radar and tints every pane's
   head, so two clubs of one main colour still look apart */
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) { --sec: var(--sec-dark, var(--team)); --radar: var(--radar-own-dark, var(--sec)); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) { --sec: var(--sec-light, var(--team)); --radar: var(--radar-own-light, var(--sec)); --hue: var(--hue-light, var(--sec)); }
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) { --hue: var(--hue-dark, var(--sec)); }   /* --hue: what tints the heads and web (radarInks) */
:is(.psheet, .tsheet, .lsheet) .sheet-body .card :is(.card-head, .sub-head) { background: color-mix(in srgb, var(--hue) 38%, var(--bg2)); border-bottom-color: color-mix(in srgb, var(--hue) 50%, transparent); }
/* a club's own heads on the dark theme (radarInks' --head-dark: Carolina's web grey), their titles in its ink */
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) .sheet-body :is(.card, .imp-pane, .dc-card) :is(.card-head, .sub-head) { background: var(--head-dark, color-mix(in srgb, var(--hue) 38%, var(--bg2))); }
[data-theme='dark'] :is(.psheet, .tsheet, .lsheet) .sheet-body :is(.card, .imp-pane, .dc-card) :is(.card-head, .sub-head) :is(.title, .sub) { color: var(--head-ink-dark, inherit); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) .sheet-body :is(.card, .imp-pane, .dc-card) :is(.card-head, .sub-head) { background: var(--head-light, color-mix(in srgb, var(--hue) 38%, var(--bg2))); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) .sheet-body :is(.card, .imp-pane, .dc-card) :is(.card-head, .sub-head) :is(.title, .sub) { color: var(--head-ink-light, inherit); }
.psheet .imp-split :is(.dc-card, .imp-pane) .card-head { background: color-mix(in srgb, var(--hue) 38%, var(--bg2)); padding: 10px 14px; border-radius: 11px 11px 0 0; }
/* the Impact tiles a shade apart from their pane, not its tint: richer in the club's colour on the dark theme (the player's jersey box takes it too), the jersey box's club tint on the light (never white) */
[data-theme='dark'] .psheet .imp-split .imp-tile { background: color-mix(in srgb, var(--team) 45%, #262b32); }   /* over a mid grey, so a dark club (Minnesota's green) lifts too */
[data-theme='light'] .psheet .imp-split .imp-tile { background: var(--gold-soft); }   /* the same fill as the player's jersey box in Line Combination */
/* the player's own jersey in Line Combination boxed in the tiles' shade on the dark theme (the light keeps its club tint) */
[data-theme='dark'] .psheet .dc-j.me { background: color-mix(in srgb, var(--team) 45%, #262b32); }
/* no surround around the Impact and Line Combination panes: they sit on the sheet as the other panes do, in the same colour */
.psheet .card.imp-top:has(.imp-pane) { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.psheet .card.imp-top:has(.imp-pane) .imp-body.imp-split { padding: 0; }
.psheet .imp-split :is(.dc-card, .imp-pane) { background: color-mix(in srgb, var(--team) var(--tint), var(--bg2)); border-color: color-mix(in srgb, var(--team) 30%, var(--border)); border-radius: 14px; }
/* no stroke around the cards' panes: each sits on the card as a block of its own colour, set apart by its tinted head */
:is(.psheet, .tsheet, .lsheet) .sheet-body :is(.card, .imp-pane, .dc-card) { border-color: transparent; }
/* and the bar under it (previous, next): the same club's colour (stepNav copies --team onto it) */
[data-theme='dark'] .card-nav .card-bar { background: color-mix(in srgb, var(--team, #0b1219) 20%, rgba(8, 10, 13, .95)); border-color: color-mix(in srgb, var(--team, #24313d) 40%, #1e252e); }
[data-theme='light'] .card-nav .card-bar { background: color-mix(in srgb, var(--team, #ffffff) 10%, #ffffff); border-color: color-mix(in srgb, var(--team, #e3e7ec) 28%, #e3e7ec); }
[data-theme='light'] :is(.psheet, .tsheet, .lsheet) {
  --bg1: color-mix(in srgb, var(--team) 4%, #ffffff); --bg2: color-mix(in srgb, var(--team) 7%, #ffffff); --bg3: color-mix(in srgb, var(--team) 13%, #ffffff);
  --border: color-mix(in srgb, var(--team) 24%, #e3e7ec);
  --accent: color-mix(in srgb, var(--team) 80%, #000000); --accent-soft: color-mix(in srgb, var(--team) 14%, transparent);
  --gold: var(--accent); --gold-soft: var(--accent-soft); --on-gold: #ffffff;
}
/* a screen up to 1080 high (a laptop): the banner a size down, the logo and ring with it */
@media (min-width: 721px) and (max-height: 1080px) {
  .psheet .hero-row { padding-top: 46px; min-height: 0; }
  :is(.tsheet, .lsheet) .hero-row { padding-right: 72px; }   /* the ring's centre as far from the right edge as the crest's from the left */
  .psheet .hero-shot:not(.team-crest) { width: calc(min(200px, 30vw) + 28px); height: min(200px, 30vw); }
  .psheet .hero-main { padding-bottom: 14px; }
  .psheet .hero-logo { width: 320px; height: 320px; --logo-box: 320px; transform: translate(-50%, calc(-50% - 17px - var(--logo-lift, 0) * var(--logo-box) * var(--logo-k, 1))) scale(var(--logo-k, 1)); }
  :is(.tsheet, .lsheet) .hero-shot-wrap { width: 230px; height: 230px; }
  :is(.tsheet, .lsheet) .hero-logo { width: 320px; height: 320px; transform: translate(calc(-50% - 44px), calc(-50% - 52px)) scale(var(--logo-k, 1)); }
  :is(.tsheet, .lsheet) .hero-row { height: 276px; padding-top: 22px; padding-bottom: 22px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring { width: 104px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring > svg { width: 104px; height: 104px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring-n { height: 104px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring-n b { font-size: 38px; }
}
/* a phone */
@media (max-width: 720px) {
  :is(.psheet, .tsheet, .lsheet) .hero .ring-l { font-size: 8px; letter-spacing: .06em; margin-top: 5px; }   /* under a 68px ring */
  /* the banner's grid on a phone (the club and line cards share it below): the headshot, the text and the ring in three columns,
     each centred on one line across the row; the text block's rows balance about the name, so the name sits on that line too */
  .psheet .hero-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 68px; column-gap: 10px; align-items: center; padding: 40px 12px; min-height: 0; }   /* the same padding above and below: the row's centre line, with the name on it, is the banner's exact middle; the ring's disc clears the buttons' band (10 to 42) */
  .psheet .hero-main { display: contents; }
  .psheet .hero-shot-wrap { grid-column: 1; justify-self: center; transform: none; }   /* the eyes sit at the head's middle: on the line */
  .psheet .hero-text { grid-column: 2; height: 118px; align-self: center; display: grid; grid-template-rows: 1fr auto minmax(0, 1fr); row-gap: 6px; align-content: stretch; }   /* as tall as the headshot, so the rows either side of the name come out equal; the lines below the name may run a little into the bottom padding */
  .psheet .hero-kick { align-self: end; }
  .psheet .hero-name { margin-top: 0; }
  .psheet .hero-sub { align-self: start; }   /* the season line and the role, one block under the name */
  .psheet .hero-line { margin-top: 0; }
  .psheet .hero .ring { grid-column: 3; justify-self: center; align-self: center; margin-bottom: 0; transform: translateY(7.5px); }   /* the disc (not the block with its label) on the line */
  .psheet .hero-logo { width: 170px; height: 170px; --logo-box: 170px; transform: translate(-50%, calc(-50% - 12px - var(--logo-lift, 0) * var(--logo-box) * var(--logo-k, 1))) scale(var(--logo-k, 1)); }
  .psheet .hero-tail-m { display: inline-flex; }
  .psheet .hero-tail-d { display: none; }
  .psheet .hero-line { font-size: 12.5px; }
  .psheet .hero-line .hl-sep { display: none; }   /* games and ice time on one line, the scoring under it */
  .psheet .hero-line .hl-b { display: block; margin-top: 1px; }   /* centred on the head, level with the Share and Compare buttons */
  .psheet .hero .ring-badge { top: -3px; right: -5px; }
  .psheet .hero .ring-badge .chip.chip-streak.streak-sup { width: 22px; height: 22px; }
  .psheet .hero .ring-badge .chip.streak-sup svg { height: 12px; }
  .psheet .hero-shot:not(.team-crest) { width: 146px; height: 118px; }
  :is(.psheet, .tsheet, .lsheet) .hero-name { font-size: 24px; }
  .psheet .hero-name { font-size: var(--nm-size, 24px); }
  :is(.tsheet, .lsheet) .hero-shot-wrap { width: 124px; height: 124px; }   /* a smaller crest on a phone (its art 93 wide at most, crestScale 0.8, 0.6), so the centred text has room beside it */
  :is(.tsheet, .lsheet) .hero-shot.team-crest { padding: 4px; transform: scale(var(--logo-kp, var(--logo-k, 1))); }   /* a phone: its own, smaller scale */
  :is(.tsheet, .lsheet) .hero-main { gap: 8px; }
  :is(.tsheet, .lsheet) .hero-logo { width: 170px; height: 170px; transform: translate(calc(-50% - 24px), calc(-50% - 28px)) scale(var(--logo-k, 1)); }
  /* the player card's grid with equal outer columns: the crest's column 84 wide (the 124 wrap overhangs it; the art is 93 at most),
     the ring's 84, so the text column is centred on the banner; the name on the row's centre line with the crest and the ring's disc */
  :is(.tsheet, .lsheet) .hero-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 84px; column-gap: 12px; align-items: center; padding: 40px 12px; min-height: 0; }   /* the same padding above and below, and the same width either side: the name on the banner's exact middle, across as well as down */
  :is(.tsheet, .lsheet) .hero-text { position: static; transform: none; width: auto; grid-column: 2; align-self: stretch; grid-template-rows: 1fr auto 1fr; row-gap: 6px; align-content: stretch; }
  :is(.tsheet, .lsheet) .hero-kick { align-self: end; }
  :is(.tsheet, .lsheet) .hero-name { margin-top: 0; }
  :is(.tsheet, .lsheet) .hero-line { align-self: start; margin-top: 0; }
  .lsheet .ln-hero-name.wrap { display: flex; flex-direction: column; align-items: center; }   /* each name on its own line, every one centred on the same axis */
  .lsheet .ln-hero-name.wrap .ln-row { display: contents; }
  .lsheet .ln-hero-name.wrap .ln-n::after { content: none; }   /* names on their own lines need no dots between them; with the dot inside the span, a name sat left of the one below */
  :is(.tsheet, .lsheet) .hero .ring { justify-self: center; align-self: center; margin-bottom: 0; transform: translateY(7.5px); }   /* the disc (not the block with its label) on the line */
  :is(.tsheet, .lsheet) .hero-line { font-size: 11px; line-height: 1.3; }
  :is(.tsheet, .lsheet) .hero-kick { font-size: 9.5px; }
  :is(.tsheet, .lsheet) .hero-main { display: contents; }
  :is(.tsheet, .lsheet) .hero-shot-wrap { grid-column: 1; justify-self: center; margin: -12px 0; }   /* the wrap counts 100 tall in the row (its art is 93 at most): less empty banner above and below a club's crest */
  :is(.tsheet, .lsheet) .hero .ring { grid-column: 3; }
  :is(.tsheet, .lsheet) .hero .ring-badge { top: -3px; right: -5px; }
  :is(.tsheet, .lsheet) .hero .ring-badge .chip.chip-streak.streak-sup { width: 22px; height: 22px; }
  :is(.tsheet, .lsheet) .hero .ring-badge .chip.streak-sup svg { height: 12px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring { width: 68px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring > svg { width: 68px; height: 68px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring-n { height: 68px; }
  :is(.psheet, .tsheet, .lsheet) .hero .ring-n b { font-size: 25px; }
  .tsheet .hero-name { font-size: var(--nm-size, 22px); }
  :is(.tsheet, .lsheet) .hero-kick { flex-wrap: wrap; white-space: normal; }
  :is(.tsheet, .lsheet) .hero-kick .hk-opt { display: none; }   /* the seasons span (a club) and the range (a line): the buttons say it; the kick stays on one line */
  :is(.tsheet, .lsheet) .hero-main { align-items: center; }   /* the ring level with the name block */
  .psheet .imp-top .imp-body.imp-split { grid-template-columns: 1fr; padding: 10px 12px 12px; }
  .psheet .imp-left:not(:has(.imp-note)) { display: none; }   /* the tiles are in the bar above on a phone */
  .psheet .imp-left { display: block; background: none; border: 0; padding: 0; }   /* a phone: only the note shows here (the tiles are in the bar), without the pane's head or frame */
  .psheet .imp-left .card-head { display: none; }
  .psheet .imp-left .imp-note { margin: 0; }
}

/* a phone: the radar, the shares and the percentiles one under the other at full width, so the labels and bars have room */
@media (max-width: 560px) {
  .adv-top.adv-split { grid-template-columns: 1fr; grid-template-areas: 'radar' 'metrics' 'goalies'; }
  .adv-top.adv-split .radar { max-height: 300px; }
  .adv-top.adv-split .radar .tick { font-size: 11px; }
  .adv-side .adv-pct-body .meter { grid-template-columns: minmax(0, 1fr) 56px 84px 44px; grid-template-areas: 'l v r t' 'b b b b'; gap: 4px 8px; font-size: 12px; }
  .adv-side .adv-pct-body .meter > .mv { font-size: 12px; }
  .adv-side .adv-pct-body .meter > .mr, .adv-side .adv-pct-body .meter > span:last-child { display: block; }
  .adv-side .adv-pct-body .meter > .mt { height: 7px; }
  .adv-side .meters { gap: 8px; margin-bottom: 6px; }
  .adv-top.adv-split .adv-pct-body { padding: 8px 12px 4px; }
