/* Mobile page supports portrait and landscape without an orientation lock. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.hero-copy,
.hero-visual,
.section-heading,
.benefit-list,
.how-inner > *,
.contact-section > *,
.benefit-item > div,
.steps li > div { min-width: 0; }

h1, h2, h3, p, .brand, .button { overflow-wrap: break-word; }
.button { max-width: 100%; }
.icon-button { width: 44px; height: 44px; min-width: 44px; }
.text-button { min-height: 44px; padding-inline: 4px; }
.header-link,
.legal-top nav a,
.footer-bottom a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.quiz-dialog,
.policy-dialog {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 760px) and (orientation: portrait) {
  .header-inner { gap: 12px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 44px); }
  .hero-visual { padding-right: 0; }
  .mobile-cta {
    padding: 10px max(20px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
  .quiz-dialog, .policy-dialog {
    width: min(540px, calc(100% - 24px));
    padding: 20px;
    scroll-padding-top: 64px;
  }
  .dialog-toolbar {
    position: sticky;
    top: -20px;
    z-index: 2;
    background: #fff;
    padding-block: 8px;
  }
}

/* A phone turned sideways has ample width but limited vertical space. */
@media screen and (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .container {
    width: calc(100% - 40px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .draft-banner { font-size: 11px; padding-block: 7px; }
  .header-inner { min-height: 64px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 11px; }
  .brand-icon { width: 34px; height: 40px; flex-shrink: 0; }
  .header-link { font-size: 12px; }
  .hero { padding-top: 28px; background: #fff; }
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 28px;
  }
  .hero .eyebrow { margin-bottom: 14px; font-size: 10px; }
  h1 { font-size: clamp(32px, 4.8vw, 42px); margin-bottom: 20px; }
  .hero-lead { font-size: 16px; }
  .source-question { font-size: 14px; }
  .hero-copy > .button { width: 100%; }
  .cta-note { max-width: none; text-align: center; font-size: 11px; }
  .hero-visual { width: 100%; padding: 0; max-width: 360px; align-self: center; }
  .photo-frame { padding: 18px; }
  .photo-topline { font-size: 8px; letter-spacing: .08em; margin-bottom: 16px; }
  .photo-caption { gap: 10px; margin-top: 16px; }
  .photo-caption strong { font-size: 22px; }
  .photo-caption p { font-size: 14px; }
  .benefit-stamp { position: static; border: 0; margin-top: 12px; padding: 12px 14px; }
  .benefit-stamp strong { font-size: 12px; }
  .benefit-stamp span { font-size: 11px; }
  .hero-disclaimer { margin-top: 28px; }
  .benefit-section { padding-top: 40px; padding-bottom: 40px; }
  .how-section { padding-block: 40px; }
  .contact-section { padding-top: 40px; padding-bottom: 40px; }
  .button { min-height: 48px; font-size: 16px; padding: 12px 18px; }
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    border-top: 1px solid var(--line);
    background: #ffffffed;
    padding: 8px max(20px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    backdrop-filter: blur(10px);
  }
  .mobile-cta .button { width: 100%; min-height: 48px; }
  .modal-open .mobile-cta { display: none; }
  .footer-bottom { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .quiz-dialog, .policy-dialog {
    width: min(640px, calc(100% - 32px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 16px 20px 20px;
    scroll-padding-top: 64px;
  }
  .dialog-toolbar {
    position: sticky;
    top: -16px;
    z-index: 2;
    background: #fff;
    padding-block: 8px;
    margin-bottom: 12px;
  }
  .quiz-dialog h2, .policy-dialog h2 { font-size: 27px; }
  .age-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .age-button { min-height: 48px; font-size: 15px; }
  .quiz-navigation { align-items: center; }
}
