/* Shared page and section treatment. Keep small card/table headings lightweight. */
:root {
  --pw-header-background: #eff6ff;
  --pw-header-accent: #2563eb;
  --pw-header-ink: #153e8a;
}

#main-content :is(.pw-page-header, .pw-section-header, .pw-heading-band,
  .pw-strength-heading, .pw-auth-header) {
  padding: 18px 20px;
  border-left: 4px solid var(--pw-header-accent);
  border-radius: 0 10px 10px 0;
  background: var(--pw-header-background);
  gap: 14px;
  min-width: 0;
}

#main-content :is(.pw-page-header, .pw-section-header, .pw-heading-band,
  .pw-strength-heading, .pw-auth-header) :is(h1, h2, .pw-section-title, .pw-page-title) {
  color: var(--pw-header-ink);
}

#main-content :is(.pw-page-header, .pw-section-header, .pw-heading-band,
  .pw-strength-heading) > :last-child {
  margin-bottom: 0;
}

#main-content .pw-section-header > div { min-width: 0; }
#main-content .pw-section-header > .pw-section-link { flex-shrink: 0; }
#main-content .pw-heading-band { margin-bottom: 20px; }
#main-content h2.pw-heading-band { font-size: clamp(1.25rem, 3vw, 1.65rem); color: var(--pw-header-ink); }

/* Older report/profile templates use named wrappers for the same section role. */
#main-content :is(.pw-team-schedule-card-header, .pw-team-schedule-results-header,
  .pw-team-results-card-header, .pw-team-prediction-snapshot-header,
  .pw-player-detail-history-header, .pw-goalie-detail-history-header,
  .pw-player-performance-table-header, .pw-player-predictions-results-header) {
  padding: 18px 20px;
  border-left: 4px solid var(--pw-header-accent);
  border-radius: 0 10px 10px 0;
  background: var(--pw-header-background);
  gap: 14px;
}
#main-content :is(.pw-team-schedule-card-header, .pw-team-schedule-results-header,
  .pw-team-results-card-header, .pw-team-prediction-snapshot-header,
  .pw-player-detail-history-header, .pw-goalie-detail-history-header,
  .pw-player-performance-table-header, .pw-player-predictions-results-header) h2 {
  color: var(--pw-header-ink);
}

/* Identity cards retain headshots, team colours and their existing layouts. */
#main-content :is(.pw-about-hero, .pw-strength-hero, .pw-team-detail-hero,
  .pw-team-schedule-hero, .pw-team-results-hero, .pw-team-prediction-hero,
  .pw-player-detail-hero, .pw-goalie-detail-hero, .pw-matchup-hero, .pw-game-score-card) {
  border-top: 4px solid var(--pw-header-accent);
}

@media (max-width: 767px) {
  #main-content :is(.pw-page-header, .pw-section-header, .pw-heading-band,
    .pw-strength-heading, .pw-auth-header) { padding: 15px 16px; }
  #main-content .pw-section-header { flex-wrap: wrap; align-items: flex-start; }
  #main-content .pw-section-header > .pw-section-link { white-space: normal; }
  #main-content :is(.pw-team-schedule-card-header, .pw-team-schedule-results-header,
    .pw-team-results-card-header, .pw-team-prediction-snapshot-header,
    .pw-player-detail-history-header, .pw-goalie-detail-history-header,
    .pw-player-performance-table-header, .pw-player-predictions-results-header) {
    padding: 15px 16px;
    flex-wrap: wrap;
  }
  #main-content :is(.pw-page-header, .pw-section-header, .pw-heading-band) :is(h1, h2) {
    overflow-wrap: anywhere;
  }
}
