/* College basketball players: /cbb/players and /cbb/player/:id (js/pages/players.js) */

/* heat tints survive row hover (table.css's hover rule uses the background shorthand, which clears the tint) */
.ps-table tbody tr:hover td.t-heat-1 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 5%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-heat-2 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 10%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-heat-3 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 16%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-heat-4 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 23%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-heat-5 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 31%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-cold-1 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 5%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-cold-2 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 10%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-cold-3 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 16%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-cold-4 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 23%, transparent) 0 0); }
.ps-table tbody tr:hover td.t-cold-5 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 31%, transparent) 0 0); }

.pl-hero .eyebrow a { color: inherit; text-decoration: none; }
.pl-hero .eyebrow a:hover { text-decoration: underline; }
.pl-pos { color: var(--good-text); }
.pl-neg { color: var(--critical); }

/* ---------- /cbb/players ---------- */
a.stat.pl-top { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat.pl-top:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
a.stat.pl-top:focus-visible { outline: none; box-shadow: var(--ring); }
a.stat.pl-top b { color: var(--good-text); }

.pl-howto-wrap > summary { display: none; }
.pl-howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 20px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); }
.pl-howto > div { padding: 14px 18px 15px; min-width: 0; }
.pl-howto > div + div { border-left: 1px solid var(--border); }
.pl-howto h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 5px; }
.pl-howto p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.pl-howto p + p { margin-top: 4px; }
.pl-howto b { color: var(--text); font-weight: 650; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pl-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.pl-key i { display: inline-block; width: 16px; height: 11px; border-radius: 3px; border: 1px solid var(--border); }
.pl-nr { display: inline-block; font: 650 10.5px/1 var(--font-text); letter-spacing: .04em; color: var(--muted); padding: 3px 5px;
  border: 1px solid var(--border-strong); border-radius: 5px; vertical-align: 1px; }

.pl-card { padding-top: 18px; }
.ps-table .pl-hidden-filter { display: none; }
.ps-table .pl-seg { height: 40px; }
.ps-table .pl-seg > button { border: 0; background: none; font: 600 13px/1 var(--font-text); padding: 0 14px; border-radius: 7px; color: var(--text-2); cursor: pointer; }
.ps-table .pl-seg > button[aria-pressed="true"] { color: var(--text); background: var(--surface); }

.ps-table .pl-name { font-weight: 620; color: var(--text); text-decoration: none; white-space: nowrap; }
.ps-table .pl-name:hover { color: var(--accent); text-decoration: underline; }
.ps-table .pl-nm-sub { display: none; }
.ps-table td .team-cell { color: var(--text-2); text-decoration: none; gap: 8px; }
.ps-table td .team-cell .logo { width: 20px; height: 20px; }
.ps-table td a.team-cell:hover span { text-decoration: underline; color: var(--accent); }
.ps-table td.pl-team .team-cell span { max-width: 15ch; }
.ps-table td.pl-pos-c { color: var(--text-2); }
.ps-table td.pl-rating .t-bar { min-width: 52px; }
.ps-table td.pl-rk { color: var(--muted); font-weight: 600; }
.ps-table tr.pl-unr td:not(.t-sticky) { color: var(--text-2); }
.pl-flag { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; font-weight: 800;
  background: var(--critical-soft); color: var(--critical); vertical-align: 1px; }
#pl-table { --t-sticky-2: 52px; }
#pl-table .pl-rk { min-width: 52px; max-width: 52px; box-sizing: border-box; }

/* ---------- sideways-scroll cue for wide tables (PS.scrollCue in players.js; also the team roster) ---------- */
.x-cue { position: relative; }
.x-cue::after { content: ""; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 32px; pointer-events: none; opacity: 0; transition: opacity .15s;
  border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(90deg, transparent, var(--surface) 85%); }
.x-cue.more::after { opacity: 1; }
.x-cue-hint { display: none; }
@media (max-width: 760px) {
  .x-cue-hint:not([hidden]) { display: block; margin: 0 2px 6px; text-align: right; font-size: 12.5px; font-weight: 650; color: var(--accent); }
}

/* ---------- /cbb/player/:id: header ---------- */
.pl-phero { align-items: stretch; }
.pl-id { display: flex; flex-direction: column; justify-content: flex-end; }
.pl-id h1 { font-size: clamp(34px, 5vw, 54px); }
.pl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pl-teamlink { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 4px 14px 4px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 650; font-size: 15px; text-decoration: none; box-shadow: var(--shadow-sm); }
.pl-teamlink:hover { color: var(--text); border-color: var(--border-strong); }
.pl-teamlink:hover span { text-decoration: underline; }
.pl-teamlink:focus-visible { outline: none; box-shadow: var(--ring); }
.pl-teamlink .pl-teamlogo { width: 30px; height: 30px; padding: 2px; border-radius: 50%; background: var(--logo-plate); }
.pl-meta-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 999px; background: var(--surface-3);
  color: var(--text-2); font-size: 13px; font-weight: 560; white-space: nowrap; text-decoration: none; }
a.pl-meta-chip { color: var(--accent); background: var(--accent-soft); }
a.pl-meta-chip:hover { color: var(--accent-hover); text-decoration: underline; }

.pl-rate { flex: 0 1 380px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 16px 18px 14px; }
.pl-rate-label { display: inline-flex; align-items: center; gap: 4px; font: 650 11px/1.3 var(--font-text); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pl-rate-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.pl-rate-num { font: 800 52px/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.pl-rank { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.pl-rankpill { justify-self: start; font: 750 15px/1 var(--font-display); padding: 5px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.pl-rankpill.nr { background: var(--surface-3); color: var(--text-2); }
.pl-units { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.pl-meter { margin-top: 12px; }
.pl-meter-track { position: relative; height: 8px; border-radius: 4px; background: var(--grid);
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), var(--border-strong) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.pl-meter-track span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); border-radius: 4px; background: var(--heat-good); }
.pl-meter-track span::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--heat-good); box-sizing: border-box; }
.pl-meter-cap { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.pl-meter-cap b { color: var(--text); }
.pl-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; border-top: 1px solid var(--grid); }
.pl-split > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 0 0; font-size: 12.5px; color: var(--muted); }
.pl-split > div + div { border-left: 1px solid var(--grid); padding-left: 12px; margin-left: 12px; }
.pl-split span { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.pl-split b { font: 700 17px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }

.pl-avail { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 16px 20px; border-color: color-mix(in oklab, var(--critical) 30%, var(--border)); }
.pl-avail p { margin: 0; flex: 1 1 300px; line-height: 1.5; }
.pl-warn { background: var(--critical-soft); color: var(--critical); white-space: nowrap; }

/* ---------- stat tiles with a percentile bar ---------- */
.pl-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pl-tile { position: relative; display: flex; flex-direction: column; }
.pl-tile .st-label { display: flex; align-items: center; gap: 3px; }
.pl-tile .st-rank { margin-bottom: 8px; }
.pl-tile-bar { margin-top: auto; height: 4px; border-radius: 2px; background: var(--grid); overflow: hidden; }
.pl-tile-bar span { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--heat-good); border-radius: 2px; }
.pl-season { margin-top: 18px; }
.pl-season .t-controls, #pl-rot .t-controls { display: none; }
#pl-season th.t-on { color: inherit; box-shadow: inset 0 -1px 0 var(--border-strong); }
#pl-season th.t-on .t-arrow, #pl-season th.t-sticky .t-sort { display: none; }
#pl-season td.t-on { background: var(--surface); }
.ps-table td.pl-slabel { font-weight: 650; white-space: nowrap; }

/* ---------- game-by-game chart ---------- */
.pl-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.pl-grid > .card { height: 100%; }
.pl-chart-seg { height: 36px; }
.pl-chart-seg > button { min-height: 28px; }
.pl-chart-plot { position: relative; display: flex; align-items: stretch; gap: 4px; height: 200px; padding-top: 22px;
  background-image: linear-gradient(var(--grid), var(--grid)); background-size: 100% 1px; background-position: bottom 22px left 0; background-repeat: no-repeat; }
.pl-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.pl-col-plot { position: relative; flex: 1; }
.pl-col-plot > span { position: absolute; left: 12%; right: 12%; max-width: 34px; margin: 0 auto; border-radius: 4px 4px 0 0;
  background: color-mix(in oklab, var(--heat-good) 45%, var(--surface)); transition: background .15s; }
.pl-col.pl-col-top .pl-col-plot > span { background: var(--heat-good); }
.pl-col.pl-col-neg .pl-col-plot > span { border-radius: 0 0 4px 4px; background: color-mix(in oklab, var(--heat-bad) 55%, var(--surface)); }
.pl-col:hover .pl-col-plot > span { background: var(--accent); }
.pl-col-v { position: absolute; left: 0; right: 0; text-align: center; font: 750 13px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.pl-col-x { height: 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-top: 4px; }
.pl-col-opp { font-size: 10px; line-height: 1; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.pl-chart.dense .pl-col-opp { display: none; }
.pl-chart.dense .pl-chart-plot { gap: 2px; }
.pl-chart-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--text-2); opacity: .55; z-index: 1; pointer-events: none;
}
.pl-chart-ov { position: absolute; left: 0; right: 0; top: 22px; bottom: 22px; pointer-events: none; z-index: 1; }
.pl-chart-avg em { position: absolute; right: 0; bottom: 3px; font: 600 11px/1 var(--font-text); font-style: normal; color: var(--text-2);
  background: var(--surface); padding: 1px 4px; border-radius: 4px; }
.pl-wl-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pl-wl-dot.w { background: var(--good); }
.pl-wl-dot.l { background: var(--critical); }
.pl-chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.pl-chart-key { display: inline-flex; align-items: center; gap: 5px; }
.pl-chart-key .pl-wl-dot.l { margin-left: 6px; }
.pl-chart-note { margin: 10px 0 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---------- shooting profile ---------- */
.pl-shoot { display: grid; gap: 14px; }
.pl-sh-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 56px; grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; align-items: center; }
.pl-sh-label { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--text); }
.pl-sh-bar { position: relative; height: 10px; border-radius: 5px; background: var(--grid); }
.pl-sh-bar > span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 100%); border-radius: 5px; background: color-mix(in oklab, var(--text-2) 45%, var(--surface)); }
.pl-sh-bar.good > span { background: var(--heat-good); }
.pl-sh-bar.bad > span { background: var(--heat-bad); }
.pl-sh-avg { position: absolute; top: -4px; bottom: -4px; left: calc(var(--m) * 100%); width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.pl-sh-val { text-align: right; font: 700 16px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pl-sh-sub { grid-column: 2 / 4; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-sh-foot { margin: 14px 0 0; }

/* ---------- game log ---------- */
.pl-res { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-res.up { color: var(--muted); font-size: 12.5px; }
.pl-wl { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 750 11.5px/1 var(--font-text); }
.pl-wl.w { background: var(--good-soft); color: var(--good-text); }
.pl-wl.l { background: var(--critical-soft); color: var(--critical); }
.pl-ha { min-width: 18px; display: inline-block; color: var(--muted); font-size: 12px; }
.pl-neutral { font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 3px; }
.pl-opp-ab { display: none; }
.pl-dnp { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pl-star { color: var(--brand-2); margin-right: 5px; font-size: 12px; }
.ps-table td.pl-date { white-space: nowrap; }
.ps-table tr.pl-best td { background-color: color-mix(in oklab, var(--brand-2) 9%, var(--surface)); }
.ps-table tr.pl-best:hover td { background-color: color-mix(in oklab, var(--brand-2) 14%, var(--surface)); }
.ps-table tr.pl-future td { color: var(--muted); }
.pl-gs { color: var(--good-text); font-weight: 700; }
#pl-log .t-controls { display: none; }

/* ---------- rotation ---------- */
.pl-role-text { margin: 0 0 14px; color: var(--text-2); line-height: 1.55; max-width: 70ch; }
.ps-table tr.pl-me td { background-color: color-mix(in oklab, var(--accent-soft) 70%, var(--surface)); }
.model-note.pl-note { margin: 0 0 24px; }

@media (max-width: 1000px) {
  .pl-howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-howto > div:nth-child(3) { border-left: 0; }
  .pl-howto > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-rate { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .pl-howto-wrap { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
  .pl-howto-wrap > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer; font-weight: 650; font-size: 14px; list-style: none; }
  .pl-howto-wrap > summary::-webkit-details-marker { display: none; }
  .pl-howto-wrap > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--muted); }
  .pl-howto-wrap[open] > summary::after { content: "−"; }
  .pl-howto-wrap > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius); }
  .pl-howto { grid-template-columns: minmax(0, 1fr); border: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); margin: 0; background: none; }
  .pl-howto > div { padding: 12px 14px; }
  .pl-howto > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .ps-table .pl-seg { flex: 1 1 100%; }
  .ps-table .pl-seg > button { flex: 1; }
  #pl-table { --t-sticky-2: 44px; }
  #pl-table .pl-rk { min-width: 44px; max-width: 44px; }
  .ps-table .pl-name { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
  .ps-table td.pl-player .pl-flag { display: none; }
  .ps-table .pl-nm-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
  .ps-table td.pl-team, .ps-table th.pl-team, .ps-table td.pl-pos-c, .ps-table th.pl-pos-c { display: none; }
  .pl-rate-num { font-size: 44px; }
  .pl-avail { padding: 14px; }
  .pl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pl-tiles .stat-tile { padding: 10px 12px; }
  .pl-tiles .stat-tile .st-value { font-size: 21px; }
  .pl-chart-plot { height: 170px; }
  .pl-col-opp { display: none; }
  #pl-log .pl-opp-full { display: none; }
  #pl-log .pl-opp-ab { display: inline; }
  #pl-log .team-cell { gap: 6px; }
  .pl-split > div { font-size: 12px; }
  .pl-split > div + div { padding-left: 10px; margin-left: 10px; }
  .pl-sh-row { grid-template-columns: 92px minmax(0, 1fr) 52px; column-gap: 10px; }
  .ps-table td .team-cell .logo { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { .pl-col-plot > span, a.stat.pl-top { transition: none; } }
