/**
 * Shared profile/report shell — design contract alignment.
 * Team Profile lineup, Pitcher Profile, Bullpen Profile.
 */
.profile-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-hero .pitcher-snapshot,
.profile-hero .bullpen-snapshot,
.profile-hero .tp-team-banner {
  margin-bottom: 0;
}

.profile-decision-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.profile-decision-card {
  background: linear-gradient(180deg, var(--card, var(--bg-2)), #0A0C16);
  border: 1.5px solid var(--border-2, var(--border));
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-decision-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--v-grad, linear-gradient(135deg, #9A6BFF, #5B2BE0));
  pointer-events: none;
}

.profile-decision-card__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.profile-decision-card__value {
  display: block;
  font-family: var(--display, var(--font-display));
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-decision-card__hint {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-2);
}

.profile-decision-card--elite .profile-decision-card__value { color: var(--d-elite, #3CCB7F); }
.profile-decision-card--watch .profile-decision-card__value { color: var(--d-mid, #E8C24A); }
.profile-decision-card--risk .profile-decision-card__value { color: var(--d-poor, #F2545B); }

.profile-verdict-card {
  background: linear-gradient(180deg, var(--card, var(--bg-2)), #0A0C16);
  border: 1.5px solid var(--border-violet, rgba(124, 77, 255, 0.35));
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.profile-verdict-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--v-grad);
  pointer-events: none;
}

.profile-verdict-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v-light, #C4B0FF);
  margin-bottom: 6px;
}

.profile-verdict-card__value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.profile-verdict-card__detail {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.profile-verdict-card--attack .profile-verdict-card__value { color: var(--d-elite, #3CCB7F); }
.profile-verdict-card--respect .profile-verdict-card__value { color: var(--d-mid, #E8C24A); }
.profile-verdict-card--volatile .profile-verdict-card__value { color: var(--d-mid, #E8C24A); }
.profile-verdict-card--fade .profile-verdict-card__value { color: var(--d-poor, #F2545B); }

.profile-context-bar {
  background: var(--bg-2, #0E1018);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.profile-context-bar .hub-control-bar,
.profile-context-bar .tp-hub-bar,
.profile-context-bar .hub-control-bar.tp-hub-bar {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.profile-analyst-take {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-left: 3px solid var(--v, #9A6BFF);
  border-radius: 0 12px 12px 0;
  padding: 12px 14px;
}

.profile-analyst-take__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-light, #C4B0FF);
  margin-bottom: 6px;
}

.profile-analyst-take__text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.profile-deep-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 767px) {
  .profile-decision-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .profile-decision-card__value {
    font-size: 15px;
  }

  .profile-verdict-card {
    padding: 12px;
  }

  .profile-verdict-card__value {
    font-size: 16px;
  }

  .profile-context-bar {
    padding: 10px 12px;
  }

  .profile-analyst-take {
    padding: 10px 12px;
  }
}

@media (max-width: 479px) {
  .profile-decision-strip {
    grid-template-columns: 1fr;
  }
}

.profile-deep-sections .section,
.profile-deep-sections .profile-section {
  margin-bottom: 0;
}

.profile-slate-collapsible {
  margin-bottom: 0;
}

.profile-slate-collapsible > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  list-style: none;
}

.profile-slate-collapsible > summary::-webkit-details-marker { display: none; }

.profile-slate-collapsible[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.profile-slate-collapsible .today-games-bar {
  margin-bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  max-height: 120px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
}

.profile-slate-collapsible .today-games-bar.show {
  display: flex;
}

.team-profile-page .profile-decision-strip {
  margin-bottom: 2px;
}

.pitcher-risk-strip {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.pitcher-risk-strip .ps-stat {
  background: linear-gradient(180deg, var(--card, var(--bg-2)), #0A0C16);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.team-profile-page .tp-identity-stack {
  gap: 12px;
}

/* Profile solid-surface pass: heavier broadcast boards, not translucent boxes. */
.profile-context-bar,
.profile-decision-card,
.profile-verdict-card,
.profile-analyst-take,
.profile-slate-collapsible > summary,
.pitcher-risk-strip .ps-stat {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 28%),
    linear-gradient(180deg, var(--ca-panel-solid, #10131F) 0%, var(--ca-panel-solid-2, #070912) 100%);
  border-color: rgba(154, 107, 255, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.profile-context-bar,
.profile-decision-card,
.profile-verdict-card {
  border-width: 1px;
}

.profile-analyst-take {
  border-left-width: 4px;
  border-left-color: var(--ca-violet-hot, #B794FF);
  border-radius: 0 14px 14px 0;
}

.profile-decision-card::after,
.profile-verdict-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 var(--ca-inner-stroke, rgba(255,255,255,0.14)), inset 0 -28px 52px rgba(0,0,0,0.32);
}

@media (max-width: 640px) {
  .profile-decision-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .profile-decision-strip {
    grid-template-columns: 1fr;
  }
}

/* ── Profile research layout: unified typography + flat inner surfaces (PC) ── */
body.team-profile-page,
body.player-profile-page,
body.pitcher-profile-page,
body.bullpen-profile-page {
  --profile-section-gap: 10px;
  --profile-text-section: 14px;
  --profile-text-helper: 12px;
  --profile-text-th: 12px;
  --profile-text-td: 16px;
  --profile-text-chip: 18px;
  --pp-table-size: 16px;
  --pp-table-num-size: 18px;
  --pp-table-head-size: 12px;
  --pp-table-chip-size: 18px;
  --tp-stat-chip-size: 18px;
  --tp-stat-value-size: 18px;
}

body.team-profile-page .ca-section-title,
body.player-profile-page .ca-section-title,
body.player-profile-page .section-title {
  font-size: var(--profile-text-section) !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  line-height: 1.25 !important;
}

body.team-profile-page .ca-helper,
body.team-profile-page .section-subtitle,
body.player-profile-page .ca-helper,
body.player-profile-page .section-subtitle,
body.player-profile-page .subtitle {
  font-size: var(--profile-text-helper) !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

body.team-profile-page .tp-section.ca-board .tp-section-filter-bar,
body.team-profile-page .tp-section.ca-board .hub-control-bar.tp-hub-bar,
body.player-profile-page .section .hub-control-bar,
body.pitcher-profile-page .tp-section.ca-board .hub-control-bar {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 10px 0 8px;
  margin: 0 0 10px;
}

body.team-profile-page .tp-section.ca-board .tp-section-filter-bar::before,
body.team-profile-page .tp-section.ca-board .hub-control-bar.tp-hub-bar::before {
  display: none;
}

body.team-profile-page .tp-identity-stack,
body.team-profile-page .profile-offense-sections,
body.player-profile-page .profile-deep-sections {
  gap: var(--profile-section-gap) !important;
}

body.player-profile-page .section:not(.ca-board) {
  border-width: 1px;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: var(--profile-section-gap);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.player-profile-page .section:not(.ca-board)::before {
  display: none;
}

body.player-profile-page .table-wrap {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

body.player-profile-page table thead th {
  font-size: var(--profile-text-th) !important;
  padding: 8px 10px !important;
}

body.player-profile-page table tbody td {
  font-size: var(--profile-text-td) !important;
  padding: 8px 10px !important;
}

body.player-profile-page table tbody td.num,
body.player-profile-page table .chip {
  font-size: var(--profile-text-chip) !important;
}

body.player-profile-page .stat-cell .s-val {
  font-size: 16px !important;
}

body.player-profile-page .metric-card .m-val {
  font-size: 18px !important;
}

body.player-profile-page .mini-stat .ms-val {
  font-size: 14px !important;
}

body.player-profile-page .player-name-lg,
body.player-profile-page .ps-name {
  font-size: 20px !important;
}

body.player-profile-page .header h1,
body.player-profile-page h1.page-title {
  font-size: clamp(20px, 2.2vw, 24px) !important;
}

body.player-profile-page .section .stat-cell,
body.player-profile-page .section .metric-card,
body.player-profile-page .section .hand-panel,
body.player-profile-page .section .loc-panel,
body.player-profile-page .section .split-panel {
  border: none !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.12) !important;
}

body.team-profile-page .tp-team-banner__medallion .chip,
body.team-profile-page .tp-team-banner__stats .tp-hero-stat__value .chip,
body.team-profile-page .tp-context-wrc-medallion .v .chip,
body.team-profile-page .tp-window-cell .w-val .chip,
body.team-profile-page .mlbma-trend-cur,
body.team-profile-page .tp-metric-slot .chip {
  font-size: 16px !important;
}

body.team-profile-page .tp-metric-slot .chip {
  font-size: 18px !important;
}

body.team-profile-page .hub-pill,
body.team-profile-page .tp-unit-nav .hub-pill,
body.team-profile-page .tp-unit-nav .tp-unit-tab {
  font-size: 12px !important;
  min-height: 32px !important;
  padding: 6px 14px !important;
}

body.pitcher-profile-page .pp-hero-stats .tp-hero-stat__value,
body.pitcher-profile-page .pp-hero-stats .tp-hero-stat__value .tp-hero-stat__num,
body.pitcher-profile-page .pp-hero-stats .tp-hero-stat__value .chip {
  font-size: 16px !important;
}

/* Hero picker ↔ banner — one card, no stacked search panel */
body.team-profile-page .tp-hero-search.profile-context-bar,
body.pitcher-profile-page .pp-hero-search.profile-context-bar,
body.player-profile-page .bp-hero-search.profile-context-bar {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 10px 18px 6px !important;
}

body.player-profile-page .bp-hero-banner-shell {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

body.player-profile-page .bp-hero-banner-shell .bullpen-snapshot {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
}

body.player-profile-page .bp-hero-banner-shell .ps-stat {
  border: none;
  background: rgba(0, 0, 0, 0.18);
}

body.player-profile-page .hub-pill,
body.player-profile-page .window-pill {
  font-size: 12px !important;
  min-height: 32px !important;
  padding: 6px 14px !important;
}

body.player-profile-page .bp-usage-table th,
body.player-profile-page .bp-usage-table td {
  font-size: 11px !important;
}

body.player-profile-page .bp-usage-table .bp-label,
body.player-profile-page .bp-usage-table .bp-meta,
body.player-profile-page .bp-usage-table .bp-tag {
  font-size: 11px !important;
}

/* Profile tables — broadcast stat numerals (team / pitcher / bullpen) */
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  :is(.tp-table, .hub-table, .pp-data-table, .pp-startlog, .pp-tier-split-table, .bp-leverage-table, .bp-reliever-rank-table, .tp-trend-table)
  tbody td.num,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  :is(.tp-table, .hub-table, .pp-data-table, .pp-startlog, .pp-tier-split-table, .bp-leverage-table, .bp-reliever-rank-table, .tp-trend-table)
  tbody td .chip,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  :is(.tp-table, .hub-table, .pp-data-table, .pp-startlog, .pp-tier-split-table, .bp-leverage-table, .bp-reliever-rank-table, .tp-trend-table)
  tbody td .val-chip {
  font-size: 18px !important;
  font-weight: 800 !important;
}

:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  :is(.tp-table, .hub-table, .pp-data-table, .pp-startlog, .pp-tier-split-table, .bp-leverage-table, .bp-reliever-rank-table, .tp-trend-table)
  tbody td {
  font-size: 16px !important;
}

:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  :is(.tp-table, .hub-table, .pp-data-table, .pp-startlog, .pp-tier-split-table, .bp-leverage-table, .bp-reliever-rank-table, .tp-trend-table)
  thead th {
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
}

:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  .tp-kpi-card .m-val .chip,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  .tp-window-cell .w-val .chip,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  .tp-metric-slot .chip,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  .stat-cell .s-val,
:is(.team-profile-page, .pitcher-profile-page, .bullpen-profile-page, .player-profile-page)
  .metric-card .m-val {
  font-size: 18px !important;
  font-weight: 800 !important;
}
