/* College basketball: /cbb/ratings (js/pages/ratings.js), the team page (js/pages/team.js) and the /cbb front door
   (renderCbbToday in js/pages/league.js). Tokens from styles.css; heat hooks from table.css. */

/* ---------- shared: heat tints that survive row hover ----------
   table.css paints .t-heat-* / .t-cold-* with background-image; the row-hover rule resets `background`,
   so inside these pages the tint is carried by --rt-tint and re-applied on hover. */
.rt-card td.t-heat-1, .tm-page .t-heat-1, .cbb-today .t-heat-1 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-good) 5%, transparent) 0 0); }
.rt-card td.t-heat-2, .tm-page .t-heat-2, .cbb-today .t-heat-2 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-good) 10%, transparent) 0 0); }
.rt-card td.t-heat-3, .tm-page .t-heat-3, .cbb-today .t-heat-3 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-good) 16%, transparent) 0 0); }
.rt-card td.t-heat-4, .tm-page .t-heat-4, .cbb-today .t-heat-4 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-good) 23%, transparent) 0 0); }
.rt-card td.t-heat-5, .tm-page .t-heat-5, .cbb-today .t-heat-5 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-good) 31%, transparent) 0 0); }
.rt-card td.t-cold-1, .tm-page .t-cold-1, .cbb-today .t-cold-1 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-bad) 5%, transparent) 0 0); }
.rt-card td.t-cold-2, .tm-page .t-cold-2, .cbb-today .t-cold-2 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-bad) 10%, transparent) 0 0); }
.rt-card td.t-cold-3, .tm-page .t-cold-3, .cbb-today .t-cold-3 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-bad) 16%, transparent) 0 0); }
.rt-card td.t-cold-4, .tm-page .t-cold-4, .cbb-today .t-cold-4 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-bad) 23%, transparent) 0 0); }
.rt-card td.t-cold-5, .tm-page .t-cold-5, .cbb-today .t-cold-5 { --rt-tint: linear-gradient(color-mix(in oklab, var(--heat-bad) 31%, transparent) 0 0); }
/* style stats (tempo, 3-point attempt rate): neutral grey, neither good nor bad */
.rt-style-1 { --rt-tint: linear-gradient(color-mix(in oklab, var(--text) 6%, transparent) 0 0); background-image: var(--rt-tint); }
.rt-style-2 { --rt-tint: linear-gradient(color-mix(in oklab, var(--text) 12%, transparent) 0 0); background-image: var(--rt-tint); }
.rt-card .ps-table tbody tr:hover td, .cbb-today table.data tbody tr:hover td { background-image: var(--rt-tint, none); }
.rt-card .ps-table tbody tr:hover td.t-on { background-image: var(--rt-tint, none); }

/* ---------- /cbb/ratings: hero ---------- */
.rt-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 20px 40px; align-items: end; padding: 36px 0 20px; }
.rt-hero .sub { max-width: 60ch; }
.rt-updated { margin: 10px 0 0; }
.rt-leaders { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 6px 16px; }
.rt-leader { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 46px; padding: 6px 0;
  border-bottom: 1px solid var(--grid); color: var(--text); text-decoration: none; }
.rt-leader:last-child { border-bottom: 0; }
.rt-leader:hover { color: var(--text); }
.rt-leader:hover b { color: var(--accent); }
.rt-l-label { font: 650 10.5px/1.2 var(--font-text); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rt-l-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rt-l-team b { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-l-team .logo { width: 22px; height: 22px; }
.rt-l-val { font: 750 19px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .rt-hero { grid-template-columns: minmax(0, 1fr); align-items: start; } }
@media (max-width: 640px) { .rt-hero { padding: 22px 0 16px; } .rt-leader { grid-template-columns: 84px minmax(0, 1fr) auto; } }

/* how to read this */
.rt-guide-wrap { margin: 0 0 18px; }
.rt-guide-wrap > summary { display: none; }
.rt-guide-wrap .rt-guide { margin: 0; }
@media (max-width: 640px) {
  .rt-guide-wrap > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-weight: 650; font-size: 14px; color: var(--text); }
  .rt-guide-wrap > summary::-webkit-details-marker { display: none; }
  .rt-guide-wrap > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--muted); }
  .rt-guide-wrap[open] > summary::after { content: "−"; }
  .rt-guide-wrap[open] .rt-guide { margin-top: 6px; }
}
.rt-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rt-g { padding: 12px 18px 13px 0; font-size: 13px; line-height: 1.45; color: var(--text-2); min-width: 0; }
.rt-g + .rt-g { padding-left: 18px; border-left: 1px solid var(--border); }
.rt-g b { display: block; font: 700 11px/1.3 var(--font-text); letter-spacing: .07em; text-transform: uppercase; color: var(--text); margin-bottom: 3px; }
.rt-keys { display: flex; flex-direction: column; gap: 3px; }
.rt-key { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.rt-key i { display: inline-block; width: 16px; height: 11px; border-radius: 3px; border: 1px solid var(--border); flex: none; background-color: var(--surface); }
.rt-key i.t-heat-4 { background-image: linear-gradient(color-mix(in oklab, var(--heat-good) 23%, transparent) 0 0); }
.rt-key i.t-cold-4 { background-image: linear-gradient(color-mix(in oklab, var(--heat-bad) 23%, transparent) 0 0); }
@media (max-width: 900px) {
  .rt-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-g:nth-child(3) { padding-left: 0; border-left: 0; }
  .rt-g:nth-child(n+3) { border-top: 1px solid var(--grid); }
}
@media (max-width: 520px) {
  .rt-guide { grid-template-columns: minmax(0, 1fr); }
  .rt-g, .rt-g + .rt-g { padding: 10px 0; border-left: 0; }
  .rt-g + .rt-g { border-top: 1px solid var(--grid); }
  .rt-keys { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
}

/* ---------- /cbb/ratings: the table ---------- */
.rt-card { padding: 16px; }
.rt-card .ps-table { --t-sticky-2: 46px; }
.rt-card .ps-table .t-controls { align-items: flex-end; }
.rt-card .ps-table .t-filter select { max-width: 300px; }
.rt-card .ps-table .t-scroll { max-height: min(80vh, 960px); }
.rt-card td.rt-rank, .rt-card th.rt-rank { width: 46px; min-width: 46px; max-width: 46px; }
.rt-card td.rt-rank { color: var(--text-2); font-weight: 650; }
.rt-card td.rt-team { min-width: 168px; max-width: 210px; }
.rt-card td.rt-team .team-cell { gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; }
.rt-card td.rt-team .logo { width: 22px; height: 22px; }
.rt-card td.rt-conf { color: var(--text-2); font-size: 12.5px; }
.rt-card td.rt-wl { color: var(--text-2); }
.rt-card td a { color: inherit; text-decoration: none; }
.rt-card td a:hover { color: var(--accent); }
.rt-card td.rt-em { min-width: 82px; }
.rt-bar { min-width: 62px; font: 700 14.5px/1.35 var(--font-display); letter-spacing: -0.01em; color: var(--text); }
.rt-card td.rt-ff { min-width: 58px; }
.rt-card td.t-heat-5 .t-rank, .rt-card td.t-cold-5 .t-rank { font-weight: 600; }
/* band row: centered group names with a hairline under each group */
.rt-card .ps-table table.t-table thead tr.t-band th.t-group { color: var(--text); }
@media (max-width: 640px) {
  .rt-card { padding: 12px; margin-left: -4px; margin-right: -4px; }
  .rt-card .ps-table { --t-sticky-2: 38px; }
  .rt-card td.rt-rank, .rt-card th.rt-rank { width: 38px; min-width: 38px; max-width: 38px; }
  .rt-card td.rt-team { min-width: 124px; max-width: 136px; }
  .rt-card .ps-table .t-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .rt-card .ps-table .t-search { grid-column: 1 / -1; width: 100%; }
  .rt-card .ps-table .t-filter { min-width: 0; }
  .rt-card .ps-table .t-filter select { max-width: none; width: 100%; }
  .rt-card .ps-table .t-views { align-self: end; }
  .rt-card .ps-table .t-count { grid-column: 1 / -1; }
}

/* ---------- team page (js/pages/team.js) ---------- */
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: 32px 0 20px; }
.tm-id { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1 1 420px; }
.tm-logo-wrap { display: grid; place-items: center; width: 92px; height: 92px; flex: none; border-radius: 50%; background: var(--logo-plate); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tm-logo { width: 62px; height: 62px; object-fit: contain; }
span.tm-logo { border-radius: 50%; background: var(--surface-3); }
.tm-title { min-width: 0; }
.tm-title h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(30px, 4.2vw, 46px); }
.tm-title .eyebrow { margin-bottom: 6px; }
.tm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: var(--text-2); font-size: 14.5px; }
.tm-conf { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 650; font-size: 13px; text-decoration: none; }
.tm-conf span { color: var(--muted); font-weight: 500; }
a.tm-conf:hover { border-color: var(--accent); color: var(--accent); }
.tm-rec b { font: 750 17px/1 var(--font-display); color: var(--text); letter-spacing: -0.01em; }
.tm-links { display: inline-flex; gap: 14px; font-size: 13.5px; font-weight: 600; }
.tm-links a { text-decoration: none; }
.tm-links a:hover { text-decoration: underline; }
.tm-rankbox { display: grid; justify-items: end; text-align: right; padding: 4px 0 4px 26px; border-left: 1px solid var(--border); }
.tm-rb-label { font: 700 11px/1.2 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tm-rb-num { font: 800 64px/.95 var(--font-display); letter-spacing: -0.05em; color: var(--text); font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.tm-rb-num small { font-size: .45em; color: var(--accent); vertical-align: .9em; margin-right: 2px; letter-spacing: 0; }
.tm-rb-sub { font-size: 13px; color: var(--text-2); }
.tm-rb-sub b { color: var(--text); }
.tm-plain { margin: 10px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--text-2); max-width: 60ch; }
.tm-plain b { color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .tm-head { padding: 20px 0 14px; gap: 14px; align-items: flex-start; }
  .tm-id { gap: 14px; flex-basis: 100%; align-items: flex-start; }
  .tm-logo-wrap { width: 60px; height: 60px; }
  .tm-logo { width: 40px; height: 40px; }
  .tm-title h1 { font-size: 28px; }
  .tm-meta { gap: 8px 12px; margin-top: 10px; }
  .tm-rankbox { grid-template-columns: auto auto; justify-items: start; align-items: baseline; gap: 0 10px; text-align: left; border-left: 0; padding: 0; }
  .tm-rb-label { grid-column: 1 / -1; }
  .tm-rb-num { font-size: 40px; margin: 2px 0 0; }
}

/* key tiles with national ranks */
.tm-keys { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 8px; }
.tm-tile .st-label { display: flex; align-items: center; gap: 2px; }
.tm-tile .st-label .info { width: 14px; height: 14px; font-size: 9px; }
.tm-tile[title] { cursor: help; }
.tm-tile .st-rank { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.tm-rk { white-space: nowrap; display: inline-block; padding: 1px 6px; border-radius: 6px; font-weight: 650; font-size: 12px; color: var(--text); background-color: var(--surface-2); line-height: 1.5; font-variant-numeric: tabular-nums; }
.tm-pctl { height: 3px; margin-top: 9px; border-radius: 2px; background: var(--grid); overflow: hidden; }
.tm-pctl i { display: block; height: 100%; background: var(--heat-good); border-radius: 2px; }
.tm-pctl.style i { background: var(--muted); }
@media (max-width: 1000px) { .tm-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tm-keys { gap: 8px; }
  .tm-keys .stat-tile { padding: 10px 10px 11px; }
  .tm-keys .st-value { font-size: 21px; }
  .tm-keys .st-label { font-size: 10px; letter-spacing: .04em; }
  .tm-keys .st-rank { font-size: 11px; }
}

/* sub-tabs stick under the sport bar */
.tm-tabs { position: sticky; top: calc(var(--header-h) + var(--sportbar-h)); z-index: 12; background: var(--bg); margin: 0 0 22px; padding-top: 10px; }
.tm-tabs a { font-size: 15px; }
@media (max-width: 640px) {
  .tm-tabs { margin: 0 -16px 16px; padding: 6px 12px 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .tm-tabs a { padding: 0 12px; min-height: 46px; }
  .tm-tabs a::after { left: 12px; right: 12px; height: 3px; }
}
.tm-row { margin-bottom: 20px; }
.tm-foot { margin: 12px 0 0; }

/* shared small pieces */
.tm-opp { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tm-opp .team-cell { gap: 8px; min-width: 0; color: var(--text); text-decoration: none; font-weight: 600; }
.tm-opp a.team-cell:hover span { color: var(--accent); }
.tm-opp .logo { width: 22px; height: 22px; }
.tm-venue { flex: none; width: 18px; color: var(--muted); font-size: 12px; }
.tm-venue.n::after { content: "ⁿ"; }
.tm-orank { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tm-chip { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; font: 750 11.5px/1 var(--font-text); }
.tm-chip.w { background: var(--good-soft); color: var(--good-text); }
.tm-chip.l { background: var(--critical-soft); color: var(--critical); }
.tm-chip.u { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border-strong); }
.tm-src { color: var(--muted); margin-left: 1px; }
.tm-glink { white-space: nowrap; text-decoration: none; font-weight: 650; font-size: 13px; }
.tm-glink:hover { text-decoration: underline; }
.tm-meter { display: inline-block; width: 34px; height: 5px; border-radius: 3px; background: var(--prob-other); overflow: hidden; vertical-align: middle; margin-right: 7px; }
.tm-meter i { display: block; height: 100%; background: var(--series-1); }

/* overview: next game */
.tm-next, .tm-form, .tm-sw, .tm-outlook { display: flex; flex-direction: column; }
.tm-nx { display: grid; gap: 14px; padding: 14px 16px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.tm-nx-when { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.tm-nx-when b { font: 700 15px/1.2 var(--font-display); color: var(--text); }
.tm-nx-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.tm-nx-side { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; color: var(--text); text-decoration: none; }
.tm-nx-side b { font: 700 16px/1.2 var(--font-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-nx-side small { font-size: 11.5px; color: var(--muted); }
a.tm-nx-side:hover b { color: var(--accent); }
.tm-nx-logo { width: 44px; height: 44px; object-fit: contain; margin-bottom: 4px; }
span.tm-nx-logo { border-radius: 50%; background: var(--surface-3); }
.tm-nx-v { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 700 12px var(--font-display); }
.tm-nx-odds { display: grid; gap: 8px; }
.tm-nx-p { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tm-nx-p b { font: 800 34px/1 var(--font-display); letter-spacing: -0.04em; color: var(--series-1); }
.tm-nx-p span:last-child { font-size: 13px; color: var(--text-2); }
.tm-nx .probbar { height: 8px; }
.tm-nx-foot { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.tm-nx-foot b { color: var(--text); }
.tm-nx-foot .tm-glink { margin-left: auto; }
.tm-mini { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.tm-mini li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.tm-mini li:last-child { border-bottom: 0; }
.tm-next .tm-mini li { grid-template-columns: 52px minmax(0, 1fr) auto; }
.tm-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tm-p { display: inline-flex; align-items: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-p b { min-width: 34px; text-align: right; }
.tm-score { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tm-score b { font-variant-numeric: tabular-nums; min-width: 52px; }
.tm-vs { font-size: 12.5px; color: var(--muted); white-space: nowrap; text-align: right; min-width: 70px; }
.tm-strip { display: flex; gap: 4px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 2px; border-bottom: 1px solid var(--border); }
.tm-strip .tm-chip { width: 26px; height: 26px; cursor: default; }
@media (max-width: 640px) { .tm-mini li { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; } .tm-mini .tm-meter { display: none; } }
/* recent form: two lines per game, so the opponent's name and the comparison with our model both fit on a phone */
.tm-mini.tm-formlist li { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "when opp score" ". vs vs"; gap: 2px 10px; padding: 8px 0; }
.tm-formlist .tm-when { grid-area: when; }
.tm-formlist .tm-opp { grid-area: opp; }
.tm-formlist .tm-score { grid-area: score; }
.tm-formlist .tm-vs { grid-area: vs; text-align: left; white-space: normal; min-width: 0; padding-left: 25px; color: var(--text-2); }
.tm-vs-p { color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .tm-mini.tm-formlist li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "opp opp score" "when vs vs"; gap: 3px 8px; }
  .tm-formlist .tm-when { align-self: start; padding-left: 25px; font-size: 12px; line-height: 1.5; }
  .tm-formlist .tm-vs { padding-left: 0; font-size: 12px; }
}
.tm-tv { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-weight: 600; }
.tm-strength { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--grid); font-size: 12.5px; line-height: 1.6; }
.tm-strength b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.tm-strength .info { vertical-align: -2px; }

/* overview: trend, strengths, outlook */
.tm-trend .chart { margin-top: 4px; }
.tm-sw-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tm-sw-h { font: 700 11px/1.3 var(--font-text); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px; display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.tm-sw-h::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.tm-sw-h.good::before { background: var(--heat-good); }
.tm-sw-h.bad::before { background: var(--heat-bad); }
.tm-sw-list { list-style: none; margin: 0; padding: 0; }
.tm-sw-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--grid); font-size: 14px; }
.tm-sw-list li:last-child { border-bottom: 0; }
.tm-ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tm-ol > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.tm-ol .st-label { font: 650 10.5px/1.3 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tm-ol b { font: 750 24px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tm-outlook .tm-foot, .tm-sw .tm-foot, .tm-form .tm-foot, .tm-next .tm-foot { margin-top: auto; padding-top: 12px; }
@media (max-width: 420px) { .tm-sw-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* schedule: season story */
.tm-story { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.tm-sum { flex: 1 1 120px; display: grid; gap: 3px; padding: 14px 18px; border-right: 1px solid var(--grid); }
.tm-sum:last-child { border-right: 0; }
.tm-sum b { font: 750 24px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tm-sum span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
@media (max-width: 640px) {
  .tm-story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-sum { padding: 11px 14px; border-bottom: 1px solid var(--grid); }
  .tm-sum b { font-size: 20px; }
}
.tm-mchart { position: relative; display: flex; align-items: stretch; gap: 4px; height: 180px; padding-bottom: 20px; }
.tm-mchart::before { content: ""; position: absolute; left: 0; right: 0; top: calc((100% - 20px) / 2); border-top: 1px solid var(--border-strong); }
.tm-mc { position: relative; flex: 1 1 0; min-width: 4px; max-width: 56px; color: inherit; text-decoration: none; border-radius: 4px; }
.tm-mc::after { content: ""; position: absolute; inset: 0 -2px 20px; border-radius: 4px; }
a.tm-mc:hover::after { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.tm-mc-bar { position: absolute; left: 18%; right: 18%; max-height: 50%; }
.tm-mc { height: calc(100% - 20px); }
.tm-mc-bar.w { background: var(--heat-good); border-radius: 3px 3px 0 0; }
.tm-mc-bar.l { background: var(--heat-bad); border-radius: 0 0 3px 3px; }
.tm-mc-slot { position: absolute; left: 24%; right: 24%; top: 40%; bottom: 40%; border: 1px dashed var(--border-strong); border-radius: 3px; }
.tm-mc.next .tm-mc-lbl { opacity: .7; }
.tm-mc.next .tm-mc-pred { border-top-color: var(--muted); }
.tm-mc-pred { position: absolute; left: 4%; right: 4%; height: 0; border-top: 2px solid var(--text); z-index: 1; }
.tm-mc-lbl { position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.tm-mchart:has(.tm-mc:nth-child(16)) .tm-mc-lbl { display: none; }
.tm-mchart:has(.tm-mc:nth-child(16)) { height: 160px; padding-bottom: 0; }
.tm-mchart:has(.tm-mc:nth-child(16)) .tm-mc { height: 100%; }
.tm-mchart:has(.tm-mc:nth-child(16))::before { top: 50%; }
.tm-mlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; }
.tm-mlegend span { display: inline-flex; align-items: center; gap: 6px; }
.tm-mlegend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.tm-mlegend i.w { background: var(--heat-good); }
.tm-mlegend i.l { background: var(--heat-bad); }
.tm-mlegend i.slot { border: 1px dashed var(--border-strong); background: transparent; }
.tm-mlegend i.pred { height: 0; border-top: 2px solid var(--text); border-radius: 0; }

.tm-glist { list-style: none; margin: 0; padding: 0; }
.tm-g { display: grid; grid-template-columns: 96px minmax(0, 1.5fr) 110px 96px 150px 130px; align-items: center; gap: 12px; min-height: 50px; padding: 6px 8px;
  border-bottom: 1px solid var(--grid); font-size: 14px; border-radius: 8px; }
.tm-g:not(.tm-g-head):hover { background: var(--row-hover); }
.tm-g-head { min-height: 32px; font: 650 10.5px/1.2 var(--font-text); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--border-strong); border-radius: 0; }
.tm-g-head span:nth-child(4), .tm-g-head span:nth-child(5) { text-align: right; }
.tm-g-date { color: var(--text-2); font-size: 13px; white-space: nowrap; display: grid; }
.tm-g-date small { color: var(--muted); font-size: 11.5px; }
.tm-g-res { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-g-res b { font-weight: 650; }
.tm-g-p { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-g-diff { display: grid; justify-items: end; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tm-g-diff b { font-weight: 650; }
.tm-g-diff small { font-weight: 500; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tm-g-lbl { display: none; }
.tm-g-tv { min-width: 0; gap: 5px; font-size: 13px; font-weight: 600; }
.tm-tvname { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tm-g-link { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.tm-flag { font: 700 10px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; background: var(--brand-2-soft); color: var(--text); }
.tm-g.is-next .tm-g-res { font-size: 12.5px; }
.tm-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 4px; font: 700 11.5px/1.2 var(--font-text); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.tm-divider::before, .tm-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.tm-divider::before { flex: 0 0 18px; background: var(--accent); height: 2px; }
@media (max-width: 760px) {
  .tm-sched { padding-left: 12px; padding-right: 12px; }
  .tm-g-head { display: none; }
  /* phones: opponent and result, then date and our pregame chance, then the margin against our model */
  .tm-g { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "opp res" "date p" "diff diff"; gap: 3px 12px; padding: 10px 6px; }
  .tm-g-opp { grid-area: opp; min-width: 0; }
  .tm-g-res { grid-area: res; justify-self: end; }
  .tm-g-date { grid-area: date; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; padding-left: 25px; min-width: 0; }
  .tm-g-p { grid-area: p; font-size: 12px; color: var(--text-2); }
  .tm-g-lbl { display: inline; color: var(--muted); }
  .tm-g-diff { grid-area: diff; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; justify-items: start; text-align: left; font-size: 13px; padding-left: 25px; }
  .tm-g-diff:empty { display: none; }
  .tm-g-tv { max-width: 46vw; font-size: 12.5px; }
  .tm-g-link { display: none; }
  .tm-g .tm-meter { width: 24px; margin-right: 5px; }
}

/* stats: factor bars vs the national average */
.tm-ff2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.tm-ffh { font: 700 12px/1.3 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin: 0 0 2px; padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.ff-row { display: grid; grid-template-columns: minmax(110px, 1.25fr) 58px minmax(90px, 1.5fr) 50px; align-items: center; gap: 12px; min-height: 42px; border-bottom: 1px solid var(--grid); font-size: 13.5px; }
.ff-row:last-child { border-bottom: 0; }
.ff-row[title] { cursor: help; }
.ff-label { color: var(--text-2); min-width: 0; }
.ff-val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.ff-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--grid); }
.ff-fill { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.ff-fill.good { background: var(--heat-good); }
.ff-fill.bad { background: var(--heat-bad); }
.ff-fill.style { background: var(--muted); }
.ff-avg { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.ff-rank { text-align: right; }
.ff-head { min-height: 26px; border-bottom: 0; }
.ff-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 860px) { .tm-ff2 { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 480px) {
  .ff-row { grid-template-columns: minmax(0, 1.25fr) 48px minmax(54px, 1fr) 46px; gap: 8px; font-size: 13px; }
  .ff-rank .tm-rk { padding: 1px 4px; font-size: 11.5px; }
  .ff-axis span:first-child, .ff-axis span:last-child { display: none; }
  .ff-axis { justify-content: center; }
}
.tm-splits td.t-up, .tm-splits td.t-down { font-weight: 650; }
.tm-tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 640px) { .tm-tiles-3 { grid-template-columns: minmax(0, 1fr); } }
.tm-tiles { margin-bottom: 14px; }

/* roster */
.tm-pl { font-weight: 600; min-width: 150px; }
.tm-ibar, .tm-mbar { min-width: 64px; }

/* projections: tournament ladder */
.tm-ladder { display: grid; gap: 2px; }
.tm-lad { display: grid; grid-template-columns: 140px minmax(0, 1fr) 62px; align-items: center; gap: 14px; min-height: 38px; }
.tm-lad-l { font-size: 14px; color: var(--text-2); }
.tm-lad-track { height: 14px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--grid); overflow: hidden; }
.tm-lad-track i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.tm-lad b { text-align: right; font: 700 16px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tm-seed { margin: 14px 0 0; color: var(--text-2); }
@media (max-width: 520px) { .tm-lad { grid-template-columns: 104px minmax(0, 1fr) 54px; gap: 10px; } .tm-lad-l { font-size: 13px; } }

/* ---------- /cbb today (js/pages/league.js renderCbbToday) ---------- */
.ct-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 40px; align-items: center; padding: 40px 0 8px; }
.ct-hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -0.04em; }
.ct-hero h1 span { color: var(--accent); }
.ct-hero .sub { max-width: 54ch; margin-top: 16px; }
.ct-links { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-top: 22px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); }
.ct-links a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ct-links a:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ct-slate { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px 18px; box-shadow: var(--shadow); }
.ct-slate-label { display: flex; align-items: center; gap: 8px; font: 700 11px/1.2 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ct-slate-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.ct-big { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.ct-big b { font: 800 64px/.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.ct-big span { color: var(--text-2); font-size: 14px; line-height: 1.3; }
.ct-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--grid); }
.ct-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; }
.ct-stats dt { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ct-stats dd { margin: 0 0 2px; font: 750 22px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ct-upd { margin: 12px 0 0; font-size: 12px; }
@media (max-width: 900px) { .ct-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 28px; } }
@media (max-width: 640px) {
  .ct-hero { padding-top: 20px; }
  .ct-links { display: flex; width: 100%; }
  .ct-links a { flex: 1 1 auto; justify-content: center; }
  .ct-slate { padding: 18px; }
  .ct-big b { font-size: 52px; }
}
.ct-first { margin-top: 40px; }

/* games to watch */
.ct-watch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.ct-fx { margin: 0; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.ct-fx::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.ct-fx-top { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ct-fx-tv { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.ct-fx-body { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.ct-fx-team { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; padding: 6px 4px; border-radius: var(--radius); color: var(--text); text-decoration: none; transition: background .15s; }
.ct-fx-team:hover { background: var(--surface-2); color: var(--text); }
.ct-fx-logo { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--logo-plate); border: 1px solid var(--border); margin-bottom: 4px; }
.ct-fx-logo .logo { width: 38px; height: 38px; }
.ct-fx-name { font: 700 15.5px/1.2 var(--font-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-fx-name small { font: 650 11px var(--font-text); color: var(--muted); margin-right: 4px; vertical-align: 1px; }
.ct-fx-meta { font-size: 11.5px; color: var(--muted); }
.ct-fx-p { font: 800 30px/1 var(--font-display); letter-spacing: -0.04em; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.ct-fx-team.fav .ct-fx-p { color: var(--series-1); }
.ct-fx-at { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font: 700 11.5px var(--font-display); }
.ct-fx .probbar { height: 8px; }
.ct-fx-foot { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: auto; }
.ct-fx-foot b { color: var(--text); }
.ct-fx-go { margin-left: auto; font-weight: 650; text-decoration: none; }
.ct-fx-go:hover { text-decoration: underline; }
@media (max-width: 1000px) { .ct-watch { grid-template-columns: minmax(0, 1fr); } .ct-fx-body { max-width: 520px; width: 100%; margin: 0 auto; } }

/* top 25 + yesterday */
.ct-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.ct-side { display: grid; gap: 20px; }
.ct-side .card, .ct-top { margin-bottom: 0; }
.ct-top { padding-top: 16px; }
.ct-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 10px; font-size: 12px; }
.ct-key { display: inline-flex; align-items: center; gap: 6px; }
.ct-key i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--border); }
.ct-top .table-wrap { margin: 0 -22px; max-width: none; }
.ct-table { font-size: 14px; }
.ct-table th { position: static; background: none; }
.ct-table th:first-child, .ct-table td:first-child { padding-left: 22px; }
.ct-table th:last-child, .ct-table td:last-child { padding-right: 22px; }
.ct-table td { padding-top: 6px; padding-bottom: 6px; height: 44px; }
.ct-table td[class*="t-heat-"], .ct-table td[class*="t-cold-"], .ct-table td[class*="rt-style-"] { background-clip: padding-box; }
.ct-rank { width: 2.6em; color: var(--text-2); font-weight: 650; }
.ct-team { white-space: nowrap; }
.ct-team .team-cell { display: inline-flex; vertical-align: middle; gap: 9px; color: var(--text); text-decoration: none; }
.ct-team .team-cell span { font-weight: 600; }
.ct-team .team-cell .logo { width: 22px; height: 22px; }
.ct-team a.team-cell:hover span { color: var(--accent); }
.ct-conf { margin-left: 7px; color: var(--muted); font-size: 12px; vertical-align: middle; }
.ct-wl { color: var(--text-2); }
.ct-em { min-width: 64px; font: 700 15px/1.4 var(--font-display); letter-spacing: -0.01em; color: var(--text); }
.ct-table .t-rank { display: block; font-size: 10.5px; line-height: 1.1; color: var(--muted); font-weight: 500; }
.ct-next { font-size: 13px; }
.ct-next a { text-decoration: none; font-weight: 600; }
.ct-next a:hover { text-decoration: underline; }
.ct-more { display: inline-block; margin-top: 14px; font-weight: 650; font-size: 13.5px; text-decoration: none; }
.ct-more:hover { text-decoration: underline; }
.ct-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ct-list li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--grid); min-width: 0; }
.ct-list li:last-child { border-bottom: 0; }
.ct-list a { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.ct-list a:hover .ct-l-name { text-decoration: underline; text-underline-offset: 3px; }
.ct-list .logo { width: 22px; height: 22px; }
.ct-l-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-l-name .t-muted { font-weight: 400; }
.ct-rk { font-size: 10.5px; font-weight: 650; color: var(--muted); margin-left: 3px; vertical-align: 1px; }
.ct-l-score { flex: none; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ct-list b { flex: none; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ct-dog { color: var(--critical); }
.ct-note { margin: 10px 0 0; font-size: 12px; }
@media (max-width: 960px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ct-top .table-wrap { margin: 0 -16px; }
  .ct-table th:first-child, .ct-table td:first-child { padding-left: 14px; }
  .ct-table th:last-child, .ct-table td:last-child { padding-right: 14px; }
  .ct-conf { display: none; }
}
.ct-schedule { margin-top: 36px; }

/* explore */
.ct-explore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ct-explore a { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  color: var(--text-2); text-decoration: none; font-size: 13px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.ct-explore a b { font: 700 16px/1.25 var(--font-display); color: var(--text); letter-spacing: -0.01em; }
.ct-explore a b span { color: var(--accent); transition: margin .15s; }
.ct-explore a:hover { border-color: var(--border-strong); box-shadow: var(--shadow); color: var(--text-2); }
.ct-explore a:hover b span { margin-left: 3px; }
@media (max-width: 960px) { .ct-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ct-explore { grid-template-columns: minmax(0, 1fr); } .ct-explore a { padding: 13px 16px; } }
@media (max-width: 640px) {
  .ct-legend { display: none; }
  .ct-fx { padding: 16px 14px 14px; gap: 12px; }
  .ct-fx-logo { width: 48px; height: 48px; }
  .ct-fx-logo .logo { width: 32px; height: 32px; }
  .ct-fx-p { font-size: 26px; }
}
/* players page: why fewer players are ranked, and the early-season sample-size note (pages/players.js) */
.pl-count-note { margin: -4px 0 14px; max-width: 72ch; font-size: 13px; line-height: 1.5; }
.pl-count-note:empty { display: none; }
