/* Match the homepage's mobile heading and section boundary. */
@media (max-width:767px) {
  main:has(.mobile-hero) {
    container: mobile-hero / inline-size;
  }

  main .mobile-hero:is(#top, .error, [aria-labelledby="page-title"]) {
    --hero-inset: 20px;
    --hero-illustration-width: calc(100cqw - 2 * clamp(20px, 4vw, 40px));
    --hero-trust-height: calc(clamp(10px, 3vw, 12px) * 1.55);
    --hero-height: calc(317.094px + var(--hero-trust-height) + var(--hero-wrap-adjustment, 0px) + var(--hero-illustration-width) * 360 / 460);
    box-sizing: border-box;
    position: relative;
    padding-top: var(--hero-inset) !important;
    padding-bottom: var(--hero-inset) !important;
  }

  main .mobile-hero::after {
    content: "";
    position: absolute;
    inset: 100% 0 auto;
    height: 1px;
    background: #E2E0D9;
    pointer-events: none;
    z-index: 1;
  }

  .mobile-hero:is(#top, [aria-labelledby="page-title"]) .mobile-hero-copy,
  .land-page .mobile-hero:is(#top) .mobile-hero-copy,
  .mobile-hero.mobile-hero-copy {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: calc(var(--hero-height) - 2 * var(--hero-inset));
    row-gap: 12px !important;
  }

  .mobile-hero .mobile-hero-copy > :is(h1, p),
  .mobile-hero.mobile-hero-copy > :is(h1, p) {
    margin-block: 0 !important;
  }

  .mobile-hero .mobile-hero-copy > .hero-metrics {
    margin-top: 14px;
  }

  .mobile-hero .mobile-hero-actions {
    margin-top: auto !important;
  }

  .mobile-hero.error {
    min-height: var(--hero-height);
  }

  .mobile-hero.error .actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    align-self: center;
  }

  /* The homepage's heading and subtitle gain or lose lines at these content widths. */
  @container mobile-hero (max-width:353.5px) {
    .mobile-hero { --hero-wrap-adjustment: 25.594px; }
  }
  @container mobile-hero (max-width:351.5px) {
    .mobile-hero { --hero-wrap-adjustment: 63.031px; }
  }
  @container mobile-hero (max-width:332.5px) {
    .mobile-hero { --hero-wrap-adjustment: 88.625px; }
  }
  @container mobile-hero (min-width:485.5px) {
    .mobile-hero { --hero-wrap-adjustment: -37.438px; }
  }
}
