/* NHL advanced stats (MoneyPuck). Colors come from the variables below; the dark theme redefines them. */
.nhl-advanced,.nhla-player,.nhla-goalie{--adv-bg:#fff;--adv-card:#f7f9fb;--adv-line:#e2e8ee;--adv-ink:#142d43;--adv-sub:#5b7080;--adv-track:#e4eaef;--adv-head:#eef3f6;
 --adv-good:#127347;--adv-good-bg:#e3f4ea;--adv-bad:#b23a2b;--adv-bad-bg:#fbe7e3;--adv-accent:#1f6fb2;--adv-edge:#127347;--adv-hot:#c2570c;--adv-cold:#2563a8}
.nhl-advanced{margin-top:28px;padding:20px;border:1px solid var(--adv-line);border-radius:12px;background:var(--adv-bg);color:var(--adv-ink);min-width:0}
.nhl-advanced-desk{margin:20px 0}
.nhla-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.nhla-title h2,.nhla-title h3{margin:2px 0 0;font-size:20px;line-height:1.2}
.nhla-eyebrow{font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--adv-sub)}
.nhla-test-badge{padding:3px 9px;border-radius:999px;background:#fff1d6;color:#7a4e00;border:1px solid #e9c77d;font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase}
.nhla-credit{margin:6px 0 18px;font-size:12px;color:var(--adv-sub)}
.nhla-credit a{color:inherit;font-weight:700}
.nhla-note{margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--adv-sub)}
.nhla-key{display:inline-block;width:10px;height:10px;border-radius:4px;background:var(--adv-edge);vertical-align:-1px;margin-right:2px}
.nhla-subhead{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:30px 0 12px;padding-top:18px;border-top:1px solid var(--adv-line)}
.nhla-subhead h3{margin:0;font-size:16px}
.nhla-subhead span{font-size:12px;color:var(--adv-sub)}

/* Tale of the tape */
.nhla-tape{border:1px solid var(--adv-line);border-radius:10px;overflow:hidden;font-variant-numeric:tabular-nums}
.nhla-tape-head,.nhla-tape-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,230px) minmax(0,1fr);align-items:center}
.nhla-tape-head{background:var(--adv-head);padding:12px 16px;gap:12px}
.nhla-tape-team{display:flex;align-items:center;gap:10px;font-weight:800;font-size:14px}
.nhla-tape-team .nhla-tape-side{font-size:10px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--adv-sub)}
.nhla-tape-team.is-home{justify-content:flex-end}
.nhla-tape-mid{text-align:center;font-size:10px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:var(--adv-sub)}
.nhla-tape-groupname{padding:10px 16px 4px;font-size:10px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:var(--adv-accent);border-top:1px solid var(--adv-line)}
.nhla-tape-row{padding:5px 16px;gap:12px}
.nhla-tape-row:last-child{padding-bottom:10px}
.nhla-tape-label{text-align:center;font-size:12px;color:var(--adv-sub);line-height:1.3}
.nhla-tape-val{display:flex;align-items:center;gap:10px}
.nhla-tape-val.is-away{flex-direction:row-reverse}
.nhla-tape-num{flex:0 0 64px;font-size:14px;font-weight:700}
.nhla-tape-val.is-away .nhla-tape-num{text-align:left}
.nhla-tape-val.is-home .nhla-tape-num{text-align:right}
.nhla-tape-bar{flex:1;height:6px;border-radius:99px;background:var(--adv-track);display:flex;overflow:hidden}
.nhla-tape-val.is-away .nhla-tape-bar{justify-content:flex-end}
.nhla-tape-bar i{display:block;height:100%;border-radius:99px;background:var(--adv-sub);opacity:.45}
.nhla-tape-val.is-edge .nhla-tape-num{color:var(--adv-edge);font-weight:800}
.nhla-tape-val.is-edge .nhla-tape-bar i{background:var(--adv-edge);opacity:1}

/* Two-team cards */
.nhla-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.nhla-card{min-width:0;border:1px solid var(--adv-line);border-radius:10px;background:var(--adv-card);padding:12px 12px 6px}
.nhla-card-wide{margin-bottom:16px}
.nhla-card-head{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:0 2px 8px}
.nhla-card-head h4{margin:0;font-size:14px}
.nhla-card-head span{font-size:12px;color:var(--adv-sub)}

/* Tables */
.nhla-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.nhla-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
.nhla-table th,.nhla-table td{padding:8px 6px;border-bottom:1px solid var(--adv-line);text-align:right;vertical-align:middle}
.nhla-table tbody tr:last-child td{border-bottom:0}
.nhla-table th:first-child,.nhla-table td:first-child{text-align:left;padding-left:4px}
.nhla-table thead th{font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:var(--adv-sub);font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nhla-table th[title]{cursor:help}
.nhla-table tbody tr:hover td{background:color-mix(in srgb,var(--adv-accent) 6%,transparent)}
.nhla-table .nhla-group td{padding:12px 4px 4px;font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--adv-accent);text-align:left;border-bottom:0;background:none!important}
.nhla-name{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nhla-sub{color:var(--adv-sub)}
.nhla-unit{font-weight:600;line-height:1.35}
.nhla-unit i{font-style:normal;color:var(--adv-sub);margin:0 4px}
.is-starter td{background:color-mix(in srgb,var(--adv-accent) 7%,transparent)}
.nhla-mins{display:flex;flex-direction:column;align-items:flex-end;gap:3px;line-height:1}
.nhla-mins-bar{width:100%;max-width:70px;height:4px;border-radius:99px;background:var(--adv-track);overflow:hidden}
.nhla-mins-bar i{display:block;height:100%;background:var(--adv-accent);border-radius:99px}
.nhla-goals{white-space:nowrap}
.nhla-diff,.nhla-gsax{display:inline-block;min-width:38px;padding:2px 6px;border-radius:8px;text-align:center;font-weight:800;font-size:12px;background:var(--adv-track)}
.nhla-goals .nhla-diff{min-width:0;margin-left:4px;padding:1px 5px;font-size:11px}
.nhla-diff.is-good,.nhla-gsax.is-good{background:var(--adv-good-bg);color:var(--adv-good)}
.nhla-diff.is-bad,.nhla-gsax.is-bad{background:var(--adv-bad-bg);color:var(--adv-bad)}
.nhla-meter{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.nhla-meter-track{position:relative;flex:1;max-width:60px;height:6px;border-radius:99px;background:var(--adv-track);overflow:hidden}
.nhla-meter-track i{position:absolute;inset:0 auto 0 0;background:var(--adv-sub);opacity:.5;border-radius:99px}
.nhla-meter-track b{position:absolute;left:50%;top:-1px;bottom:-1px;width:1px;background:var(--adv-ink);opacity:.35}
.nhla-meter.is-good .nhla-meter-track i{background:var(--adv-good);opacity:1}
.nhla-meter.is-bad .nhla-meter-track i{background:var(--adv-bad);opacity:1}
.nhla-meter-num{width:46px;text-align:right;font-weight:700}
.nhla-meter.is-good .nhla-meter-num{color:var(--adv-good)}
.nhla-meter.is-bad .nhla-meter-num{color:var(--adv-bad)}
.nhla-chip{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;font-size:10px;font-weight:800;vertical-align:1px;border:1px solid transparent;letter-spacing:.2px}
.nhla-chip.is-pp{background:#e6eef8;color:#1d4a7a;border-color:#bcd0e8}
.nhla-chip.is-hot{background:#fde8e4;color:#9a2a1b;border-color:#f1bcb2}
.nhla-chip.is-cold{background:#e6f4ec;color:#1b6a43;border-color:#b8dcc7}
.nhla-chip.is-start{background:#fff1d6;color:#7a4e00;border-color:#e9c77d}
.nhla-table .yfc-team-badge,.nhla-table [class*=badge]{vertical-align:middle}

/* League table */
.nhla-league{min-width:760px}
.nhla-league col{width:auto}
.nhla-league th:first-child,.nhla-league td:first-child{width:110px}
.nhla-league-groups th{padding:4px 6px 0;border-bottom:0;text-align:center!important;color:var(--adv-accent)!important}
.nhla-league-groups th[colspan]{border-bottom:2px solid color-mix(in srgb,var(--adv-accent) 35%,transparent)}
.nhla-league thead button{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:3px;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit}
.nhla-league thead button:hover{color:var(--adv-ink)}
.nhla-league thead button:focus-visible{outline:2px solid var(--adv-accent);outline-offset:2px;border-radius:4px}
.nhla-league th[aria-sort]{color:var(--adv-ink)}
.nhla-league th[aria-sort] span{font-size:8px}
.nhla-team-cell{display:flex;align-items:center;gap:8px;position:sticky;left:0;background:var(--adv-card)}
.nhla-rank{width:18px;font-size:11px;color:var(--adv-sub);text-align:right}
.nhla-heat.is-up{background:color-mix(in srgb,var(--adv-good) calc(var(--heat)*30%),transparent)}
.nhla-heat.is-down{background:color-mix(in srgb,var(--adv-bad) calc(var(--heat)*30%),transparent)}
.nhla-heat.is-hot{background:color-mix(in srgb,var(--adv-hot) calc(var(--heat)*30%),transparent)}
.nhla-heat.is-cold{background:color-mix(in srgb,var(--adv-cold) calc(var(--heat)*30%),transparent)}
.nhla-heat.is-strong{font-weight:800}
.nhla-heat.is-strong.is-up{color:var(--adv-good)}.nhla-heat.is-strong.is-down{color:var(--adv-bad)}
.nhla-heat.is-strong.is-hot{color:var(--adv-hot)}.nhla-heat.is-strong.is-cold{color:var(--adv-cold)}
.nhla-pair+.nhla-pair{margin-top:16px}

/* Season box on H2H player cards and goalie outlook cards */
.nhla-player{margin-top:12px;padding-top:10px;border-top:1px dashed var(--adv-line)}
.nhla-player-title{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:0 0 6px!important;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--adv-sub)}
.nhla-player-title>span:first-child{font-weight:600;text-transform:none;letter-spacing:0}
.nhla-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0}
.nhla-stats div{padding:5px 7px;border-radius:8px;background:var(--adv-card);min-width:0}
.nhla-stats dt{font-size:10px;color:var(--adv-sub);text-transform:uppercase;letter-spacing:.3px}
.nhla-stats dd{margin:0;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.nhla-goalie{grid-template-columns:repeat(4,minmax(0,1fr));margin:10px 0}
.nhla-goalie.is-good div:first-child dd{color:var(--adv-good)}
.nhla-goalie.is-bad div:first-child dd{color:var(--adv-bad)}

@media(max-width:760px){
 .nhl-advanced{padding:14px}
 .nhla-pair{grid-template-columns:1fr}
 .nhla-tape-head,.nhla-tape-row{grid-template-columns:minmax(0,1fr) minmax(96px,120px) minmax(0,1fr);gap:8px;padding-left:10px;padding-right:10px}
 .nhla-tape-num{flex-basis:auto;font-size:14px}
 .nhla-tape-bar{display:none}
 .nhla-tape-label{font-size:11px}
 .nhla-tape-side{display:none}
 .nhla-name{white-space:normal;overflow:visible}
 .nhla-name .nhla-chip{margin-left:0;margin-top:2px}
 .nhla-name .nhla-chip:first-of-type{display:table}
 .nhla-table th,.nhla-table td{padding:7px 4px}
}

/* Simple tables: no cell fills. Only clear outliers get colored, bold numbers. */
.nhla-heat.is-up,.nhla-heat.is-down,.nhla-heat.is-hot,.nhla-heat.is-cold{background:none}
.nhla-heat.is-strong.is-hot{color:var(--adv-hot)}.nhla-heat.is-strong.is-cold{color:var(--adv-cold)}
html[data-theme=dark] .nhla-heat{background:none!important}

/* Pills instead of filled cells: only clear outliers get a pill; everything else stays plain. */
.nhla-pill{display:inline-block;min-width:46px;padding:2px 7px;border-radius:8px;text-align:center;font-weight:800;font-size:12px;background:var(--adv-track);color:var(--adv-ink)}
.nhla-pill.is-up{background:var(--adv-good-bg);color:var(--adv-good)}
.nhla-pill.is-down{background:var(--adv-bad-bg);color:var(--adv-bad)}
.nhla-pill.is-hot{background:color-mix(in srgb,var(--adv-hot) 20%,transparent);color:var(--adv-hot)}
.nhla-pill.is-cold{background:color-mix(in srgb,var(--adv-cold) 20%,transparent);color:var(--adv-cold)}
.nhla-league td{text-align:right}
.nhla-chip.is-start.is-confirmed{background:#dcfce7;color:#07513e;border-color:#86d8af}
.nhla-chip.is-start.is-projected{background:#e0f2fe;color:#164e63;border-color:#94d7f0}

/* Match NBA/NFL/Soccer team labels without bolding rank numbers or table values. */
.nhl-advanced-desk .nhla-league .nhla-team-cell .history-team{font-weight:650}
