/* Public-page headings share responsive rules, independently of app navigation.
   style.css applies flex layout to every <header>; editorial heroes stack text. */
.seo-page > .seo-hero,
.legal-page > .legal-hero {
  display: block;
}

.seo-page > .seo-hero { text-align: left; }

:is(.seo-hero, .legal-hero, .pricing-hero, .welcome-section,
    .freemium-welcome-content, .beta-public-page, .verification-card) h1,
.login-form-container > h2 {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

@media (max-width: 767.98px) {
  /* Keep long FR/EN titles readable inside the available card width. */
  :is(.seo-hero, .legal-hero, .pricing-hero, .welcome-section,
      .freemium-welcome-content, .beta-public-page, .verification-card) h1 {
    display: block;
    max-width: 100%;
    font-size: clamp(1.5rem, 5.8vw, 2rem);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 14px;
  }

  .seo-page > .seo-hero,
  .legal-page > .legal-hero,
  .pricing-page > .pricing-hero {
    min-width: 0;
    padding: clamp(18px, 4.5vw, 28px);
  }

  :is(.seo-hero, .legal-hero, .pricing-hero) > p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .seo-hero .seo-lead,
  .pricing-hero > p:not(.pricing-eyebrow),
  .legal-hero > p,
  .freemium-welcome-content .freemium-welcome-lead,
  .beta-public-page .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .seo-hero .seo-lead { margin-top: 16px; }

  .seo-hero .seo-eyebrow,
  .pricing-hero .pricing-eyebrow,
  .freemium-welcome-content .onboarding-kicker {
    font-size: .75rem;
    line-height: 1.45;
    letter-spacing: .075em;
  }

  .seo-hero .seo-hero-actions { margin-top: 22px; }

  .seo-hero-actions > a,
  .welcome-section .button-group > a {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.4;
  }

  .seo-hero-actions > a { padding-inline: 14px; }

  .welcome-section .onboard-content > h2,
  .freemium-form-heading > h2,
  .login-form-container > h2 {
    max-width: 100%;
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .welcome-section .onboard-row { gap: 24px; }

  /* Guest navigation must not inherit the desktop horizontal offset. */
  body:not(.ainvestor-authenticated) .guest-header-actions {
    transform: none;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
    margin-inline: 0;
  }

  body:not(.ainvestor-authenticated) .menu-container > nav > ul {
    min-width: 0;
    flex-wrap: wrap;
    padding-inline: 0;
  }

  body:not(.ainvestor-authenticated) .guest-header-actions > a,
  body:not(.ainvestor-authenticated) .guest-header-actions .language-dropdown-trigger {
    padding: 8px 6px;
    font-size: clamp(.8rem, 3.5vw, .95rem);
    line-height: 1.35;
  }
}
