:root {
  --espn-red: #d00;
  --espn-red-dark: #a30000;
  --espn-red-light: #ff1a1a;
  --bg-page: #edeef0;
  --bg-card: #ffffff;
  --bg-nav: #1d1e1f;
  --bg-nav-hover: #2b2c2d;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #8c8c8c;
  --border: #dcdcdc;
  --border-light: #ececec;
  --green: #008248;
  --green-bg: #e6f4ed;
  --red-stat: #c8102e;
  --red-bg: #fdecee;
  --tier-elite: #008248;
  --tier-elite-bg: #e6f4ed;
  --tier-average: #c9a000;
  --tier-average-bg: #fef9e6;
  --tier-below: #c8102e;
  --tier-below-bg: #fdecee;
  --chart-bg: #ffffff;
  --chart-grid: rgba(0, 0, 0, 0.08);
  --chart-text: #5a5a5a;
  --chart-text-dark: #1a1a1a;
  --chart-border: #dcdcdc;
  --bg-elevated: #f7f7f8;
  --bg-row-alt: #fafafa;
  --bg-row-hover: #f0f4ff;
  --bg-input: #ffffff;
  --bg-muted: #f0f0f0;
  --bg-track: #ececec;
  --bg-season-btn: #f7f7f8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius: 4px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #121314;
  --bg-card: #1e1f21;
  --bg-nav: #0d0e0f;
  --bg-nav-hover: #2b2c2d;
  --text-primary: #f0f0f0;
  --text-secondary: #b8b8b8;
  --text-muted: #888;
  --border: #3a3b3d;
  --border-light: #2b2c2d;
  --green-bg: rgba(0, 130, 72, 0.18);
  --red-bg: rgba(200, 16, 46, 0.18);
  --tier-elite-bg: rgba(0, 130, 72, 0.2);
  --tier-average-bg: rgba(201, 160, 0, 0.18);
  --tier-below-bg: rgba(200, 16, 46, 0.18);
  --chart-bg: #1e1f21;
  --chart-grid: rgba(255, 255, 255, 0.08);
  --chart-text: #a8a8a8;
  --chart-text-dark: #f0f0f0;
  --chart-border: #3a3b3d;
  --bg-elevated: #252628;
  --bg-row-alt: #232425;
  --bg-row-hover: #2a2d35;
  --bg-input: #2b2c2d;
  --bg-muted: #2b2c2d;
  --bg-track: #3a3b3d;
  --bg-season-btn: #2b2c2d;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .injury-status-doubtful {
  background: rgba(230, 81, 0, 0.22);
  color: #ffb74d;
}

[data-theme="dark"] .injury-status-questionable {
  background: rgba(245, 127, 23, 0.22);
  color: #ffd54f;
}

[data-theme="dark"] .impact-significant {
  background: rgba(183, 28, 28, 0.22);
  color: #ef9a9a;
}

[data-theme="dark"] .impact-moderate {
  background: rgba(230, 81, 0, 0.22);
  color: #ffb74d;
}

[data-theme="dark"] .error-banner {
  border-color: rgba(200, 16, 46, 0.35);
}

[data-theme="dark"] .compare-win-a td:nth-child(2),
[data-theme="dark"] .compare-win-b td:nth-child(4) {
  background: rgba(0, 130, 72, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Top bar ── */
.site-header {
  background: linear-gradient(180deg, var(--espn-red) 0%, var(--espn-red-dark) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--espn-red);
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.header-meta {
  font-size: 12px;
  opacity: 0.9;
  text-align: right;
}

.header-link {
  display: block;
  color: #fff;
  opacity: 0.9;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  text-decoration: none;
}

.header-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── App switcher (Stats Tracker ↔ Mavs) ── */
.app-switcher {
  background: #111;
  border-bottom: 1px solid #2b2c2d;
}

.app-switcher-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-switcher-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.site-chrome-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-elevated);
}

.player-search {
  position: relative;
  min-width: 200px;
}

.player-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.player-search-input {
  width: 240px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
}

.player-search-input::placeholder {
  color: var(--text-muted);
}

.player-search-input:focus {
  outline: none;
  border-color: var(--espn-red);
  background: var(--bg-card);
}

.player-search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
}

.player-search-hit {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  cursor: pointer;
}

.player-search-hit:hover {
  background: var(--bg-row-hover);
}

.app-switcher a {
  display: inline-block;
  padding: 9px 16px;
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.app-switcher a:hover {
  color: #fff;
}

.app-switcher a.active {
  color: #fff;
  border-bottom-color: var(--espn-red-light);
}

/* ── Mavs offseason components (shared ESPN shell) ── */
.move-card.acquire .featured-card-header {
  background: linear-gradient(135deg, #1d1e1f 0%, #333 100%);
}

.move-card.move-out .featured-card-header {
  background: linear-gradient(135deg, #3d1515 0%, #5a2020 100%);
}

.action-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.action-badge.acquire {
  background: rgba(0, 132, 72, 0.25);
  color: #b8f0d4;
}

.action-badge.move-out {
  background: rgba(200, 16, 46, 0.3);
  color: #ffc8d0;
}

.draft-card .featured-card-header {
  background: linear-gradient(135deg, #1d1e1f 0%, #333 100%);
}

.draft-card .pick-badge {
  font-size: 28px;
  font-weight: 800;
  color: var(--espn-red-light);
  line-height: 1;
  margin-right: 12px;
  flex-shrink: 0;
}

.prospect-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--espn-red);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.draft-card .featured-card-footer {
  font-size: 12px;
  line-height: 1.5;
}

.draft-sources {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

.draft-grid {
  margin-bottom: 28px;
}

.trade-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.trade-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
}

.trade-profile-card.acquire .trade-profile-header {
  background: linear-gradient(135deg, #1d1e1f 0%, #2a4035 100%);
}

.trade-profile-card.move-out .trade-profile-header {
  background: linear-gradient(135deg, #3d1515 0%, #5a2020 100%);
}

.trade-profile-header {
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.trade-profile-header .featured-info h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.trade-profile-body {
  padding: 18px 20px 20px;
}

.trade-profile-body-compact {
  padding: 10px 14px 12px;
}

.trade-profile-body-compact .trade-analysis-collapse {
  margin-bottom: 0;
}

.trade-analysis {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.trade-analysis p {
  margin: 0 0 12px;
}

.trade-analysis p:last-child {
  margin-bottom: 0;
}

.metric-section {
  margin-bottom: 16px;
}

.metric-section:last-child {
  margin-bottom: 0;
}

.metric-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px 10px;
}

.metric-grid .mini-stat-label {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
}

.metric-grid .mini-stat-value {
  font-size: 14px;
  font-weight: 600;
}

.trade-profile-body .metric-grid {
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 5px 8px;
}

.trade-profile-body .metric-section {
  margin-bottom: 12px;
}

.metric-section-compact {
  margin-bottom: 0;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
}

.metric-section-compact .metric-section-title {
  margin: 0 0 6px;
  padding-bottom: 4px;
  font-size: 10px;
}

.metric-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)) !important;
  gap: 4px 6px !important;
}

.metric-tile {
  min-width: 0;
}

.metric-grid-compact .mini-stat-label {
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-grid-compact .mini-stat-value {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.trade-breakdown-inner {
  padding: 8px 10px 10px;
}

.trade-breakdown-inner .contract-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.hero-stat-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-stat-share {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.hero-strip-2 {
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  max-width: 640px;
}

.metric-grid .mini-stat-value.positive {
  color: var(--green);
}

.metric-grid .mini-stat-value.negative {
  color: var(--red-stat);
}

.section-header-sub {
  margin-top: 8px;
}

.section-header-sub .section-title {
  font-size: 15px;
  font-weight: 600;
}

.brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ── Season bar ── */
.season-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 52px;
  z-index: 90;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.season-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.season-bar-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 72px;
}

.season-bar-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.active-season-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--espn-red);
  letter-spacing: -0.3px;
}

.season-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.season-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-season-btn);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.season-btn:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.season-btn.active {
  background: var(--espn-red);
  border-color: var(--espn-red-dark);
  color: #fff;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.25);
}

.season-btn.active:hover {
  background: var(--espn-red-dark);
}

/* ── Nav ── */
.site-nav {
  background: var(--bg-nav);
  border-bottom: 3px solid var(--espn-red);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.nav-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: #ccc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.15s, background 0.15s;
}

.nav-tab:hover {
  color: #fff;
  background: var(--bg-nav-hover);
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--espn-red-light);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Layout ── */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* ── Hero strip ── */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.hero-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Section headers ── */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--espn-red);
}

/* Hover definitions (Basketball Reference–style, site colors) */
.term-tip {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted var(--espn-red-dark);
  color: var(--text-primary);
}

.term-tip-abbr {
  font-weight: inherit;
}

.term-tip-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 140px;
  max-width: 280px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.term-tip:hover .term-tip-popup,
.term-tip:focus-visible .term-tip-popup {
  opacity: 1;
  visibility: visible;
}

.data-table th .term-tip {
  color: var(--espn-red-dark);
  font-weight: 700;
}

.data-table th .term-tip-popup {
  bottom: auto;
  top: calc(100% + 8px);
}

.metric-grid .mini-stat-label .term-tip,
.featured-card-body .mini-stat-label .term-tip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.metric-grid .term-tip-popup,
.featured-card-body .term-tip-popup {
  bottom: auto;
  top: calc(100% + 6px);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.section-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-muted);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── Featured cards ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.featured-card-header {
  background: linear-gradient(135deg, #1d1e1f 0%, #333 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #555;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info h3 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
}

.featured-info .team-line {
  font-size: 12px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.featured-card-body {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.mini-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.featured-card-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Data table ── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: visible;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1200px;
}

.data-table thead {
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--border);
}

.data-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-row-alt);
}

.data-table tbody tr:hover {
  background: var(--bg-row-hover);
}

.data-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

.rank-cell {
  font-weight: 700;
  color: var(--text-muted);
  width: 36px;
}

.note-cell {
  display: block;
  min-width: 220px;
  max-width: 360px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.player-cell .player-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.player-cell .player-team-logo,
.featured-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.featured-team-logo {
  width: 40px;
  height: 40px;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Trend / stock badges ── */
.trend-up {
  color: var(--green);
  font-weight: 700;
}

.trend-down {
  color: var(--red-stat);
  font-weight: 700;
}

.trend-neutral {
  color: var(--text-muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-up {
  background: var(--green-bg);
  color: var(--green);
}

.badge-down {
  background: var(--red-bg);
  color: var(--red-stat);
}

.stock-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-track);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--espn-red), #ff4444);
}

.stock-num {
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

/* ── Methodology ── */
.method-grid {
  display: flex;
  gap: 10px;
  width: 100%;
}

.method-card {
  flex: 1 1 0;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  box-shadow: var(--shadow);
}

.method-card h4 {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--espn-red);
}

.method-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.method-card .weight {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 3px;
}

/* ── Sources footer ── */
.site-footer {
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.source-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.source-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ── Loading / error ── */
.loading-screen {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--espn-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-banner {
  background: var(--red-bg);
  border: 1px solid #f5c2c7;
  color: var(--red-stat);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  .header-meta {
    text-align: center;
  }

  .season-bar {
    top: auto;
    position: relative;
  }

  .season-bar-inner {
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .season-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .page {
    padding: 14px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .data-table {
    min-width: 720px;
  }
}

/* ── All-teams offseason hub ── */
.contract-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border-left: 3px solid var(--espn-red-light);
}

.untouchable-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.untouchable-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.untouchable-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1d1e1f 0%, #3a2a2a 100%);
  color: #fff;
}

.untouchable-card-header .team-logo {
  width: 40px;
  height: 40px;
}

.untouchable-card-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.untouchable-caveat {
  margin-left: 6px;
  font-weight: 700;
  color: #ffd54f;
  cursor: help;
}

.untouchable-headline {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.untouchable-card-body {
  padding: 16px 20px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
}

.untouchable-card-body p {
  margin: 0 0 12px;
}

.untouchable-card-body p:last-child {
  margin-bottom: 0;
}

.section-intro {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
  max-width: 720px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.team-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.team-card-link:hover {
  border-color: var(--espn-red-light);
  transform: translateY(-2px);
}

.team-card-link img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.team-card-link .team-abbr {
  font-weight: 700;
  font-size: 13px;
}

.team-card-link .team-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.team-mode-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}

.team-mode-tag.mode-champions {
  color: #ffd966;
  background: rgba(255, 217, 102, 0.12);
}

.team-mode-tag.mode-winnow {
  color: #6dd4a0;
  background: rgba(109, 212, 160, 0.12);
}

.team-mode-tag.mode-buying {
  color: #7eb8ff;
  background: rgba(126, 184, 255, 0.12);
}

.team-mode-tag.mode-selling {
  color: #ffb366;
  background: rgba(255, 179, 102, 0.12);
}

.team-mode-tag.mode-rebuild {
  color: #c9a0ff;
  background: rgba(201, 160, 255, 0.12);
}

.team-mode-tag.mode-muted {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.fa-notes {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 320px;
}

.curated-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6dd4a0;
}

/* ── Offseason split layout (2/3 content + 1/3 radar) ── */
.offseason-workspace {
  display: grid;
  grid-template-columns: 200px 2fr 1fr;
  gap: 16px;
  align-items: start;
  min-height: 520px;
}

.offseason-rail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 8px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  position: sticky;
  top: 120px;
}

.rail-title {
  margin: 0 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.team-rail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-rail-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  transition: background 0.15s, border-color 0.15s;
}

.team-rail-btn:hover {
  background: var(--bg-page);
}

.team-rail-btn.active {
  background: rgba(221, 0, 0, 0.08);
  border-color: var(--espn-red);
}

.team-rail-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.team-rail-abbr {
  font-weight: 700;
  font-size: 12px;
  min-width: 32px;
}

.team-rail-name {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offseason-main {
  min-width: 0;
}

.offseason-radar-aside {
  position: sticky;
  top: 120px;
}

.team-overview-hero {
  margin-bottom: 16px;
}

.team-overview-triple {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 360px) minmax(200px, 260px);
  gap: 16px;
  align-items: start;
}

.team-overview-col {
  min-width: 0;
}

.team-overview-col-left {
  /* acquire / move-out scroll with the page */
}

.team-overview-sticky {
  position: sticky;
  top: 120px;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.team-overview-col-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-overview-col-right .overview-roster-list {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.overview-roster-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.overview-roster-row:last-child {
  border-bottom: none;
}

.overview-roster-jersey {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.overview-roster-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.overview-roster-info {
  min-width: 0;
}

.overview-roster-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-roster-meta {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.lineup-sticky-block {
  min-width: 0;
}

.lineup-sticky-block .section-header-compact {
  margin-bottom: 6px;
}

.radar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.radar-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.radar-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.radar-canvas-wrap {
  position: relative;
  height: 260px;
  margin-bottom: 12px;
}

.radar-legend {
  margin: 0;
  padding: 0 0 0 16px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.radar-legend li {
  margin-bottom: 4px;
}

.team-placeholder {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.team-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.team-detail-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.team-detail-header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.team-detail-picks {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.compact-section {
  margin-bottom: 16px;
}

.section-header-compact {
  margin-bottom: 8px;
}

.compact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.compact-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.compact-player-card h4 {
  margin: 6px 0 4px;
  font-size: 14px;
}

.compact-meta {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.compact-rationale {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.compact-table-wrap {
  margin-top: 0;
}

.compact-draft-table {
  font-size: 12px;
}

.compact-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-full-link {
  margin: 8px 0 0;
  font-size: 13px;
}

.detail-full-link a {
  color: var(--espn-red);
  font-weight: 600;
  text-decoration: none;
}

.detail-full-link a:hover {
  text-decoration: underline;
}

.trade-cards-compact .trade-profile-card {
  font-size: 13px;
}

.trade-cards-compact .trade-profile-body-compact {
  padding: 8px 10px 10px;
}

.trade-cards-compact .trade-analysis-toggle {
  padding: 8px 10px;
  font-size: 12px;
}

.trade-cards-compact .metric-section-compact {
  padding: 6px 8px;
}

.trade-cards-compact .metric-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)) !important;
}

.trade-cards-compact .trade-analysis {
  font-size: 12px;
}

.hero-strip-compact {
  margin-bottom: 12px;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.hero-strip-compact .hero-stat {
  padding: 10px 12px;
}

/* ── Stock page graph toggle ── */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-mode-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-mode-select {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
}

.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 8px;
  margin-bottom: 20px;
  height: 520px;
}

.chart-panel canvas {
  width: 100% !important;
  height: 100% !important;
}

.section-view-chart .chart-panel {
  min-height: 480px;
}

@media (max-width: 1100px) {
  .offseason-workspace {
    grid-template-columns: 1fr;
  }

  .offseason-rail {
    position: static;
    max-height: 200px;
  }

  .team-rail-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .team-rail-btn {
    width: auto;
    flex: 1 1 140px;
  }

  .offseason-radar-aside,
  .team-page-radar,
  .team-overview-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .team-overview-triple {
    grid-template-columns: 1fr;
  }
}

/* ── Injury report ── */
.hero-stat-small {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.injury-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.injury-status-out {
  background: var(--red-bg);
  color: var(--red-stat);
}

.injury-status-doubtful {
  background: #fff3e0;
  color: #e65100;
}

.injury-status-questionable {
  background: #fff8e1;
  color: #f57f17;
}

.injury-status-day {
  background: var(--green-bg);
  color: var(--green);
}

.injury-status-neutral {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.impact-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.impact-major {
  background: var(--red-bg);
  color: var(--red-stat);
}

.impact-significant {
  background: #fde8e8;
  color: #b71c1c;
}

.impact-moderate {
  background: #fff3e0;
  color: #e65100;
}

.impact-minor {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* ── Player links ── */
.player-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.player-link:hover {
  color: var(--espn-red);
  border-bottom-color: var(--espn-red);
}

/* ── Daily Digest ── */
.digest-date-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.digest-date-edition {
  font-family: var(--font-display, var(--font));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--espn-red);
}

.digest-date-day {
  font-family: var(--font-display, var(--font));
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
}

.digest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.digest-column {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.digest-column .section-header {
  margin-bottom: 10px;
}

.digest-movers-section + .digest-movers-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.digest-subhead {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.digest-mover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px auto 72px;
  gap: 4px 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.digest-mover-card:last-child {
  border-bottom: none;
}

.digest-mover-team {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.digest-mover-stock {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
}

.digest-injury-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.digest-injury-item .injury-detail {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.news-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.news-source {
  font-weight: 700;
  color: var(--espn-red);
  text-transform: uppercase;
}

.news-headline {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.news-headline:hover {
  color: var(--espn-red);
}

.news-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.game-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.game-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.game-result-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.game-result-line.winner {
  font-weight: 700;
}

.game-result-line strong {
  margin-left: auto;
}

.game-result-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
}

.team-logo-sm {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Player profile page ── */
.player-sticky-bar {
  position: sticky;
  top: 52px;
  z-index: 90;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.player-sticky-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-sticky-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.player-sticky-name {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sticky-stock {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.player-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.player-hero-stats .hero-stat {
  min-width: 0;
}

.player-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}

.player-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-card-btn {
  padding: 8px 16px;
  background: var(--espn-red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  flex-shrink: 0;
}

.share-card-btn:hover {
  background: var(--espn-red-dark);
}

.player-hero-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.player-hero-info {
  min-width: 0;
}

.player-hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.player-hero-team-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.player-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--espn-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.player-hero-team-name {
  font-weight: 700;
  color: var(--text-primary);
}

.player-hero-info h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.player-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.player-hero-notes {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.player-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.player-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.player-radar-wrap,
.player-stock-chart {
  height: 280px;
}

.section-sub {
  margin: -8px 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.stat-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.stat-tile {
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 12px;
  border-left: 3px solid transparent;
  min-width: 0;
}

.stat-tile-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  min-width: 0;
}

.stat-tile-value .stock-bar-wrap {
  min-width: 0;
}

.stat-tile-tier-elite {
  background: var(--tier-elite-bg);
  border-left-color: var(--tier-elite);
}

.stat-tile-tier-average {
  background: var(--tier-average-bg);
  border-left-color: var(--tier-average);
}

.stat-tile-tier-below {
  background: var(--tier-below-bg);
  border-left-color: var(--tier-below);
}

.stat-tier-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.tier-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 2px;
}

.tier-dot.tier-elite {
  background: var(--tier-elite);
}

.tier-dot.tier-average {
  background: var(--tier-average);
}

.tier-dot.tier-below {
  background: var(--tier-below);
}

.similar-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.similar-player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-page);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.similar-player-info {
  min-width: 0;
  flex: 1;
}

.similar-player-name {
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.similar-player-card:hover {
  border-color: var(--espn-red);
  box-shadow: var(--shadow);
}

.similar-player-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.similar-player-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.similar-player-stock {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-tile-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.timeline-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.timeline-item {
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 12px;
}

.timeline-season {
  font-weight: 700;
  font-size: 14px;
}

.timeline-team {
  font-size: 12px;
  color: var(--text-muted);
}

.injury-card {
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}

.injury-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  margin-bottom: 6px;
}

.injury-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.injury-card-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Compare tool ── */
.compare-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.compare-selectors label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  min-width: 200px;
  position: relative;
}

.compare-autocomplete {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 20;
}

.compare-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg-input);
  color: var(--text-primary);
}

.compare-input::placeholder {
  color: var(--text-muted);
}

.compare-vs {
  font-weight: 800;
  color: var(--text-muted);
  padding-bottom: 10px;
}

.compare-btn {
  padding: 10px 20px;
  background: var(--espn-red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}

.compare-btn:hover {
  background: var(--espn-red-dark);
}

.compare-players-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.compare-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.compare-player-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.compare-name {
  font-size: 18px;
  display: block;
  margin-bottom: 6px;
}

.compare-team {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.compare-diff-center {
  text-align: center;
  padding: 16px;
  background: var(--bg-page);
  border-radius: var(--radius);
}

.compare-diff-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.compare-diff-value {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0;
}

.compare-diff-winner {
  font-weight: 700;
  font-size: 14px;
}

.compare-diff-gap {
  font-size: 12px;
  color: var(--text-muted);
}

.compare-radar-wrap {
  height: 320px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.compare-win-a td:nth-child(2) {
  background: var(--green-bg);
  font-weight: 700;
}

.compare-win-b td:nth-child(4) {
  background: var(--green-bg);
  font-weight: 700;
}

.compare-diff-cell {
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Lineup optimizer — half court ── */
.lineup-optimizer {
  margin-bottom: 0;
}

.lineup-court-wrap {
  --court-floor-a: #d4a574;
  --court-floor-b: #c49562;
  --court-accent: #555;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lineup-court-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--court-accent) 0%, color-mix(in srgb, var(--court-accent) 65%, #000) 100%);
  color: #fff;
}

.lineup-court-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.lineup-court-city {
  font-family: var(--font-display, var(--font));
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lineup-court-sub {
  font-size: 10px;
  opacity: 0.88;
  margin-top: 2px;
}

.lineup-court {
  position: relative;
  aspect-ratio: 500 / 470;
  width: 100%;
  margin: 0 auto;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 22px,
      rgba(0, 0, 0, 0.035) 22px,
      rgba(0, 0, 0, 0.035) 23px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(255, 255, 255, 0.04) 48px,
      rgba(255, 255, 255, 0.04) 49px
    ),
    linear-gradient(175deg, var(--court-floor-a) 0%, var(--court-floor-b) 100%);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--court-accent) 25%, transparent);
}

.lineup-court-lines,
.lineup-court-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lineup-court-decor {
  z-index: 0;
}

.lineup-court-lines {
  z-index: 1;
}

.lineup-court-center-logo {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.22;
  pointer-events: none;
  filter: grayscale(20%);
  z-index: 1;
}

.lineup-court-slots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.lineup-court-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 34%;
  z-index: 2;
}

.lineup-slot-pos {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.lineup-player-token {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lineup-token-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--token-color, #555);
  border: 3px solid #fff;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.lineup-token-name {
  display: block;
  font-size: clamp(9px, 2vw, 12px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 6px rgba(0, 0, 0, 0.45);
  word-break: break-word;
  max-width: 100%;
}

.lineup-court-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
}

.lineup-court-footer strong {
  color: var(--text-primary);
  font-weight: 800;
}

.lineup-bench {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}

.lineup-bench-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lineup-bench-drop {
  min-height: 48px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.lineup-bench-drop.drop-target {
  background: rgba(221, 0, 0, 0.06);
  outline: 2px dashed var(--espn-red);
  outline-offset: 2px;
}

.lineup-bench-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lineup-bench-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-card);
  cursor: grab;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-primary);
  transition: border-color 0.15s, opacity 0.15s;
}

.lineup-bench-chip:hover {
  border-color: var(--court-accent, var(--espn-red));
}

.lineup-bench-chip.on-court {
  opacity: 0.55;
}

.lineup-bench-chip.dragging {
  opacity: 0.45;
}

.lineup-bench-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.lineup-bench-label {
  font-weight: 700;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-bench-pos {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
}

.lineup-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* Draft picks section */
.draft-picks-section {
  margin-bottom: 24px;
}

.draft-year-group {
  margin-bottom: 16px;
}

.draft-year-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.draft-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.draft-pick-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.draft-pick-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--espn-red);
  line-height: 1;
  min-width: 42px;
}

.draft-pick-body {
  min-width: 0;
}

.draft-pick-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.draft-pick-via {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.draft-pick-prospects {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.draft-pick-prospects li {
  margin-bottom: 2px;
}

/* Legacy slot cards — kept for share/export fallbacks */
.lineup-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.lineup-slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lineup-slot-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--espn-red);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lineup-player-name {
  font-weight: 700;
  font-size: 13px;
  margin-top: 8px;
}

.lineup-player-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 4px 0 8px;
}

.lineup-player-bpm {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 6px;
}

@media (max-width: 1100px) {
  .method-grid {
    flex-wrap: wrap;
  }

  .method-card {
    flex: 1 1 calc(33.333% - 10px);
  }
}

@media (max-width: 900px) {
  .digest-grid,
  .player-detail-grid,
  .compare-players-header {
    grid-template-columns: 1fr;
  }

  .digest-mover-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .digest-mover-stock {
    grid-column: 1 / -1;
    text-align: left;
  }

  .method-card {
    flex: 1 1 calc(50% - 10px);
  }

  .lineup-court {
    max-width: 100%;
  }

  .lineup-token-avatar {
    width: 52px;
    height: 52px;
    font-size: 15px;
  }

  .lineup-token-name {
    font-size: 10px;
  }

  .player-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .player-hero-brand {
    flex-direction: row;
    justify-content: center;
  }

  .player-hero-team-logo {
    width: 64px;
    height: 64px;
  }

  .player-hero-stats {
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
  }

  .player-hero-side {
    align-items: center;
    width: 100%;
  }

  .player-hero-meta {
    justify-content: center;
  }

  .player-radar-wrap,
  .player-stock-chart {
    height: 240px;
  }

  .stat-tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-switcher-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .site-chrome-slot {
    width: 100%;
    justify-content: flex-end;
  }

  .player-search {
    flex: 1;
    min-width: 0;
  }

  .player-search-input {
    width: 100%;
    min-width: 0;
  }

  .player-hero-actions {
    justify-content: center;
  }

  .player-sticky-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .stat-tier-legend {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 14px;
    gap: 6px;
  }

  .header-meta {
    text-align: center;
  }

  .page {
    padding: 12px;
  }

  .player-hero-card {
    padding: 16px;
    gap: 14px;
  }

  .player-hero-info h1 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .player-hero-notes {
    text-align: left;
  }

  .player-sticky-inner {
    padding: 8px 14px;
  }

  .player-sticky-stock {
    font-size: 12px;
  }

  .player-panel {
    padding: 14px;
  }

  .player-detail-grid {
    gap: 14px;
  }

  .timeline-track {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    min-width: 0;
  }

  .timeline-item .stock-bar-wrap {
    min-width: 0;
  }

  .app-switcher a {
    padding: 8px 10px;
    font-size: 12px;
  }

  .stat-tile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-tile-value {
    font-size: 14px;
  }

  .similar-players-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 14px;
  }

  .section-sub {
    font-size: 12px;
  }

  .compare-selectors label {
    min-width: 0;
    flex: 1 1 100%;
  }

  .compare-vs {
    align-self: center;
    padding-bottom: 0;
  }

  .compare-btn {
    width: 100%;
  }
}

/* ── Free agent market layout ── */
.fa-market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}

.fa-movements-aside {
  position: sticky;
  top: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.fa-movements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fa-movement-card {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.fa-movement-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fa-movement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 4px;
  font-size: 11px;
}

.fa-movement-headline {
  display: block;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-primary);
  text-decoration: none;
}

.fa-movement-headline:hover {
  color: var(--espn-red);
}

.fa-movement-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ── Collapsible trade card analysis ── */
.trade-analysis-collapse {
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
}

.trade-analysis-toggle {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-analysis-toggle::-webkit-details-marker {
  display: none;
}

.trade-toggle-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 10px;
}

.trade-analysis-collapse[open] .trade-toggle-arrow {
  transform: rotate(90deg);
}

.trade-analysis-collapse .trade-analysis {
  margin-bottom: 10px;
}

.trade-analysis-collapse .trade-breakdown-inner .trade-analysis {
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .fa-market-layout {
    grid-template-columns: 1fr;
  }

  .fa-movements-aside {
    position: static;
    max-height: none;
  }
}
