/*
 * Canonical page-section header.
 *
 * Signals is the visual reference. Page heroes opt into this contract through
 * explicit classes so card, widget, modal and chart-internal headings remain
 * untouched.
 */
.page-section-header {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: clamp(16px, 2.2vw, 32px) !important;
  width: 100%;
  min-width: 0;
  margin: clamp(20px, 2.2vw, 30px) 0 clamp(6px, .8vw, 10px) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.page-section-header::before,
.page-section-header::after,
.page-section-header__title::before,
.page-section-header__title::after {
  content: none !important;
  display: none !important;
}

.page-section-header > *,
.page-section-header__copy {
  position: relative;
  z-index: auto;
  min-width: 0;
}

.page-section-header__copy {
  flex: 1 1 auto;
  max-width: 78rem;
}

.page-section-header .page-section-header__title {
  max-width: 22ch !important;
  margin: 0 !important;
  color: var(--text) !important;
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 3.2vw, 3.15rem) !important;
  font-weight: 700 !important;
  line-height: .98 !important;
  letter-spacing: -.055em !important;
  text-wrap: balance;
}

.page-section-header .page-section-header__description {
  display: block;
  max-width: 68ch !important;
  margin: 10px 0 0 !important;
  color: var(--muted) !important;
  font-family: var(--font-sans) !important;
  font-size: .92rem !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
  text-wrap: pretty;
}

.page-section-header__actions {
  flex: 0 0 auto;
  max-width: min(46%, 42rem);
}

/* Existing page-specific heroes may still carry legacy decorative styles. */
.signals-hero.page-section-header,
.earnings-hero.page-section-header,
.fg-hero.page-section-header,
.discover-hero.page-section-header,
.portfolio-page-head.page-section-header,
.performance-hero.page-section-header,
.integrations-hero.page-section-header,
.market-workspace-head.page-section-header,
.market-map-head.page-section-header,
.users-admin-head.page-section-header,
.rd-intro.page-section-header,
.overview-news-head.page-section-header {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.signals-hero.page-section-header::after {
  content: none !important;
}

#signals-page .signals-stats {
  display: none !important;
}

/* The chart header keeps its controls but uses the same title contract. */
.page-section-header--chart {
  flex-wrap: wrap;
  align-items: center;
}

.page-section-header--chart .page-section-header__copy {
  flex: 0 1 auto;
}

.page-section-header--chart .page-section-header__title {
  max-width: 14ch;
}

/* Launch controls remain in their own panel; only the page heading is global. */
#launch-page .lc-overview-panel {
  margin-top: 0;
}

@media (max-width: 900px) {
  .page-section-header {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
  }

  .page-section-header__actions {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .page-section-header {
    gap: 12px !important;
    margin: 16px 0 4px !important;
  }

  .page-section-header .page-section-header__title {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8.4vw, 2.15rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
  }

  .page-section-header .page-section-header__description {
    margin-top: 8px !important;
    font-size: .84rem !important;
    line-height: 1.5 !important;
  }

  .page-section-header__actions {
    width: 100%;
  }

  .page-section-header--chart .page-section-header__actions {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-section-header,
  .page-section-header * {
    scroll-behavior: auto;
  }
}
