/* Mobile-first conversion refinements for the homepage and Discovery flow. */
.mobile-discovery-cta {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: clip;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .site-header {
    min-height: 68px;
    padding-inline: 16px;
  }

  .mobile-brand-group {
    width: 100%;
    justify-content: space-between;
  }

  .mobile-brand-group .logo-link {
    order: 1;
  }

  .mobile-brand-group .mobile-nav-toggle {
    order: 2;
  }

  .site-logo {
    width: 126px;
  }

  .mobile-brand-group .logo-link,
  .mobile-brand-group .mobile-nav-toggle,
  .site-header nav .client-login-link {
    min-height: 44px;
  }

  .mobile-brand-group .logo-link {
    display: inline-flex;
    align-items: center;
  }

  .home-discovery-hero {
    gap: 28px;
    padding: 34px 16px 54px;
  }

  .home-discovery-eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
    line-height: 1.45;
  }

  .home-discovery-hero h1 {
    max-width: 520px;
    font-size: clamp(42px, 13vw, 58px);
    line-height: .96;
  }

  .home-discovery-hero .lede {
    margin: 18px 0 20px;
    font-size: 16px;
    line-height: 1.52;
  }

  .hero-jump-cta {
    min-height: 54px;
    padding: 15px 18px;
  }

  .hero-outcomes {
    display: flex;
    gap: 7px 14px;
    margin-top: 16px;
    font-size: 10px;
  }

  .hero-result-glimpse {
    display: none;
  }

  .home-discovery-form-shell {
    scroll-margin-top: 78px;
  }

  .home-discovery-form {
    padding: 18px 14px 20px;
    border-radius: 18px;
    scroll-margin-top: 78px;
  }

  .home-discovery-form-head {
    padding-bottom: 12px;
    font-size: 9px;
  }

  .home-business-context {
    margin-top: 15px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .home-business-context .home-discovery-step,
  .home-business-context > p {
    display: none;
  }

  .home-business-context h2,
  .home-discovery-form h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
  }

  .home-industry-field {
    margin-top: 13px;
  }

  .home-industry-field > span {
    font-size: 9px;
  }

  .home-industry-field select {
    min-height: 54px;
    font-size: 16px;
  }

  .home-question-divider {
    margin: 13px 0;
  }

  .home-question-divider:before,
  .home-question-divider:after {
    opacity: .55;
  }

  .home-main-question .home-discovery-step {
    margin-bottom: 5px;
    font-size: 8px;
  }

  .home-main-question .home-discovery-fields {
    margin-top: 12px;
  }

  .home-discovery-fields {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .home-discovery-choice span {
    min-height: 68px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.25;
  }

  .home-discovery-fineprint {
    margin-top: 13px;
    font-size: 10px;
  }

  .mobile-discovery-cta {
    position: fixed;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 14px;
    z-index: 5000;
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--home-coral, #df704e);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(8, 44, 54, .28);
    opacity: 1;
    transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }

  .home-resource-all {
    width: auto;
    max-width: 100%;
    padding: 10px 0;
    text-align: center;
    white-space: normal;
  }

  .mobile-discovery-cta.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    pointer-events: none;
  }

  .discovery-shell {
    padding: 18px 12px 44px;
  }

  .discovery-intro {
    display: none;
  }

  .form-panel {
    overflow: visible;
    border-radius: 14px;
  }

  .progress-wrap {
    position: sticky;
    top: 0;
    z-index: 12;
    padding: 15px 18px 10px;
    border-radius: 14px 14px 0 0;
    background: rgba(255, 253, 249, .96);
    backdrop-filter: blur(10px);
  }

  .progress-meta {
    font-size: 10px;
  }

  .progress-track {
    margin-top: 9px;
  }

  .form-step {
    min-height: 390px;
    padding: 22px 18px 104px;
  }

  .form-step h2,
  .form-complete h2 {
    font-size: 28px;
    line-height: 1.06;
  }

  .form-step[data-step="1"] .step-lede {
    display: none;
  }

  .form-step[data-step="1"] .industry-context-field {
    margin-top: 18px;
  }

  .form-step[data-step="1"] .choice-group {
    margin-top: 20px;
  }

  .form-step[data-step="1"] .scenario-choice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .form-step[data-step="1"] .scenario-choice-grid label {
    min-height: 70px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.3;
  }

  .form-step.is-tree-active .step-kicker {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .form-step.is-tree-active .step-lede,
  .form-step.is-tree-active .elimination-note {
    display: none;
  }

  .question-tree-status {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 14px 0 18px;
    padding: 10px 0;
    font-size: 11px;
  }

  .question-tree-status strong {
    font-size: 12px;
  }

  .form-step.is-tree-active .tree-question > legend,
  .form-step.is-tree-active .tree-question:not(fieldset) {
    font-size: 17px;
    line-height: 1.35;
  }

  .form-step.is-tree-active .tree-question select,
  .form-step.is-tree-active .tree-question input,
  .form-step.is-tree-active .tree-question textarea {
    min-height: 52px;
    margin-top: 10px;
    font-size: 16px;
  }

  .form-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4000;
    gap: 9px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #d4dedb;
    background: rgba(255, 253, 249, .97);
    box-shadow: 0 -12px 30px rgba(16, 43, 53, .09);
    backdrop-filter: blur(12px);
  }

  .form-actions .primary-button {
    flex: 1 1 auto;
    min-height: 52px;
  }

  .form-actions .back-button {
    flex: 0 0 auto;
    min-height: 52px;
  }

  .form-error:not(:empty) {
    margin: -92px 18px 100px;
  }

  .mozo-a11y-widget {
    right: 4px !important;
    left: auto !important;
  }

  .mozo-a11y-launcher {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

  .mozo-a11y-icon {
    width: 22px !important;
    height: 22px !important;
    flex-basis: 22px !important;
  }

  .mozo-a11y-panel {
    right: 0 !important;
    left: auto !important;
  }

  body[data-page-type="homepage"] .mozo-a11y-widget {
    top: 154px !important;
    bottom: auto !important;
  }

  body[data-page-type="homepage"].is-discovery-focused .mozo-a11y-widget {
    top: auto !important;
    bottom: var(--mozo-a11y-bottom, 14px) !important;
  }

  .discovery-page .mozo-a11y-widget {
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 340px) {
  .home-discovery-fields {
    grid-template-columns: 1fr;
  }

  .home-discovery-choice span {
    min-height: 52px;
  }

  .form-step[data-step="1"] .scenario-choice-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-discovery-cta {
    transition: none;
  }
}
