/**
 * Team Profile — platform-aligned layout (matches Team Rankings / Opening Dashboard)
 */
html:has(body.team-profile-page) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.team-profile-page {
  color: var(--text);
  font-family: var(--font-body, var(--font, system-ui));
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: visible;
  scroll-padding-top: 72px;
  --tp-label-size: 11px;
  --tp-label-desc-size: 11px;
  --tp-helper-size: 12px;
  --tp-band-title-size: 14px;
  --tp-band-hint-size: 14px;
  --tp-note-size: 14px;
  --tp-desc-color: #C4CBD6;
  --tp-note-color: #B8C0CC;
  --tp-stat-value-size: 16px;
  /* Section rhythm — one scale for cards, bands, and stacks */
  --tp-section-gap: 10px;
  --tp-section-pad-y: 14px;
  --tp-section-pad-x: 16px;
  --tp-section-pad-bottom: 16px;
  --tp-section-radius: 14px;
  --tp-band-pad-y: 14px;
  --tp-band-pad-x: 16px;
  --tp-band-pad-bottom: 16px;
  --tp-filter-pad: 12px 14px;
  --tp-filter-gap: 12px;
  --tp-header-gap: 12px;
  --tp-stat-chip-size: 18px;
  /* Split / window / filter toggle buttons — one size everywhere */
  --tp-pill-font-size: 12px;
  --tp-pill-font-weight: 600;
  --tp-pill-padding-y: 6px;
  --tp-pill-padding-x: 14px;
  --tp-pill-min-height: 32px;
  --tp-pill-radius: 12px;
  --tp-pill-row-gap: 10px;
}

.team-profile-page .ca-helper {
  font-size: var(--tp-helper-size);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}

.team-profile-page .ca-section-header,
.team-profile-page .ca-section-head,
.team-profile-page .ca-section-head__body {
  text-align: left;
}

.team-profile-page .ca-section-head .purpose {
  font-size: var(--tp-helper-size, 15px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}

.team-profile-page .tp-control-hint {
  font-size: var(--tp-note-size, 14px);
  line-height: 1.55;
  color: var(--tp-note-color, #B8C0CC);
  text-align: left;
}

.tp-page-guide {
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.tp-page-guide summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3, #9CA3AF);
  padding: 4px 0;
  list-style: none;
}

.tp-page-guide summary::-webkit-details-marker {
  display: none;
}

.tp-page-guide[open] summary {
  margin-bottom: 8px;
}

.tp-page-guide[open] {
  padding: 12px 16px;
  background: rgba(124, 77, 255, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.22);
  border-radius: 12px;
}

.tp-page-guide__lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-1, #F3F4F6);
}

.tp-page-guide__steps {
  margin: 0 0 12px 20px;
  padding: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2, #D1D5DB);
}

.tp-page-guide__steps li {
  margin-bottom: 8px;
}

.tp-page-guide__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3, #9CA3AF);
}

.tp-page-guide__note a {
  color: var(--purple-l, #A78BFA);
  text-decoration: none;
}

.tp-page-guide__note a:hover {
  text-decoration: underline;
}

.tp-unit-guide {
  display: none;
}

.tp-split-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.tp-split-context .tp-platoon-summary,
.tp-split-context .tp-location-summary {
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
  border-radius: 10px;
}

.tp-split-context .tp-platoon-summary-head {
  display: none;
}

.tp-metric-tile-grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.tp-control-hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2, #D1D5DB);
}

.tp-context-controls .tp-control-hint {
  margin: 8px 0 0;
}

.team-profile-page .container.ca-page-shell {
  max-width: 1400px;
  padding: 12px 24px 72px;
  overflow: visible;
  height: auto;
  max-height: none;
}

/* Team hero + unit snapshot — stacked sections (same rhythm as tp-unit-snapshot / tp-section) */
.tp-identity-stack {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
  margin: 0 0 var(--tp-section-gap, 12px);
}

.team-profile-page .profile-offense-sections {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
  margin: 0;
}

#profileHeroMount:empty {
  display: none;
}

/* Hero shell — team picker + banner in one board */
.team-profile-page .tp-hero-banner-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--tp-section-radius, 14px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--purple, #7C4DFF) 38%, rgba(154, 107, 255, 0.45));
  box-shadow:
    0 0 0 1px rgba(196, 176, 255, 0.1),
    0 24px 64px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 76% 70% at 88% 8%, color-mix(in srgb, var(--tp-accent, #7C4DFF) 18%, transparent), transparent 64%),
    linear-gradient(128deg, #171A2A 0%, #0B0E18 52%, #05060C 100%);
}

.team-profile-page .tp-hero-search {
  position: relative;
  z-index: 55;
  width: 100%;
  max-width: none;
  padding: 10px 18px 6px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.team-profile-page .tp-hero-search::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent 72%);
}

.team-profile-page .tp-hero-search .tp-team-picker {
  width: 100%;
}

.team-profile-page .tp-hero-search .tp-team-picker__trigger {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.team-profile-page .tp-hero-search .tp-team-picker__trigger:hover,
.team-profile-page .tp-hero-search .tp-team-picker.is-open .tp-team-picker__trigger,
.team-profile-page .tp-hero-search .tp-team-picker__trigger:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border: none;
  box-shadow: inset 0 0 0 1px rgba(154, 107, 255, 0.28);
}

.team-profile-page .tp-hero-search .tp-team-picker__panel {
  z-index: 60;
}

.team-profile-page .tp-hero-banner-shell .tp-team-banner,
.team-profile-page .tp-hero-banner-shell .tp-team-banner--hero {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.team-profile-page .tp-hero-banner-shell .tp-team-banner--hero {
  padding-top: 14px;
}

.team-profile-page .tp-section[data-tp-section="offense-profile"] .tp-section-filter-bar {
  margin: 0 0 14px;
}

/* Team banner — editorial hero, no outer frame */
.tp-team-banner {
  position: relative;
  padding: var(--tp-section-pad-y, 14px) var(--tp-section-pad-x, 16px) var(--tp-section-pad-bottom, 16px);
  background: var(--bg-2, #0E1018);
  border: none;
  border-radius: var(--tp-section-radius, 14px);
  margin: 0;
  overflow: hidden;
}

.tp-team-banner--hero {
  padding: 20px 22px 18px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(
    128deg,
    color-mix(in srgb, var(--tp-accent, #7C4DFF) 10%, var(--bg-2, #0E1018)) 0%,
    var(--bg-2, #0E1018) 42%,
    color-mix(in srgb, var(--bg-3, #12141D) 92%, var(--tp-accent, #7C4DFF) 8%) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 48px -28px color-mix(in srgb, var(--tp-accent, #7C4DFF) 35%, transparent);
}

.tp-team-banner__ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% -10%, color-mix(in srgb, var(--tp-accent, #7C4DFF) 22%, transparent), transparent 58%),
    radial-gradient(ellipse 40% 60% at 0% 100%, color-mix(in srgb, var(--tp-accent, #7C4DFF) 10%, transparent), transparent 55%);
  pointer-events: none;
}

.tp-team-banner__watermark {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
}

.tp-team-banner__watermark-img,
.tp-team-banner__watermark .team-logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.tp-team-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 24px;
}

.tp-team-banner__inner--solo {
  justify-content: flex-start;
}

.tp-identity-stack--hero-only {
  gap: 12px;
  margin-bottom: 12px;
}

.tp-identity-stack--hero-only #tpContextBar,
.tp-identity-stack--hero-only #tpUnitSnapshot {
  display: none !important;
}

.tp-team-banner__identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.tp-team-banner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 16px;
}

.tp-team-banner__copy {
  min-width: 0;
  flex: 1;
}

.tp-team-banner__eyebrow {
  margin: 0 0 6px;
}

.tp-team-banner__title {
  font-family: var(--font-display, var(--display));
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
  color: var(--text, #F5F6FA);
}

.tp-team-banner--hero .tp-team-banner__title {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 4px;
}

.tp-team-banner__sub {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3, #9CA3AF);
}

.tp-team-banner__badge {
  display: inline-flex;
  margin-top: 2px;
}

.tp-team-banner__medallion {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-3, #12141D) 80%, var(--tp-accent, #7C4DFF) 20%);
  border: 1px solid color-mix(in srgb, var(--tp-accent, #7C4DFF) 38%, var(--border, #262A38));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px -14px color-mix(in srgb, var(--tp-accent, #7C4DFF) 50%, transparent);
}

.tp-team-banner__medallion-k {
  font-family: var(--font-display, var(--display));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3, #9CA3AF);
}

.tp-team-banner__medallion .chip {
  font-size: 16px;
  font-weight: 800;
  padding: 6px 14px;
  min-width: 72px;
  text-align: center;
}

.tp-team-banner__medallion-rank {
  font-family: var(--font-display, var(--display));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-2, #D1D5DB);
}

.tp-team-banner__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-team-banner__logo-img,
.tp-team-banner__logo .team-logo,
.tp-team-banner__logo .snapshot-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.92;
}

.tp-team-banner--hero .tp-team-banner__logo-img,
.tp-team-banner--hero .tp-team-banner__logo .team-logo,
.tp-team-banner--hero .tp-team-banner__logo .snapshot-logo {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 6px 22px color-mix(in srgb, var(--tp-accent, #7C4DFF) 42%, transparent));
  opacity: 1;
}

.tp-team-banner__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tp-team-banner__stats--hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: var(--tp-header-gap, 12px);
  padding-top: var(--tp-header-gap, 12px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  grid-template-columns: none;
}

.tp-team-banner__stats .tp-hero-stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
  box-shadow: none;
}

.tp-team-banner__stats .tp-hero-stat__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-1, #F3F4F6);
  margin-bottom: 8px;
}

.tp-team-banner__stats .tp-hero-stat__value {
  display: block;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-value-size, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-1, #F3F4F6);
}

.tp-team-banner__stats .tp-hero-stat__value .chip {
  font-size: 16px;
  font-weight: 800;
  padding: 5px 12px;
  min-width: 56px;
  text-align: center;
}

.tp-team-banner__stats .tp-hero-stat--positive .tp-hero-stat__value,
.tp-team-banner__stats .tp-hero-stat--elite .tp-hero-stat__value { color: var(--green, #4ADE80); }
.tp-team-banner__stats .tp-hero-stat--negative .tp-hero-stat__value { color: var(--red-l, #F87171); }
.tp-team-banner__stats .tp-hero-stat--strong .tp-hero-stat__value { color: #86EFAC; }
.tp-team-banner__stats .tp-hero-stat--solid .tp-hero-stat__value { color: var(--gold, #FBBF24); }
.tp-team-banner__stats .tp-hero-stat--mid .tp-hero-stat__value { color: var(--text-1, #E5E7EB); }
.tp-team-banner__stats .tp-hero-stat--weak .tp-hero-stat__value { color: var(--red-l, #FCA5A5); }
.tp-team-banner__stats .tp-hero-stat--neutral .tp-hero-stat__value { color: var(--text-1, #F3F4F6); }

@media (max-width: 767px) {
  .tp-team-banner__head {
    flex-wrap: wrap;
  }
  .tp-team-banner__logo {
    order: -1;
    width: 100%;
    justify-content: flex-start;
  }
  .tp-team-banner__stats {
    grid-template-columns: 1fr;
  }

  .tp-team-banner--hero .tp-team-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .tp-team-banner--hero .tp-team-banner__medallion {
    align-self: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
    padding: 12px 14px;
  }

  .tp-team-banner--hero .tp-team-banner__medallion .chip {
    font-size: 16px;
    padding: 4px 10px;
  }

  .tp-team-banner__watermark {
    right: -4%;
    opacity: 0.04;
  }
}

.tp-snapshot-card .tp-team-banner {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 0 16px;
  border-radius: 0;
}

.tp-profile-toolbar {
  margin-bottom: 10px;
}

.tp-profile-toolbar .tp-context-strip {
  border-radius: 14px;
}

.tp-sticky-wrap {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: var(--bg, #08090F);
  padding: 0 0 8px;
  margin-bottom: var(--tp-section-gap, 12px);
  overflow: visible;
}

.tp-context-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  padding: 16px 18px 18px;
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 14px;
}

.tp-context-picker {
  position: relative;
  z-index: 50;
  width: 100%;
  max-width: 420px;
  overflow: visible;
}

.tp-context-wrc {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 18px 12px;
  background: var(--bg-2, #0E1018);
  border-left: 1px solid var(--border, #262A38);
  border-right: 1px solid var(--border, #262A38);
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}

.tp-context-wrc[hidden] {
  display: none;
}

.tp-context-wrc-medallion {
  padding: 8px 14px;
  min-width: 88px;
}

.tp-context-wrc-medallion .v .chip {
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 800;
}

.tp-hero-record {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-1, #F3F4F6);
  letter-spacing: 0.02em;
}

/* Hub filter bars — match Team Rankings / platform hub-control-bar */
.tp-hub-bar,
.tp-section-filter-bar {
  margin: 0 0 var(--tp-filter-gap, 12px);
  padding: var(--tp-filter-pad, 12px 14px);
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #2A2A35);
  border-radius: 12px;
  box-shadow: var(--e-1, none);
  position: relative;
  overflow: hidden;
}

.tp-section-filter-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple, #7C4DFF), transparent 72%);
  pointer-events: none;
}

.tp-section-filter-bar--context {
  margin-bottom: var(--tp-header-gap, 14px);
}

.tp-section-filter-bar--context .tp-filter-groups-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: flex-end;
}

.tp-section-filter-bar--context .hub-ctrl-group {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
}

.tp-section-filter-bar--context .hub-pill-row {
  gap: 10px;
}

.tp-section-filter-bar--context .tp-control-hint {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border, #2A2A35) 88%, transparent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--tp-note-color, #B8C0CC);
}

.tp-lineup-context-bar:not([hidden]) {
  display: block;
}

.tp-section-filter-bar--identity {
  margin: 0 0 12px;
}

.tp-hub-bar .hub-ctrl-group,
.tp-section-filter-bar .hub-ctrl-group,
.tp-hub-bar .tp-section-ctrl,
.tp-section-filter-bar .tp-section-ctrl {
  width: 100%;
  gap: 8px;
}

.team-profile-page .ca-section-header .ca-eyebrow {
  margin-bottom: 6px;
}

.tp-hub-bar .hub-ctrl-label,
.tp-section-filter-bar .hub-ctrl-label {
  font-size: var(--tp-label-size, 11px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-note-color, #B8C0CC);
  margin-bottom: 8px;
}

.tp-hub-bar .hub-pill-row,
.tp-section-filter-bar .hub-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-pill-row-gap, 10px);
}

/* Unified split / window / filter toggle sizing */
body.team-profile-page :is(
  #profileControlBar,
  .profile-context-bar,
  .tp-section-filter-bar,
  .tp-hub-bar,
  .tp-context-controls,
  .tp-control-cell--split,
  .tp-control-cell--window,
  .tp-control-cell--section,
  .tp-section .ca-section-header__actions
) .hub-pill-row {
  gap: var(--tp-pill-row-gap, 10px);
}

body.team-profile-page :is(
  #profileControlBar,
  .profile-context-bar,
  .tp-section-filter-bar,
  .tp-hub-bar,
  .tp-context-controls,
  .tp-control-cell--split,
  .tp-control-cell--window,
  .tp-control-cell--section,
  .tp-section .ca-section-header__actions
) .hub-pill {
  min-height: var(--tp-pill-min-height, 44px);
  padding: var(--tp-pill-padding-y, 11px) var(--tp-pill-padding-x, 20px);
  font-size: var(--tp-pill-font-size, 14px);
  font-weight: var(--tp-pill-font-weight, 600);
  border-radius: var(--tp-pill-radius, 12px);
  line-height: 1.25;
}

.tp-context-strip--picker {
  display: block;
}

.tp-context-strip--picker .tp-context-picker {
  width: 100%;
}

/* Section-level split / window controls */
.tp-section .ca-section-header__actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border, #262A38) 88%, transparent);
}

.tp-section-ctrl {
  width: 100%;
}

.tp-section-ctrl .hub-pill-row {
  flex-wrap: wrap;
}

.tp-section-ctrl .hub-pill {
  width: auto;
}

.tp-section[data-tp-section="rolling-trend"] .tp-trend-table-wrap {
  margin-top: 4px;
}

.tp-context-controls {
  width: 100%;
  min-width: 0;
}

.tp-context-controls .hub-control-bar {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.tp-context-controls .tp-split-window-cell {
  min-width: 0;
}

.tp-context-controls .tp-split-window-cell .hub-ctrl-group {
  width: 100%;
}

.tp-context-controls .tp-split-window-row {
  grid-template-columns: 1fr;
  gap: 18px;
  justify-content: stretch;
  align-items: stretch;
}

@media (min-width: 900px) {
  .tp-context-controls .tp-split-window-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 20px 36px;
  }
}

.tp-context-controls .hub-ctrl-group {
  gap: 12px;
  min-width: 0;
}

.tp-context-controls .hub-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-pill-row-gap, 10px);
}

.tp-context-controls .hub-ctrl-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.tp-unit-nav {
  padding: 10px 12px;
  margin-bottom: var(--tp-filter-gap, 12px);
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.tp-unit-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple, #7C4DFF), transparent 72%);
  pointer-events: none;
}

.tp-unit-nav-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.tp-unit-nav .hub-pill,
.tp-unit-nav .tp-unit-tab {
  width: 100%;
  min-height: 36px;
  padding: 8px 14px;
  margin: 0;
  border-radius: 12px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.tp-unit-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--purple-2, #9A6BFF);
  opacity: 0.85;
}

.tp-unit-nav .tp-unit-tab.active .tp-unit-tab-icon,
.tp-unit-nav .hub-pill.active .tp-unit-tab-icon {
  opacity: 1;
  color: var(--purple-1, #B794FF);
}

.tp-unit-tab-label {
  font-weight: 700;
  font-size: 13px;
}

.tp-unit-tab-hint {
  display: none;
}

.tp-unit-nav .hub-pill.active,
.tp-unit-nav .tp-unit-tab.active {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.45), rgba(91, 43, 224, 0.35));
  box-shadow:
    0 6px 24px -8px rgba(124, 77, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  border-color: rgba(154, 107, 255, 0.55);
  color: #E9D5FF;
}

.tp-unit-snapshot {
  padding: 12px 18px 16px;
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 14px;
  margin: 0 0 16px;
}

.tp-unit-snapshot--below-hero {
  margin: 0;
  padding: 14px 18px 16px;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--border, #262A38);
  background: transparent;
}

.tp-unit-snapshot--below-hero .tp-intel-status,
.tp-unit-snapshot--below-hero .tp-lineup-identity {
  margin-bottom: 16px;
}

.tp-unit-snapshot--below-hero .tp-lineup-identity {
  margin-top: 2px;
}

.tp-unit-snapshot .tp-offense-split-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #262A38);
}

.tp-offense-split-summary__label {
  margin: 0 0 8px;
}

.tp-unit-snapshot .tp-split-context {
  margin-bottom: 0;
  gap: 10px;
}

.tp-unit-snapshot .tp-platoon-summary,
.tp-unit-snapshot .tp-location-summary {
  padding: 12px 14px;
}

.tp-unit-snapshot .tp-platoon-summary-detail,
.tp-unit-snapshot .tp-platoon-summary-lead {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-1, #E5E7EB);
}

.tp-unit-snapshot .tp-intel-read--split {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-1, #E5E7EB);
  border-radius: 10px;
  background: color-mix(in srgb, var(--purple, #7C4DFF) 6%, var(--bg-3));
  border-left: 3px solid var(--purple, #7C4DFF);
}

.tp-unit-snapshot--solo {
  margin-bottom: 16px;
}

.tp-unit-snapshot:has(.tp-identity-panel) {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.tp-unit-snapshot--banner {
  margin: 0;
  padding: 14px 18px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.tp-unit-snapshot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 767px) {
  .tp-unit-snapshot-row {
    grid-template-columns: 1fr;
  }
}

.tp-unit-chip {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2, #101015);
  border: 1px solid var(--border, #2A2A35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-unit-chip-k {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-1, #F3F4F6);
  margin-bottom: 0;
  line-height: 1.35;
}

.tp-unit-chip-v {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tp-unit-chip-v .chip {
  font-family: var(--font-display);
  font-size: var(--tp-stat-value-size);
  font-weight: 800;
  padding: 6px 12px;
  flex-shrink: 0;
}

.tp-unit-chip-rank {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  text-align: right;
  line-height: 1.15;
}

.tp-unit-chip-rank__num {
  font-family: var(--font-display, var(--display, "Roboto Condensed", sans-serif));
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-1, #F3F4F6);
}

.tp-unit-chip-rank__of {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3, #9CA3AF);
}

.tp-unit-chip-rank--elite .tp-unit-chip-rank__num { color: #4ade80; }
.tp-unit-chip-rank--strong .tp-unit-chip-rank__num { color: #93c5fd; }
.tp-unit-chip-rank--mid .tp-unit-chip-rank__num { color: #fbbf24; }
.tp-unit-chip-rank--weak .tp-unit-chip-rank__num { color: #f87171; }

.tp-sticky-wrap .tp-team-bar {
  margin-bottom: 0;
  border-radius: 14px 14px 0 0;
  border-bottom: none;
  padding-bottom: 12px;
}

.tp-sticky-wrap #profileControlBar .hub-control-bar {
  border-radius: 0 0 14px 14px;
  margin-top: 0;
  border-top: none;
  box-shadow: none;
}

.tp-sticky-wrap .tp-team-bar,
.tp-sticky-wrap #profileControlBar .hub-control-bar {
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
}

.tp-sticky-wrap #profileControlBar .hub-control-bar {
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}

.tp-team-bar {
  margin-bottom: 10px;
  padding: 14px 16px 10px;
}

.tp-team-bar .hub-control-row {
  margin-bottom: 0;
  align-items: flex-end;
}

.tp-team-picker-group {
  flex: 1;
  min-width: min(100%, 320px);
  max-width: 420px;
}

/* Searchable team picker */
.tp-team-picker {
  position: relative;
  width: 100%;
}

.tp-team-picker__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--border, #262A38);
  border-radius: 12px;
  background: var(--bg-3, #12141D);
  color: var(--text, #F5F5F7);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tp-team-picker__trigger:hover {
  border-color: var(--border-2, #363b4d);
  background: var(--bg-4, #1C1C25);
}

.tp-team-picker.is-open .tp-team-picker__trigger,
.tp-team-picker__trigger:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--purple, #7C4DFF) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple, #7C4DFF) 22%, transparent);
}

.tp-team-picker__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tp-team-picker__logo img,
.tp-picker-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tp-team-picker__text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tp-team-picker__abbr {
  font-family: var(--font-display, var(--display));
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  flex-shrink: 0;
}

.tp-team-picker__sep {
  color: var(--text-3, #71717A);
  font-weight: 600;
  flex-shrink: 0;
}

.tp-team-picker__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2, #A1A1AA);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-team-picker__chev {
  flex-shrink: 0;
  color: var(--text-3, #71717A);
  transition: transform 0.15s ease, color 0.15s ease;
}

.tp-team-picker.is-open .tp-team-picker__chev {
  transform: rotate(180deg);
  color: var(--purple, #9A6BFF);
}

.tp-team-picker__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 14px;
  box-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--purple, #7C4DFF) 18%, transparent);
  overflow: hidden;
}

.tp-team-picker__search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #262A38);
  background: var(--bg-3, #12141D);
}

.tp-team-picker__search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-3, #71717A);
  flex-shrink: 0;
}

.tp-team-picker__search {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text, #F5F5F7);
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  min-width: 0;
}

.tp-team-picker__search::placeholder {
  color: var(--text-3, #71717A);
}

.tp-team-picker__search:focus {
  outline: none;
}

.tp-team-picker__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(320px, 50vh);
  overflow-y: auto;
}

.tp-team-picker__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.tp-team-picker__opt:hover,
.tp-team-picker__opt.is-highlight {
  background: rgba(124, 77, 255, 0.1);
}

.tp-team-picker__opt.is-selected {
  background: rgba(124, 77, 255, 0.16);
  box-shadow: inset 2px 0 0 var(--purple, #7C4DFF);
}

.tp-team-picker__opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tp-team-picker__opt-abbr {
  font-family: var(--font-display, var(--display));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.tp-team-picker__opt-name {
  font-size: 12px;
  color: var(--text-2, #A1A1AA);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-team-picker__empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3, #71717A);
}

@media (max-width: 767px) {
  .tp-team-picker-group {
    max-width: none;
  }

  .tp-team-picker__name {
    display: none;
  }

  .tp-team-picker__sep {
    display: none;
  }
}

#profileControlBar .hub-control-bar,
#profileControlBar .tp-filter-bar {
  border-radius: 12px;
}

.profile-offense-block {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
  margin-bottom: var(--tp-section-gap, 12px);
  overflow: visible;
}

.profile-offense-block--aux:empty,
.profile-offense-block--aux:not(:has(#tpAnalystTakeMount:not(:empty))) {
  display: none;
}

.profile-offense-sections {
  margin: 0;
}

.tp-identity-stack .profile-offense-sections .tp-section:first-child {
  margin-top: 0;
}

.tp-identity-stack .profile-offense-sections [data-tp-section="offense-profile"] {
  margin-top: 0;
}

.profile-staff-block {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
  margin-bottom: var(--tp-section-gap, 12px);
  overflow: visible;
}

.profile-lineup-footer {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
  margin-bottom: var(--tp-section-gap, 12px);
  overflow: visible;
}

.profile-lineup-footer:empty {
  display: none;
}

.profile-staff-block .tp-section:first-child {
  margin-top: 0;
}

.profile-staff-block .tp-intel-section {
  margin-top: 0;
}

.tp-batting-qualified {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
}

.tp-batting-section .tp-section-filter-bar--batting {
  margin: 0 0 var(--tp-header-gap, 12px);
}

.tp-batting-split {
  display: flex;
  flex-direction: column;
  gap: var(--tp-header-gap, 12px);
}

.tp-batting-split + .tp-batting-split {
  padding-top: 0;
  border-top: none;
}

.tp-batting-split__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tp-batting-split__title {
  margin: 0;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-band-title-size, 14px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
}

.tp-batting-split__hint {
  margin: 0;
}

.tp-batting-pane {
  padding: 0 0 4px;
}

.tp-batting-pane[hidden] {
  display: none;
}

.tp-rate-stat {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-1, #E5E7EB);
}

.tp-batting-section .num .chip {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  min-width: 3.25rem;
}

.tp-batter-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tp-sp-player-cell {
  min-width: 168px;
}

.tp-batter-player-cell .tp-batter-avatar,
.tp-batter-player-cell .tp-sp-avatar,
.tp-batter-player-cell .ca-pitcher-avatar--matchup,
.tp-batter-player-cell .headshot-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.tp-batter-player-cell .ca-pitcher-avatar--matchup img,
.tp-batter-player-cell .tp-batter-avatar,
.tp-batter-player-cell .tp-sp-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.tp-batter-player-link,
.tp-sp-player-link {
  font-weight: 600;
  color: var(--ca-purple-light, #C4B0FF);
  text-decoration: none;
  line-height: 1.3;
}

.tp-batter-player-link:hover,
.tp-sp-player-link:hover {
  color: #fff;
  text-decoration: underline;
}

.tp-rotation-section .tp-sp-player-link {
  font-weight: 700;
  color: #fff;
}
.tp-rotation-section .tp-sp-player-link:hover {
  color: #fff;
  text-decoration: underline;
}
.tp-rotation-section .tp-sp-player-link__cue {
  color: rgba(255, 255, 255, 0.55);
}
.tp-rotation-section .tp-sp-player-link:hover .tp-sp-player-link__cue {
  color: rgba(255, 255, 255, 0.9);
}
.tp-sp-player-hand {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ca-purple-light, #C4B0FF);
  letter-spacing: 0.02em;
}

.tp-rotation-section .profile-table td:first-child {
  min-width: 168px;
}

.tp-bullpen-section .profile-table td:first-child {
  min-width: 168px;
}

.tp-batting-section .profile-table td:first-child + td + td,
.tp-batting-section .profile-table th:nth-child(3) {
  min-width: 168px;
}

.tp-staff-links {
  margin-top: 12px;
}

.tp-staff-links a {
  color: var(--purple, #9A6BFF);
  font-weight: 600;
  text-decoration: none;
}

.tp-staff-links a:hover {
  text-decoration: underline;
}

.tp-snapshot-card {
  padding: 0;
  overflow: visible;
  margin-bottom: 16px;
}

.tp-snapshot-card .team-snapshot {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 20px 22px 8px;
}

.tp-section {
  padding: var(--tp-section-pad-y, 14px) var(--tp-section-pad-x, 16px) var(--tp-section-pad-bottom, 16px);
  margin-bottom: 0;
}

.team-profile-page .profile-offense-block .tp-section,
.team-profile-page .profile-offense-sections .tp-section,
.team-profile-page .profile-staff-block .tp-section {
  margin-bottom: 0;
}

.team-profile-page .tp-section.ca-board {
  padding: var(--tp-section-pad-y, 12px) var(--tp-section-pad-x, 14px) var(--tp-section-pad-bottom, 14px);
  border-radius: var(--tp-section-radius, 12px);
  border-width: 1px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), transparent 26%),
    linear-gradient(180deg, var(--ca-board-top, #181A2A), var(--ca-board-bottom, #05060C));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.52);
}

.team-profile-page .tp-section.ca-card {
  padding: var(--tp-section-pad-y, 14px) var(--tp-section-pad-x, 16px) var(--tp-section-pad-bottom, 16px);
  border-radius: var(--tp-section-radius, 14px);
}

.team-profile-page .tp-section:hover {
  transform: none;
}

.tp-section .ca-section-header {
  margin-bottom: var(--tp-header-gap, 12px);
}

/* ── Team Profile heading system — Matchups chrome treatment ── */
.team-profile-page {
  --tp-chrome-title: linear-gradient(180deg, #FFFFFF 0%, #E9EAF0 38%, #9DA0AE 56%, #D7D9E2 72%, #FFFFFF 100%);
}

.team-profile-page #profilePageHeader .ca-page-header {
  margin: 0 0 28px;
  padding: 8px 0 0;
  border: none;
  background: none;
  box-shadow: none;
}

.team-profile-page #profilePageHeader .ca-eyebrow,
.team-profile-page .ca-section-header .ca-eyebrow,
.team-profile-page .ca-section-head .kicker,
.team-profile-page .tp-team-banner__eyebrow {
  font-family: var(--font-display, var(--display));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ca-purple-light, #C4B0FF);
  margin: 0 0 6px;
  line-height: 1.35;
}

.team-profile-page #profilePageHeader h1.ca-page-title {
  font-family: var(--font-display, var(--display));
  font-size: clamp(2rem, 4vw, 3.375rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  background: var(--tp-chrome-title) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.team-profile-page #profilePageHeader .ca-page-header__sub,
.team-profile-page #profilePageHeader .ca-helper {
  display: none;
}

.team-profile-page .tp-section .ca-section-title,
.team-profile-page .tp-summary-head .ca-section-title,
.team-profile-page .ca-section-head .title {
  font-family: var(--font-display, var(--display));
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin: 0 0 2px;
  background: var(--tp-chrome-title) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.team-profile-page .ca-profile-hero__title {
  font-family: var(--font-display, var(--display));
  font-size: clamp(1.85rem, 3.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
  color: var(--text, #F5F6FA) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--text, #F5F6FA) !important;
}

.team-profile-page .tp-section .ca-section-header .ca-helper,
.team-profile-page .tp-summary-head .ca-helper,
.team-profile-page .tp-summary-head .tp-summary-filter {
  font-size: var(--tp-helper-size, 12px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  max-width: 720px;
  margin: 0;
}

.team-profile-page .ca-section-header .ca-helper {
  margin-top: 8px;
}

.tp-table-wrap {
  margin-top: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.tp-table-wrap::before {
  display: none;
}

.tp-table.hub-table thead th {
  font-size: 10px;
  padding: 8px 10px;
  letter-spacing: 0.08em;
}

.tp-table.hub-table tbody td {
  font-family: var(--font-display, var(--display));
  font-size: 13px;
  padding: 8px 10px;
}

.tp-table.hub-table tbody td:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1, #F3F4F6);
}

.tp-table.hub-table tbody td.num .chip {
  font-size: 13px;
  padding: 3px 8px;
}

.tp-table.hub-table a {
  color: var(--purple, #9A6BFF);
  text-decoration: none;
  font-weight: 600;
}

.tp-table.hub-table a:hover {
  text-decoration: underline;
}

.tp-rotation-section .tp-rotation-launch-table a.tp-rotation-sp-link {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.tp-rotation-section .tp-rotation-launch-table a.tp-rotation-sp-link:hover {
  color: #fff;
  text-decoration: underline;
}
.tp-rotation-section .tp-rotation-launch-table .tp-sp-player-hand {
  color: var(--ca-purple-light, #C4B0FF);
}

.tp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: var(--tp-section-gap, 12px);
  margin-bottom: var(--tp-header-gap, 12px);
}

.tp-kpi-card {
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 12px;
  padding: 12px 14px;
}

.tp-kpi-card .m-label,
.tp-kpi-card .tp-kpi-lab {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.tp-kpi-card .m-val .chip {
  font-size: var(--tp-stat-chip-size, 15px);
  font-weight: 800;
  padding: 4px 10px;
}

.tp-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.tp-data-banner {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid rgba(232, 194, 74, 0.35);
  background: rgba(232, 194, 74, 0.08);
  color: var(--gold, #E8C24A);
}

.tp-data-banner.show {
  display: block;
}

.tp-platoon-callout {
  margin-bottom: 14px;
}

.tp-platoon-summary {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
  border-radius: 10px;
}

.tp-platoon-summary-head {
  margin-bottom: 8px;
}

.tp-subsection-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3, #71717A);
}

.tp-subsection-head__label {
  line-height: 1.2;
}

.tp-platoon-summary-lead,
.tp-platoon-summary-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2, #A1A1AA);
}

.tp-platoon-summary-detail {
  margin-top: 6px;
  font-size: 12px;
}

.tp-platoon-summary-lead strong,
.tp-platoon-summary-detail strong {
  color: var(--text, #F4F4F5);
  font-weight: 600;
}

.tp-platoon-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  margin-right: 8px;
  letter-spacing: 0.02em;
}

.tp-platoon-tag--strong {
  color: var(--green, #22C55E);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.tp-platoon-tag--weak {
  color: var(--gold, #E8C24A);
  background: rgba(232, 194, 74, 0.08);
  border: 1px solid rgba(232, 194, 74, 0.2);
}

.tp-location-summary {
  margin-top: 10px;
}

.tp-matchup-panel {
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.tp-matchup-panel p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-2);
}

.tp-matchup-panel p strong {
  color: var(--text);
}

.tp-matchup-panel .ca-btn {
  margin-top: 12px;
}

/* Accordions — platform card feel */
.mini-dashboards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-accordion {
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border, #262A38);
  border-radius: 14px;
  overflow: hidden;
}

.metric-accordion summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  font-family: var(--font-display, var(--display));
}

.metric-accordion summary::-webkit-details-marker {
  display: none;
}

.metric-accordion .ma-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.metric-accordion .ma-body {
  padding: 0 18px 18px;
  font-size: 12px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

/* Window / platoon mini blocks */
.tp-window-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 767px) {
  .tp-window-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-profile-page .container.ca-page-shell {
    padding: 16px 14px 56px;
  }
}

.tp-window-cell {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.tp-window-cell .w-label {
  font-size: var(--tp-label-size);
  color: var(--text-2, #D1D5DB);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.tp-window-cell .w-val .chip {
  font-size: 16px;
}

.tp-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 700px) {
  .tp-split-grid {
    grid-template-columns: 1fr;
  }
}

.tp-split-panel {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.tp-split-panel h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}

.tp-mini-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tp-mini-stat {
  flex: 1;
  min-width: 72px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.tp-mini-stat .ms-label {
  font-size: var(--tp-label-size);
  color: var(--text-2, #D1D5DB);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.tp-mini-stat .ms-val .chip {
  font-size: 15px;
}

.tp-platoon-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-3);
  margin-top: 12px;
  overflow: hidden;
  display: flex;
}

.tp-platoon-bar .rhp {
  background: var(--blue, #60A5FA);
}

.tp-platoon-bar .lhp {
  background: var(--gold, #E8C24A);
}

/* Profile control bar — hub pattern */
#profileControlBar .hub-control-bar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 14px 16px 12px;
}

#profileControlBar .hub-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

#profileControlBar .hub-ctrl-label {
  font-size: var(--tp-label-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2, #D1D5DB);
  line-height: 1.2;
}

.tp-control-bar .tp-control-matrix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "split window"
    "section section";
  column-gap: 20px;
  row-gap: 14px;
  align-items: start;
}

.tp-control-cell--split { grid-area: split; }
.tp-control-cell--window { grid-area: window; }

.tp-control-cell--section {
  grid-area: section;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.tp-control-cell--section .hub-ctrl-group {
  gap: 10px;
}

.tp-control-cell--section .hub-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-pill-row-gap, 10px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.tp-control-cell--section .hub-pill {
  width: auto;
  margin: 0;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.tp-control-cell--section .hub-pill.active {
  box-shadow:
    0 6px 24px -8px rgba(124, 77, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

@media (max-width: 820px) {
  .tp-control-bar .tp-control-matrix {
    grid-template-columns: 1fr;
    grid-template-areas:
      "split"
      "window"
      "section";
    column-gap: 0;
  }

  .tp-control-cell--section {
    padding-top: 12px;
  }

  .tp-control-cell--section .hub-pill-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .tp-sticky-wrap .tp-team-bar,
  .tp-sticky-wrap #profileControlBar .hub-control-bar {
    border-radius: 14px;
    border: 1px solid var(--border);
  }

  .tp-sticky-wrap .tp-team-bar {
    margin-bottom: 10px;
  }

  .tp-sticky-wrap #profileControlBar .hub-control-bar {
    border-top: 1px solid var(--border);
  }
}

#profileControlBar .hub-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-start;
}

#profileControlBar .hub-control-row.tp-split-window-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 900px) {
  #profileControlBar .hub-control-row.tp-split-window-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 20px 36px;
  }
}

#profileControlBar .hub-confirm {
  font-size: 11px;
  color: var(--text-3);
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}

#profileControlBar .hub-confirm strong {
  color: var(--text);
}

#profileControlBar .pc-team-snapshot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  width: 100%;
}

#profileControlBar .pc-team-snapshot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
  font-family: var(--font-display);
  font-weight: 700;
}

#profileControlBar .pc-split-compare {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-family: var(--font-display);
  color: var(--text-2);
}

#profileControlBar .pc-spark-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

#profileControlBar .mlbma-sparkline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#profileControlBar .mlbma-spark-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-3);
  min-width: 28px;
}

#profileControlBar .mlbma-spark-val {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

#profileControlBar .pc-tonight-chip {
  font-size: 11px;
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}

#profileControlBar .hub-pill.warn {
  color: var(--gold, #E8C24A);
}

#profileControlBar .hub-pill.warn.active {
  border-color: var(--gold, #E8C24A);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #E8C24A) 45%, transparent);
}

.pill-tonight,
.pill-platoon,
.pill-hot,
.pill-cold {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.pill-tonight {
  background: rgba(60, 203, 127, 0.12);
  color: var(--green, #3CCB7F);
  border: 1px solid rgba(60, 203, 127, 0.35);
}

.pill-platoon {
  background: rgba(232, 194, 74, 0.12);
  color: var(--gold, #E8C24A);
  border: 1px solid rgba(232, 194, 74, 0.35);
}

.pill-hot {
  background: rgba(242, 84, 91, 0.12);
  color: var(--red, #F2545B);
  border: 1px solid rgba(242, 84, 91, 0.35);
}

.pill-cold {
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue, #60A5FA);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.tier-badge,
.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* Launchpad button into a dedicated profile page (Pitcher / Bullpen Profile). */
.tp-profile-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #C4B0FF;
  background: rgba(124, 77, 255, 0.14);
  border: 1px solid rgba(124, 77, 255, 0.42);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.tp-profile-launch:hover {
  background: rgba(124, 77, 255, 0.24);
  border-color: rgba(124, 77, 255, 0.7);
  color: #E2D6FF;
}
.tp-profile-launch:active { transform: translateY(1px); }
.tp-profile-launch__arrow { font-weight: 800; }
/* Neutral (ungraded) stat value — e.g. Avg IP/Start, which has no 0-100 grade. */
.tp-stat-plain {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-1, #E5E7EB);
}
.tp-staff-launch-hint {
  margin: 4px 0 10px;
  font-size: 12px;
  color: var(--text-3, #8A8A99);
}

.tp-staff-launch-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.1);
  border: 1px solid rgba(124, 77, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.tp-staff-launch-callout__text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2, #B8B8C6);
}
.tp-staff-launch-callout__text strong {
  color: #E2D6FF;
  font-weight: 700;
}

.tp-rotation-launch-table tbody tr.tp-rotation-launch-row {
  cursor: pointer;
  transition: background 0.12s ease;
}
.tp-rotation-launch-table tbody tr.tp-rotation-launch-row:hover {
  background: rgba(124, 77, 255, 0.08);
}
.tp-rotation-launch-table .tp-profile-action {
  width: 88px;
  text-align: right;
  white-space: nowrap;
}
.tp-sp-player-link__cue {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(196, 176, 255, 0.72);
  transition: color 0.12s ease, transform 0.12s ease;
}
.tp-sp-player-link:hover .tp-sp-player-link__cue {
  color: #fff;
  transform: translateX(2px);
}

.tier-elite { background: rgba(74, 222, 128, 0.18); color: #4ADE80; }
.tier-high, .tier-solid { background: rgba(134, 239, 172, 0.15); color: #86EFAC; }
.tier-dangerous, .tier-danger { background: rgba(251, 191, 36, 0.15); color: #FBBF24; }
.tier-inconsistent, .tier-incon, .tier-mid { background: rgba(113, 113, 122, 0.2); color: #A1A1AA; }
.tier-weak { background: rgba(248, 113, 113, 0.15); color: #F87171; }
.tier-ace { background: rgba(74, 222, 128, 0.18); color: #4ADE80; }
.tier-average { background: rgba(251, 191, 36, 0.12); color: #FBBF24; }
.tier-volatile { background: rgba(248, 113, 113, 0.15); color: #F87171; }
.tier-avg { background: rgba(251, 191, 36, 0.15); color: #FBBF24; }
.tier-vol { background: rgba(248, 113, 113, 0.15); color: #F87171; }
.role-closer { background: rgba(124, 77, 255, 0.18); color: #C4B0FF; }
.role-setup { background: rgba(96, 165, 250, 0.15); color: #93C5FD; }

.trend-up { color: var(--green, #3CCB7F); }
.trend-down { color: var(--red, #F2545B); }
.trend-flat { color: var(--text-3); }

/* Legacy export / team_card hero stats */
.tp-hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tp-hero-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
}

.tp-hero-stat__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-1, #F3F4F6);
  margin-bottom: 8px;
}

.tp-hero-stat__value {
  display: block;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-value-size, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-1, #F3F4F6);
}

.tp-hero-stat--positive .tp-hero-stat__value,
.tp-hero-stat--elite .tp-hero-stat__value { color: var(--green, #4ADE80); }
.tp-hero-stat--negative .tp-hero-stat__value { color: var(--red-l, #F87171); }
.tp-hero-stat--strong .tp-hero-stat__value { color: #86EFAC; }
.tp-hero-stat--solid .tp-hero-stat__value { color: var(--gold, #FBBF24); }
.tp-hero-stat--mid .tp-hero-stat__value { color: var(--text-1, #E5E7EB); }
.tp-hero-stat--weak .tp-hero-stat__value { color: var(--red-l, #FCA5A5); }
.tp-hero-stat--neutral .tp-hero-stat__value { color: var(--text-1, #F3F4F6); }

/* Content spec §1–§10 */
.tp-summary-panel {
  margin-top: 12px;
  padding: 18px 20px 20px;
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.04) 0%, transparent 100%);
}

.tp-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 20px;
  margin-bottom: 18px;
}

.tp-summary-head .ca-section-head {
  flex: 1;
  min-width: min(100%, 280px);
}

.tp-summary-title {
  /* legacy — prefer .ca-section-title inside .tp-summary-head */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.tp-summary-filter {
  letter-spacing: normal;
}

.tp-summary-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.tp-summary-chip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}

.tp-summary-chip-k {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-1, #F3F4F6);
  margin-bottom: 0;
}

.tp-summary-chip .chip {
  font-size: var(--tp-stat-value-size);
  font-weight: 800;
  padding: 6px 12px;
}

.team-profile-page .tp-table th {
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  color: var(--text-1, #D1D5DB);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tp-summary-trends {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .tp-summary-trends {
    grid-template-columns: 1fr;
  }
}

.mlbma-trend-chart {
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.1) 0%, rgba(14, 16, 24, 0.95) 100%);
  border: 1px solid rgba(124, 77, 255, 0.28);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mlbma-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mlbma-trend-head-val {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.mlbma-trend-label {
  font-family: var(--font-display, var(--display));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple, #C4B0FF);
}

.mlbma-trend-cur {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.mlbma-trend-delta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.mlbma-trend-delta.is-up {
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.mlbma-trend-delta.is-down {
  color: #F87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.mlbma-trend-delta.is-flat {
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.mlbma-trend-svg-wrap {
  width: 100%;
  margin-bottom: 4px;
}

.mlbma-trend-svg {
  width: 100%;
  height: 56px;
  display: block;
  overflow: visible;
}

.mlbma-trend-axis-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(124, 77, 255, 0.15);
}

.mlbma-trend-axis {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
}

.mlbma-trend-axis-l {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 9px;
  color: var(--text-3);
}

.mlbma-trend-axis strong {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.mlbma-trend-na {
  opacity: 0.45;
  font-size: 11px;
}

.tp-bp-usage-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tp-bp-usage-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 12px;
}

.tp-bp-usage-mount {
  margin-top: 8px;
}

.tp-bp-usage-section .bp-usage-chart {
  margin-top: 4px;
}

/* legacy glow — kept for reference, unused */
.tp-logo-glow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 16px;
}

.tp-logo-glow::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--team-glow, #7C4DFF) 55%, transparent) 0%, transparent 72%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.tp-logo-glow img,
.tp-logo-glow .snapshot-logo {
  position: relative;
  z-index: 1;
}

.tp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 4px;
}

.tp-chip-row + .tp-chip-row {
  margin-top: 12px;
}

.tp-metric-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 88px;
}

.tp-metric-slot .tp-metric-k {
  font-size: var(--tp-label-size);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2, #D1D5DB);
}

.tp-metric-slot .chip {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
}

/* Unified offense metrics — smooth bands with league rank */
.tp-offense-metrics {
  border-radius: 12px;
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--bg-3, #12141D) 92%, var(--purple, #7C4DFF) 8%) 0%,
    var(--bg-2, #0E1018) 100%
  );
  border: 1px solid color-mix(in srgb, var(--border, #262A38) 88%, var(--purple, #7C4DFF) 12%);
  overflow: hidden;
}

.tp-offense-metrics__band {
  padding: 14px 16px 16px;
}

.tp-offense-metrics__band + .tp-offense-metrics__band {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tp-offense-metrics__band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.tp-offense-metrics__band-title {
  font-family: var(--font-display, var(--display, "Roboto Condensed", sans-serif));
  font-size: var(--tp-band-title-size, 14px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
}

.tp-offense-metrics__band-hint {
  font-size: var(--tp-band-hint-size, 14px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--tp-note-color, #B8C0CC);
}

.tp-offense-metrics__row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 2px;
  align-items: stretch;
}

/* Offense profile — symmetric metric columns */
.tp-offense-metrics--profile .tp-offense-metrics__table-wrap {
  margin-top: 2px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.tp-offense-metrics--profile .tp-offense-metrics__table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.tp-offense-metrics--profile .tp-offense-metrics__table thead th {
  font-family: var(--font-display, var(--display));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2, #AEB4C6);
  padding: 10px 8px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.tp-offense-metrics--profile .tp-offense-metrics__table tbody td {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.tp-offense-metrics--profile .tp-offense-metrics__table tbody tr.tp-offense-metrics__values td {
  padding-top: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tp-offense-metrics--profile .tp-offense-metrics__table tbody tr.tp-offense-metrics__ranks td {
  padding-top: 4px;
  padding-bottom: 12px;
}

.tp-offense-metrics--profile .tp-offense-metrics__val-cell .chip {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
}

.tp-offense-metrics--profile .tp-offense-metrics__rank-cell {
  font-family: var(--font-display, var(--display));
  font-size: 13px;
  font-weight: 800;
}

.tp-offense-metrics--profile .tp-offense-metrics__rank-cell--elite .tp-offense-stat__rank-num { color: #4ade80; }
.tp-offense-metrics--profile .tp-offense-metrics__rank-cell--strong .tp-offense-stat__rank-num { color: #93c5fd; }
.tp-offense-metrics--profile .tp-offense-metrics__rank-cell--mid .tp-offense-stat__rank-num { color: #fbbf24; }
.tp-offense-metrics--profile .tp-offense-metrics__rank-cell--weak .tp-offense-stat__rank-num { color: #f87171; }
.tp-offense-metrics--profile .tp-offense-metrics__rank-cell--neutral .tp-offense-stat__rank-num { color: var(--text-2, #AEB4C6); }

.tp-offense-metrics--profile .tp-offense-metrics__band-head {
  align-items: center;
  gap: 8px 12px;
}

.tp-offense-metrics--profile .tp-offense-metrics__band-icon {
  display: inline-flex;
  flex: none;
}

/* Surface wins — split rows × metric columns */
.tp-surface-wins__table-wrap {
  padding: 0;
}

.tp-surface-wins__table thead th.tp-surface-wins__corner,
.tp-surface-wins__table tbody th.tp-surface-wins__split-cell {
  text-align: left;
  width: 132px;
  min-width: 120px;
  vertical-align: middle;
}

.tp-surface-wins__split-cell {
  padding: 12px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.tp-surface-wins__split-title {
  display: block;
  font-family: var(--font-display, var(--display));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
  line-height: 1.2;
}

.tp-surface-wins__split-hint {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-3, #717892);
}

.tp-surface-wins__table tbody tr.tp-surface-wins__row + tr.tp-surface-wins__row td,
.tp-surface-wins__table tbody tr.tp-surface-wins__row + tr.tp-surface-wins__row th {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-surface-wins__metric-cell {
  padding: 10px 8px 12px;
}

.tp-surface-wins__metric-cell .tp-offense-metrics__val-cell {
  margin-bottom: 4px;
}

.tp-surface-wins__metric-cell .tp-offense-metrics__val-cell .chip {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
}

.tp-surface-wins__metric-cell .tp-offense-metrics__rank-cell {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.tp-offense-stat {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.tp-offense-stat:hover {
  background: rgba(124, 77, 255, 0.06);
}

.tp-offense-stat__label {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-height: 2.5em;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text-2, #AEB4C6);
}

.tp-offense-stat__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  min-height: 32px;
}

.tp-offense-stat__body .chip {
  font-family: var(--font-display, var(--display));
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
  min-width: 0;
  flex-shrink: 0;
}

.tp-offense-stat__rank {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-left: auto;
  font-family: var(--font-display, var(--display));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tp-offense-stat__rank-num {
  font-size: 14px;
  font-weight: 800;
}

.tp-offense-stat__rank-of {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3, #717892);
}

.tp-offense-stat__rank--elite .tp-offense-stat__rank-num { color: #4ade80; }
.tp-offense-stat__rank--strong .tp-offense-stat__rank-num { color: #93c5fd; }
.tp-offense-stat__rank--mid .tp-offense-stat__rank-num { color: #fbbf24; }
.tp-offense-stat__rank--weak .tp-offense-stat__rank-num { color: #f87171; }
.tp-offense-stat__rank--neutral .tp-offense-stat__rank-num { color: var(--text-2, #AEB4C6); }

/* Lineup profile — reset legacy column stat cards when using inline row layout */
.team-profile-page .tp-offense-stat.tp-offense-stat--inline,
.team-profile-page .tp-offense-stat.tp-surface-stat,
.team-profile-page .tp-offense-stat.tp-intel-stat {
  flex-direction: row;
  height: auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.team-profile-page .tp-offense-stat.tp-offense-stat--inline:hover,
.team-profile-page .tp-offense-stat.tp-surface-stat:hover,
.team-profile-page .tp-offense-stat.tp-intel-stat:hover {
  background: transparent;
}

.team-profile-page .tp-offense-stat.tp-offense-stat--inline .tp-offense-stat__body,
.team-profile-page .tp-offense-stat.tp-surface-stat .tp-offense-stat__body,
.team-profile-page .tp-offense-stat.tp-intel-stat .tp-offense-stat__body {
  min-height: 0;
  margin-top: 0;
  justify-content: flex-start;
}

.team-profile-page .tp-offense-stat.tp-offense-stat--inline .tp-offense-stat__label,
.team-profile-page .tp-offense-stat.tp-surface-stat .tp-offense-stat__label,
.team-profile-page .tp-offense-stat.tp-intel-stat .tp-offense-stat__label {
  min-height: 0;
  margin-bottom: 0;
}

.tp-offense-metrics--opponent {
  margin-bottom: 4px;
}

.tp-offense-metrics--opponent.tp-offense-metrics--profile .tp-offense-metrics__table-wrap {
  margin-top: 2px;
}

.tp-opponent-strength__table thead th,
.tp-opponent-strength__table tbody td {
  width: 25%;
  text-align: center;
}

.tp-opponent-strength__table tbody tr.tp-offense-metrics__values td {
  padding-top: 10px;
  padding-bottom: 4px;
}

.tp-opponent-strength__table tbody tr.tp-offense-metrics__ranks td {
  padding-top: 2px;
  padding-bottom: 10px;
}

.tp-opponent-strength-note {
  margin: 10px 0 0;
}

@media (max-width: 640px) {
  .tp-offense-metrics__row:not(.tp-offense-metrics__row--inline) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Metric tiles — legacy (schedule & results) */
.tp-metric-group {
  margin-bottom: 24px;
}

.tp-metric-group:last-child {
  margin-bottom: 8px;
}

.tp-metric-group__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.tp-metric-group__icon {
  flex: none;
  margin-top: 1px;
}

.tp-metric-group__copy {
  flex: 1;
  min-width: 0;
}

.tp-metric-group__title {
  margin: 0 0 4px;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-band-title-size, 14px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
}

.tp-metric-group__hint {
  margin: 0;
  font-size: var(--tp-band-hint-size, 14px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-note-color, #B8C0CC);
}

.tp-metric-tile-grid {
  display: grid;
  gap: 12px 14px;
}

.tp-metric-tile-grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
}

.tp-metric-tile-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tp-metric-tile-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tp-metric-tile-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tp-metric-tile-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .tp-metric-tile-grid--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tp-metric-tile-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .tp-metric-tile-grid--5,
  .tp-metric-tile-grid--4,
  .tp-metric-tile-grid--3,
  .tp-metric-tile-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .tp-metric-tile-grid--5,
  .tp-metric-tile-grid--4,
  .tp-metric-tile-grid--3,
  .tp-metric-tile-grid--2,
  .tp-metric-tile-grid--auto {
    grid-template-columns: 1fr;
  }
}

.tp-metric-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tp-metric-tile:hover {
  border-color: color-mix(in srgb, var(--purple, #7C4DFF) 35%, var(--border));
  background: color-mix(in srgb, var(--bg-3) 92%, rgba(124, 77, 255, 0.08));
}

.tp-metric-tile__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tp-metric-tile__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-1, #F3F4F6);
}

.tp-metric-tile__abbr {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3, #9CA3AF);
}

.tp-metric-tile__value {
  display: flex;
  align-items: flex-end;
}

.tp-metric-tile__value .chip {
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-value-size);
  font-weight: 800;
  min-width: 56px;
  padding: 7px 14px;
  text-align: center;
}

.tp-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px 12px;
  margin-bottom: 12px;
}

.tp-phase1-slot {
  opacity: 0.72;
}

.tp-phase1-slot .chip {
  border-bottom: 1px dashed var(--text-3);
}

.tp-phase1-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold, #E8C24A);
}

.tp-phase1-inline {
  margin-top: 10px;
}

.tp-window-stale {
  margin-top: 10px;
  font-size: 12px;
}

.tp-window-stale code {
  font-size: 11px;
}

.tp-summary-line {
  margin: 16px 0 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.06);
  border: 1px solid rgba(124, 77, 255, 0.15);
}

.tp-ha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 700px) {
  .tp-ha-grid {
    grid-template-columns: 1fr;
  }
}

.tp-ha-col {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-ha-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 4px;
}

.tp-edge-bar {
  height: 8px;
  border-radius: 4px;
  margin: 14px 0 12px;
  background: linear-gradient(
    90deg,
    var(--blue, #60A5FA) 0%,
    var(--purple, #7C4DFF) 50%,
    #EC4899 100%
  );
  position: relative;
  overflow: hidden;
}

.tp-edge-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--edge, 50%);
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-right: 2px solid #fff;
}

.tp-analyst-rail {
  margin-top: 4px;
}

.tp-split-section {
  margin-top: 4px;
}

/* Metric grids — label once in header row (EDIT 3) */
.tp-metric-grid--header-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp-metric-grid-head,
.tp-metric-grid-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  align-items: end;
}

.tp-metric-grid-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  text-align: center;
  min-height: 34px;
}

.tp-metric-abbr {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
}

.tp-metric-desc {
  display: block;
  font-size: var(--tp-label-desc-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-3, #9CA3AF);
  line-height: 1.2;
}

.tp-section-filter-bar--trend {
  margin-bottom: var(--tp-filter-gap, 12px);
}

.tp-metric-chip-only {
  display: flex;
  justify-content: center;
}

.tp-metric-chip-only .chip {
  min-width: 52px;
}

/* Interactive trend chart panel — Research Lab trend table parameters */
.tp-trend-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tp-trend-table-wrap {
  margin-bottom: 16px;
}

.tp-trend-table-note {
  margin: 0 0 12px;
}

.tp-trend-directive {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-3, #12141D);
  border-left-width: 4px;
}

.tp-trend-directive--up { border-left-color: #1FB866; }
.tp-trend-directive--down { border-left-color: #E0392E; }
.tp-trend-directive--spike { border-left-color: #C9A21E; }
.tp-trend-directive--stable { border-left-color: #717892; }
.tp-trend-directive--mixed { border-left-color: #7C4DFF; }

.tp-trend-directive__metric {
  font-family: var(--font-display, var(--display, "Roboto Condensed", sans-serif));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ca-purple-light, #C4B0FF);
}

.tp-trend-directive__read {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-1, #F3F4F6);
}

.tp-trend-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.tp-trend-table thead th {
  background: #0C0E18;
  color: #AEB4C6;
  font-family: var(--display, "Roboto Condensed", sans-serif);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 10px;
  border-bottom: 1.5px solid #37405A;
  text-align: center;
  white-space: nowrap;
}

.tp-trend-table thead th:first-child {
  text-align: left;
}

.tp-trend-table tbody th,
.tp-trend-table tbody td {
  padding: 0 10px;
  height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  vertical-align: middle;
}

.tp-trend-table tbody th {
  text-align: left;
  font-weight: 700;
}

.tp-trend-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.tp-trend-table tbody tr[data-trend-metric-row] {
  cursor: pointer;
}

.tp-trend-table tbody tr.is-active {
  background: rgba(124, 77, 255, 0.12);
  box-shadow: inset 3px 0 0 #7C4DFF;
}

.tp-trend-table tbody tr:hover {
  background: rgba(124, 77, 255, 0.08);
}

.tp-trend-table .numcol {
  width: 1%;
  white-space: nowrap;
}

.tp-trend-col--highlight {
  background: rgba(124, 77, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(196, 176, 255, 0.35);
}

.tp-trend-table__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--display, "Roboto Condensed", sans-serif);
  font-size: 15px;
  font-weight: 800;
  color: #F6F8FC;
}

.tp-trend-table__metric-desc {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3, #717892);
  text-transform: none;
}

.tp-trend-table__reliability {
  font-size: 12px;
  font-weight: 700;
  color: #AEB4C6;
}

.tp-trend-table__interp {
  font-size: 12px;
  font-weight: 700;
  color: #F6F8FC;
}

.tp-trend-table__interp--up { color: #1FB866; }
.tp-trend-table__interp--down { color: #E0392E; }
.tp-trend-table__interp--spike { color: #C9A21E; }
.tp-trend-table__interp--stable { color: #AEB4C6; }
.tp-trend-table__interp--mixed { color: #C4B0FF; }

@media (max-width: 900px) {
  .tp-trend-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tp-trend-table {
    min-width: 720px;
  }
}

.tp-trend-chart-mount .mlbma-trend-chart {
  width: 100%;
  max-width: 100%;
}

.tp-trend-readout {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-1, #E5E7EB);
  background: color-mix(in srgb, var(--purple, #7C4DFF) 8%, var(--bg-3));
  border-left: 3px solid var(--purple, #7C4DFF);
}

/* Scouting intelligence layer */
.tp-intel-read {
  margin: 10px 0 0;
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}
.tp-intel-read--form {
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--purple, #7C4DFF) 8%, var(--bg-3));
  border-left: 3px solid var(--purple, #7C4DFF);
}
.tp-intel-read--rotation,
.tp-intel-read--bullpen {
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--teal, #2DD4BF) 6%, var(--bg-3));
  border-left: 3px solid color-mix(in srgb, var(--teal, #2DD4BF) 55%, var(--border));
}
.tp-intel-read--split {
  margin-top: 8px;
  font-style: normal;
  color: var(--text-2);
}
.tp-intel-status {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.tp-intel-status__label {
  display: inline-block;
  font-family: var(--display, "Roboto Condensed", sans-serif);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.tp-intel-status--elite { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.tp-intel-status--plus { background: rgba(96, 165, 250, 0.14); color: #93c5fd; }
.tp-intel-status--mid { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.tp-intel-status--volatile { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.tp-intel-status--weak { background: rgba(248, 113, 113, 0.14); color: #f87171; }
.tp-intel-status--neutral { background: var(--bg-3); color: var(--text-2); }
.tp-intel-status__line {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}

/* Identity panel — same section + inline metrics as Offense Profile */
.team-profile-page .tp-identity-panel.tp-section {
  margin-bottom: 0;
}

.team-profile-page .tp-identity-panel .ca-section-header {
  margin-bottom: 12px;
}

.team-profile-page .tp-identity-panel__metrics {
  margin-top: 0;
}

.team-profile-page .tp-identity-panel__take {
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--border, #262A38) 88%, transparent);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2, #A4A8B6);
}

.tp-lineup-identity__badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--bg-3, #12141D);
  border: 1px solid var(--border, #262A38);
  color: var(--text-2, #A4A8B6);
}

.tp-lineup-identity__badge.tp-intel-status--elite { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }
.tp-lineup-identity__badge.tp-intel-status--plus { color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); }
.tp-lineup-identity__badge.tp-intel-status--mid { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.tp-lineup-identity__badge.tp-intel-status--volatile { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.tp-lineup-identity__badge.tp-intel-status--weak { color: #f87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.tp-lineup-identity__badge.tp-intel-status--neutral { color: var(--text-2); }

/* Stat chips — card hue reflects grade */
.tp-unit-chip--elite {
  background: color-mix(in srgb, #4ade80 14%, var(--bg-3, #12141D));
  border-color: color-mix(in srgb, #4ade80 38%, var(--border, #262A38));
}
.tp-unit-chip--strong {
  background: color-mix(in srgb, #86efac 12%, var(--bg-3, #12141D));
  border-color: color-mix(in srgb, #86efac 32%, var(--border, #262A38));
}
.tp-unit-chip--mid {
  background: color-mix(in srgb, #fbbf24 10%, var(--bg-3, #12141D));
  border-color: color-mix(in srgb, #fbbf24 28%, var(--border, #262A38));
}
.tp-unit-chip--weak {
  background: color-mix(in srgb, #fb923c 10%, var(--bg-3, #12141D));
  border-color: color-mix(in srgb, #fb923c 28%, var(--border, #262A38));
}
.tp-unit-chip--poor {
  background: color-mix(in srgb, #f87171 10%, var(--bg-3, #12141D));
  border-color: color-mix(in srgb, #f87171 30%, var(--border, #262A38));
}
.tp-unit-chip--neutral {
  background: var(--bg-3, #12141D);
  border-color: var(--border, #262A38);
}

/* Lineup identity — legacy gradient card (staff status blocks only) */
.tp-lineup-identity {
  margin-bottom: var(--tp-section-gap, 12px);
  padding: var(--tp-band-pad-y, 14px) var(--tp-band-pad-x, 16px) var(--tp-band-pad-bottom, 16px);
  border-radius: var(--tp-section-radius, 12px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--purple, #7C4DFF) 7%, var(--bg-3, #12141D)) 0%,
    var(--bg-3, #12141D) 58%
  );
  border: 1px solid color-mix(in srgb, var(--border, #262A38) 82%, var(--purple, #7C4DFF) 18%);
  border-left-width: 4px;
}

.tp-lineup-identity--elite { border-left-color: #4ade80; }
.tp-lineup-identity--plus { border-left-color: #60a5fa; }
.tp-lineup-identity--volatile { border-left-color: #fbbf24; }
.tp-lineup-identity--weak { border-left-color: #f87171; }
.tp-lineup-identity--neutral {
  border-left-color: color-mix(in srgb, var(--purple, #7C4DFF) 40%, #94a3b8);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--purple, #7C4DFF) 10%, var(--bg-3, #12141D)) 0%,
    color-mix(in srgb, var(--bg-2, #0E1018) 35%, var(--bg-3, #12141D)) 100%
  );
}

.tp-lineup-identity__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
}

.tp-identity-panel .tp-lineup-identity__title {
  margin: 0;
}

.tp-lineup-identity__desc {
  margin: 0;
  font-size: clamp(1rem, 1.75vw, 1.125rem);
  font-weight: 500;
  line-height: 1.68;
  color: var(--text-1, #E5E7EB);
  max-width: none;
}

.tp-identity-panel .tp-lineup-identity__desc {
  font-size: clamp(1.0625rem, 1.85vw, 1.1875rem);
  line-height: 1.72;
}
.tp-intel-section {
  position: relative;
}
.tp-intel-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple, #7C4DFF), transparent 70%);
  border-radius: 14px 14px 0 0;
}
.tp-intel-sustain {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tp-intel-verdict-label {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.tp-intel-verdict-label--overperforming { color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
.tp-intel-verdict-label--underperforming { color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); }
.tp-intel-verdict-label--sustainable { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.tp-intel-verdict-label--volatile { color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
.tp-intel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}
.tp-intel-chip-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tp-intel-chip-item .ca-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tp-intel-chip-item--market {
  min-width: 168px;
}

.tp-intel-market-pos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.tp-intel-market-pos__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pos-color, #7C4DFF);
  box-shadow: 0 0 10px color-mix(in srgb, var(--pos-color, #7C4DFF) 55%, transparent);
  flex-shrink: 0;
}

.tp-intel-market-pos__label {
  font-family: var(--font-display, var(--display));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-1, #F3F4F6);
}

.tp-intel-market-pos__rank {
  font-family: var(--font-display, var(--display));
  font-size: 12px;
  font-weight: 700;
  color: var(--ca-purple-light, #C4B0FF);
  font-variant-numeric: tabular-nums;
}

.tp-intel-market-pos__meta {
  flex: 1 1 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3, #9CA3AF);
  font-variant-numeric: tabular-nums;
}

.tp-intel-note {
  margin: 0;
}
.tp-intel-takeaways {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 767px) {
  .tp-intel-takeaways { grid-template-columns: 1fr; }
}
.tp-intel-takeaway {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-3);
}

.tp-intel-takeaway__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tp-intel-takeaway__icon {
  flex: none;
  line-height: 0;
}

.tp-intel-takeaway__title {
  margin: 0;
  font-family: var(--display, "Roboto Condensed", sans-serif);
  font-size: var(--tp-band-title-size, 14px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1, #F3F4F6);
}
.tp-intel-takeaway__body {
  margin: 0;
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}

@media (max-width: 820px) {
  .tp-unit-nav-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tp-unit-nav .hub-pill,
  .tp-unit-nav .tp-unit-tab {
    min-height: 48px;
    justify-content: flex-start;
    text-align: left;
    padding-left: 20px;
  }

  .tp-unit-tab-hint {
    display: block;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3, #9CA3AF);
  }

  .tp-unit-nav .hub-pill.active .tp-unit-tab-hint,
  .tp-unit-nav .tp-unit-tab.active .tp-unit-tab-hint {
    color: rgba(255, 255, 255, 0.72);
  }

  .tp-unit-nav .tp-unit-tab {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
  }
}

.tp-split-section .ca-split-pair {
  margin: 0;
}

.tp-tonight-compare {
  margin-top: 4px;
}

.tp-tonight-compare__inner {
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--purple, #7C4DFF) 22%, var(--border, #262A38));
  border-radius: 12px;
  background: color-mix(in srgb, var(--purple, #7C4DFF) 4%, var(--bg-2, #0E1018));
}

.tp-tonight-compare__matchup {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1, #E5E7EB);
  letter-spacing: 0.03em;
}

.tp-tonight-compare__at {
  margin: 0 8px;
  color: var(--text-3, #9CA3AF);
  font-weight: 500;
}

.tp-tonight-compare__meta {
  margin-left: 10px;
  font-size: var(--tp-note-size, 14px);
  font-weight: 500;
  color: var(--tp-note-color, #B8C0CC);
}

.tp-tonight-compare__sp {
  margin: 0 0 10px;
  font-size: var(--tp-note-size, 14px);
  color: var(--tp-desc-color, #C4CBD6);
}

.tp-tonight-compare__prompt {
  margin: 0 0 14px;
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  max-width: 680px;
}

.tp-tonight-compare__prompt strong {
  color: var(--ca-purple-light, #C4B0FF);
  font-weight: 600;
}

.tp-tonight-compare__cta {
  display: inline-flex;
}
