/**
 * Profile sections — flat metric rows + unified section copy (team + player profiles)
 */

/* Metric scan typography — brighter labels, slightly larger type */
:is(body.team-profile-page, body.player-profile-page) {
  --tp-stat-label-size: 11px;
  --tp-stat-label-color: #C8D0DC;
  --tp-stat-chip-size: 18px;
  --tp-stat-rank-size: 11px;
  --tp-stat-rank-muted: #9CA8BA;
  --tp-metric-chip-min-w: 48px;
  --tp-metric-chip-h: 24px;
  --tp-metric-stat-gap: 8px;
  --tp-metric-row-gap: 10px 16px;
  --tp-helper-size: 12px;
  --tp-band-title-size: 12px;
  --tp-band-hint-size: 11px;
  --tp-note-size: 12px;
  --tp-desc-color: #C4CBD6;
  --tp-note-color: #B8C0CC;
  --tp-header-gap: 10px;
  --tp-band-pad-y: 10px;
  --tp-band-pad-x: 0;
  --tp-band-pad-bottom: 10px;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline .tp-offense-stat__label,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat__label,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat .tp-offense-stat__label,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat .tp-offense-stat__label,
.team-profile-page .tp-unit-chip-k {
  min-height: 0;
  margin-bottom: 0;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-label-size);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--tp-stat-label-color);
  white-space: nowrap;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band-title,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__band-title,
.team-profile-page .tp-intel-sustain__band .tp-offense-metrics__band-title,
:is(.team-profile-page, .player-profile-page) .tp-batting-split__title,
:is(.team-profile-page, .player-profile-page) .tp-metric-group__title,
:is(.team-profile-page, .player-profile-page) .tp-intel-takeaway__title {
  font-size: var(--tp-band-title-size, 14px);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band-hint,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__band-hint {
  font-size: var(--tp-band-hint-size, 14px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-note-color, #B8C0CC);
}

:is(.team-profile-page, .player-profile-page) .tp-section.ca-board :is(.tp-offense-metrics--profile, .tp-offense-metrics--opponent, .tp-surface-wins) {
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-section.ca-board .tp-offense-metrics--profile .tp-offense-metrics__band,
:is(.team-profile-page, .player-profile-page) .tp-section.ca-board .tp-offense-metrics--opponent .tp-offense-metrics__band,
:is(.team-profile-page, .player-profile-page) .tp-section.ca-board .tp-surface-wins .tp-offense-metrics__band {
  padding: 10px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

:is(.team-profile-page, .player-profile-page) .tp-section.ca-board .tp-offense-metrics__band:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent {
  border: 1.5px solid rgba(196, 176, 255, 0.20);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.052), transparent 28%),
    linear-gradient(180deg, #151827, #080A13);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 18px 48px rgba(0,0,0,0.48);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band {
  padding: var(--tp-band-pad-y, 14px) var(--tp-band-pad-x, 16px) var(--tp-band-pad-bottom, 16px);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band:last-child {
  padding-bottom: var(--tp-band-pad-y, 14px);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__band {
  padding: var(--tp-band-pad-y, 14px) var(--tp-band-pad-x, 16px) var(--tp-band-pad-bottom, 16px);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band + .tp-offense-metrics__band,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__band + .tp-offense-metrics__band {
  border-top: 1px solid rgba(196, 176, 255, 0.12);
  padding-top: var(--tp-band-pad-y, 14px);
  margin-top: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__band-head,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__band-head,
:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-offense-metrics__band-head,
.team-profile-page .tp-intel-sustain__band .tp-offense-metrics__band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  text-align: left;
  gap: 6px 12px;
  margin-bottom: var(--tp-header-gap, 12px);
  padding-bottom: 0;
  border-bottom: none;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics__band-hint {
  flex: 1 1 100%;
  max-width: 100%;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics__band-icon .ca-icon-circle {
  width: 28px;
  height: 28px;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics__row--inline,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__row,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--profile .tp-offense-metrics__row--inline,
:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-offense-metrics__row--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--tp-metric-row-gap, 12px 20px);
  padding: 2px 0 0;
  grid-template-columns: none;
}

/* Flat metric units — label + chip (+ rank); no nested stat cards */
:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--tp-metric-stat-gap, 9px);
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline .tp-offense-stat__body,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat .tp-offense-stat__body,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat .tp-offense-stat__body,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat__body {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 0;
  min-height: 0;
  justify-content: flex-start;
}

:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline .tp-offense-stat__rank,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat .tp-offense-stat__rank,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat .tp-offense-stat__rank,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat__rank,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--staff .tp-offense-stat__rank,
:is(.team-profile-page, .player-profile-page) .tp-unit-snapshot-metrics .tp-offense-stat__rank {
  margin-left: 0;
}

/* Unified value chips — same box size and grade hues in every lineup section */
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tp-metric-chip-min-w, 52px);
  height: var(--tp-metric-chip-h, 28px);
  padding: 0 10px;
  border-radius: 8px;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-chip-size, 15px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

/* KPI-band values render as bare graded text (#1), matching the global system. */
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-elite { color: #4ADE80; }
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-good { color: #7BDC5A; }
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-mid { color: #FBBF24; }
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-weak { color: #FB923C; }
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-poor { color: #F87171; }
:is(.team-profile-page, .player-profile-page) .tp-offense-stat__body .chip.c-na { color: #6E7383; }

:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline .tp-offense-stat__rank-num,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat__rank-num,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--staff .tp-offense-stat__rank-num,
:is(.team-profile-page, .player-profile-page) .tp-unit-snapshot-metrics .tp-offense-stat__rank-num,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat .tp-offense-stat__rank-num,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat .tp-offense-stat__rank-num {
  font-size: var(--tp-stat-rank-size);
  color: var(--tp-stat-rank-muted);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline .tp-offense-stat__rank-of,
:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat__rank-of,
:is(.team-profile-page, .player-profile-page) .tp-surface-stat .tp-offense-stat__rank-of,
:is(.team-profile-page, .player-profile-page) .tp-intel-stat .tp-offense-stat__rank-of {
  font-size: 11px;
  color: var(--tp-stat-rank-muted);
}

/* Hero stat strip — inline under banner, not nested cards */
.team-profile-page .tp-team-banner__stats--hero {
  gap: 10px 18px;
}

.team-profile-page .tp-team-banner__stats--hero .tp-hero-stat {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 0;
  border: 1px solid rgba(196, 176, 255, 0.16);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.052), transparent 30%),
    linear-gradient(180deg, rgba(18,21,33,0.92), rgba(6,7,13,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.team-profile-page .tp-team-banner__stats--hero .tp-hero-stat__label {
  margin-bottom: 0;
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-label-size);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tp-stat-label-color);
}

.team-profile-page .tp-team-banner__stats--hero .tp-hero-stat__value {
  font-size: var(--tp-stat-chip-size, 15px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-profile-page .tp-team-banner__stats--hero .tp-hero-stat__value .tp-offense-stat__rank-num {
  font-size: var(--tp-stat-rank-size, 12px);
  color: var(--tp-stat-rank-muted, #9CA8BA);
  font-weight: 700;
}

.team-profile-page .tp-team-banner__stats--hero .tp-hero-stat__value .chip {
  min-width: var(--tp-metric-chip-min-w, 52px);
  height: var(--tp-metric-chip-h, 28px);
  padding: 0 10px;
  font-size: var(--tp-stat-chip-size, 15px);
}

.team-profile-page .tp-team-banner {
  padding: 0;
  margin: 0;
  border-radius: var(--tp-section-radius, 14px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.072), transparent 28%),
    linear-gradient(180deg, var(--ca-panel-solid, #10131F) 0%, var(--ca-panel-solid-2, #070912) 100%);
  border: 1.5px solid var(--ca-panel-border, rgba(154, 107, 255, 0.58));
}

.team-profile-page .tp-team-banner--hero {
  padding: var(--tp-section-pad-y, 14px) var(--tp-section-pad-x, 16px) var(--tp-section-pad-bottom, 16px);
  margin: 0;
  border-radius: var(--tp-section-radius, 14px);
  border-color: color-mix(in srgb, var(--tp-accent, #7C4DFF) 46%, var(--ca-panel-border, rgba(154, 107, 255, 0.58)));
  background:
    radial-gradient(ellipse 76% 70% at 88% 8%, color-mix(in srgb, var(--tp-accent, #7C4DFF) 26%, transparent), transparent 64%),
    linear-gradient(128deg, #171A2A 0%, #0B0E18 52%, #05060C 100%);
  background-size: auto, auto;
  box-shadow:
    0 0 0 1px rgba(196,176,255,0.14),
    0 0 42px color-mix(in srgb, var(--tp-accent, #7C4DFF) 34%, transparent),
    0 34px 96px rgba(0,0,0,0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -38px 70px rgba(0,0,0,0.34);
}

.team-profile-page .tp-team-banner__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

/* Sustainability — unified metric bands */
.team-profile-page .tp-intel-sustain {
  display: flex;
  flex-direction: column;
  gap: var(--tp-section-gap, 12px);
}

.team-profile-page .tp-intel-sustain__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 2px 12px 0;
  text-align: center;
}

.team-profile-page .tp-intel-sustain__lead .tp-intel-read--lead {
  flex: 1 1 100%;
  max-width: 720px;
  margin: 0;
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: center;
}

.team-profile-page .tp-intel-sustain__board {
  gap: 0;
}

.team-profile-page .tp-intel-sustain__band + .tp-intel-sustain__band {
  padding-top: 0;
}

.team-profile-page .tp-intel-sustain__map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  padding: 6px 12px 0;
  text-align: center;
}

.team-profile-page .tp-intel-sustain__band-head {
  justify-content: center;
  text-align: center;
}

.team-profile-page .tp-intel-sustain__table-wrap {
  margin-top: 2px;
}

.team-profile-page .tp-intel-sustain__table thead th,
.team-profile-page .tp-intel-sustain__table tbody td {
  text-align: center;
}

.team-profile-page .tp-intel-sustain__table--cols-3 thead th,
.team-profile-page .tp-intel-sustain__table--cols-3 tbody td {
  width: 33.333%;
}

.team-profile-page .tp-intel-sustain__table--cols-2 thead th,
.team-profile-page .tp-intel-sustain__table--cols-2 tbody td {
  width: 50%;
}

.team-profile-page .tp-intel-sustain__table tbody tr.tp-offense-metrics__values td {
  padding-top: 10px;
  padding-bottom: 4px;
}

.team-profile-page .tp-intel-sustain__table tbody tr.tp-offense-metrics__ranks td {
  padding-top: 2px;
  padding-bottom: 10px;
}

.team-profile-page .tp-intel-sustain .tp-section-filter-bar {
  margin-bottom: 4px;
}

.team-profile-page .tp-intel-sustain__map-label {
  font-family: var(--font-display, var(--display));
  font-size: var(--tp-stat-label-size);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--tp-stat-label-color);
  white-space: nowrap;
}

.team-profile-page .tp-intel-market-pos--compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-profile-page .tp-intel-sustain .tp-intel-verdict-label {
  flex-shrink: 0;
  margin: 0;
}

/* Staff unit snapshot — inline metric rows */
.team-profile-page .tp-unit-snapshot-row,
.team-profile-page .tp-unit-snapshot-metrics .tp-offense-metrics__row--inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-metric-row-gap, 12px 20px);
  align-items: center;
  grid-template-columns: none;
  height: auto;
}

.team-profile-page .tp-unit-snapshot-metrics {
  margin-top: 10px;
}

.team-profile-page .tp-unit-snapshot-metrics .tp-offense-metrics__band {
  padding-bottom: 0;
}

/* Starter / bullpen summary — symmetric 3-up metrics */
.team-profile-page .tp-staff-summary-banner .tp-staff-summary-banner__row,
.team-profile-page .tp-unit-snapshot-metrics.tp-staff-summary-banner .tp-staff-summary-banner__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  width: 100%;
  align-items: stretch;
  flex-wrap: nowrap;
}

.team-profile-page .tp-staff-summary-banner .tp-offense-stat--inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--bg-2, #101015);
  border: 1px solid var(--border, #2A2A35);
  text-align: center;
}

.team-profile-page .tp-staff-summary-banner .tp-offense-stat__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-2, #A1A1AA);
  letter-spacing: 0.02em;
}

.team-profile-page .tp-staff-summary-banner .tp-offense-stat__body {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.team-profile-page .tp-staff-summary-banner .tp-offense-metrics__band-head {
  margin-bottom: 10px;
}

.team-profile-page .tp-staff-summary-banner .tp-offense-metrics__band-title {
  font-family: var(--font-display, var(--display));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2, #A1A1AA);
}

@media (max-width: 720px) {
  .team-profile-page .tp-staff-summary-banner .tp-staff-summary-banner__row,
  .team-profile-page .tp-unit-snapshot-metrics.tp-staff-summary-banner .tp-staff-summary-banner__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :is(.team-profile-page, .player-profile-page) .tp-offense-metrics__row--inline,
  :is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-metrics__row,
  :is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-offense-metrics__row--inline {
    gap: 10px 14px;
  }

  :is(.team-profile-page, .player-profile-page) .tp-offense-stat--inline,
  :is(.team-profile-page, .player-profile-page) .tp-surface-stat,
  :is(.team-profile-page, .player-profile-page) .tp-intel-stat,
  :is(.team-profile-page, .player-profile-page) .tp-offense-metrics--opponent .tp-offense-stat {
    flex: 0 1 auto;
    min-width: 0;
  }

  .team-profile-page .tp-team-banner__stats--hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .team-profile-page .tp-team-banner__stats--hero .tp-hero-stat {
    width: 100%;
  }
}

.team-profile-page .tp-split-section {
  margin-top: 0;
}

.team-profile-page .tp-split-section .tp-platoon-summary,
.team-profile-page .tp-split-section .tp-location-summary {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2, #101015);
  border: 1px solid var(--border, #2A2A35);
}

.team-profile-page .tp-trend-panel {
  margin-top: 0;
}

.team-profile-page .tp-trend-table-wrap {
  margin-top: 8px;
}

.team-profile-page .tp-trend-table tbody th,
.team-profile-page .tp-trend-table tbody td {
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.team-profile-page .profile-lineup-footer {
  gap: var(--tp-section-gap, 12px);
  margin-bottom: var(--tp-section-gap, 12px);
}

.team-profile-page .tp-team-banner--hero {
  margin: 0;
}

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

.team-profile-page .tp-identity-panel .ca-section-header .ca-helper {
  color: var(--text-2, #B0B8C8);
}

/* Surface wins — metric bands with inset padding */
:is(.team-profile-page, .player-profile-page) .tp-surface-wins {
  display: flex;
  flex-direction: column;
  gap: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-offense-metrics__band {
  padding: var(--tp-band-pad-y, 14px) var(--tp-band-pad-x, 16px) var(--tp-band-pad-bottom, 16px);
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-offense-metrics__band:last-child {
  padding-bottom: var(--tp-band-pad-bottom, 16px);
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins__band + .tp-surface-wins__band {
  margin-top: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-surface-stat {
  padding: 0;
  gap: var(--tp-metric-stat-gap, 9px);
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins .tp-surface-stat .tp-offense-stat__body {
  gap: 7px;
}

:is(.team-profile-page, .player-profile-page) .tp-surface-wins + .f5-variance-note,
.team-profile-page .tp-section[data-tp-section="surface-wins"] .f5-variance-note {
  margin: 12px 0 0;
  padding: 0;
  text-align: left;
}

.team-profile-page .tp-analyst-rail .ca-insight-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.team-profile-page .tp-analyst-rail .ca-insight-label {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.team-profile-page .tp-analyst-rail .ca-insight-text {
  display: block;
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}

.team-profile-page .tp-opponent-strength-note {
  margin-top: var(--tp-header-gap, 12px);
  padding: 0;
  text-align: left;
}

/* Nested metric boards inside sections — align inset with section padding */
.team-profile-page .tp-section .tp-offense-metrics--profile,
.team-profile-page .tp-section .tp-offense-metrics--opponent,
.team-profile-page .tp-section .tp-surface-wins {
  margin-top: 0;
}

.team-profile-page .tp-section .tp-offense-metrics--profile .tp-offense-metrics__band-head,
.team-profile-page .tp-section .tp-offense-metrics--opponent .tp-offense-metrics__band-head,
.team-profile-page .tp-section .tp-surface-wins .tp-offense-metrics__band-head {
  margin-bottom: var(--tp-header-gap, 12px);
}

.team-profile-page .tp-section-filter-bar {
  margin-bottom: var(--tp-filter-gap, 12px);
  padding: var(--tp-filter-pad, 12px 14px);
}

.team-profile-page .tp-lineup-context-bar {
  margin-bottom: var(--tp-header-gap, 14px);
}

.team-profile-page .tp-intel-sustain__band .tp-offense-metrics__band {
  padding: var(--tp-band-pad-y, 14px) var(--tp-band-pad-x, 16px);
}

/* Section footnotes & supplementary copy — one style at section bottom */
:is(.team-profile-page, .player-profile-page) :is(
  .tp-section .ca-helper,
  .tp-section .ca-empty-state .ca-helper,
  .tp-empty + .ca-helper,
  .tp-section > .ca-helper,
  .section .ca-helper,
  .tp-trend-table-note,
  .tp-trend-readout,
  .tp-opponent-strength-note,
  .tp-intel-note,
  .tp-phase1-inline,
  .tp-staff-meta,
  .f5-variance-note,
  .tp-metric-group__hint,
  .tp-batting-split__hint,
  .tp-offense-split-summary__label,
  .tp-summary-filter,
  .tp-staff-links
) {
  font-family: inherit;
  font-size: var(--tp-helper-size, 15px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}

:is(.team-profile-page, .player-profile-page) :is(
  .tp-opponent-strength-note,
  .tp-phase1-inline,
  .tp-intel-note,
  .tp-staff-meta,
  .f5-variance-note,
  .tp-trend-readout,
  .tp-section-body > .ca-helper:last-child,
  .tp-section > .ca-helper:last-child
) {
  margin-top: var(--tp-header-gap, 12px);
  margin-bottom: 0;
}

:is(.team-profile-page, .player-profile-page) .tp-trend-table-note {
  margin: 0 0 var(--tp-header-gap, 12px);
}

:is(.team-profile-page, .player-profile-page) .tp-batting-split__hint {
  margin: 0 0 var(--tp-header-gap, 12px);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-split-summary__label {
  margin: 0 0 8px;
}

:is(.team-profile-page, .player-profile-page) .tp-batting-split__head {
  text-align: left;
}

:is(.team-profile-page, .player-profile-page) .tp-intel-read,
:is(.team-profile-page, .player-profile-page) .tp-intel-note,
:is(.team-profile-page, .player-profile-page) .tp-phase1-inline {
  text-align: left;
}

:is(.team-profile-page, .player-profile-page) .profile-analyst-take__text,
:is(.team-profile-page, .player-profile-page) .profile-analyst-take .ca-helper {
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
}

:is(.team-profile-page, .player-profile-page) .tp-trend-readout,
:is(.team-profile-page, .player-profile-page) .tp-summary-line {
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
}

.team-profile-page .tp-unit-tab-hint {
  font-size: var(--tp-note-size, 14px);
  line-height: 1.4;
  color: var(--tp-note-color, #B8C0CC);
}

.team-profile-page .tp-page-guide__lead,
.team-profile-page .tp-page-guide .ca-helper {
  font-size: var(--tp-note-size, 14px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
}

/* Legacy + player profile section headers — same copy scale as metric bands */
:is(.team-profile-page, .player-profile-page) .ca-section-header,
:is(.team-profile-page, .player-profile-page) .ca-section-head,
:is(.team-profile-page, .player-profile-page) .ca-section-head__body {
  text-align: left;
}

:is(.team-profile-page, .player-profile-page) .section-title,
:is(.team-profile-page, .player-profile-page) .allowed-header .section-title {
  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);
  text-align: left;
  margin: 0 0 6px;
}

:is(.team-profile-page, .player-profile-page) .section-subtitle,
:is(.team-profile-page, .player-profile-page) .allowed-header .section-subtitle {
  font-size: var(--tp-helper-size, 15px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
  margin: 0 0 12px;
  max-width: none;
}

:is(.team-profile-page, .player-profile-page) .ca-helper,
:is(.team-profile-page, .player-profile-page) .pp-intel-read,
:is(.team-profile-page, .player-profile-page) .insight-line {
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
}

:is(.team-profile-page, .player-profile-page) .ca-insight-rail .ca-insight-label,
:is(.team-profile-page, .player-profile-page) .ca-insight-label {
  font-family: var(--display, var(--font-display));
  font-weight: 800;
  font-size: var(--tp-band-title-size, 14px);
  color: var(--text-1, #F3F4F6);
}

:is(.team-profile-page, .player-profile-page) .ca-insight-rail .ca-insight-text,
:is(.team-profile-page, .player-profile-page) .ca-insight-text {
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
}

:is(.team-profile-page, .player-profile-page) .tp-offense-metrics--staff {
  margin-bottom: var(--tp-header-gap, 12px);
}

:is(.team-profile-page, .player-profile-page) .tp-staff-meta {
  margin: 0 0 var(--tp-header-gap, 12px);
  font-size: var(--tp-helper-size, 15px);
  line-height: 1.55;
  color: var(--tp-desc-color, #C4CBD6);
  text-align: left;
}

:is(.team-profile-page, .player-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;
}
