:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --accent: #bf5b0f;
  --accent-hover: #a64b0e;
  --ring-orange: #cc5500;
  --bg: #fff;
}
* { box-sizing: border-box; }
body.pitching-app {
  margin: 0;
  color: #1b1b1b;
  background-color: #fff;
  background-image: none;
}
.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px clamp(10px, 1.2vw, 20px);
  box-sizing: border-box;
  background: transparent;
}
body.the40-app .page {
  padding-top: 6px;
}
.top h1 { margin: 0 0 12px; font-size: 1.75rem; }
.muted { color: #666; }

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
/* One row of filters: burnt-orange header + white control per tile */
.filters-bar-section.filters.card {
  padding: 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  /* Let the pitcher combobox popover extend below this card */
  position: relative;
  z-index: 5;
  overflow: visible;
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  overflow: visible;
}
.filter-tile {
  flex: 1 1 140px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.filter-tile--wide {
  flex: 2 1 240px;
  min-width: min(100%, 220px);
  position: relative;
  z-index: 6;
  overflow: visible;
}
.filter-tile-header {
  background: #bf5700;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: 0;
  line-height: 1.2;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.filter-tile-title {
  color: inherit;
  font: inherit;
  margin: 0;
  cursor: pointer;
}
.filter-tile-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  border: 1px solid #cfd4da;
  border-top: none;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  min-height: 44px;
}
/* Combo dropdown is position:absolute; must not be clipped by filter-tile-body (default overflow:hidden) */
.filter-tile-body--combo {
  padding: 0;
  position: relative;
  overflow: visible;
}
/* Custom select panels use position:absolute; same clipping issue as pitcher combo */
.filter-tile-body:has(.custom-select) {
  overflow: visible;
  position: relative;
}
.filter-tile:has(.custom-select-panel:not(.hidden)) {
  z-index: 40;
}
.dashboard-filters-inner:has(.custom-select-panel:not(.hidden)) {
  z-index: 30;
}
.filter-tile-body--range {
  gap: 8px;
  padding: 6px 8px;
  flex-wrap: wrap;
}
.filter-select {
  width: 100%;
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23222' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.filter-select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #7eb8ff;
}
.pitcher-combo {
  position: relative;
  width: 100%;
  z-index: 1;
}
.pitcher-combo:has(.pitcher-combo-panel:not(.hidden)) {
  z-index: 20;
}
.filter-tile-body--combo .pitcher-combo-trigger {
  border: none;
  border-radius: 0;
  min-height: 44px;
}
.filter-tile-body--combo .pitcher-combo-trigger:hover {
  border-color: transparent;
  background: #fafafa;
}
.pitcher-combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #cfd4da;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.pitcher-combo-trigger:hover {
  border-color: #9aa3ad;
}
.pitcher-combo-trigger:focus {
  outline: 2px solid #7eb8ff;
  outline-offset: 1px;
}
.pitcher-combo-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pitcher-combo-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #222;
  flex-shrink: 0;
}
.pitcher-combo-panel {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border-radius: 0;
  border: 1px solid #cfd4da;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(420px, 56vh);
}
.pitcher-combo-panel.hidden {
  display: none !important;
}
.pitcher-combo-filter {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid #e5e8ec;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.pitcher-combo-filter:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #7eb8ff;
}
.pitcher-combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
.pitcher-combo-option {
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eef1f4;
}
.pitcher-combo-section {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7a5a32;
  background: #fbf3ea;
  border-bottom: 1px solid #eedecb;
  text-transform: uppercase;
}
.pitcher-combo-option:last-child {
  border-bottom: none;
}
.pitcher-combo-option:hover {
  background: #f5e6d8;
}
.pitcher-combo-option.is-selected {
  background: #e8e8e8;
}
.pitcher-combo-option-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: #111;
  line-height: 1.25;
}
.pitcher-combo-option-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 13px;
  color: #555;
  line-height: 1.2;
}
.pitcher-combo-option-sub img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.pitcher-combo-empty {
  padding: 14px;
  text-align: center;
  color: #666;
  font-size: 14px;
  list-style: none;
}

select:not(.filter-select),
input[type="date"] {
  padding: 8px;
  border: 1px solid #cfd4da;
  border-radius: 0;
}
.hidden { display: none !important; }

/* —— Shiny mod_pitching.R dashboard left panel: rectangle-border + stacked columns —— */
.rectangle-border {
  border: 4px solid #bf5b0f;
  border-radius: 0;
  padding: 15px;
  margin: 10px 10px;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pitcher-summary-panel.rectangle-border {
  margin: 10px 0;
}

/* Hitting top row: same layout as pitcher-summary (class names differ in HTML). */
.batter-summary-panel.rectangle-border {
  margin: 10px 0;
}

.batter-summary-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  min-height: 0;
}

.batter-headshot-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.batter-three-columns {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
}

.batter-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 700px) {
  .batter-summary-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .batter-headshot-col {
    justify-content: center;
  }
  .batter-three-columns {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Headshot left (vertically centered); three columns: info box over ring each */
.pitcher-summary-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  min-height: 0;
}

.pitcher-headshot-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pitcher-three-columns {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
}

.pitcher-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

.ring-column {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* Score card: dark inner panel so the red→white→green ramp pops. */
/*
 * Score info box (mirrors the Shiny custom.css `.stuff-info-box`):
 *   - flat burnt-orange background, no gradient
 *   - solid white text
 *   - sharp rectangle, no border
 */
.stuff-info-box {
  background-color: #bf5b0f;
  color: #ffffff;
  padding: 10px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 90px;
  margin-left: 0;
}

.stuff-info-box .value {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 1px;
  color: #ffffff;
}

.stuff-info-box .label {
  font-size: 16px;
  text-transform: uppercase;
  margin: 5px 0;
  color: #ffffff;
}
.stuff-info-box .label.label--bat-to-ball {
  font-size: 14px;
  line-height: 1.15;
}
.stuff-info-box .label.label--bat-speed {
  font-size: 14px;
  line-height: 1.15;
}

/* Hit Grades tab: slash stats table + Hit Score badge (paired with .grades-grid--pitch-grades layout in index.html) */
.hit-grades-slash-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}
.hit-grades-slash-table th,
.hit-grades-slash-table td {
  border: 1px solid #cfd4da;
  padding: 8px 10px;
  text-align: center;
}
.hit-grades-slash-table th {
  background: #bf5700;
  color: #fff;
  font-weight: 700;
}
.action-grade-badge--hit-score {
  min-width: 120px;
  padding: 18px 24px;
  font-size: 34px;
}
.hit-score-display-wrap {
  text-align: center;
  margin-top: 4px;
}
.hit-grades-calc-result:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}
.grades-grid--hit-grades .grades-form--hit-scores {
  max-width: none;
}
.grades-grid--hit-grades .hit-grades-blob-plot {
  height: 600px;
  margin-top: 12px;
}

.circle-image {
  width: 100px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  display: block;
}

/* School logos: wider square frame + contain so crest fits (headshots stay portrait crop). */
.circle-image.circle-image--team-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  box-sizing: border-box;
  background: #fff;
}

/* Top row: 50 / 50 */
.dashboard-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}
.col-half {
  flex: 1 1 50%;
  min-width: min(100%, 320px);
  padding: 0 4px;
}
.career-panel {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.rectangle-border.career-panel {
  border: 4px solid #bf5b0f;
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(191, 87, 0, 0.35);
}
.career-panel .table-scrollable {
  border: 1px solid #d4d8de;
  box-sizing: border-box;
}
.career-title {
  text-align: center;
  font-weight: bold;
  font-size: 30px;
  margin: 10px 0 8px;
}
.career-radios {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}
.career-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.radio-group label {
  font-weight: 600;
  font-size: 14px;
}
.career-school-link {
  color: #111;
  text-decoration: underline;
  cursor: pointer;
}

/* Reactive rings: gradient + glow look, 170×170 svg viewBox */
.ring-gauge {
  width: 170px;
  height: 170px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 10px rgba(120, 50, 0, 0.18));
  transition: transform 200ms ease, filter 200ms ease;
}
.ring-gauge svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ring-gauge-arc {
  transition: stroke-dasharray 0.78s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring-gauge:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 8px 14px rgba(120, 50, 0, 0.26));
}
@media (prefers-reduced-motion: reduce) {
  .ring-gauge { transition: none; }
  .ring-gauge:hover { transform: none; }
  .ring-gauge-arc { transition: none; }
}

@media (max-width: 700px) {
  .pitcher-summary-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .pitcher-headshot-col {
    justify-content: center;
  }
  .pitcher-three-columns {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Tab buttons (Shiny btn-custom) */
.button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.btn-custom {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  min-height: 44px;
  border-radius: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.btn-custom:hover:not(:disabled) {
  background-color: var(--accent-hover);
  transform: scale(1.05);
}
.btn-custom:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.tab-btn.active {
  outline: 3px solid #8b4513;
}

.tab-panel { margin-bottom: 20px; }

/* Dashboard: metrics table + footer toggle + optional filter column (identical to top filter tiles) */
.dashboard-metrics-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
}
/* Hitting dashboard: keep metrics + filter column on one row so the table width tracks filter visibility (matches pitching). */
#hitDashboardMetricsLayout.dashboard-metrics-layout {
  flex-wrap: nowrap;
}
.dashboard-metrics-left {
  flex: 1 1 0;
  min-width: 0;
}
.metrics-table-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  width: 100%;
}
.btn-toggle-filters {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}
.dashboard-filters-column {
  flex: 0 0 140px;
  min-width: 0;
  align-self: flex-start;
}
.dashboard-filters-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dashboard-filters-column .filter-tile {
  flex: 0 0 auto;
}
.filter-tile--stacked {
  width: 100%;
  min-width: 0;
}
.dashboard-filters-column .filter-tile-header {
  min-height: 18px;
  padding: 2px 6px;
  font-size: 9px;
}
.dashboard-filters-column .filter-tile-body {
  flex: 0 0 auto;
  min-height: 24px;
}
.dashboard-filters-column .filter-select {
  min-height: 24px;
  font-size: 11px;
  padding: 2px 6px;
  padding-right: 20px;
  background-position: right 5px center;
}
.dashboard-filters-column .custom-select-trigger {
  min-height: 28px;
  padding: 4px 22px 4px 6px;
  font-size: 11px;
  font-weight: 400;
}
.dashboard-filters-column .custom-select-trigger::after {
  right: 6px;
  margin-top: -2px;
  border-top-width: 5px;
}
.filter-tile-body--multi {
  min-height: 78px;
  padding: 2px;
}
.filter-select-multi {
  min-height: 72px !important;
  padding-right: 6px !important;
  background-image: none;
  font-size: 10px;
}
.filter-tile-body--cluster-picker {
  min-height: 24px;
  position: relative;
  overflow: visible;
}
.cluster-types-toggle {
  width: 100%;
  border: 1px solid #b8bfc8;
  background: #fff;
  min-height: 24px;
  font-size: 11px;
  text-align: left;
  padding: 2px 20px 2px 6px;
  cursor: pointer;
  box-sizing: border-box;
}
.cluster-types-toggle::after {
  content: "▼";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: #333;
}
.cluster-types-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  background: #fff;
  border: 1px solid #cfd4da;
  z-index: 40;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px 6px;
}
.cluster-types-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 0;
}
.filter-tile-body--check {
  min-height: 24px;
  display: flex;
  align-items: center;
  padding: 0 5px;
}
.filter-tile-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #111;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.filter-tile-check input {
  width: 0.72rem;
  height: 0.72rem;
  cursor: pointer;
}

/* Date range inputs: match select tile body */
.filter-tile-body--range .filter-date-input {
  flex: 1 1 120px;
  min-width: 0;
  margin: 0;
  padding: 10px 10px;
  min-height: 44px;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  background: #fff;
  border: 1px solid #e5e8ec;
  border-radius: 0;
  box-sizing: border-box;
}
.filter-tile-body--range .filter-date-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #7eb8ff;
}

.plot-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
  color: #333;
}

/* LOCATION STRATEGY — 50/50 split: reserved left, dashboard plate (points/heat) right */
.location-strategy-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 24px);
  align-items: start;
  width: 100%;
  margin-top: 8px;
}
.location-strategy-pane {
  min-width: 0;
}
.location-strategy-pane--reserved {
  min-height: min(400px, 50vh);
}
.location-strategy-facet-caption {
  margin: 0 0 10px;
  text-align: center;
}

/* Location strategy: HTML chrome + one Plotly div spanning 3×2 subplot area */
.location-facet-grid--strategy-matrix {
  display: grid;
  grid-template-columns: minmax(52px, 64px) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
  grid-template-areas:
    "corner hL hR"
    "rE plot plot"
    "rF plot plot"
    "rB plot plot";
  gap: 8px 12px;
  width: 100%;
  align-items: stretch;
  min-height: min(520px, 72vh);
}
.location-strategy-g-corner {
  grid-area: corner;
}
.location-strategy-g-hL {
  grid-area: hL;
}
.location-strategy-g-hR {
  grid-area: hR;
}
.location-strategy-g-rE {
  grid-area: rE;
}
.location-strategy-g-rF {
  grid-area: rF;
}
.location-strategy-g-rB {
  grid-area: rB;
}
.location-strategy-g-plot {
  grid-area: plot;
  width: 100%;
  min-height: min(420px, 62vh);
  position: relative;
  z-index: 0;
}
.location-strategy-toolbar {
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 10px;
}
.location-strategy-pane--placeholder {
  display: flex;
  align-items: stretch;
  min-height: min(520px, 62vh);
}
.location-strategy-coming-soon {
  flex: 1;
  align-self: stretch;
  min-height: min(480px, 58vh);
}
.location-strategy-heading {
  margin: 0 0 12px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: #bf5700;
}
.location-strategy-toolbar--left {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}
.location-strategy-toolbar .location-mode-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.location-facet-grid {
  display: grid;
  grid-template-columns: minmax(52px, 64px) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto repeat(3, minmax(200px, 26vh));
  gap: 8px 12px;
  width: 100%;
  align-items: stretch;
  overflow: visible;
}
.location-facet-grid--rows2 {
  grid-template-rows: auto repeat(2, minmax(170px, 22vh));
}
.location-facet-corner {
  min-height: 0;
}
.location-facet-colhead {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #222;
  align-self: end;
  padding-bottom: 4px;
}
.location-facet-rowlab {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #333;
  text-align: center;
  padding-right: 4px;
}
.location-facet-plot {
  width: 100%;
  min-height: 180px;
  height: 100%;
  overflow: visible;
  position: relative;
  z-index: 0;
  pointer-events: auto;
}
.location-facet-plot .js-plotly-plot .plotly .main-svg {
  overflow: visible;
}
@media (max-width: 1100px) {
  .location-strategy-split {
    grid-template-columns: 1fr;
  }
}

/* Movement + release / spray + location: Plotly fills square host */
.plots-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.2vw, 16px);
  margin-top: 28px;
  width: 100%;
  align-items: start;
}
.plot-area-square {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.plotly-host {
  width: 100%;
}
.plot-square-host {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 200px;
  margin: 0 auto;
}

/* Movement profile: optional overlays below chart (left column only; centered as a pair) */
.movement-plot-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: clamp(12px, 2.5vw, 28px);
  margin-top: 10px;
  padding: 0 4px;
  line-height: 1.35;
  width: 100%;
  box-sizing: border-box;
}
.movement-plot-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.movement-plot-check input {
  margin: 0;
  flex-shrink: 0;
}

/* Plotly hover — light grey outline + connector to the point */
.plotly .hoverlayer .hovertext path {
  stroke: #c8c8c8 !important;
  stroke-width: 1px !important;
}
.plotly .hoverlayer .hovertext {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
}
.plotly .hoverlayer .axistext path {
  stroke: #c8c8c8 !important;
}
.plotly .hoverlayer line {
  stroke: #c8c8c8 !important;
}

/* Tables (DT-style center, 11pt) */
.table-scrollable {
  overflow-x: auto;
}
.table-scrollable-metrics {
  max-height: none;
}
table.dt-career,
table.dt-metrics {
  border-collapse: collapse;
  width: 100%;
  font-size: 11pt;
  line-height: 1.2;
}
table.dt-career th,
table.dt-career td,
table.dt-metrics th,
table.dt-metrics td {
  border: 1px solid #c9cdd3;
  padding: 4px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
table.dt-career th,
table.dt-metrics th {
  background: #f6f8fa;
  font-weight: 600;
}
table.dt-career tbody td,
table.dt-metrics tbody td,
table.dt-roster tbody td {
  background-color: #fff !important;
}

/* Hitting dashboard metrics: same header strip as pitching (#f6f8fa from table.dt-metrics th) */
#hit-panel-dashboard #hitMetricsTable.dt-metrics tbody tr:nth-child(even):not(.roster-row-totals) td {
  background-color: #fff !important;
}
#hitCareerTable a.career-school-link {
  color: #111;
}

@media (max-width: 1100px) {
  .filters-row .filter-tile {
    flex: 1 1 calc(50% - 5px);
    min-width: min(100%, 160px);
  }
  .dashboard-filters-column:not([hidden]) {
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .filters-row .filter-tile,
  .filters-row .filter-tile--wide {
    flex: 1 1 100%;
  }
}

@media (max-width: 900px) {
  .plots-row-half {
    grid-template-columns: 1fr;
  }
}

/* Extended pitching tabs */
.tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.tab-toolbar-check {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  min-height: 38px;
  box-shadow: none;
}
.filter-select--inline {
  display: inline-block;
  min-width: 160px;
  margin-left: 6px;
}
.filter-select--narrow {
  width: 72px;
  min-width: 72px;
}
.filter-select--wide {
  min-width: 240px;
}
.tab-section-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  text-align: center;
}
.grades-section-title {
  margin: 0;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #bf5700;
}
.grades-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.grades-card-head .grades-section-title {
  flex: 1;
  text-align: center;
}
.btn-reset-grades {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.btn-reset-grades:hover {
  background: #f5f6f8;
}
.grades-edit-hint {
  margin: 0 0 12px 0;
  text-align: center;
}
.grades-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b8bfc8;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  min-height: 44px;
}
.grades-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(126, 184, 255, 0.65);
}
.grades-input--usage {
  width: 100px;
  min-height: 38px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 500;
}
.grades-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
/* Pitch Grades: Action Calculator left, Arsenal Calculator right (Shiny reference layout). */
.grades-grid--pitch-grades {
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  max-width: 1400px;
  gap: 24px;
  align-items: start;
}
.grades-grid--hit-grades .grades-section-title--hit-primary {
  color: #bf5700;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  width: 100%;
}
.grades-form--hit-scores {
  grid-template-columns: 1fr 1fr;
}
.hit-grades-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.hit-grades-score-label {
  font-size: 18px;
  font-weight: 600;
}
.hit-grades-slash-wrap {
  margin-top: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hit-grades-slash-hint {
  margin-top: 8px;
  text-align: center;
}
.hit-blob-card {
  min-width: 0;
}
.grades-form--hit-blob-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.hit-blob-plot {
  width: 100%;
  min-height: 520px;
  height: 600px;
}
.grades-card {
  border: 1px solid #cfd4da;
  padding: 16px;
  background: #fafafa;
  border-radius: 10px;
}
.grades-card--action,
.grades-card--arsenal {
  background: #fff;
}
.grades-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.grades-form--action {
  gap: 14px 18px;
  align-items: end;
}
.grades-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  text-align: center;
}
.grades-field-span-full {
  grid-column: 1 / -1;
}
/* Pitch Type + Horz Break: same visual width as one form column, centered (matches Shiny column width). */
.grades-form-row-centered {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}
.grades-form-narrow-control {
  width: 100%;
  max-width: calc((100% - 18px) / 2);
  box-sizing: border-box;
}
.grades-form-row-hb-rfv {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}
.grades-form-row-hb-rfv.grades-form-row-hb-rfv--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: stretch;
}
.grades-form-row-hb-rfv--split .grades-form-narrow-control {
  max-width: none;
}
.grades-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}
.btn-calculate-action {
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  min-height: 48px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  border: 1px solid #8b3a00;
  border-radius: 6px;
  background: linear-gradient(180deg, #e87414 0%, #bf5700 48%, #a04400 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 8px rgba(88, 32, 0, 0.2);
}
.btn-calculate-action:hover {
  filter: brightness(1.05);
}
.btn-add-arsenal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  min-height: 48px;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}
.btn-add-arsenal-icon {
  font-size: 26px;
  line-height: 1;
  color: #bf5700;
}
.btn-add-arsenal-text {
  max-width: 7em;
  line-height: 1.15;
  text-align: center;
}
.grades-results {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
  gap: 12px;
}
.grades-results--action {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.grades-result-card {
  border: none;
  border-radius: 0;
  padding: 10px 8px 0;
  background: #fff;
  text-align: center;
}
.grades-result-label {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}
.action-grade-badge {
  display: inline-block;
  min-width: 88px;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #e87414 0%, #bf5700 55%, #a04400 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.action-grade-badge--arsenal {
  min-width: 120px;
  padding: 22px 28px;
  font-size: 36px;
}
.arsenal-action-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: inherit;
  text-align: center;
  line-height: 1.25;
}
.arsenal-action-pill--empty {
  padding: 2px 8px;
  color: #555;
}
table.arsenal-table th {
  background: #bf5700;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
}
.arsenal-table-outer {
  margin-bottom: 20px;
}
.arsenal-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.arsenal-usage-title {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: #bf5700;
}
.arsenal-weighted-card {
  margin-top: 16px;
  border: none;
  border-radius: 0;
  padding: 10px 8px 0;
  background: #fff;
  text-align: center;
  box-shadow: none;
}
.arsenal-weighted-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}
.btn-arsenal-edit {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #0d6efd;
  color: #fff;
}
.btn-arsenal-edit:hover {
  filter: brightness(1.06);
}
.btn-arsenal-remove {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #dc3545;
  color: #fff;
}
.btn-arsenal-remove:hover {
  filter: brightness(1.06);
}
.arsenal-placeholder {
  padding: 12px 0;
  text-align: center;
}

.arsenal-populate-toolbar {
  margin: 0 0 16px 0;
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fafbfc;
}
.arsenal-populate-reveal-btn {
  width: 100%;
  margin-bottom: 0;
}
.arsenal-populate-options {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e4e7ec;
}
.arsenal-populate-combo-label {
  display: block;
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 700;
  color: #222;
}
.pitcher-combo--arsenal {
  margin-bottom: 12px;
}
.arsenal-populate-intro {
  margin: 0 0 12px 0;
  line-height: 1.45;
}
.arsenal-populate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.arsenal-populate-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #222;
}
.arsenal-populate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.arsenal-populate-replace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.arsenal-populate-status {
  margin: 10px 0 0 0;
}

/* Pitch type naming modal (Shiny modalDialog parity) */
.grades-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}
.grades-modal-overlay.hidden {
  display: none;
}
.grades-modal-dialog {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.grades-modal-dialog--narrow {
  max-width: 400px;
}
.grades-modal-header {
  padding: 16px 18px 8px;
  border-bottom: 1px solid #e8eaee;
}
.grades-modal-title {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}
.grades-modal-body {
  padding: 16px 18px;
}
.grades-modal-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
.grades-modal-label .filter-select {
  font-weight: 400;
}
.grades-modal-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}
.grades-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid #e8eaee;
}
.grades-modal-footer--single {
  justify-content: flex-end;
}
.btn-modal-secondary {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.btn-modal-secondary:hover {
  background: #f5f5f5;
}
.btn-modal-primary {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: #0d6efd;
  color: #fff;
  cursor: pointer;
}
.btn-modal-primary:hover {
  filter: brightness(1.05);
}

@media (max-width: 780px) {
  .arsenal-usage-grid {
    grid-template-columns: 1fr;
  }
}
.grades-arsenal-hint {
  margin-top: 0;
}
.arsenal-list {
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
}
.arsenal-empty {
  padding: 8px 0;
  line-height: 1.45;
}
.arsenal-item {
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.arsenal-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.arsenal-remove {
  border: none;
  background: transparent;
  color: #991b1b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.arsenal-item-grades {
  font-size: 14px;
  color: #333;
}
.usage-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* PITCH USAGE — mirrors mod_pitching.R (Distribution / Mapping + filters) */
.pitch-usage-panel {
  margin-top: 12px;
  padding: 8px 0 24px;
}
.pitch-usage-view-type {
  text-align: center;
  margin-bottom: 16px;
}
.pitch-usage-view-title {
  margin: 0 0 12px;
  color: #bf5b0f;
  font-weight: 700;
  font-size: 1.4rem;
}
.pitch-usage-radio-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
  align-items: center;
}
.pitch-usage-radio {
  font-weight: 600;
  font-size: 1.06rem;
  color: #333;
  cursor: pointer;
}
.pitch-usage-toolbar-bar.roster-toolbar-bar {
  margin-bottom: 12px;
}
.pitch-usage-filter-toggle,
.pitch-usage-reset {
  background-color: #bf5b0f !important;
  color: #fff !important;
}
.pitch-usage-filters-panel {
  background: #fff;
  border: 1px solid #e8ddd4;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.pitch-usage-filters-panel.hidden {
  display: none !important;
}
.pitch-usage-filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  justify-content: center;
}
.pitch-usage-filter-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 130px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.pitch-usage-main-plot {
  width: 100%;
  max-width: min(100%, 920px);
  margin-left: auto;
  margin-right: auto;
  /* Plotly sets an explicit height; keep the host from forcing a huge square
   * viewport (old aspect-ratio + min-height blew past one screen for pies). */
  max-height: min(72vh, 560px);
  min-height: 220px;
  overflow: auto;
}

.pitch-plinko-heading {
  margin: 14px 0 14px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  text-align: center;
}

.pitch-plinko-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

.pitch-plinko-cell {
  flex: 1 1 min(520px, 100%);
  min-width: 320px;
  min-height: 640px;
  width: 100%;
}
.pitch-usage-status {
  margin-top: 8px;
}

.plot-tab-host {
  min-height: 420px;
  width: 100%;
}
#panel-visuals .plot-tab-host--visuals {
  min-height: min(92vh, 920px);
}

#hit-panel-visuals .plot-tab-host--visuals {
  min-height: min(88vh, 860px);
}

.tab-toolbar--hit-visuals {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.tab-toolbar-hit-visuals-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
#panel-visuals .visuals-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-bottom: 12px;
}
#panel-visuals .visual-traj-opts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}
#panel-visuals .visual-traj-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
#panel-visuals .visual-blob-controls {
  margin-bottom: 14px;
}
#panel-visuals .visual-blob-controls-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}
#panel-visuals .visual-blob-controls-inner label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
#panel-visuals .visual-blob-velo .filter-input-text {
  min-width: 6.5rem;
}
.filter-input-text {
  font: inherit;
  padding: 7px 10px;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  background: #fff;
}
.compare-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.compare-toolbar {
  margin-bottom: 16px;
}
.compare-toolbar-row--split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-controls-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 auto 20px;
  max-width: 920px;
  text-align: center;
}
.compare-stat-type-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.compare-stat-type-row .stat-type-label {
  font-weight: 700;
  margin-right: 4px;
}
.compare-selects-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 20px 32px;
  margin-bottom: 8px;
}
.compare-select-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
}
.compare-reload-btn {
  margin-top: 8px;
}
.compare-vs-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 8px 0 20px;
  flex-wrap: wrap;
}
.compare-vs-side {
  min-width: 100px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-vs-logo {
  max-height: 100px;
  max-width: 150px;
  object-fit: contain;
}
.compare-vs-logo.compare-vs-logo--school {
  max-width: 132px;
  max-height: 132px;
  padding: 4px;
  background: #fff;
  box-sizing: border-box;
}
.compare-vs-text {
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  color: var(--accent, #bf5b0f);
}
.compare-filled-body {
  width: 100%;
}
.compare-empty-state {
  margin: 24px auto 32px;
  padding: clamp(28px, 6vh, 56px) clamp(20px, 4vw, 48px);
  max-width: 720px;
  text-align: center;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  color: #2a2a2a;
  border: 2px dashed #c9cdd3;
  background: linear-gradient(180deg, #fafafa 0%, #f0f1f3 100%);
  box-sizing: border-box;
}
.compare-empty-state.hidden {
  display: none !important;
}
.compare-filled-body.hidden {
  display: none !important;
}
.compare-empty-highlight {
  color: #bf5700;
  font-weight: 800;
}

#compareFiltersPanel .roster-filter-row--compare-fives,
#hitCompareFiltersPanel .roster-filter-row--compare-fives {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  min-height: unset;
}
#compareFiltersPanel .roster-filter-row--compare-fives .roster-dd,
#hitCompareFiltersPanel .roster-filter-row--compare-fives .roster-dd {
  flex: unset;
  min-width: 0;
}
@media (max-width: 1000px) {
  #compareFiltersPanel .roster-filter-row--compare-fives,
  #hitCompareFiltersPanel .roster-filter-row--compare-fives {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compare-main-split {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px 28px;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1080px;
  box-sizing: border-box;
}
.compare-main-left {
  flex: 0 0 auto;
  width: min(300px, 92vw);
  max-width: 300px;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.compare-main-right {
  flex: 1 1 360px;
  max-width: min(520px, 48vw);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.compare-main-right .compare-spider-host {
  width: 100%;
  max-width: min(100%, 520px);
}
.compare-spider-host {
  min-height: min(88vh, 920px);
  width: 100%;
}
.compare-spider-empty {
  min-height: min(82vh, 860px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px dashed #c9cdd3;
  background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}
.compare-spider-empty-msg {
  margin: 0;
  max-width: 360px;
  text-align: center;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 600;
  color: #444;
  line-height: 1.45;
}
.compare-main-split .compare-triple-scroll {
  max-width: 100%;
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
}
.compare-triple-scroll {
  max-width: min(100%, 300px);
  margin: 0 auto;
}
table.compare-triple-table {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  font-size: 11px;
}
.compare-triple-table td.compare-cell-winner {
  background-color: #f0f0f0 !important;
}
.compare-cell-metric {
  font-weight: 700;
  font-size: 11px;
  max-width: 76px;
  width: 22%;
  padding: 6px 4px !important;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}
.compare-triple-table td.compare-cell-left,
.compare-triple-table td.compare-cell-right {
  padding: 6px 8px !important;
}
.compare-filters-hint {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.small {
  font-size: 13px;
}
@media (max-width: 900px) {
  .grades-grid,
  .grades-grid--pitch-grades,
  .usage-split,
  .compare-columns {
    grid-template-columns: 1fr;
  }
  .compare-main-split {
    flex-wrap: wrap;
    flex-direction: column;
    max-width: none;
    align-items: center;
  }
  .compare-main-left,
  .compare-main-right {
    flex: 1 1 auto;
    max-width: min(300px, 100%);
    width: 100%;
    justify-content: center;
  }
  .compare-main-right {
    max-width: min(520px, 100%);
  }
}

/* Hitting — Defense tab (layout inspired by defense_report.Rmd) */
.defense-report-page {
  max-width: 1100px;
  margin: 0 auto;
}
.defense-header-line {
  font-size: 15px;
  color: #333;
  margin: 8px 0 16px;
  font-weight: 600;
}
.defense-two-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.defense-two-tables .defense-table-wrap {
  flex: 1 1 340px;
  min-width: 0;
}
.defense-table-wrap .plot-title,
.defense-field-wrap .plot-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}
.defense-field-wrap {
  margin: 20px 0;
}
#hitDefenseFieldPlot {
  min-height: 440px;
  width: 100%;
}
.defense-best-worst {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 8px;
}
.defense-best-worst .defense-table-wrap {
  flex: 1 1 400px;
  min-width: 0;
}
table.defense-report-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11pt;
}
table.defense-report-table th,
table.defense-report-table td {
  border: 1px solid #c9cdd3;
  padding: 6px 8px;
  text-align: center;
}
table.defense-report-table th {
  background: #f6f8fa;
  font-weight: 600;
}
a.defense-batter-link {
  color: #0f4c81;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ROSTER tab */
.roster-toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.roster-toolbar-bar--outcomes {
  align-items: flex-start;
}
.roster-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.defense-school-msg {
  margin: 8px 0 12px;
}
.btn-roster-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  min-height: 46px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid #8b3a00;
  border-radius: 0;
  background: linear-gradient(180deg, #e87414 0%, #bf5700 48%, #a04400 100%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(88, 32, 0, 0.22);
}
.btn-roster-reset:hover {
  background: linear-gradient(180deg, #f08828 0%, #cf6410 48%, #bf5700 100%);
  color: #fff;
  border-color: #702c00;
}
.btn-roster-reset:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}
.btn-roster-reset-icon {
  font-size: 19px;
  line-height: 1;
  opacity: 0.95;
}
.roster-filters-panel {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: visible;
}
.roster-dd:has(.custom-select-panel:not(.hidden)) {
  z-index: 45;
}
.roster-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.roster-filter-row--top {
  align-items: flex-end;
}
.roster-filter-row--group-columns {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
}
.roster-filter-row--dense {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 56px;
}
.roster-filter-row--dense .roster-dd {
  flex: 1 1 min(120px, 14%);
  min-width: 96px;
}
.roster-filters-panel .roster-dd .custom-select-trigger,
.roster-filters-panel .roster-columns-trigger {
  min-height: 42px;
}
.roster-filters-panel .roster-group-checks {
  min-height: 42px;
  align-items: center;
}
.roster-filter-row--dense .roster-columns-wrap {
  flex: 1 1 200px;
  min-width: 180px;
}
.roster-filter-row--dense .roster-group-checks {
  flex: 0 1 auto;
}
.outcomes-stat-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  flex: 0 1 auto;
  padding-bottom: 2px;
}
.outcomes-stat-type .roster-columns-heading {
  margin-bottom: 0;
  width: 100%;
}
@media (min-width: 900px) {
  .outcomes-stat-type .roster-columns-heading {
    width: auto;
    margin-right: 4px;
  }
}
.roster-group-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  flex: 0 1 auto;
}
.roster-group-pitch-label {
  margin: 0;
}
.roster-dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  min-width: 120px;
  flex: 1 1 140px;
}
.roster-columns-heading {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
}
.roster-columns-wrap {
  position: relative;
  min-width: 200px;
  flex: 1 1 220px;
  z-index: 8;
}
.roster-columns-control {
  position: relative;
}
.roster-columns-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #b8bfc8;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #222;
  cursor: pointer;
  text-align: left;
}
.roster-columns-trigger:hover {
  border-color: #b8c0cc;
}
.roster-columns-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #555;
  margin-left: 8px;
  flex-shrink: 0;
}
.roster-columns-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: 280px;
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 50;
  overflow: hidden;
}
.roster-columns-panel.hidden {
  display: none;
}
.roster-columns-search {
  margin: 10px 10px 8px;
  padding: 8px 10px;
  border: 1px solid #7eb8e8;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.roster-columns-search:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.25);
}
.roster-columns-actions {
  display: flex;
  margin: 0 10px 8px;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  overflow: hidden;
}
.roster-columns-action-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: #f5f6f8;
  color: #222;
  cursor: pointer;
}
.roster-columns-action-btn:hover {
  background: #ebecef;
}
.roster-columns-action-btn + .roster-columns-action-btn {
  border-left: 1px solid #cfd4da;
}
.roster-columns-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.roster-columns-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  color: #111;
  cursor: pointer;
  gap: 8px;
}
.roster-columns-item:hover,
.roster-columns-item:focus-within {
  background: #fddcb4;
}
.roster-columns-item.is-selected .roster-columns-item-label {
  font-weight: 400;
}
.roster-columns-check {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #111;
}
.roster-columns-item.is-locked {
  cursor: default;
}
.roster-columns-item.is-locked:hover,
.roster-columns-item.is-locked:focus-within {
  background: #f7f2eb;
}
.roster-columns-lock {
  flex-shrink: 0;
  font-size: 9px;
  color: #8a5a2b;
  line-height: 1;
  opacity: 0.9;
}
.roster-sliders-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 24px;
  margin-top: 8px;
}
/* Hitting roster / outcomes: 15 range sliders in five columns × three rows. */
.roster-sliders-grid--hit-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .roster-sliders-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .roster-sliders-grid--hit-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .roster-sliders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.roster-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 8px 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.roster-range-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  text-transform: none;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
/*
 * Dual range — Texas Longhorn vibe: warm rail, burnt-orange span, white lasso thumbs.
 */
.roster-noui-host {
  margin: 34px 10px 44px 10px;
  padding: 0 6px;
}
.roster-noui-host.noUi-target {
  border: none;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px rgba(191, 87, 0, 0.12);
  background: linear-gradient(180deg, #faf6f3 0%, #f0ebe7 100%);
  height: 8px;
}
.roster-noui-host .noUi-connects {
  border-radius: 9999px;
}
.roster-noui-host .noUi-connect {
  background: linear-gradient(90deg, #e86a12 0%, #bf5700 45%, #9c4500 100%);
  border-radius: 9999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.roster-noui-host .noUi-handle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(191, 87, 0, 0.45),
    0 2px 8px rgba(88, 32, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: grab;
  top: -6px;
}
.roster-noui-host .noUi-handle:focus {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(191, 87, 0, 0.45),
    0 2px 8px rgba(88, 32, 0, 0.2);
}
.roster-noui-host .noUi-handle:active {
  cursor: grabbing;
}
.roster-noui-host .noUi-handle:before,
.roster-noui-host .noUi-handle:after {
  display: none;
}
.roster-noui-host .noUi-tooltip {
  background: #fffdf9;
  color: #3d1f0a;
  border: 1px solid rgba(191, 87, 0, 0.35);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(88, 32, 0, 0.12);
}
.roster-noui-host .noUi-pips-horizontal {
  height: 30px;
  padding-top: 6px;
}
.roster-noui-host .noUi-pips {
  font-size: 10px;
  color: #6b5d52;
}
.roster-noui-host .noUi-marker-horizontal.noUi-marker-large {
  height: 5px;
  width: 1px;
  background: #a67c52;
}
.roster-noui-host .noUi-marker-horizontal.noUi-marker-normal {
  height: 3px;
  width: 1px;
  background: #c4b5a0;
}
.roster-noui-host .noUi-value {
  font-size: 10px;
  color: #4a3728;
  font-weight: 500;
}
.roster-noui-host .noUi-value-sub {
  color: #6b5d52;
}
.roster-table-outer {
  margin-top: 4px;
}
table.dt-roster th {
  background: #bf5700;
  color: #fff;
  border-color: #a34a00;
  font-weight: 700;
  padding: 10px 12px;
  min-height: 44px;
  box-sizing: border-box;
  vertical-align: middle;
}
table.dt-roster th.roster-th-sort {
  cursor: pointer;
  user-select: none;
}
table.dt-roster th.roster-th-sort:hover {
  filter: brightness(1.06);
}
table.dt-roster td.roster-row-totals,
table.dt-roster tr.roster-row-totals td {
  background: #fff;
  font-weight: normal;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 48px;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Outcomes tab: extra-tall rows for readability */
#panel-outcomes table.dt-roster th,
#panel-outcomes table.dt-roster td {
  padding: 15px 14px;
  min-height: 54px;
  vertical-align: middle;
}
#panel-outcomes table.dt-roster th {
  padding-top: 16px;
  padding-bottom: 16px;
  min-height: 56px;
}
#panel-outcomes table.dt-roster tr.roster-row-totals td {
  padding-top: 15px;
  padding-bottom: 15px;
  min-height: 54px;
}
#panel-outcomes table.dt-roster tbody tr:nth-child(even):not(.roster-row-totals) td {
  background-color: #fff !important;
}
#panel-outcomes .table-scrollable {
  border-radius: 8px;
  overflow: auto;
  border: 1px solid rgba(191, 87, 0, 0.12);
}

/* Hitting outcomes: match pitching outcomes row density */
#hit-panel-outcomes table.dt-roster th,
#hit-panel-outcomes table.dt-roster td {
  padding: 15px 14px;
  min-height: 54px;
  vertical-align: middle;
}
#hit-panel-outcomes table.dt-roster th {
  padding-top: 16px;
  padding-bottom: 16px;
  min-height: 56px;
}
#hit-panel-outcomes table.dt-roster tr.roster-row-totals td {
  padding-top: 15px;
  padding-bottom: 15px;
  min-height: 54px;
}
#hit-panel-outcomes table.dt-roster tbody tr:nth-child(even):not(.roster-row-totals) td {
  background-color: #fff !important;
}
#hit-panel-outcomes .table-scrollable {
  border-radius: 8px;
  overflow: auto;
  border: 1px solid rgba(191, 87, 0, 0.12);
}

.spray-stadium-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a3728;
}
.spray-stadium-select {
  max-width: 220px;
  min-width: 140px;
}
.hitting-dash-plots-wrap {
  margin-top: 28px;
  width: 100%;
}
.hitting-dash-plot-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  min-height: 44px;
}
.hitting-dash-plot-toolbar__inner {
  margin-bottom: 0;
}
.plots-row-hitting-dash {
  margin-top: 0;
}
.location-mode-toggle--hit-dash {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 0;
}
.location-dash-stack .plotly-host.hidden {
  display: none;
}
.roster-cell-pitcher {
  text-align: left !important;
  white-space: nowrap;
}
/*
 * Roster headshot: top ~70% of photo (bottom 30% clipped); tall viewport for faces.
 * No decorative frame — plain clip only.
 */
.roster-hs-wrap {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: 54px;
  height: 46px;
  vertical-align: middle;
  margin-right: 10px;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}
.roster-cell-pitcher .roster-hs {
  display: block;
  width: 100%;
  height: 142.857%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  border: none;
  border-radius: 0;
  margin: 0;
}
.roster-pitcher-name {
  vertical-align: middle;
}
a.roster-pitcher-link {
  color: #000;
  font-weight: 400;
  text-decoration: none;
}
a.roster-pitcher-link:hover {
  text-decoration: underline;
}

/* Custom selects (replace native dark OS menus with light list + compact rows) */
.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}
.custom-select:has(.custom-select-panel:not(.hidden)) {
  z-index: 50;
}
.filter-tile-body .custom-select {
  width: 100%;
}
.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 10px 32px 10px 12px;
  border: 1px solid #b8bfc8;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
  color: #111;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -3px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #333;
  pointer-events: none;
}
.custom-select-trigger:hover {
  background: #fafafa;
}
.custom-select:focus-within .custom-select-trigger {
  box-shadow: inset 0 0 0 2px rgba(126, 184, 255, 0.65);
}
.custom-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  max-height: min(320px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.custom-select--inline {
  display: inline-block;
  width: auto;
  min-width: min(100%, 220px);
  vertical-align: middle;
}
.custom-select--inline .custom-select-panel {
  min-width: 200px;
  right: auto;
}
.custom-select--wide .custom-select-panel {
  min-width: min(100%, 440px);
}
.custom-select-list {
  list-style: none;
  margin: 0;
  padding: 2px 0;
}
.custom-select-option {
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.28;
  color: #111;
  cursor: pointer;
}
.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: #fddcb4;
}
.custom-select-option.is-selected {
  font-weight: 400;
}
.custom-select-list--compact .custom-select-option {
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.28;
}

/* Site module nav (The40) */
.site-header {
  margin-bottom: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0;
}
.site-header-inner {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: clamp(52px, 9vw, 76px);
}
.site-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  z-index: 2;
}
.site-header-texas-logo {
  height: clamp(34px, 6vw, 48px);
  width: auto;
  max-width: min(220px, 42vw);
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.site-header-mascot {
  flex: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
}
.site-header-bevo {
  width: clamp(56px, 11vw, 92px);
  height: auto;
  display: block;
}
.site-logo {
  display: block;
  max-width: min(100%, 560px);
  font-size: clamp(1.85rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--accent, #bf5b0f);
}
@media (max-width: 900px) {
  .site-logo {
    max-width: 100%;
    font-size: clamp(1.5rem, 7vw, 2.5rem);
  }
}
/* Nav centered on the viewport; brand left, mascot right */
.site-nav-strip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: min(920px, calc(100vw - 300px));
  min-width: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 1;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 2;
}
@media (max-width: 960px) {
  .site-header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 10px;
    min-height: 0;
    padding-bottom: 4px;
  }
  .site-nav-strip {
    position: static;
    transform: none;
    flex: 1 1 100%;
    order: 3;
    max-width: none;
    width: 100%;
    justify-content: center;
  }
}
/* Skyline strip: target display 1400×200, centered (image may be letterboxed on very wide viewports) */
.site-header-skyline {
  width: 100%;
  max-width: 1400px;
  margin: 6px auto 0;
  padding: 0;
  line-height: 0;
  display: block;
  height: 200px;
  pointer-events: none;
  overflow: hidden;
}
.site-header-skyline__img {
  display: block;
  width: 100%;
  max-width: 1400px;
  height: 200px;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 38%;
}
.site-nav-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 2px solid var(--accent, #bf5b0f);
  border-radius: 4px;
  background: #fff;
  color: var(--accent, #bf5b0f);
  cursor: pointer;
  margin: 0;
}
.site-nav-tab:hover {
  background: #fff8f0;
}
.site-nav-tab.active {
  background: var(--accent, #bf5b0f);
  color: #fff;
}

.site-module.hidden {
  display: none !important;
}

.hub-module {
  padding: 0 0 28px;
  background: #fff;
}
/* Full-bleed Texas Baseball hero: fixed short strip, full width — image scaled to box (stretches to fit) */
.hub-hero-image-banner {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 14px;
  line-height: 0;
  background: #2c241a;
  border-top: 2px solid #bf5700;
  border-bottom: 2px solid #3d2415;
  overflow: hidden;
}
.hub-hero-image-banner__img {
  display: block;
  width: 100%;
  height: clamp(320px, 42vh, 600px);
  object-fit: fill;
  object-position: center;
}

.hub-message-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.hub-message-card {
  border: 1px solid #ebcfb5;
  background: linear-gradient(180deg, #fff 0%, #fff5ea 100%);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(191, 87, 0, 0.09);
}
.hub-message-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #bf5700;
  text-transform: uppercase;
}
.hub-message-card p {
  margin: 0;
  line-height: 1.45;
  font-size: 0.95rem;
}
/* Between global header / skyline and Texas Hub banner */
.hub-welcome-strip {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: clamp(10px, 2vw, 16px) 0;
  margin: 0 0 12px;
  box-shadow: none;
}
.hub-welcome-strip__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
}
.hub-welcome-strip__logo-img {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.hub-welcome-strip__logo-img--amazon {
  width: clamp(100px, 18vw, 150px);
  height: auto;
}
.hub-welcome-strip__logo-img--github {
  height: clamp(40px, 5.5vw, 52px);
  width: auto;
}
.hub-welcome-strip__quote {
  margin: 0;
  padding: 0;
  border: none;
  flex: 1 1 min(100%, 42rem);
  min-width: min(100%, 260px);
  text-align: center;
}
.hub-welcome-strip__quote.hub-welcome-strip__quote--lead {
  flex: 1 1 min(100%, 68rem);
  max-width: min(100%, 72rem);
}
.hub-welcome-strip__quote p {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
  font-style: normal;
  font-weight: 500;
  color: #000;
  text-align: center;
  max-width: none;
}
.hub-welcome-strip__quote--lead p {
  margin: 0;
  font-size: clamp(1.08rem, 2.3vw, 1.38rem);
  line-height: 1.45;
  font-weight: 700;
  font-style: normal;
  color: #000;
  text-align: center;
  max-width: min(100%, 68rem);
  margin-inline: auto;
  text-wrap: pretty;
  hyphens: none;
}
@supports not (text-wrap: pretty) {
  .hub-welcome-strip__quote--lead p {
    text-wrap: wrap;
  }
}
.hub-welcome-strip__quote strong {
  font-style: normal;
  font-weight: 800;
  color: #000;
}
.hub-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hub-tables-grid--triple {
  --hub-sync-head: 48px;
  --hub-sync-row: 52px;
  --hub-sync-rows: 10;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1.15fr);
  /* `start` (vs `stretch`) lets each card size to its own content so the card
     backgrounds don't extend past the table — no wasted vertical space. */
  align-items: start;
}
.hub-tables-grid--triple > .hub-table-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hub-tables-grid--triple > .hub-table-card > .table-scrollable.leaderboard-table-wrap {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
/*
 * SEC / NCAA / Texas Top 25: SHARE one viewport (header + 10 × 52 px = 568 px)
 * so all three cards display the same number of rows and bottom-align. Cards
 * size to content (no `flex: 1 1 auto` stretching) — eliminates the blank gap
 * under the tables.
 *
 * +6 px on the wrap height gives the final cell borders breathing room inside the
 * scrollport (bottom + clip). Padding + overflow-x keeps the right edge border visible.
 */
.hub-tables-grid--triple > .hub-table-card > .leaderboard-table-wrap.leaderboard-table-wrap--hub-sec,
.hub-tables-grid--triple > .hub-table-card > .leaderboard-table-wrap.leaderboard-table-wrap--hub-ncaa,
.hub-tables-grid--triple > .hub-table-card > .leaderboard-table-wrap.leaderboard-table-wrap--hub-tpi {
  flex: 0 0 auto;
  /* Extra px so bottom row border + last column’s right border aren’t clipped by the scrollport. */
  height: calc(var(--hub-sync-head) + var(--hub-sync-rows) * var(--hub-sync-row) + 6px);
  max-height: calc(var(--hub-sync-head) + var(--hub-sync-rows) * var(--hub-sync-row) + 6px);
  overflow-y: auto;
  overflow-x: auto;
  box-sizing: content-box;
  padding-right: 2px;
  padding-bottom: 2px;
}
/* Ensure sticky header + cell grid borders render through horizontal scroll. */
.hub-tables-grid--triple .leaderboard-table-wrap--hub-sec table.leaderboard-table,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-ncaa table.leaderboard-table,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-tpi table.leaderboard-table {
  border-collapse: collapse;
  min-width: max-content;
}
.hub-tables-grid--triple .leaderboard-table-wrap--hub-sec table.leaderboard-table th:last-child,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-sec table.leaderboard-table td:last-child,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-ncaa table.leaderboard-table th:last-child,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-ncaa table.leaderboard-table td:last-child,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-tpi table.leaderboard-table th:last-child,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-tpi table.leaderboard-table td:last-child {
  border-right: 1px solid #c9cdd3;
}
.hub-tables-grid--triple .leaderboard-table-wrap--hub-sec table.leaderboard-table tbody tr:last-child td,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-ncaa table.leaderboard-table tbody tr:last-child td,
.hub-tables-grid--triple .leaderboard-table-wrap--hub-tpi table.leaderboard-table tbody tr:last-child td {
  border-bottom: 1px solid #c9cdd3;
}
/*
 * Lock the body rows in all three tables to the same 52 px height so each
 * viewport holds exactly 10 rows (no half-row, no fractional alignment).
 */
#secStandings.hub-landing-table tbody td,
#ncaaLeaders.hub-landing-table tbody td,
#hubTpiRankings.hub-landing-table tbody td {
  padding: 10px 8px !important;
  line-height: 1.25;
  font-size: 12px;
  height: 52px;
  box-sizing: border-box;
}
#secStandings.hub-landing-table tbody tr,
#ncaaLeaders.hub-landing-table tbody tr,
#hubTpiRankings.hub-landing-table tbody tr {
  height: 52px;
}
#secStandings.hub-landing-table th,
#ncaaLeaders.hub-landing-table th,
#hubTpiRankings.hub-landing-table th {
  padding: 10px 8px !important;
  height: var(--hub-sync-head);
  box-sizing: border-box;
}
#secStandings.hub-landing-table .hub-sec-logo,
#ncaaLeaders.hub-landing-table .hub-sec-logo,
#hubTpiRankings.hub-landing-table .hub-sec-logo {
  width: 28px;
  height: 28px;
}
/* NCAA Leaders: narrow Rank, wider School / name */
#ncaaLeaders thead th:first-child,
#ncaaLeaders tbody td:first-child {
  width: 44px;
  max-width: 52px;
  min-width: 40px;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
#ncaaLeaders thead th:nth-child(2),
#ncaaLeaders tbody td.col-team {
  max-width: none;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ncaaLeaders .hub-team-cell span:last-child {
  display: inline-block;
  max-width: min(200px, 32vw);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
/* Individual leaders: Rank | Player | School | Stat — slightly wider value column */
#ncaaLeaders thead th:nth-child(4),
#ncaaLeaders tbody td:nth-child(4) {
  min-width: 3.5rem;
  text-align: right;
}
@media (max-width: 1320px) {
  .hub-tables-grid--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  .hub-tables-grid--triple {
    grid-template-columns: 1fr;
  }
}
.hub-table-card .hub-hub-roster-filters.roster-filters-panel {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}
/* Hub SEC / NCAA: center filter blocks horizontally & vertically (override roster defaults) */
.hub-table-card .hub-hub-roster-filters .roster-filter-row,
.hub-table-card .hub-hub-roster-filters .roster-filter-row--dense {
  margin-bottom: 0;
  min-height: 0;
  justify-content: center;
  align-items: center;
  align-self: center;
  width: 100%;
  max-width: 100%;
}
.hub-table-card .hub-hub-roster-filters .roster-filter-row--dense .roster-dd {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 200px;
  align-items: center;
  text-align: center;
}
/* NCAA Leaders: Scope + Stat one row */
.hub-table-card-head--ncaa .hub-hub-roster-filters .roster-filter-row--dense {
  flex-wrap: nowrap;
  gap: 14px;
}
.hub-table-card-head--ncaa .hub-hub-roster-filters .roster-filter-row--dense .roster-dd {
  max-width: 200px;
}
/* Keep Scope / Stat custom-select panels above the scrollable NCAA table */
.hub-table-card-head.hub-table-card-head--ncaa {
  position: relative;
  z-index: 40;
}
.hub-table-card-head--ncaa .custom-select-panel {
  z-index: 500 !important;
}
@media (max-width: 440px) {
  .hub-table-card-head--ncaa .hub-hub-roster-filters .roster-filter-row--dense {
    flex-wrap: wrap;
  }
}
.hub-table-card .hub-hub-roster-filters .roster-dd .custom-select {
  width: 100%;
  max-width: 100%;
}
.hub-table-card .hub-hub-roster-filters .roster-dd .custom-select-trigger {
  margin-left: auto;
  margin-right: auto;
  min-height: 42px;
}
.hub-hub-filter-row {
  width: 100%;
  justify-content: center;
}
.hub-hub-filter-row--center {
  justify-content: center;
}
.hub-table-card-head--filters {
  flex-direction: column;
  gap: 12px;
}
.hub-table-card-head--filters h3.hub-title-center {
  width: 100%;
  margin: 0 auto;
}
.hub-table-card-head--filters .hub-hub-roster-filters {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.hub-live-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-bottom: 12px;
}
.hub-live-grid--stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hub-uploads-daily-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hub-daily-caption {
  margin: -4px 0 10px;
}
.hub-upload-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #166534, #22c55e);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}
.hub-table-card {
  border: 1px solid #c88b5c;
  background: linear-gradient(180deg, #fff 0%, #fffaf4 100%);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(36, 19, 8, 0.12);
}
.hub-landing-table th {
  background: #bf5700 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
  font-weight: 800;
  border-right: 1px solid #d67b37;
  padding: 10px 8px !important;
}
.hub-landing-table td {
  background: #fff !important;
  border-bottom: 1px solid #d5d5d5;
  font-weight: 700;
  padding: 10px 8px !important;
}
.hub-landing-table tbody tr:nth-child(even) td {
  background: #fff !important;
}
.hub-landing-table tbody tr:hover td {
  background: #f5f5f5 !important;
}
.hub-landing-table td.col-team {
  text-align: left;
}
.hub-team-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Hub triple: center + middle align (SEC, NCAA, Texas Top-25) */
#secStandings.hub-landing-table th,
#secStandings.hub-landing-table td,
#ncaaLeaders.hub-landing-table th,
#ncaaLeaders.hub-landing-table td,
#hubTpiRankings.hub-landing-table th,
#hubTpiRankings.hub-landing-table td {
  text-align: center;
  vertical-align: middle;
}
#secStandings.hub-landing-table td.col-team,
#ncaaLeaders.hub-landing-table td.col-team,
#hubTpiRankings.hub-landing-table td.col-team {
  text-align: center;
}
#secStandings.hub-landing-table .hub-team-cell,
#ncaaLeaders.hub-landing-table .hub-team-cell,
#hubTpiRankings.hub-landing-table .hub-team-cell {
  justify-content: center;
}
.hub-sec-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.hub-table-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
}
.hub-table-card-head h3 {
  margin: 0 auto 0 0;
  color: #bf5700;
  text-transform: uppercase;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.hub-table-card-head h3.hub-title-center {
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
/* Win cascade over .hub-table-card-head { align-items: flex-end } so SEC/NCAA filters center in card */
.hub-table-card-head.hub-table-card-head--filters {
  flex-direction: column;
  align-items: center;
  align-content: center;
  justify-content: flex-start;
  width: 100%;
}
/* Third triple card (Texas Top 25): only a title row — stretch header block so card
   bottoms align with SEC / NCAA cards that include filter controls. */
.hub-table-card-head.hub-table-card-head--triple-sync {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 92px;
}
.hub-table-card-head label {
  font-size: 12px;
  font-weight: 700;
  color: #5f3a1f;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#secStandings tbody tr:first-child {
  box-shadow: inset 4px 0 0 #bf5700;
}
.hub-art-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.hub-schedule-strip {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/*
 * Rotation controls: pill-shaped pause/play toggle + speed selector. Sits
 * directly below the schedule row, right-aligned, so it never overlaps the
 * countdown card or rotating chips.
 */
/*
 * The schedule rotation controls now live INSIDE the ticker ribbon at the
 * top-right corner. We give the ticker wrap right-padding equal to the
 * controls' width so chips never slide under them, and we paint a soft
 * white fade on the right edge so any chip that does scroll past dissolves
 * smoothly into the controls' background.
 */
/* Schedule controls sit *below* the ticker inside the same block — no overlay. */
.hub-schedule-ticker-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.hub-schedule-controls--below {
  align-self: flex-end;
  flex-shrink: 0;
}
.hub-schedule-controls {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #c88b5c;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(36, 19, 8, 0.12);
}
.hub-schedule-ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5f3a1f;
  letter-spacing: 0.04em;
}
.hub-schedule-ctl--toggle {
  appearance: none;
  background: #bf5700;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: background-color 150ms ease;
}
.hub-schedule-ctl--toggle:hover {
  background: #a14600;
}
.hub-schedule-ctl--toggle[data-state="paused"] {
  background: #2c4d2c;
}
.hub-schedule-ctl--toggle[data-state="paused"]:hover {
  background: #1f3a1f;
}
.hub-schedule-ctl-icon {
  font-size: 12px;
  line-height: 1;
}
.hub-schedule-ctl--speed {
  padding: 0 4px 0 8px;
}
.hub-schedule-ctl-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.hub-schedule-ctl-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: #1a1510;
  border: 1px solid #c88b5c;
  border-radius: 999px;
  padding: 3px 22px 3px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  background-image: linear-gradient(45deg, transparent 50%, #bf5700 50%), linear-gradient(135deg, #bf5700 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.hub-schedule-ctl-select:focus {
  outline: none;
  border-color: #bf5700;
  box-shadow: 0 0 0 2px rgba(191, 87, 0, 0.18);
}
@media (max-width: 640px) {
  .hub-schedule-controls {
    gap: 6px;
    padding: 3px 4px;
  }
  .hub-schedule-ctl-text {
    display: none;
  }
  .hub-schedule-ctl--toggle {
    padding: 4px 8px;
  }
}
.hub-schedule-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 14px 18px;
}
@media (min-width: 960px) {
  .hub-schedule-row {
    grid-template-columns: minmax(232px, 300px) minmax(0, 1fr);
    gap: 16px 28px;
  }
}
.hub-schedule-strip .hub-countdown-pill {
  margin-bottom: 0;
}
.hub-schedule-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f3a1f;
  margin: 0 0 6px 4px;
}
.hub-ticker-ribbon--inline {
  width: 100%;
}
.hub-live-grid--split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 12px;
  align-items: start;
}
.hub-live-left-col,
.hub-live-right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.hub-countdown-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b1804 0%, #bf5700 55%, #e89448 100%);
  border: 2px solid #ffd8a8;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(89, 42, 8, 0.35);
}
.hub-countdown-pill--live .hub-countdown-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hub-countdown-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.92;
}
.hub-countdown-main {
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hub-countdown-sub {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.95;
}
.hub-countdown-timer {
  margin-top: 4px;
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.hub-countdown-timer strong {
  font-size: 1.25rem;
  font-weight: 900;
}
.hub-countdown-opp-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  border: 2px solid #ffd8a8;
}
/* Postseason / conference marks (schedule ticker + next-game pill) */
.hub-schedule-event-badge {
  box-sizing: border-box;
  height: 52px;
  width: auto;
  max-width: 112px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  padding: 5px 6px;
  border: 2px solid #ffd8a8;
}
.hub-schedule-event-badge--compact {
  max-width: 96px;
}
.hub-ticker-ribbon {
  position: relative;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(145deg, rgba(191, 87, 0, 0.35) 0%, rgba(26, 58, 110, 0.28) 100%);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.hub-ticker-wrap {
  overflow: hidden;
  border-radius: 11px;
  background: #fffefb;
  border: 1px solid #e8ddd4;
}
.hub-ticker-wrap--schedule {
  padding: 0;
}
.hub-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  min-width: 100%;
}
.hub-ticker-track--animate {
  animation: hubTickerMove 118s linear infinite;
}
.hub-ticker-track--rich {
  padding: 10px 0;
  align-items: center;
}
.hub-ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 5px;
  padding: 5px 11px 5px 7px;
  border-radius: 10px;
  font-weight: 750;
  font-size: 0.8rem;
  color: #2c2418;
  background: #fff;
  border: 1px solid #e5dcd3;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
/* Stacked schedule cards (matches Next Game typography; no countdown) */
.hub-ticker-chip--stack {
  white-space: normal;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  min-width: min(220px, 72vw);
  max-width: 280px;
}
.hub-ticker-chip--stack .hub-countdown-opp-logo,
.hub-ticker-chip--stack .hub-schedule-event-badge {
  margin-top: 2px;
}
.hub-schedule-chip-inner.hub-countdown-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}
.hub-ticker-chip--stack .hub-countdown-main {
  font-size: 1.05rem;
  line-height: 1.2;
  color: #1a1510;
}
.hub-schedule-chip-line {
  font-size: 0.82rem;
  font-weight: 650;
  color: #3d342c;
  line-height: 1.25;
}
.hub-schedule-chip-line--stadium {
  font-size: 0.74rem;
  font-weight: 600;
  color: #5c534a;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-ticker-chip--empty {
  border-style: dashed;
  opacity: 0.85;
}
.hub-ticker-tx-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.hub-ticker-vs {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #bf5700;
}
.hub-ticker-opp-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.hub-ticker-chip-text {
  white-space: nowrap;
}
.hub-spotlight-head {
  align-items: center !important;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 8px;
}
.hub-spotlight-head h3 {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin: 0 auto !important;
  text-align: center;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.05em;
}
.hub-spotlight-board-label {
  margin-left: auto;
}
/* Spotlight tagline (e.g. "Highlighting The Best Plays & Pitches Across the Country.") */
#hubSpotlightStatus.leaderboard-status {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
  letter-spacing: 0.01em;
}
.hub-spotlight-next {
  font-size: 11px;
  padding: 6px 12px;
}
.hub-spotlight-next--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  line-height: 0;
}
.hub-spotlight-next-icon {
  display: block;
}
@keyframes hubTickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.hub-art-img {
  width: 100%;
  height: 138px;
  object-fit: cover;
  border: 1px solid #d9c4b4;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  background: #111;
}
.hub-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6d655e;
}
.hub-coming-soon-panel {
  border: 1px dashed #d5a67f;
  background: linear-gradient(180deg, #fff 0%, #fff4e7 100%);
  border-radius: 10px;
  min-height: 140px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hub-coming-soon-panel h4 {
  margin: 0 0 8px;
  color: #bf5700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hub-coming-soon-panel p {
  margin: 0;
  color: #4d3b2d;
  line-height: 1.45;
}
.hub-error-only {
  margin-top: 8px;
}
.hub-spotlight-card {
  background: linear-gradient(180deg, #fff 0%, #fff8f0 100%);
}
.hub-spotlight-body {
  border: 1px solid #edd8c6;
  background: #fff;
  padding: 12px;
  min-height: 210px;
}
.hub-spotlight-top-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: stretch;
}
.hub-spotlight-top-left {
  min-width: 0;
}
.hub-spotlight-top-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hub-spotlight-top-right .hub-spotlight-viz-stack {
  margin-top: 0;
}
.hub-spotlight-spray-fallback {
  margin: 6px 0 0;
  line-height: 1.35;
  max-width: 220px;
}
.hub-main-live-band__spotlight #hubSpotlightStatus {
  margin: 10px 0 0;
  text-align: center;
}
.hub-upload-volume-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
}
.hub-upload-volume-card-head {
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.hub-upload-volume-card-body {
  flex: 0 1 auto;
  min-height: 0;
}
.hub-main-live-band__spotlight .hub-upload-volume-card .hub-upload-volume-plot {
  min-height: 200px;
  height: 220px;
}
.hub-spotlight-metrics-full {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edd8c6;
}
.hub-spotlight-core {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  border: 1px solid #eeddcd;
}
.hub-spotlight-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  padding: 5px 0;
  border-bottom: 1px solid #efe5dc;
}
.hub-spotlight-kv span:first-child {
  color: #7a5235;
  font-weight: 700;
}
.hub-spotlight-lede {
  font-weight: 700;
  color: #5c3012;
}
.hub-spotlight-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 14px;
  margin-bottom: 12px;
}
.hub-spotlight-detail-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
.hub-spotlight-detail-grid--compact.hub-spotlight-detail-grid--fullwidth {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.hub-spotlight-detail-grid .hub-spotlight-kv {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border-bottom: none;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.hub-spotlight-detail-grid--compact .hub-spotlight-kv {
  font-size: 0.78rem;
  padding: 5px 6px;
}
.hub-spotlight-detail-grid--compact .hub-spotlight-kv span:first-child {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.hub-spotlight-viz-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
}
.hub-spotlight-viz-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
.hub-spotlight-viz-item {
  border: 1px solid #e7d8cc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.hub-spotlight-viz-item:has(.hub-mini-viz--spray) {
  max-height: 248px;
}
.hub-mini-viz {
  width: 100%;
}
.hub-mini-viz--zone {
  min-height: 172px;
  max-height: 172px;
}
.hub-spotlight-viz-item .hub-mini-viz--zone {
  height: 172px;
}
.hub-mini-viz--spray {
  min-height: 200px;
  max-height: 240px;
}
.hub-mini-viz--spray .js-plotly-plot {
  max-height: 240px;
}
a.hub-spotlight-nav {
  color: #bf5700;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.hub-spotlight-nav:hover {
  color: #8f4100;
}
.hub-mini-viz svg {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.hub-spotlight-kv--gameid {
  margin-top: 10px;
  border: 1px solid #e7d8cc;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fffaf5;
}
.hub-spotlight-type {
  font-size: 0.95rem;
  color: #a64b0e;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.hub-spotlight-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  color: #bf5700;
  margin-bottom: 10px;
}
.hub-spotlight-meta {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #2c2c2c;
}
@media (max-width: 980px) {
  .hub-message-grid,
  .hub-art-strip,
  .hub-live-grid,
  .hub-tables-grid:not(.hub-tables-grid--triple) {
    grid-template-columns: 1fr;
  }
  .hub-schedule-row {
    grid-template-columns: 1fr;
  }
  .hub-uploads-daily-row {
    grid-template-columns: 1fr;
  }
  .hub-schedule-ticker-block {
    max-width: 100%;
  }
  .hub-spotlight-head {
    flex-direction: column;
    align-items: stretch !important;
  }
  .hub-spotlight-board-label {
    margin-left: 0;
  }
  .hub-spotlight-top-split {
    grid-template-columns: 1fr;
  }
  .hub-spotlight-detail-grid--compact:not(.hub-spotlight-detail-grid--fullwidth) {
    grid-template-columns: 1fr;
  }
  .hub-spotlight-detail-grid--compact.hub-spotlight-detail-grid--fullwidth {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
}

body.theme-night {
  background: #0f1319;
  color: #e7ebf2;
}
body.theme-night .page,
body.theme-night .card,
body.theme-night .rectangle-border,
body.theme-night .hub-module,
body.theme-night .hub-table-card,
body.theme-night .leaderboard-page,
body.theme-night .filters-bar-section.filters.card {
  background: #151b24 !important;
  color: #e7ebf2;
  border-color: #2a3342 !important;
}
body.theme-night .rectangle-border.career-panel {
  border-color: #bf5700 !important;
  box-shadow: 0 0 0 1px rgba(191, 87, 0, 0.45);
}
body.theme-night .site-header {
  border-bottom-color: #2a3342;
}
body.theme-night .site-nav-strip {
  background-color: #151b24;
}
body.theme-night .site-nav-tab {
  background: #1a2330;
  color: #ffd8bc;
  border-color: #bf5700;
}
body.theme-night .site-nav-tab.active {
  background: #bf5700;
  color: #fff;
}
body.theme-night .site-footer {
  background: linear-gradient(180deg, #151b24 0%, #0f1319 100%);
  border-top-color: #2a3342;
}
body.theme-night .site-footer-line {
  color: #9ca3af;
}
body.theme-night .site-footer-line strong {
  color: #e7ebf2;
}
body.theme-night .site-footer-note-title {
  color: #c9b49a;
}
body.theme-night .site-footer-note-text {
  color: #9ca3af;
}
body.theme-night .site-footer-mail {
  color: #fbbf77;
}
body.theme-night .site-footer-mail:hover {
  color: #fcd9a8;
}
body.theme-night .filter-tile-body,
body.theme-night .filter-select,
body.theme-night select,
body.theme-night input,
body.theme-night .hub-spotlight-body,
body.theme-night .table-scrollable,
body.theme-night .leaderboard-table td {
  background: #111827 !important;
  color: #e7ebf2 !important;
  border-color: #2a3342 !important;
}
body.theme-night .hub-spotlight-core,
body.theme-night .hub-spotlight-detail-grid .hub-spotlight-kv {
  background: #0f1520 !important;
  border-color: #2a3342 !important;
  color: #e7ebf2 !important;
}
body.theme-night .hub-spotlight-kv span:first-child {
  color: #c4b5a0 !important;
}
body.theme-night .hub-spotlight-lede {
  color: #fbbf77 !important;
}
body.theme-night .hub-spotlight-metrics-full {
  border-top-color: #2a3342;
}
body.theme-night a.hub-spotlight-nav {
  color: #fbbf77;
}
body.theme-night a.hub-spotlight-nav:hover {
  color: #fcd9a8;
}
body.theme-night a.portal-player-nav {
  color: #fbbf77;
}
body.theme-night a.portal-player-nav:hover {
  color: #fcd9a8;
}
body.theme-night .leaderboard-table th,
body.theme-night .hub-landing-table th {
  background: #0b0f14 !important;
  color: #fff !important;
}
body.theme-night .hub-message-card {
  background: linear-gradient(95deg, #151b24 0%, #1a2230 55%, #151b24 100%) !important;
  border-color: #2a3342 !important;
}
body.theme-night .hub-welcome-strip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.theme-night .hub-welcome-strip__quote p {
  color: #e7ebf2;
}
body.theme-night .hub-welcome-strip__quote--lead p {
  color: #e7ebf2;
}
body.theme-night .hub-welcome-strip__quote strong {
  color: #fbbf77;
}

/* Night theme: keep metric/table bodies white for readability (outer shells stay dark above). */
body.theme-night table.dt-metrics tbody td,
body.theme-night table.dt-career tbody td,
body.theme-night table.dt-roster tbody td,
body.theme-night .leaderboard-table tbody td,
body.theme-night .hub-landing-table td {
  background-color: #fff !important;
  color: #111827 !important;
}
body.theme-night .hub-welcome-strip__logo-img--amazon {
  filter: brightness(0) invert(1);
}
body.theme-night .hub-welcome-strip__logo-img--github {
  filter: invert(1) brightness(1.05);
}
body.theme-night .hub-schedule-label {
  color: #c9b49a;
}
body.theme-night .hub-hero-image-banner {
  background: #0f0f0f;
  border-top-color: #d97706;
  border-bottom-color: #1f2937;
}
body.theme-night .hub-countdown-pill {
  background: linear-gradient(135deg, #1e1208 0%, #8a3f0b 55%, #b45818 100%);
  border-color: #5c4030;
}
body.theme-night .hub-countdown-opp-logo {
  background: #111827;
  border-color: #334155;
}
body.theme-night .hub-schedule-event-badge {
  background: #111827;
  border-color: #334155;
}
body.theme-night .hub-ticker-ribbon {
  background: linear-gradient(145deg, rgba(191, 87, 0, 0.35) 0%, rgba(30, 58, 95, 0.4) 100%);
}
body.theme-night .hub-ticker-wrap {
  background: #111827;
  border-color: #334155;
}
body.theme-night .hub-ticker-chip {
  background: #0f172a;
  color: #e7ebf2;
  border-color: #334155;
}
body.theme-night .hub-ticker-chip--stack .hub-countdown-main {
  color: #f8fafc;
}
body.theme-night .hub-schedule-chip-line {
  color: #cbd5e1;
}
body.theme-night .hub-schedule-chip-line--stadium {
  color: #94a3b8;
}
body.theme-night .hub-ticker-vs {
  color: #ffb380;
}
body.theme-night .hub-ticker-opp-logo {
  background: #1e293b;
  border-color: #475569;
}
body.theme-night .hub-coming-soon-panel {
  background: #1a2431;
  border-color: #3a4d63;
}
body.theme-night .hub-coming-soon-panel p {
  color: #d5dfec;
}

.module-placeholder-text {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}
.module-placeholder-note {
  margin: 12px 0 0;
}
.portal-module {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.portal-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px clamp(12px, 3vw, 24px) 32px;
  box-sizing: border-box;
}
.portal-page-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #bf5b0f);
}
.portal-page-lede {
  margin: 0 0 12px;
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 42rem;
}
.portal-status {
  margin: 0 0 10px;
  min-height: 1.2em;
}
.portal-table-wrap {
  margin-top: 4px;
  width: 100%;
}
.portal-transfer-board-table {
  width: 100%;
}
.portal-cell-trackman {
  white-space: normal;
  min-width: 12rem;
}
.portal-transfer-board-table.hub-landing-table th.portal-th-sort {
  text-align: center;
  vertical-align: middle;
}
.portal-transfer-board-table.hub-landing-table th.portal-th-sort .portal-sort-btn {
  color: #fff;
  text-align: center;
  justify-content: center;
}
.portal-transfer-board-table.hub-landing-table td {
  text-align: center;
  vertical-align: middle;
}
.portal-transfer-board-table.hub-landing-table td.portal-cell-trackman {
  text-align: center;
}
.portal-transfer-board-table.hub-landing-table td.portal-cell-tags {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}
.portal-tag-link,
.portal-tag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  cursor: default;
  user-select: none;
}
.portal-tag-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}
.portal-name-link {
  color: #bf5700;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.portal-name-link:hover {
  text-decoration-thickness: 2px;
}
.portal-cell-icon {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}
.leaderboard-table .portal-th-sort {
  vertical-align: bottom;
}
.portal-sort-btn {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  text-align: inherit;
  width: 100%;
}
.portal-sort-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
body.theme-night .portal-name-link {
  color: #fbbf77;
}
body.theme-night .portal-transfer-board-table.hub-landing-table tbody td {
  background-color: #fff !important;
  color: #111827 !important;
}

/* ---- R&D Team roster page -------------------------------------- */
.rdteam-page {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px clamp(12px, 3vw, 28px) 32px;
}
.rdteam-page-head {
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5dcd4;
  text-align: center;
}
.rdteam-page-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #bf5700;
}
.rdteam-page-lede {
  margin: 0 auto;
  max-width: 46rem;
  font-size: 1rem;
  line-height: 1.55;
  color: #4a3a2a;
}
body.theme-night .rdteam-page-head { border-bottom-color: #2a3342; }
body.theme-night .rdteam-page-title { color: #fbbf77; }
body.theme-night .rdteam-page-lede { color: #b8c3d4; }

.rdteam-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  margin: 8px auto 16px;
  max-width: 46rem;
}
.rdteam-year-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.94rem;
  color: #4a3a2a;
  letter-spacing: 0.03em;
}
body.theme-night .rdteam-year-filter-label {
  color: #b8c3d4;
}
.rdteam-season-dd--narrow {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  margin-inline: auto;
}
.rdteam-module .rdteam-season-dd--narrow.roster-dd {
  min-width: 0;
  flex: 0 0 auto;
  width: auto;
}
.rdteam-module .rdteam-season-dd--narrow .custom-select {
  width: auto;
  max-width: 5rem;
  margin-inline: auto;
}
.rdteam-season-dd-label {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #4a3a2a;
}
body.theme-night .rdteam-season-dd-label {
  color: #b8c3d4;
}
.rdteam-year-select-narrow {
  width: 4.35rem;
  min-width: 4.35rem;
  max-width: 5rem;
  text-align: center;
}
.rdteam-module .rdteam-season-dd--narrow .custom-select-trigger {
  width: 4.35rem;
  min-width: 4.35rem;
  max-width: 5rem;
  justify-content: center;
  padding-inline: 0.35rem;
  margin-inline: auto;
}
.rdteam-module .rdteam-season-dd--narrow .custom-select-panel {
  min-width: 4.35rem;
  text-align: center;
}
.rdteam-module .rdteam-season-dd--narrow .custom-select-option {
  justify-content: center;
  text-align: center;
}
.rdteam-season-dd .custom-select-trigger {
  min-height: 42px;
}

/* ---- Nerd roster grid + cards ---------------------------------- */
.nerd-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 6px;
}
@media (max-width: 1320px) {
  .nerd-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .nerd-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .nerd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.nerd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ecdfd2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(60, 30, 6, 0.06), 0 10px 28px rgba(60, 30, 6, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.nerd-card:hover {
  transform: translateY(-3px);
  border-color: #d8b58c;
  box-shadow: 0 4px 10px rgba(60, 30, 6, 0.1), 0 18px 36px rgba(60, 30, 6, 0.12);
}
.nerd-card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #fff3e3 0%, #fad7a8 100%);
  overflow: hidden;
}
.nerd-card-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  background: #fff3e3;
}
.nerd-card-photo--fallback {
  object-fit: contain;
  padding: 18%;
  background: linear-gradient(135deg, #fff3e3 0%, #fad7a8 100%);
}
.nerd-card-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(122, 54, 0, 0.18);
  pointer-events: none;
}
.nerd-card-photo-wrap::after {
  /* subtle vignette so the role badge stays legible on bright photos */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.32) 100%);
  pointer-events: none;
}
.nerd-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1 1 auto;
}
.nerd-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.nerd-card-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #2a1d10;
  line-height: 1.2;
}
.nerd-card-role {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
  background: linear-gradient(135deg, #bf5700 0%, #f08a2e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.nerd-card-role--operations {
  background: linear-gradient(135deg, #2c5e8e 0%, #4a8ec4 100%);
}
.nerd-card-role--analyst {
  background: linear-gradient(135deg, #bf5700 0%, #f08a2e 100%);
}
.nerd-card-meta {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a5a3b;
}
.nerd-card-meta-sep {
  display: inline-block;
  margin: 0 6px;
  color: #c8a07a;
}
.nerd-card-description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3d342c;
}

/* Night mode */
body.theme-night .nerd-card {
  background: linear-gradient(180deg, #1a212e 0%, #161c27 100%);
  border-color: #2a3342;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.35);
}
body.theme-night .nerd-card:hover {
  border-color: #f08a2e;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), 0 18px 36px rgba(0, 0, 0, 0.45);
}
body.theme-night .nerd-card-photo-wrap {
  background: linear-gradient(135deg, #2c1f12 0%, #5a341a 100%);
}
body.theme-night .nerd-card-name { color: #f3e9dc; }
body.theme-night .nerd-card-meta { color: #d3a373; }
body.theme-night .nerd-card-meta-sep { color: #6e533a; }
body.theme-night .nerd-card-description { color: #c8d3e2; }
body.theme-night .nerd-card-initials { color: rgba(255, 184, 110, 0.22); }

/* Smaller screens — keep cards readable but tighten the grid. */
@media (max-width: 600px) {
  .nerd-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }
  .nerd-card-name { font-size: 1rem; }
  .nerd-card-description { font-size: 0.88rem; }
}

.site-footer {
  margin-top: 28px;
  padding: 18px clamp(14px, 3vw, 28px);
  border-top: 2px solid #e8ddd4;
  background: linear-gradient(180deg, #faf8f5 0%, #fff 55%);
}
.site-footer-inner {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  overflow-x: auto;
}
.site-footer-line {
  margin: 0;
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(0.9rem, 1.05vw, 1.1rem);
  line-height: 1.4;
  color: #666; /* matches `.muted` so it reads softly like the hub tagline */
  font-weight: 500;
}
/* Bug-report link inherits everything so it visually matches surrounding text. */
.site-footer-bug,
.site-footer-bug:link,
.site-footer-bug:visited,
.site-footer-bug:hover,
.site-footer-bug:focus,
.site-footer-bug:active {
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.site-footer-bug:focus-visible {
  outline: 2px solid #7eb8ff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Leaderboard (mod_leaderboard-style) */
.leaderboard-page {
  padding: 8px 0 24px;
}
.leaderboard-page-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: var(--accent, #bf5b0f);
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.leaderboard-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.leaderboard-subtab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 2px solid var(--accent, #bf5b0f);
  border-radius: 4px;
  background: #fff;
  color: var(--accent, #bf5b0f);
  cursor: pointer;
  margin: 0;
}
.leaderboard-subtab:hover {
  background: #fff8f0;
}
.leaderboard-subtab.active {
  background: var(--accent, #bf5b0f);
  color: #fff;
}
/* Portal subtabs: same look as leaderboard tabs but must NOT use .leaderboard-subtab (that hooks Leaderboard JS). */
.portal-subtabs .portal-subtab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 2px solid var(--accent, #bf5b0f);
  border-radius: 4px;
  background: #fff;
  color: var(--accent, #bf5b0f);
  cursor: pointer;
  margin: 0;
}
.portal-subtabs .portal-subtab:hover {
  background: #fff8f0;
}
.portal-subtabs .portal-subtab.active {
  background: var(--accent, #bf5b0f);
  color: #fff;
}
.leaderboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
/*
 * Leaderboard filter row: burnt-orange tile panel that matches the Pitching/Hitting
 * Dashboard `.filters-bar-section` aesthetic — cream background, orange border,
 * Texas-orange labels above the custom-select trigger.
 */
/*
 * Leaderboard filter row: keep every control on a single line. We swap the
 * old `flex-wrap: wrap` (which spilled onto a second row once 9-11 filters
 * were rendered) for `nowrap` + horizontal scroll. Each control shrinks to a
 * compact width so the full row stays visible on most viewports.
 */
.leaderboard-filters-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 10px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #c88b5c;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(36, 19, 8, 0.08);
  overflow-x: auto;
}
.leaderboard-filters-wrap.hidden {
  display: none !important;
}
.leaderboard-filters-wrap .lb-pitch-preset-select {
  flex: 0 1 auto;
  min-width: 158px;
}
/*
 * Filter labels in the Leaderboard panels now mirror the pitching Outcomes
 * `.roster-dd` look: title-case (no forced uppercase), 12px / 600-weight,
 * neutral dark text. This keeps the leaderboard dropdowns visually
 * consistent with Outcomes / Roster filters elsewhere on the site.
 */
.lb-inline,
.lb-check {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #333;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  flex: 0 0 auto;
  width: 130px;
  min-width: 0;
  max-width: none;
}
.lb-check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: auto;
  font-size: 12px;
  color: #3d2a1a;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: 8px;
}
.lb-check input[type="checkbox"] {
  accent-color: #bf5700;
  width: 14px;
  height: 14px;
}
.lb-inline > .custom-select,
.lb-inline > input[type="number"] {
  margin-left: 0;
  width: 100%;
}
.lb-inline > input[type="number"] {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #c88b5c;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #1a1510;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.lb-inline > input[type="number"]:focus {
  outline: none;
  border-color: #bf5700;
  box-shadow: 0 0 0 2px rgba(191, 87, 0, 0.18);
}
/* ADVANCE tab (pitching / hitting): similarity toolbar + checkboxes */
.advance-panel-intro {
  margin: 0 0 10px;
  max-width: 52rem;
}
/* Main toolbar: SHOW FILTERS + stacked rows (search / controls / metrics / range windows) */
.advance-main-toolbar.roster-toolbar-bar--outcomes {
  align-items: flex-start;
}
.advance-main-toolbar .advance-toolbar-cluster {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.advance-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}
.advance-toolbar-row--search {
  justify-content: center;
}
.advance-toolbar-row--metrics {
  justify-content: center;
}
.advance-toolbar-row--windows {
  justify-content: center;
}
.advance-toolbar-row--windows .advance-win-grid {
  margin-bottom: 0;
  justify-content: center;
}
.advance-toolbar-row--controls {
  justify-content: center;
  align-items: center;
}
.advance-toolbar-row--controls .roster-toolbar-reset--end {
  margin-left: auto;
}
.advance-toolbar-row--metrics .advance-sim-cols--inline {
  justify-content: center;
}
/* Pitch COMPS: center filter row */
#panel-comps .comps-toolbar {
  justify-content: center;
  align-items: center;
  text-align: center;
}
#panel-comps .comps-toolbar .compare-select-label {
  align-items: center;
  text-align: center;
}
.advance-main-toolbar.advance-toolbar-collapsed .advance-toolbar-cluster {
  display: none;
}
.advance-main-toolbar .advance-search-label.advance-search--opponent {
  flex: 0 1 200px;
  max-width: 220px;
  min-width: 140px;
  align-items: center;
  text-align: center;
}
.advance-main-toolbar .pitcher-combo--advance-opp .pitcher-combo-trigger {
  justify-content: center;
}
.advance-main-toolbar .pitcher-combo--advance-opp .pitcher-combo-trigger-text {
  flex: 1 1 auto;
  text-align: center;
}
.advance-main-toolbar .pitcher-combo--advance-opp .pitcher-combo-panel {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(300px, 92vw);
  max-width: 300px;
}
.advance-main-toolbar .pitcher-combo--advance-opp .pitcher-combo-option-title,
.advance-main-toolbar .pitcher-combo--advance-opp .pitcher-combo-option-sub {
  text-align: center;
  justify-content: center;
}
.advance-detail-panel {
  margin-bottom: 14px;
}
.advance-sim-cols--inline {
  margin-bottom: 0;
  align-items: center;
}
.advance-row--controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 10px;
}
.advance-pt-filter-wrap {
  display: inline-flex;
  align-items: center;
}
.advance-pt-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.9rem;
}
.advance-reset-btn {
  flex: 0 0 auto;
}
.advance-search-label {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 440px;
}
.advance-scope-check {
  flex: 0 0 auto;
  white-space: nowrap;
}
.advance-row--metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 4px;
}
.advance-row--metrics .advance-sim-cols {
  margin-bottom: 0;
  flex: 1 1 300px;
}
.advance-row--metrics .advance-win-grid {
  margin-bottom: 0;
  flex: 2 1 360px;
}
.advance-sim-cols {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
}
.advance-sim-cols .advance-sim-label {
  font-weight: 600;
  color: #3d2a1a;
  margin-right: 4px;
}
.advance-sim-cols label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.advance-sim-cols input[type="checkbox"] {
  accent-color: #bf5700;
}
.advance-status {
  min-height: 1.25em;
}
.advance-toolbar--combo .compare-select-label--combo {
  flex: 1 1 280px;
  min-width: 220px;
}
.advance-win-hint {
  margin: 0 0 10px;
}
.advance-win-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 12px;
}
.advance-win-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.9rem;
}
.advance-win-item input.advance-win-input,
input.advance-win-input {
  min-width: 5.5rem;
  width: 6rem;
  padding: 7px 10px;
  padding-right: 28px;
  box-sizing: border-box;
}
.advance-profile-block {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
  padding: 10px 12px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.advance-profile-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #3d2a1a;
  text-align: center;
}
.advance-profile-table-wrap {
  max-height: none;
  overflow: visible;
}
.advance-profile-table {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}
.advance-profile-table th,
.advance-profile-table td {
  font-size: 0.82rem;
  padding: 5px 8px;
  max-width: 8rem;
  white-space: normal;
  word-break: break-word;
}
.advance-narrative {
  margin: 0 0 8px;
  max-width: 56rem;
  line-height: 1.45;
}

/*
 * Custom Graph builder (Pitching / Hitting "GRAPH" tab).
 *   - Toolbar mirrors the burnt-orange Outcomes filter row.
 *   - Plot host fills the available width with a comfortable aspect ratio.
 */
.graph-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 24px;
}
.graph-builder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff 0%, #fffaf4 100%);
  border: 1px solid #c88b5c;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(36, 19, 8, 0.08);
}
.graph-builder-toolbar > .roster-dd {
  min-width: 160px;
  flex: 1 1 180px;
  max-width: 240px;
}
.graph-builder-toolbar .filter-select {
  min-height: 42px;
}
.graph-builder-reload {
  margin-left: auto;
  align-self: flex-end;
  min-height: 42px;
  padding: 8px 18px;
  font-weight: 700;
}
.graph-builder-status {
  margin: 0 4px;
  color: #6c5240;
}
.graph-builder-plot {
  width: 100%;
  /* Plots fill the viewport vertically — bigger is better per user feedback. */
  min-height: min(900px, calc(100vh - 220px));
  height: min(900px, calc(100vh - 220px));
  background: #fff;
  border: 1px solid rgba(191, 87, 0, 0.18);
  border-radius: 12px;
  padding: 6px;
  box-sizing: border-box;
}
.graph-builder-plot .graph-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 520px;
  text-align: center;
  font-size: 14px;
  color: #6c5240;
  padding: 24px;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .graph-builder-toolbar > .roster-dd {
    flex: 1 1 100%;
    max-width: none;
  }
  .graph-builder-reload {
    margin-left: 0;
    width: 100%;
  }
  .graph-builder-plot,
  .graph-builder-plot .graph-empty {
    min-height: 480px;
    height: auto;
  }
}

/*
 * Leaderboard "Show Columns" picker (re-uses the Outcomes/Roster widget):
 * align the trigger height + label weight with neighboring `.lb-inline`
 * dropdowns so the row stays visually balanced.
 */
.leaderboard-filters-wrap .roster-columns-wrap {
  flex: 0 0 auto;
  width: 150px;
  min-width: 0;
  max-width: none;
}
.leaderboard-filters-wrap .roster-columns-heading {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}
.leaderboard-filters-wrap .roster-columns-trigger {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  border: 1px solid #c88b5c;
  border-radius: 6px;
}
/*
 * The leaderboard filter row is a horizontal scroller (overflow-x: auto),
 * which would clip pop-up panels vertically. Switch every dropdown panel
 * inside the filter row to viewport-fixed positioning so they can escape
 * the scroll container; JS sets `top` / `left` from the trigger's
 * getBoundingClientRect() at open time.
 */
.leaderboard-filters-wrap .roster-columns-panel {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  min-width: 260px;
  width: 280px;
  max-width: min(360px, 96vw);
  max-height: min(440px, 70vh);
  z-index: 1000;
}
.leaderboard-filters-wrap .custom-select-panel {
  position: fixed !important;
  z-index: 1000;
  /* width is set inline by JS to mirror the trigger's width */
}
/* Use the same burnt-orange trigger styling here as on the hub SEC/NCAA cards. */
.leaderboard-filters-wrap .custom-select-trigger {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid #c88b5c;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #1a1510;
}
.leaderboard-filters-wrap .custom-select-trigger:hover {
  border-color: #bf5700;
  background: #fff7ef;
}
.leaderboard-filters-wrap .custom-select-trigger::after {
  border-top-color: #bf5700;
}
.leaderboard-filters-wrap .custom-select-panel {
  border: 1px solid #c88b5c;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(36, 19, 8, 0.16);
}
.leaderboard-filters-wrap .custom-select-option:hover,
.leaderboard-filters-wrap .custom-select-option:focus-visible {
  background: #fddcb4;
  color: #1a1510;
}
.leaderboard-filters-wrap .custom-select-option.is-selected {
  background: #bf5700;
  color: #fff;
  font-weight: 700;
}
.leaderboard-table-wrap {
  max-height: min(70vh, 900px);
}
.leaderboard-table {
  width: 100%;
  font-size: 12px;
}
.leaderboard-table th {
  background: #bf5700;
  color: #fff;
  font-weight: 700;
  padding: 8px 6px;
  position: sticky;
  top: 0;
  z-index: 1;
}
/*
 * Sortable column headers: click on any leaderboard <th> to sort. The current
 * sort key shows a colored arrow; hover hints at clickability.
 */
.leaderboard-table--sortable th.lb-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}
.leaderboard-table--sortable th.lb-sortable .lb-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.leaderboard-table--sortable th.lb-sortable .lb-sort-arrow {
  font-size: 9px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  min-width: 8px;
  display: inline-block;
}
.leaderboard-table--sortable th.lb-sortable.is-active .lb-sort-arrow {
  color: #ffe6cc;
}
.leaderboard-table--sortable th.lb-sortable:hover {
  background: #a14600 !important;
}
.leaderboard-table--sortable th.lb-sortable.is-active {
  background: #a14600 !important;
}

/* Defense 1★–5★ grouped header (mirrors Shiny .defense_star_bucket_groups). */
.leaderboard-table th.lb-bucket-head {
  background: #8b3f00;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.18);
}
.leaderboard-table td {
  padding: 7px 8px;
  text-align: center;
  border-bottom: 1px solid #eee;
  background-color: #fff !important;
  vertical-align: middle;
}
/* Match hub-landing table polish: subtle row striping + hover, named cells left-aligned with logo. */
.leaderboard-table tbody tr:nth-child(even) td {
  background-color: #fcf7f1 !important;
}
.leaderboard-table tbody tr:hover td {
  background-color: #fff1e0 !important;
}
.leaderboard-table td.col-team,
.leaderboard-table td.col-player {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.leaderboard-table td.col-team .hub-team-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}
.leaderboard-table td.col-team .hub-sec-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

/*
 * Leaderboard tables (Pitching / Batting / Defense): burnt-orange header
 * strip (matches the rest of the site), white text in title case (NOT
 * uppercase). Cells are center + vertically middle-aligned. Selectors are
 * scoped by table ID so they win against the generic `.hub-landing-table`
 * rules the JS still applies for sticky-header behavior.
 */
#lbPitchTable.leaderboard-table,
#lbBatTable.leaderboard-table,
#lbDefTable.leaderboard-table {
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.2;
}
#lbPitchTable.leaderboard-table th,
#lbBatTable.leaderboard-table th,
#lbDefTable.leaderboard-table th {
  background: #bf5700 !important;
  color: #fff !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-right: 1px solid #d67b37 !important;
  padding: 8px 8px !important;
  text-align: center !important;
  vertical-align: middle !important;
  text-align: center !important;
  vertical-align: middle !important;
}
#lbPitchTable.leaderboard-table th.lb-bucket-head,
#lbBatTable.leaderboard-table th.lb-bucket-head,
#lbDefTable.leaderboard-table th.lb-bucket-head {
  background: #8b3f00 !important;
  color: #fff !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 700 !important;
}
#lbPitchTable.leaderboard-table--sortable th.lb-sortable:hover,
#lbBatTable.leaderboard-table--sortable th.lb-sortable:hover,
#lbDefTable.leaderboard-table--sortable th.lb-sortable:hover,
#lbPitchTable.leaderboard-table--sortable th.lb-sortable.is-active,
#lbBatTable.leaderboard-table--sortable th.lb-sortable.is-active,
#lbDefTable.leaderboard-table--sortable th.lb-sortable.is-active {
  background: #a14600 !important;
  color: #fff !important;
}
#lbPitchTable.leaderboard-table--sortable th.lb-sortable .lb-sort-arrow,
#lbBatTable.leaderboard-table--sortable th.lb-sortable .lb-sort-arrow,
#lbDefTable.leaderboard-table--sortable th.lb-sortable .lb-sort-arrow {
  color: rgba(255, 255, 255, 0.55);
}
#lbPitchTable.leaderboard-table--sortable th.lb-sortable.is-active .lb-sort-arrow,
#lbBatTable.leaderboard-table--sortable th.lb-sortable.is-active .lb-sort-arrow,
#lbDefTable.leaderboard-table--sortable th.lb-sortable.is-active .lb-sort-arrow {
  color: #ffe6cc;
}
#lbPitchTable.leaderboard-table td,
#lbBatTable.leaderboard-table td,
#lbDefTable.leaderboard-table td {
  background-color: #fff !important;
  border-bottom: 1px solid #eee !important;
  padding: 7px 8px !important;
  text-align: center !important;
  vertical-align: middle !important;
  font-weight: 500;
  white-space: nowrap;
}
#lbPitchTable.leaderboard-table tbody tr:nth-child(even) td,
#lbBatTable.leaderboard-table tbody tr:nth-child(even) td,
#lbDefTable.leaderboard-table tbody tr:nth-child(even) td {
  background-color: #fcf7f1 !important;
}
#lbPitchTable.leaderboard-table tbody tr:hover td,
#lbBatTable.leaderboard-table tbody tr:hover td,
#lbDefTable.leaderboard-table tbody tr:hover td {
  background-color: #fff1e0 !important;
}
#lbPitchTable.leaderboard-table td.col-team,
#lbBatTable.leaderboard-table td.col-team,
#lbDefTable.leaderboard-table td.col-team,
#lbPitchTable.leaderboard-table td.col-player,
#lbBatTable.leaderboard-table td.col-player,
#lbDefTable.leaderboard-table td.col-player {
  text-align: center !important;
  font-weight: 600;
}
#lbPitchTable.leaderboard-table td.col-team .hub-team-cell,
#lbBatTable.leaderboard-table td.col-team .hub-team-cell,
#lbDefTable.leaderboard-table td.col-team .hub-team-cell {
  justify-content: center;
}

/*
 * Roster-style hyperlinks for player + school cells inside the leaderboards.
 * Black, unbolded, no underline by default — underline on hover (matches the
 * Pitching ROSTER tab look the user pointed at).
 */
.lb-player-link,
.lb-school-link {
  color: #000;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.lb-player-link:hover,
.lb-school-link:hover {
  text-decoration: underline;
}
.leaderboard-empty {
  padding: 16px;
  text-align: center;
}
.leaderboard-coming-soon {
  text-align: center;
  padding: 48px 20px;
  font-size: 1.25rem;
  color: var(--accent, #bf5b0f);
  font-weight: 700;
}
.leaderboard-status {
  margin-top: 8px;
}

/* =====================================================================
   Motion, loading skeletons, density toggle, narrow-header polish
   --------------------------------------------------------------------- */

:root {
  --skeleton-bg: #efe7dd;
  --skeleton-shimmer: rgba(255, 255, 255, 0.7);
}

/*
 * Leaderboard "Export CSV" button — sits on the filter row alongside the
 * column picker. Burnt-orange to match the rest of the chrome; collapses
 * to icon-only on narrow screens.
 */
.lb-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #bf5700;
  background: #fff;
  color: #bf5700;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  flex: 0 0 auto;
  align-self: center;
}
.lb-csv-btn:hover {
  background: #bf5700;
  color: #fff;
}
.lb-csv-btn:active {
  transform: translateY(1px);
}
.lb-reset-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #888;
  background: #fafafa;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  align-self: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.lb-reset-btn:hover {
  background: #eee;
  border-color: #666;
}
.lb-reset-btn:active {
  transform: translateY(1px);
}
.lb-csv-btn-icon {
  font-size: 14px;
  line-height: 1;
}
@media (max-width: 720px) {
  .lb-csv-btn-label {
    display: none;
  }
  .lb-csv-btn {
    padding: 7px 10px;
  }
}

/* --- Module tab transition (Hub / Pitching / Hitting / ...) ---------- */
@keyframes the40ModuleEnter {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.site-module--enter {
  animation: the40ModuleEnter 220ms ease-out;
  will-change: opacity, transform;
}

/* --- Skeleton loaders (tables + chart hosts) ------------------------- */
@keyframes the40SkeletonShimmer {
  0%   { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}
.skeleton-tbody td,
.leaderboard-table .skeleton-row td,
table.dt-roster .skeleton-row td,
table.dt-metrics .skeleton-row td {
  background-color: var(--skeleton-bg) !important;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer) 50%,
    transparent 100%
  ) !important;
  background-repeat: no-repeat !important;
  background-size: 200% 100% !important;
  animation: the40SkeletonShimmer 1.4s ease-in-out infinite;
  color: transparent !important;
  border-bottom: 1px solid #f3ede5;
  height: 22px;
}
/* Plotly chart hosts: shimmer placeholder while empty (pre-render). */
.plotly-host:empty {
  position: relative;
  background-color: var(--skeleton-bg);
  border-radius: 8px;
  min-height: 220px;
  overflow: hidden;
}
.plotly-host:empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: the40SkeletonShimmer 1.6s ease-in-out infinite;
}

/* --- Hub Upload Volume bar chart ------------------------------------- */
.hub-upload-volume-plot {
  width: 100%;
  min-height: 220px;
  height: 240px;
  border-radius: 8px;
}
.hub-upload-volume-empty {
  padding: 32px 16px;
  text-align: center;
  color: #6f5d4a;
  font-style: italic;
  border: 1px dashed #d5a67f;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff4e7 100%);
}

/* --- Narrow-viewport header polish ----------------------------------- */
@media (max-width: 720px) {
  .site-header-texas-logo {
    height: clamp(28px, 8vw, 38px);
    max-width: 50vw;
  }
  .site-header-bevo {
    width: clamp(40px, 9vw, 60px);
  }
  .site-header-skyline,
  .site-header-skyline__img {
    height: 110px;
  }
  .site-header-skyline__img {
    object-position: 50% 55%;
  }
}
@media (max-width: 480px) {
  .site-header-mascot { display: none; }
  .site-header-texas-logo {
    height: 30px;
    max-width: 60vw;
  }
  .site-header-skyline,
  .site-header-skyline__img {
    height: 70px;
  }
  .site-header-skyline__img {
    object-position: 50% 62%;
  }
  body.the40-app .page {
    padding-top: 4px;
  }
}

/* --- Reduced motion overrides --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hub-ticker-track--animate { animation: none !important; }
  .site-module--enter { animation: none !important; }
  .skeleton-tbody td,
  .leaderboard-table .skeleton-row td,
  table.dt-roster .skeleton-row td,
  table.dt-metrics .skeleton-row td,
  .plotly-host:empty::after { animation: none !important; }
}

/* ============================================================
 * Hub NCAA tournament projection bracket + live band alignment
 * ============================================================ */
.hub-bracket-section {
  margin: 0;
}

/** Two columns: primary stack | sidebar (championship odds above spotlight) */
.hub-main-live-band {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 1.25rem;
}

.hub-main-live-band__primary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.hub-live-primary-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 1 auto;
  min-height: 0;
}

.hub-main-live-band__sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.hub-main-live-band__champ {
  flex: 0 0 auto;
  min-width: 0;
  --hub-champ-odds-head-row-h: 34px;
  --hub-champ-odds-body-row-h: 36px;
  --hub-champ-odds-visible-rows: 15;
}

.hub-main-live-band__champ .hub-champ-odds-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(82vh, 880px);
}

.hub-champ-odds-body--band-fill {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(
    calc(94vh - 140px),
    calc(var(--hub-champ-odds-head-row-h) + var(--hub-champ-odds-visible-rows) * var(--hub-champ-odds-body-row-h))
  );
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hub-main-live-band__spotlight {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.hub-main-live-band__spotlight .hub-spotlight-card {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hub-main-live-band__spotlight .hub-spotlight-body {
  flex: 0 1 auto;
  min-height: 0;
}
.hub-main-live-band__spotlight .hub-upload-volume-card {
  flex: 0 1 auto;
}

@media (max-width: 1200px) {
  .hub-main-live-band {
    grid-template-columns: 1fr;
  }
}

.hub-bracket-card--with-tree {
  min-width: 0;
}

.hub-bracket-card-head.hub-table-card-head {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding-right: 0;
  min-height: 2.85rem;
  margin-bottom: 6px;
}

.hub-bracket-head-left {
  justify-self: start;
  min-width: 0;
}

.hub-bracket-title-stack {
  justify-self: center;
  text-align: center;
  max-width: min(560px, 100%);
  padding: 0 4px;
}
.hub-bracket-page-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: 0.07em;
  font-weight: 900;
  color: #5c3012;
  text-transform: uppercase;
}
.hub-bracket-page-subtitle {
  margin: 8px 0 0;
  font-size: clamp(0.68rem, 1.35vw, 0.82rem);
  line-height: 1.35;
  font-weight: 600;
  color: #6b5346;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}
.hub-bracket-page-subtitle.hidden {
  display: none;
}

body.theme-night .hub-bracket-page-title {
  color: #fcd9a8;
}
body.theme-night .hub-bracket-page-subtitle {
  color: #c4b5a0;
}

.hub-bracket-run-btn {
  justify-self: end;
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  padding: 0.55rem 1.15rem 0.55rem 2.05rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #bf5700 0%, #f08a2e 60%, #ffb066 100%);
  border: 1px solid rgba(122, 54, 0, 0.65);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(191, 87, 0, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.hub-bracket-run-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 0.78rem;
  height: 0.78rem;
  transform: translateY(-50%);
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.65 6.35A7.95 7.95 0 0 0 12 4V1L7 6l5 5V7a6 6 0 1 1-5.66 8h-2.06A8 8 0 1 0 17.65 6.35z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.65 6.35A7.95 7.95 0 0 0 12 4V1L7 6l5 5V7a6 6 0 1 1-5.66 8h-2.06A8 8 0 1 0 17.65 6.35z'/></svg>") no-repeat center / contain;
  pointer-events: none;
}
.hub-bracket-run-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(191, 87, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.hub-bracket-run-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(191, 87, 0, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.hub-bracket-run-btn:focus-visible {
  outline: 2px solid #ffd09a;
  outline-offset: 3px;
}
.hub-bracket-run-btn:disabled {
  opacity: 0.78;
  cursor: not-allowed;
  transform: none;
  filter: saturate(0.85);
}

.hub-bracket-year-dd {
  margin: 0;
  white-space: nowrap;
}

.hub-bracket-year-dd .hub-bracket-year-select {
  min-width: 7.5rem;
}

.hub-bracket-year-dd .custom-select-trigger {
  min-height: 42px;
}

.hub-bracket-section--historical .hub-bracket-pod-prob,
.hub-bracket-section--historical .hub-bracket-mini-prob,
.hub-bracket-section--historical .hub-bracket-champion-prob {
  visibility: hidden;
}

@media (max-width: 720px) {
  .hub-bracket-card-head.hub-table-card-head {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .hub-bracket-title-stack {
    order: -1;
  }
  .hub-bracket-run-btn {
    justify-self: stretch;
    width: 100%;
    text-align: center;
  }
}
.hub-bracket-empty {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 0.75rem !important;
}

/* ---- Visual bracket tree --------------------------------------- */

:root {
  --hub-bracket-line: #b9c2cc;
  --hub-bracket-gap: 0.5rem;
}

.hub-bracket-tree {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.4rem;
  padding: 0.4rem 0.2rem;
  overflow-x: auto;
}

.hub-bracket-half {
  display: grid;
  /* Slightly wider region pods, slightly narrower supers vs prior overcorrection */
  grid-template-columns: minmax(198px, 1.02fr) minmax(118px, 1.06fr);
  gap: var(--hub-bracket-gap);
  min-width: 0;
}
.hub-bracket-half--right {
  grid-template-columns: minmax(118px, 1.06fr) minmax(198px, 1.02fr);
}
.hub-bracket-half--right .hub-bracket-col--regions { order: 2; }
.hub-bracket-half--right .hub-bracket-col--supers  { order: 1; }

.hub-bracket-col {
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  gap: 0.4rem;
  min-width: 0;
}
.hub-bracket-col--regions > .hub-bracket-cell { grid-row: span 2; }
.hub-bracket-col--supers  > .hub-bracket-cell { grid-row: span 2; }

.hub-bracket-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.hub-bracket-cell > * { width: 100%; }

/* ---- Bracket connector arms ----
   Region pods come in pairs (regions[0..1], [2..3], [4..5], [6..7]);
   each pair feeds one super. Super cells point inward toward the center
   column with a simple stub. */
.hub-bracket-half--left .hub-bracket-col--regions > .hub-bracket-cell:nth-child(odd)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  height: 50%;
  border-top: 1.5px solid var(--hub-bracket-line);
  border-right: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--left .hub-bracket-col--regions > .hub-bracket-cell:nth-child(even)::after {
  content: "";
  position: absolute;
  top: 0;
  right: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  height: 50%;
  border-bottom: 1.5px solid var(--hub-bracket-line);
  border-right: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--left .hub-bracket-col--supers > .hub-bracket-cell::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  border-top: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--left .hub-bracket-col--supers > .hub-bracket-cell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  border-top: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}

.hub-bracket-half--right .hub-bracket-col--regions > .hub-bracket-cell:nth-child(odd)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  height: 50%;
  border-top: 1.5px solid var(--hub-bracket-line);
  border-left: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--right .hub-bracket-col--regions > .hub-bracket-cell:nth-child(even)::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  height: 50%;
  border-bottom: 1.5px solid var(--hub-bracket-line);
  border-left: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--right .hub-bracket-col--supers > .hub-bracket-cell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  border-top: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}
.hub-bracket-half--right .hub-bracket-col--supers > .hub-bracket-cell::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--hub-bracket-gap));
  width: var(--hub-bracket-gap);
  border-top: 1.5px solid var(--hub-bracket-line);
  pointer-events: none;
}

/* ---- Region pod (2x2 grid of seeds: 1, 4 / 2, 3) --------------- */
.hub-bracket-pod {
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #ffffff;
  padding: 0.3rem 0.4rem 0.4rem;
  font-size: 0.74rem;
  line-height: 1.25;
}
.hub-bracket-pod-head {
  border-bottom: 1px solid #eef0f3;
  padding-bottom: 0.2rem;
  margin-bottom: 0.3rem;
  text-align: center;
}
.hub-bracket-pod-name {
  font-weight: 700;
  font-size: 0.78rem;
  color: #1f2937;
  letter-spacing: 0.005em;
}
.hub-bracket-pod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.55rem;
}
.hub-bracket-pod-cell {
  display: grid;
  grid-template-columns: 1.1em minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  min-width: 0;
}
.hub-bracket-pod-cell .hub-bracket-seed {
  font-weight: 700;
  color: #6b7280;
  text-align: center;
}
.hub-bracket-pod-cell .hub-bracket-team {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 500;
  text-align: left;
  min-width: 0;
}
.hub-bracket-pod-cell--seed-1 .hub-bracket-seed { color: #bf5700; }

/* ---- Team logos & fallbacks ------------------------------------ */
.hub-bracket-team-logo {
  display: inline-block;
  object-fit: contain;
  background: transparent;
}
.hub-bracket-team-logo--pod {
  width: 26px;
  height: 26px;
}
.hub-bracket-team-logo--mini {
  width: 30px;
  height: 30px;
}
.hub-bracket-team-logo--cell {
  width: 26px;
  height: 26px;
  vertical-align: middle;
}
.hub-bracket-team-logo--champion {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}
.hub-bracket-team-fallback {
  font-weight: 600;
  color: #1f2937;
  word-break: break-word;
  line-height: 1.18;
}
.hub-bracket-team-fallback--tbd {
  color: #6b7280;
  font-style: italic;
  font-weight: 500;
}

/* ---- Probability pills (pods, matchups, tables) ---------------- */
.hub-bracket-pod-prob,
.hub-bracket-mini-prob,
.hub-bracket-prob {
  display: inline-block;
  min-width: 3.2em;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #ffffff;
  color: #1f2937;
  letter-spacing: 0.01em;
}

/* ---- Super-regional matchup boxes ------------------------------ */
.hub-bracket-matchup {
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #ffffff;
  padding: 0.3rem 0.4rem 0.35rem;
}
.hub-bracket-matchup-head {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  text-align: center;
  border-bottom: 1px dashed #e7eaef;
  padding-bottom: 0.18rem;
  margin-bottom: 0.3rem;
}
.hub-bracket-matchup-rows {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hub-bracket-mini-row {
  display: grid;
  grid-template-columns: 1.4em minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  min-width: 0;
}
.hub-bracket-mini-seed {
  font-weight: 700;
  color: #bf5700;
  text-align: center;
  font-size: 0.72rem;
}
.hub-bracket-mini-name {
  font-weight: 600;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.2;
  min-width: 0;
}

/* ---- Center column — National Champion + CWS panel ------------- */
.hub-bracket-center {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 132px;
  max-width: 168px;
  align-self: stretch;
  justify-content: flex-start;
}
.hub-bracket-champion-cell {
  border: 1.5px solid rgba(191, 87, 0, 0.45);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff7ec 0%, #ffe8cc 100%);
  text-align: center;
  padding: 0.42rem 0.42rem 0.48rem;
  box-shadow: 0 2px 8px rgba(191, 87, 0, 0.12);
}
.hub-bracket-champion-head {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bf5700;
  margin-bottom: 0.28rem;
}
.hub-bracket-champion-row {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  align-items: center;
  margin-bottom: 0.18rem;
}
.hub-bracket-champion-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.15;
  word-break: break-word;
}
.hub-bracket-champion-prob {
  display: inline-block;
  min-width: 3.6em;
  padding: 0.12rem 0.48rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: #ffffff;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
.hub-bracket-champion-sub {
  margin: 0.08rem 0 0;
  font-size: 0.58rem;
  line-height: 1.22;
  color: #6b7280;
  font-style: italic;
}
.hub-bracket-champion-sub.hidden {
  display: none;
}

/* CWS Top 8 table */
.hub-bracket-cws-panel {
  border: 1px solid #d8dde3;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.45rem 0.55rem 0.55rem;
}
.hub-bracket-cws-head {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bf5700;
  text-align: center;
  border-bottom: 1px dashed #eef0f3;
  padding-bottom: 0.25rem;
  margin-bottom: 0.4rem;
}
.hub-bracket-cws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}
.hub-bracket-cws-table th {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0.18rem 0.25rem;
  border-bottom: 1px solid #eef0f3;
  text-align: center;
  background: transparent;
}
.hub-bracket-cws-table td {
  padding: 0.22rem 0.25rem;
  border-bottom: 1px solid #f3f5f7;
  text-align: center;
  vertical-align: middle;
}
.hub-bracket-cws-table tbody tr:last-child td { border-bottom: none; }
.hub-bracket-cws-name {
  text-align: left !important;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.2;
}

/* Responsive: stack halves vertically when there isn't room for 3 cols. */
@media (max-width: 1080px) {
  .hub-bracket-tree {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }
  .hub-bracket-center {
    order: 2;
    min-width: 0;
    max-width: none;
  }
  .hub-bracket-half--left  { order: 1; }
  .hub-bracket-half--right { order: 3; }
  .hub-bracket-half--right {
    grid-template-columns: minmax(118px, 1.06fr) minmax(198px, 1.02fr);
  }
  .hub-bracket-half--right .hub-bracket-col--regions { order: 1; }
  .hub-bracket-half--right .hub-bracket-col--supers  { order: 2; }
  .hub-bracket-tree .hub-bracket-cell::before,
  .hub-bracket-tree .hub-bracket-cell::after { display: none !important; }
}

/* ---- Favorites to Win Championship (Hub middle column, stretched height) ----- */

.hub-champ-odds-card {
  display: flex;
  flex-direction: column;
}
.hub-champ-odds-body {
  padding: 0.35rem 0.5rem 0.5rem;
}
.hub-champ-odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}
.hub-champ-odds-table th,
.hub-champ-odds-table td {
  padding: 0.26rem 0.28rem;
  text-align: center;
  border-bottom: 1px solid #edf0f3;
}
.hub-champ-odds-table th {
  font-weight: 600;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4b5563;
  background: transparent;
  line-height: 1.15;
}
.hub-champ-odds-name {
  text-align: left;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12em;
}

/* ---- Hub live-grid: stretch columns; last card grows to align bottoms --------- */
.hub-live-grid--split { align-items: stretch; }
.hub-live-left-col,
.hub-live-right-col {
  height: 100%;
}
.hub-live-left-col > .hub-table-card:last-child,
.hub-live-right-col > .hub-table-card:last-child {
  flex: 1 1 auto;
}
/* Keep the chart inside "Are other games up?" filling its growing card. */
.hub-live-left-col > .hub-table-card:last-child .hub-upload-volume-plot {
  flex: 1 1 auto;
  min-height: 200px;
}
.hub-live-left-col > .hub-table-card:last-child {
  display: flex;
  flex-direction: column;
}
