/* NBA standings and projections (js/pages/nba_standings.js). Uses the tokens in styles.css and the table pieces in
   table.css (.ps-table, .t-scroll, .t-sticky, .t-band). */

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

/* ---------- standings tables ---------- */
.ns-stand .t-scroll { max-height: none; }
.ns-table { --t-sticky-2: 44px; }
.ns-table th, .ns-table td { white-space: nowrap; }
.ns-table th.ns-seed, .ns-table td.ns-seed { width: 44px; min-width: 44px; max-width: 44px; text-align: center; padding-left: 6px; padding-right: 6px; }
.ps-table table.ns-table tbody td.ns-seed, .ps-table table.ns-table thead th.ns-seed { padding-left: 6px; }
.ns-seedno { display: inline-grid; place-items: center; min-width: 24px; height: 22px; border-radius: 6px; font-weight: 650; font-size: 12.5px; }
.ns-seedno.z-po { background: color-mix(in oklab, var(--series-1) 16%, transparent); color: var(--text); }
.ns-seedno.z-pi { background: color-mix(in oklab, var(--brand-2) 26%, transparent); color: var(--text); }
.ns-seedno.z-out { color: var(--muted); }
.ns-teamcell { min-width: 180px; }
.ns-team { color: var(--text); text-decoration: none; font-weight: 560; }
.ns-team:hover { color: var(--accent); }
.ns-abbr { display: none; }
.ns-table tbody tr { cursor: pointer; }
.ns-table tr.ns-cut td { box-shadow: inset 0 -2px 0 var(--border-strong); }
.ns-table tr.ns-cut2 td { box-shadow: inset 0 -2px 0 var(--border); }
.ns-table tr.ns-cut td.t-divider, .ns-table tr.ns-cut2 td.t-divider { box-shadow: inset 1px 0 0 var(--border), inset 0 -2px 0 var(--border-strong); }
.ns-table tr.ns-cut td.t-sticky:not(:has(+ .t-sticky)) { box-shadow: inset -1px 0 0 var(--border), inset 0 -2px 0 var(--border-strong); }
.ns-proj b { font-weight: 650; }
.ns-proj small { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.ns-strk { font-weight: 600; }

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

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

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

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

/* ---------- who's out ---------- */
.ns-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ns-out-team { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); min-width: 0; }
.ns-out-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ns-out-head .ns-team { min-width: 0; }
.ns-out-pts { font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ns-out ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ns-out li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--grid); }
.ns-out li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-out li small { color: var(--muted); white-space: nowrap; }

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

@media (max-width: 760px) {
  .ns-bt-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ns-teamcell { min-width: 0; }
  .ns-full { display: none; }
  .ns-abbr { display: inline; }
  .ns-table { --t-sticky-2: 38px; }
  .ns-table th.ns-seed, .ns-table td.ns-seed { width: 38px; min-width: 38px; max-width: 38px; padding-left: 4px; padding-right: 4px; }
  .ns-bar { margin-bottom: 12px; }
  .ns-jump { font-size: 13px; }
  .ns-hm { font-size: 11px; border-spacing: 1.5px; }
  .ns-hm td { height: 26px; }
  .ns-hm-c { min-width: 22px; }
  .ns-pick select { max-width: 100%; }
  .ns-ctrls { width: 100%; }
  .ns-pick { flex: 1 1 100%; }
  .ns-pick select { width: 100%; }
}
