/* ==========================================================================
   Tappa NBA Intelligence Platform — Forensic Player Dossier Stylesheet
   Route: /player/:id
   Bloomberg-density, high-contrast dark theme, zero-slop UI tokens
   ========================================================================== */

/* Tappa Platform Brand Header Strip (matching team page) */
.player-page-tappa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem;
  background: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--tappa-orange, #ea580c);
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 0.85rem;
}

/* Dossier Wrapper */
.player-dossier {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  font-family: var(--font-sans, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);
  color: var(--text-primary, #f1f5f9);
}

/* Tier Card Container (aligned with team-section-card) */
.player-tier-card {
  background: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.player-tier-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Tier Header (aligned with team-section-header) */
.tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #18181b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.tier-header:hover {
  background: #1e1e24;
}

.tier-title-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Signature Tappa Orange Section Badge */
.tier-number-tag {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  background: var(--tappa-orange-subtle, rgba(234, 88, 12, 0.12));
  color: var(--tappa-orange, #ea580c);
  border: 1px solid var(--tappa-orange-border, rgba(234, 88, 12, 0.32));
  border-radius: 3px;
}

.tier-title {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary, #f8fafc);
  margin: 0;
}

.tier-summary-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
}

.tier-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  background: transparent;
  border: none;
  cursor: pointer;
}

.tier-chevron {
  transition: transform 0.2s ease;
}

.player-tier-card.collapsed .tier-chevron {
  transform: rotate(-90deg);
}

.player-tier-card.collapsed .tier-body {
  display: none !important;
}

.tier-body {
  padding: 1rem;
}

/* ==========================================================================
   §0: COMMAND CENTER PLAYER HERO BANNER (Modeled after Team Page)
   ========================================================================== */
.player-hero-banner,
.verdict-strip {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 1.25rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, #0e0e12 0%, #18181e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--tappa-orange, #ea580c);
  border-radius: var(--radius-md, 8px);
  position: relative;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .player-hero-banner,
  .verdict-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.verdict-hero-row {
  display: contents;
}

/* Center Column: 4 Core Metric Boxes (Modeled after Team Page) */
.player-hero-metrics {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.5rem;
}

@media (max-width: 1100px) {
  .player-hero-metrics {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.hero-metric-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.hero-metric-key {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.04em;
}

.hero-metric-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero-metric-sub {
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  color: var(--text-muted, #94a3b8);
}

/* Right Column: Signals & Verdict Profile */
.player-hero-signals {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center;
}

/* Player Identity Left Column */
.player-identity-col {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-headshot-box {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: #18181b;
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

.player-bio-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.player-name-h1 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary, #f8fafc);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}

.team-pill-link {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  background: var(--tappa-orange-subtle, rgba(234, 88, 12, 0.12));
  color: var(--tappa-orange, #ea580c);
  border: 1px solid var(--tappa-orange-border, rgba(234, 88, 12, 0.32));
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.team-pill-link:hover {
  background: var(--tappa-orange, #ea580c);
  color: #ffffff;
  transform: translateY(-1px);
}

.pos-pill {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #cbd5e1);
  border-radius: 4px;
}

.age-text {
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #94a3b8);
  font-size: 0.7rem;
}

/* Center Column: DARKO DPM Apex Hero */
.darko-hero-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.darko-hero-top {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.darko-val-large {
  font-family: var(--font-mono, monospace);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.darko-val-large.positive {
  color: #10b981;
}

.darko-val-large.negative {
  color: #ef4444;
}

.darko-label-group {
  display: flex;
  flex-direction: column;
}

.darko-main-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.darko-percentile-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 600;
  color: #10b981;
}

.darko-splits-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.darko-split-item {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
}

.darko-split-item strong {
  font-weight: 600;
  color: #f8fafc;
}

/* Right Column: Signals & Verdict Badges */
.verdict-signals-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.signal-key {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-tier-elite {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-tier-t1 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-tier-t2 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-tier-t3 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-pivot-validated {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-pivot-unproven {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-pivot-streak {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-yoy-leap {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Bottom Accolades Strip */
.verdict-accolades-strip {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.accolade-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin-right: 0.2rem;
}

.accolade-chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
}

/* Top Right Action Buttons */
.verdict-actions-bar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn-pill {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  background: #18181b;
  color: var(--text-secondary, #cbd5e1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xs, 4px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.action-btn-pill:hover {
  background: #27272a;
  color: var(--text-primary, #f8fafc);
  border-color: var(--tappa-orange, #ea580c);
}

.action-btn-pill.pinned {
  background: var(--tappa-orange-subtle, rgba(234, 88, 12, 0.15));
  color: var(--tappa-orange, #ea580c);
  border-color: var(--tappa-orange-border, rgba(234, 88, 12, 0.4));
}

/* ==========================================================================
   TIER 1 — HEADLINE & TACTICAL BASELINE
   ========================================================================== */
.headline-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-box-cell {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
}

.stat-box-key {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.15rem;
}

.stat-box-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.headline-sub-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 1rem;
}

/* Efficiency Trio */
.efficiency-trio-card, .home-away-card, .narrative-summary-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.75rem 0.85rem;
}

.card-inner-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eff-gauge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.eff-gauge-row:last-child {
  border-bottom: none;
}

.eff-gauge-key {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.eff-gauge-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
}

.eff-delta-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-left: 0.4rem;
}

.eff-delta-pill.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.eff-delta-pill.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* High-Density Tabular Splits Table (Anti-Slop / Bloomberg Standard) */
.splits-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
}

.splits-table th {
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.64rem;
  color: var(--text-dim, #64748b);
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.splits-table td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.splits-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Narrative Blurb */
.narrative-text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 0.6rem;
}

.archetype-tags-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   TIER 2 — SHOT PROFILE, SYNERGY DIET & SPATIAL EFFICIENCY
   ========================================================================== */
.tier2-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}

/* Proportional Segmented Diet Strip */
.diet-strip-container {
  margin-bottom: 1.25rem;
}

.diet-strip-bar {
  display: flex;
  height: 28px;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.4rem 0;
}

.diet-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  transition: opacity 0.15s ease;
  position: relative;
  cursor: pointer;
}

.diet-segment:hover {
  filter: brightness(1.15);
}

.diet-seg-rim { background: #3b82f6; }
.diet-seg-short-mid { background: #6366f1; }
.diet-seg-long-mid { background: #8b5cf6; }
.diet-seg-corner3 { background: #ec4899; }
.diet-seg-atb3 { background: #14b8a6; }

.diet-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, monospace);
}

.diet-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.diet-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Dumbbell Connected Dot Plot */
.dumbbell-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.dumbbell-row {
  display: grid;
  grid-template-columns: 90px 1fr 65px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
}

.dumbbell-zone-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #cbd5e1);
}

.dumbbell-track {
  position: relative;
  height: 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  display: flex;
  align-items: center;
}

.dumbbell-line {
  position: absolute;
  height: 3px;
  border-radius: 2px;
}

.dumbbell-line.better { background: #10b981; }
.dumbbell-line.worse { background: #ef4444; }

.dumbbell-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
}

.dumbbell-dot-league {
  background: #64748b;
  border: 2px solid #0f172a;
  z-index: 2;
}

.dumbbell-dot-player {
  background: #38bdf8;
  border: 2px solid #0f172a;
  z-index: 3;
}

.dumbbell-delta-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: right;
}

/* Synergy Playtype Table */
.synergy-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.85rem;
}

.synergy-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
}

.synergy-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.synergy-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Tracking Metrics Strip */
.tracking-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   TIER 3 — IMPACT & MULTI-MODEL FORENSIC CONSENSUS
   ========================================================================== */
.tier3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.multi-model-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
}

.multi-model-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.multi-model-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.model-val-cell {
  font-weight: 700;
  color: #ffffff;
}

.model-pct-cell {
  color: #10b981;
}

/* Crafted Forensics Panel */
.crafted-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.crafted-metric-cell {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crafted-key {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
}

.crafted-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
}

/* ==========================================================================
   TIER 4 — BEST-FIT DESTINATION TEAMS
   ========================================================================== */
.best-fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.best-fit-team-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.best-fit-team-card:hover {
  border-color: var(--tappa-orange, #ea580c);
  transform: translateY(-2px);
}

.best-fit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.best-fit-team-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.best-fit-rank-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 3px;
}

.best-fit-abbr-link {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.best-fit-score-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.best-fit-label-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  width: fit-content;
}

.best-fit-desc {
  font-size: 0.72rem;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.4;
}

.best-fit-acquirable {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent-blue, #3b82f6);
}

/* ==========================================================================
   TIER 5 — TRAJECTORY, HISTORICAL COMPS & CONTRACT LEDGER
   ========================================================================== */
.tier5-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}

.chart-wrapper-box {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.75rem;
  height: 220px;
  position: relative;
}

.contract-valuation-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-callout-box {
  margin-top: 0.85rem;
  padding: 0.6rem 0.75rem;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
}

.comp-item-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comp-item-row:last-child {
  border-bottom: none;
}

.surplus-value-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  width: fit-content;
}

.surplus-value-badge.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.surplus-value-badge.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 10-Game Log Strip */
.gamelog-strip-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  margin-top: 0.75rem;
}

.gamelog-strip-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gamelog-strip-table td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .player-hero-banner,
  .verdict-strip,
  .verdict-hero-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .player-hero-metrics,
  .darko-hero-col {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0;
  }
  .headline-sub-grid, .tier2-grid, .tier3-grid, .tier5-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   TAPPA LIGHT THEME PALETTE OVERRIDES
   Activates under html[data-theme="light"] or [data-theme="light"]
   Preserves crisp 1px borders, high contrast, zero slop
   ========================================================================== */
[data-theme="light"] .player-dossier {
  color: #0f172a;
}

/* Header & Breadcrumb Strip */
[data-theme="light"] .player-page-tappa-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--tappa-orange, #ea580c);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] #player-header-title {
  color: #0f172a !important;
}

[data-theme="light"] #player-header-meta {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* Tier Card Container & Headers */
[data-theme="light"] .player-tier-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .player-tier-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tier-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .tier-header:hover {
  background: #f1f5f9;
}

[data-theme="light"] .tier-number-tag {
  background: rgba(234, 88, 12, 0.08);
  color: var(--tappa-orange, #ea580c);
  border: 1px solid rgba(234, 88, 12, 0.25);
}

[data-theme="light"] .tier-title {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .tier-summary-badge {
  color: #64748b;
}

[data-theme="light"] .tier-toggle-btn {
  color: #64748b;
}

/* Tier 0 — Apex Verdict Strip & Hero Banner */
[data-theme="light"] .player-hero-banner,
[data-theme="light"] .verdict-strip {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--tappa-orange, #ea580c);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .player-hero-metrics {
  border-left-color: #e2e8f0;
  border-right-color: #e2e8f0;
}

[data-theme="light"] .player-headshot-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .player-name-h1 {
  color: #0f172a;
}

[data-theme="light"] .team-pill-link {
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

[data-theme="light"] .team-pill-link:hover {
  background: #ea580c;
  color: #ffffff;
}

[data-theme="light"] .pos-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
}

[data-theme="light"] .age-text {
  color: #64748b;
}

[data-theme="light"] .darko-hero-col {
  border-left-color: #e2e8f0;
  border-right-color: #e2e8f0;
}

[data-theme="light"] .darko-main-title {
  color: #0f172a;
}

[data-theme="light"] .darko-split-item {
  color: #64748b;
}

[data-theme="light"] .darko-split-item strong {
  color: #0f172a;
}

[data-theme="light"] .signal-key {
  color: #64748b;
}

[data-theme="light"] .verdict-accolades-strip {
  border-top-color: #e2e8f0;
}

[data-theme="light"] .accolade-label {
  color: #64748b;
}

[data-theme="light"] .accolade-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}

[data-theme="light"] .action-btn-pill {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .action-btn-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: var(--tappa-orange, #ea580c);
}

[data-theme="light"] .action-btn-pill.pinned {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.35);
}

/* Tier 1 — Headline & Tactical Baseline */
[data-theme="light"] .stat-box-cell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .stat-box-key {
  color: #64748b;
}

[data-theme="light"] .stat-box-val {
  color: #0f172a;
}

[data-theme="light"] .efficiency-trio-card,
[data-theme="light"] .home-away-card,
[data-theme="light"] .narrative-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .card-inner-title {
  color: #334155;
}

[data-theme="light"] .eff-gauge-row {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .eff-gauge-key {
  color: #64748b;
}

[data-theme="light"] .eff-gauge-val {
  color: #0f172a;
}

[data-theme="light"] .splits-table th {
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .splits-table td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .narrative-text {
  color: #475569;
}

/* Tier 2 — Shot Profile & Dumbbell Plot */
[data-theme="light"] .diet-strip-bar {
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .diet-legend-row {
  color: #64748b;
}

[data-theme="light"] .dumbbell-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .dumbbell-zone-label {
  color: #334155;
}

[data-theme="light"] .dumbbell-track {
  background: #e2e8f0;
}

[data-theme="light"] .dumbbell-dot-league {
  background: #94a3b8;
  border: 2px solid #ffffff;
}

[data-theme="light"] .dumbbell-dot-player {
  background: #0284c7;
  border: 2px solid #ffffff;
}

[data-theme="light"] .synergy-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .synergy-table th {
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .synergy-table td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

/* Tier 3 — Multi-Model & Crafted Metrics */
[data-theme="light"] .multi-model-table th {
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .multi-model-table td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .model-val-cell {
  color: #0f172a;
}

[data-theme="light"] .crafted-metric-cell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .crafted-key {
  color: #64748b;
}

[data-theme="light"] .crafted-val {
  color: #0f172a;
}

[data-theme="light"] .player-callout-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Tier 4 — Best-Fit Destination Teams */
[data-theme="light"] .best-fit-team-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .best-fit-team-card:hover {
  border-color: var(--tappa-orange, #ea580c);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .best-fit-abbr-link {
  color: #0f172a;
}

[data-theme="light"] .best-fit-rank-pill {
  background: #e2e8f0;
  color: #1e293b;
}

[data-theme="light"] .best-fit-desc {
  color: #475569;
}

[data-theme="light"] .best-fit-acquirable {
  background: #f1f5f9;
  color: #475569;
  border-left: 2px solid var(--tappa-orange, #ea580c);
}

/* Tier 5 — Trajectory, Historical Comps & Ledger */
[data-theme="light"] .chart-wrapper-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .contract-valuation-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .comp-item-row {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .gamelog-strip-table th {
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .gamelog-strip-table td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

/* Badge Tweaks in Light Theme for High Contrast */
[data-theme="light"] .badge-tier-elite {
  background: rgba(147, 51, 234, 0.1);
  color: #7e22ce;
  border-color: rgba(147, 51, 234, 0.3);
}

[data-theme="light"] .badge-tier-t1 {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .badge-tier-t2 {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .badge-tier-t3 {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .badge-pivot-validated {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .badge-pivot-unproven {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .badge-pivot-streak {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .badge-yoy-leap {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .surplus-value-badge.positive {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .surplus-value-badge.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.35);
}
/* ==========================================================================
   ENHANCED TRADITIONAL STAT RIBBON (IDENTITY HEADER)
   ========================================================================== */
.player-stat-ribbon {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs, 4px);
  padding: 0.5rem 0.6rem;
  margin-top: 0.15rem;
}

@media (max-width: 1080px) {
  .player-stat-ribbon {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 600px) {
  .player-stat-ribbon {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ribbon-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem 0.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.ribbon-stat-item:last-child {
  border-right: none;
}

.ribbon-stat-key {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ribbon-stat-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==========================================================================
   HORIZONTAL STORIES CARD ROW (STORYLINES INTEGRATION)
   ========================================================================== */
.player-stories-section {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.player-stories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  width: 100%;
}

.player-stories-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

.player-story-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--tappa-orange, #ea580c);
  border-radius: var(--radius-xs, 4px);
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: all 0.15s ease;
  min-width: 0;
}

.player-story-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(234, 88, 12, 0.5);
  transform: translateY(-1px);
}

.player-story-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
}

.player-story-badge {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--tappa-orange, #ea580c);
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.player-story-time {
  color: var(--text-dim, #71717a);
  font-size: 0.6rem;
}

.player-story-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  margin: 0;
  line-height: 1.3;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.player-story-hook {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   §1: STAT RANK BENTO GRID (MODELED AFTER TEAM STATS TABLE)
   ========================================================================== */
.player-stat-mode-pills {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-stat-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, monospace);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.player-stat-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.player-stat-mode-btn.active {
  background: #27272a;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-stats-rank-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

@media (max-width: 1280px) {
  .player-stats-rank-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .player-stats-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .player-stats-rank-grid {
    grid-template-columns: 1fr;
  }
}

.stat-rank-card {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 142px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.stat-rank-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #18181f;
  transform: translateY(-1px);
}

.stat-rank-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
}

.stat-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.stat-card-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim, #71717a);
  letter-spacing: 0.04em;
}

.stat-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.stat-rank-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-rank-badge .rank-num {
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-rank-badge .rank-scope {
  font-size: 0.54rem;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 0.05rem;
}

.stat-rank-badge.rank-tier-elite {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.stat-rank-badge.rank-tier-top10 {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.stat-rank-badge.rank-tier-mid {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-rank-badge.rank-tier-low {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.stat-rank-badge.rank-tier-na {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim, #71717a);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-rank-main {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.4rem 0 0.35rem 0;
}

.stat-season-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-season-caption {
  font-size: 0.6rem;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.stat-rank-gauge-wrap {
  margin-bottom: 0.5rem;
}

.stat-rank-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

.stat-rank-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.stat-rank-fill.rank-tier-elite {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.stat-rank-fill.rank-tier-top10 {
  background: linear-gradient(90deg, #0d9488 0%, #34d399 100%);
}

.stat-rank-fill.rank-tier-mid {
  background: linear-gradient(90deg, #52525b 0%, #94a3b8 100%);
}

.stat-rank-fill.rank-tier-low {
  background: linear-gradient(90deg, #9f1239 0%, #f43f5e 100%);
}

.stat-rank-fill.rank-tier-na {
  background: transparent;
  width: 0% !important;
  opacity: 0;
}

.stat-rank-median-tick {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.stat-rank-track-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 0.52rem;
  color: var(--text-dim, #52525b);
  margin-top: 2px;
  line-height: 1;
}

.stat-rank-track-labels .median-label {
  opacity: 0.7;
}

.stat-l5-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.28rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-l5-left {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat-l5-caption {
  font-size: 0.6rem;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-l5-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.stat-l5-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  line-height: 1.1;
}

.stat-l5-delta.delta-positive {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.stat-l5-delta.delta-negative {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.stat-l5-delta.delta-neutral {
  color: var(--text-dim, #71717a);
}

.stat-l5-delta .delta-arrow {
  font-size: 0.52rem;
}

/* ==========================================================================
   §2: IMPACT MODELS PERCENTILE METERS
   ========================================================================== */
.model-meter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.model-meter-bar {
  height: 6px;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 3px;
  min-width: 4px;
}

.model-meter-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ==========================================================================
   §6: TRADE SIMULATOR CTA BUTTON
   ========================================================================== */
.btn-trade-sim {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  background: var(--tappa-orange-subtle, rgba(234, 88, 12, 0.12));
  color: var(--tappa-orange, #ea580c);
  border: 1px solid var(--tappa-orange-border, rgba(234, 88, 12, 0.35));
  border-radius: var(--radius-xs, 4px);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-trade-sim:hover {
  background: var(--tappa-orange, #ea580c);
  color: #ffffff;
  border-color: var(--tappa-orange, #ea580c);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

/* ==========================================================================
   §8: HISTORICAL COMP CARDS
   ========================================================================== */
.comp-item-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  transition: border-color 0.15s ease;
}

.comp-item-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.comp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface-elevated, #18181b);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.comp-match-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.comp-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.comp-stat-chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ==========================================================================
   §9: DEDICATED HISTORICAL SIMILARITY TWINS GRID
   ========================================================================== */
.comps-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  width: 100%;
}

.comps-cards-grid .comp-item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.comps-cards-grid .comp-item-card:hover {
  border-color: var(--tappa-orange, #ea580c);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   LIGHT MODE OVERRIDES ([data-theme="light"])
   ========================================================================== */
[data-theme="light"] .player-stat-ribbon {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .ribbon-stat-item {
  border-right-color: #e2e8f0;
}

[data-theme="light"] .ribbon-stat-key {
  color: #64748b;
}

[data-theme="light"] .ribbon-stat-val {
  color: #0f172a;
}

[data-theme="light"] .player-stories-section {
  border-top-color: #e2e8f0;
}

[data-theme="light"] .player-story-card {
  background: #ffffff;
  border-color: #e2e8f0;
  border-left-color: var(--tappa-orange, #ea580c);
}

[data-theme="light"] .player-story-card:hover {
  background: #f8fafc;
  border-color: rgba(234, 88, 12, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .player-story-title {
  color: #0f172a;
}

[data-theme="light"] .player-story-hook {
  color: #475569;
}

[data-theme="light"] .player-stat-mode-pills {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .player-stat-mode-btn {
  color: #64748b;
}

[data-theme="light"] .player-stat-mode-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

[data-theme="light"] .player-stat-mode-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-rank-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .stat-rank-card:hover {
  border-color: #cbd5e1;
  background: #fafafa;
}

[data-theme="light"] .stat-card-code {
  color: #64748b;
}

[data-theme="light"] .stat-card-label {
  color: #0f172a;
}

[data-theme="light"] .stat-season-caption {
  color: #64748b;
}

[data-theme="light"] .stat-rank-track {
  background: #e2e8f0;
}

[data-theme="light"] .stat-rank-median-tick {
  background: #94a3b8;
}

[data-theme="light"] .stat-rank-track-labels {
  color: #94a3b8;
}

[data-theme="light"] .stat-l5-strip {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .stat-l5-caption {
  color: #64748b;
}

[data-theme="light"] .stat-l5-val {
  color: #0f172a;
}

[data-theme="light"] .comp-item-card,
[data-theme="light"] .comps-cards-grid .comp-item-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .comp-item-card:hover,
[data-theme="light"] .comps-cards-grid .comp-item-card:hover {
  border-color: var(--tappa-orange, #ea580c);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
}

[data-theme="light"] .comp-avatar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .comp-stat-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

/* ==========================================================================
   Skeleton Loading Architecture & Micro-Animations
   ========================================================================== */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

.player-skeleton-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.player-skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.player-skeleton-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.player-skeleton-line {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.player-skeleton-card {
  background: #121216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 8px);
  width: 100%;
  box-sizing: border-box;
}

.player-skeleton-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  background: rgba(18, 18, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm, 6px);
  width: fit-content;
}

.player-skeleton-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(234, 88, 12, 0.25);
  border-top-color: var(--tappa-orange, #ea580c);
  border-radius: 50%;
  animation: skeleton-spin 0.8s linear infinite;
  display: inline-block;
}

/* Light mode overrides for skeleton */
[data-theme="light"] .player-skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 25%,
    rgba(0, 0, 0, 0.08) 37%,
    rgba(0, 0, 0, 0.04) 63%
  );
  background-size: 400% 100%;
}

[data-theme="light"] .player-skeleton-avatar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

[data-theme="light"] .player-skeleton-line {
  background: #e2e8f0;
}

[data-theme="light"] .player-skeleton-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .player-skeleton-status {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* ==========================================================================
   §3 Player Archetype Matchup Cards & Grid
   ========================================================================== */

.archetype-toggle-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(18, 18, 24, 0.7);
  padding: 0.25rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: fit-content;
}

.archetype-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  padding: 0.35rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.archetype-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.archetype-tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: none;
}

.player-archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.archetype-matchup-card {
  background: rgba(22, 22, 28, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md, 8px);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.archetype-matchup-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.archetype-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.archetype-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.archetype-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.archetype-scope-meta {
  font-size: 0.68rem;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.archetype-win-pill {
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.70rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.archetype-win-pill.pill-win {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.archetype-win-pill.pill-loss {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.archetype-win-pill.pill-even {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.archetype-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.archetype-stat-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.archetype-stat-caption {
  font-size: 0.62rem;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.archetype-stat-val {
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.archetype-shooting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  padding: 0.35rem 0.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.archetype-opponents-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.archetype-opponents-title {
  font-size: 0.64rem;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.archetype-opponents-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.archetype-opponent-chip {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

