/* NHL standings and projections (js/pages/nhl_standings.js). Uses the tokens in styles.css and the table pieces in
   table.css (.ps-table, .t-scroll, .t-sticky, .t-band). Zones: z-po = division top 3, z-wc = wild card, z-out = outside. */

.hs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.hs-segs { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-jump { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.hs-jump a { color: var(--text-2); text-decoration: none; font-weight: 560; }
.hs-jump a:hover { color: var(--accent); }
.hs-sub { margin: 4px 0 0; }
.hs-card .card-head { margin-bottom: 12px; }
.hs-foot { margin: -8px 0 20px; }

/* ---------- standings tables ---------- */
.hs-stand .t-scroll { max-height: none; }
.hs-table { --t-sticky-2: 48px; }
.hs-table th, .hs-table td { white-space: nowrap; }
.hs-table th.hs-seed, .hs-table td.hs-seed { width: 48px; min-width: 48px; max-width: 48px; text-align: center; padding-left: 6px; padding-right: 6px; }
.ps-table table.hs-table tbody td.hs-seed, .ps-table table.hs-table thead th.hs-seed { padding-left: 6px; }
.hs-seedno { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 4px; border-radius: 6px; font-weight: 650; font-size: 12px; }
.hs-seedno.z-po { background: color-mix(in oklab, var(--series-1) 16%, transparent); color: var(--text); }
.hs-seedno.z-wc { background: color-mix(in oklab, var(--brand-2) 26%, transparent); color: var(--text); }
.hs-seedno.z-out { color: var(--muted); }
.hs-teamcell { min-width: 190px; }
.hs-team { color: var(--text); text-decoration: none; font-weight: 560; }
.hs-team:hover { color: var(--accent); }
.hs-abbr { display: none; }
.hs-table tbody tr[data-href] { cursor: pointer; }
.hs-table td.hs-pts { font-weight: 700; }
.hs-table tr.hs-cut td { box-shadow: inset 0 -2px 0 var(--border-strong); }
.hs-table tr.hs-cut td.t-divider { box-shadow: inset 1px 0 0 var(--border), inset 0 -2px 0 var(--border-strong); }
.hs-table tr.hs-cut td.t-sticky:not(:has(+ .t-sticky)) { box-shadow: inset -1px 0 0 var(--border), inset 0 -2px 0 var(--border-strong); }
.hs-table tr.hs-subhead th, .hs-table tr.hs-subhead td { background: var(--surface-2); font: 650 11px/1.2 var(--font-text); letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); padding-top: 7px; padding-bottom: 7px; text-align: left; }
.hs-table tr.hs-subhead td .hint { text-transform: none; letter-spacing: 0; font-weight: 500; }
.hs-table tr.hs-subhead th.t-sticky { background: var(--surface-2); }
.hs-proj b { font-weight: 650; }
.hs-proj small { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.hs-strk { font-weight: 600; }

/* probability cells: one hue, stronger with the chance */
td.hs-p { min-width: 58px; background-image: linear-gradient(color-mix(in oklab, var(--series-1) var(--hs-a, 0%), transparent) 0 0); }
td.hs-title { font-weight: 650; }
.hs-table th .info, .hs-lot th .info, .hs-bt th .info, .hs-hm th .info { margin-left: 3px; }

/* ---------- playoff picture ---------- */
.hs-pic { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 10px; }
.hs-bracket { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hs-pic h3, .hs-likely h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 0 0 8px; }
.hs-mu { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 6px; margin-bottom: 8px; }
.hs-mu-team { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.hs-mu-team:hover { border-color: var(--border-strong); }
.hs-mu-team .logo { width: 22px; height: 22px; grid-row: 1 / span 2; grid-column: 2; }
.hs-mu-spot { grid-row: 1 / span 2; grid-column: 1; font: 650 10.5px/1 var(--font-text); color: var(--text-2); background: var(--surface-3);
  border-radius: 5px; padding: 4px 5px; min-width: 30px; text-align: center; }
.hs-mu-team b { grid-column: 3; font-weight: 650; font-size: 14px; }
.hs-mu-pts { grid-column: 3; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hs-mu-odds { grid-column: 4; grid-row: 1 / span 2; margin-left: 6px; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hs-mu-vs { align-self: center; font-size: 11px; color: var(--muted); }
.hs-likely ol { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.hs-likely li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--grid); }
.hs-likely li:first-child { border-top: 0; }
.hs-likely li span { display: inline-flex; align-items: center; gap: 5px; }
.hs-likely .logo { width: 18px; height: 18px; }
.hs-likely b { font-variant-numeric: tabular-nums; }

/* ---------- where teams finish ---------- */
.hs-hm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; margin: 0 -4px; padding: 0 4px; }
.hs-hm { border-collapse: separate; border-spacing: 2px; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 100%; }
.hs-hm th { font: 650 11px/1.2 var(--font-text); color: var(--muted); padding: 2px 0 4px; text-align: center; }
.hs-hm .hs-zones th { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 2px; border-bottom: 2px solid var(--border); }
.hs-hm .hs-zones th.z-po { color: var(--series-1); border-color: color-mix(in oklab, var(--series-1) 55%, transparent); }
.hs-hm .hs-zones th.z-wc { color: color-mix(in oklab, var(--brand-2) 75%, var(--text)); border-color: var(--brand-2); }
.hs-hm .hs-zones th.z-out { border-color: var(--border-strong); }
.hs-hm .hs-zones th:empty { border: 0; }
.hs-hm td { padding: 0; height: 28px; }
.hs-hm td.hs-hm-c, .hs-hm thead th.num:not(.hs-hm-avg) { text-align: center !important; }
.hs-hm.hs-hm-spot { min-width: 0; width: 100%; max-width: 640px; }
.hs-hm .hs-hm-team, .hs-hm .hs-hm-avg { width: 1%; }
.hs-hm-team { text-align: left !important; padding-right: 8px !important; white-space: nowrap; position: sticky; left: 0; z-index: 1; background: var(--surface); }
.hs-hm-team a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 12.5px; }
.hs-hm-team a:hover { color: var(--accent); }
.hs-hm-team .logo { width: 20px; height: 20px; }
.hs-hm-c { min-width: 30px; text-align: center; border-radius: 4px; color: var(--text-2);
  background: var(--surface-2) linear-gradient(color-mix(in oklab, var(--series-1) var(--hs-a, 0%), transparent) 0 0); }
.hs-hm-c.hs-hm-out { background: var(--surface-2) linear-gradient(color-mix(in oklab, var(--muted) var(--hs-a, 0%), transparent) 0 0); }
.hs-hm-c.hs-hm-dark { color: var(--accent-ink); font-weight: 650; }
.hs-hm .hs-zb { box-shadow: -2px 0 0 var(--surface), -3px 0 0 var(--border-strong); }
.hs-hm-avg { padding-left: 8px !important; color: var(--text-2); font-weight: 600; text-align: right; white-space: nowrap; }

/* ---------- odds over time ---------- */
#hs-time .card-head, #hs-seeds .card-head, #hs-picture .card-head { align-items: flex-start; }
.hs-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hs-pick select { height: 36px; min-width: 0; max-width: 220px; }
.hs-chart { min-height: 240px; }
.hs-line { fill: none; stroke: var(--border-strong); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.hs-line-hi { fill: none; stroke: var(--series-1); stroke-width: 2.75; stroke-linejoin: round; stroke-linecap: round; }
.hs-dot-hi { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.hs-lab { fill: var(--text); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hs-mark { fill: var(--muted); font-size: 10.5px; }
.hs-time-note { margin-top: 8px; }

/* ---------- lottery ---------- */
.hs-lot td.hs-pk, .hs-lot th.hs-pk { min-width: 30px; padding-left: 3px; padding-right: 3px; text-align: center; }
.hs-lot td.hs-pk { border-radius: 0; font-size: 12px; }
.hs-lot td.hs-pkc { background: linear-gradient(color-mix(in oklab, var(--series-1) var(--hs-a, 0%), transparent) 0 0); }
.hs-lot td.hs-pkc.hs-hm-dark { color: var(--accent-ink); font-weight: 650; }
#hs-lottery .ps-table { margin-bottom: 12px; }

/* ---------- method + backtest ---------- */
.hs-method p { max-width: 80ch; line-height: 1.6; color: var(--text-2); }
.hs-method h3 { font-size: 16px; margin: 22px 0 6px; }
.hs-bt { margin-top: 12px; }
.hs-bt .t-scroll { max-height: none; margin-bottom: 12px; }
.hs-bt table th[scope="row"] { font-weight: 560; text-align: left; white-space: nowrap; }
.hs-bt tr.hs-bt-us th, .hs-bt tr.hs-bt-us td { font-weight: 700; background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.hs-bt-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hs-bt td { white-space: nowrap; }
.hs-stat-team b { display: flex; align-items: center; gap: 8px; }
.hs-stat-team .logo { width: 28px; height: 28px; }

@media (min-width: 1180px) {
  .hs-pic { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); }
}
@media (min-width: 761px) {
  .hs-likely ol { columns: 2; column-gap: 24px; }
  .hs-likely li { break-inside: avoid; }
}
@media (min-width: 1180px) {
  .hs-likely ol { columns: 1; }
}
@media (max-width: 760px) {
  .hs-bt-split { grid-template-columns: minmax(0, 1fr); }
  .hs-bracket { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hs-teamcell { min-width: 0; }
  .hs-full { display: none; }
  .hs-abbr { display: inline; }
  .hs-table { --t-sticky-2: 44px; }
  .hs-table th.hs-seed, .hs-table td.hs-seed { width: 44px; min-width: 44px; max-width: 44px; padding-left: 4px; padding-right: 4px; }
  .hs-bar { margin-bottom: 12px; }
  .hs-jump { font-size: 13px; }
  .hs-hm { font-size: 11px; border-spacing: 1.5px; }
  .hs-hm td { height: 26px; }
  .hs-hm-c { min-width: 24px; }
  .hs-ctrls { width: 100%; }
  .hs-pick { flex: 1 1 100%; }
  .hs-pick select { width: 100%; max-width: 100%; }
  .hs-mu { gap: 4px; }
  .hs-mu-team { padding: 7px 7px; column-gap: 5px; }
  .hs-mu-team .logo { width: 18px; height: 18px; }
  .hs-mu-spot { min-width: 26px; padding: 4px 3px; }
}
