:root {
  --p360-section-title-size: 40px;
  --p360-subsection-title-size: 30px;
  --p360-card-title-size: 24px;
  --p360-compact-title-size: 18px;
  --p360-service-title-size: 17px;
}

/* Shared typography overrides keep content titles consistent across pages.
   Hero descendants are deliberately excluded, including the home chapters. */
:where(main, .premium-footer) h2:not(:where(.page-hero *, .legal-hero *, .error-hero *, .stage *)) {
  font-size: var(--p360-heading-size, var(--p360-section-title-size)) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

:where(main, .premium-footer) h3:not(:where(.page-hero *, .legal-hero *, .error-hero *, .stage *)) {
  font-size: var(--p360-heading-size, var(--p360-card-title-size)) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

:where(.founder-mini-copy, .team-mini-cta, .contact-form-head, .legal-sources) h2,
:where(.team-method-intro, .avs-situations-cta, .pillar3-guide-panel, .pillar3-deeper-subhead) h3 {
  --p360-heading-size: var(--p360-subsection-title-size);
}

:where(.home-trust-card, .cv-block, .legal-content) h3 {
  --p360-heading-size: var(--p360-compact-title-size);
}

.orientation-service h3 {
  --p360-heading-size: var(--p360-service-title-size);
}

@media (max-width: 1100px) {
  :root {
    --p360-section-title-size: 36px;
    --p360-subsection-title-size: 28px;
  }
}

@media (max-width: 700px) {
  :root {
    --p360-section-title-size: 30px;
    --p360-subsection-title-size: 26px;
    --p360-card-title-size: 22px;
    --p360-service-title-size: 16px;
  }
}
