/* Phone and compact tablet layouts. Kept separate from the desktop design. */
@media (max-width: 900px) {
  html { scroll-padding-bottom: 100px; }
  .container { width: calc(100% - 36px); }
  .section { padding-block: 36px; }
  .nav { position: relative; padding-block: 12px; }
  .menu-button { display: grid; place-items: center; background: transparent; border: 1px solid #6b7488; color: var(--cream); border-radius: 8px; width: 46px; height: 46px; font-size: 22px; }
  .nav-links { display: none; position: absolute; top: 100%; left: -18px; right: -18px; background: var(--navy); padding: 16px 18px 20px; z-index: 25; border-top: 1px solid #1e3263; box-shadow: 0 12px 20px #0003; max-height: calc(100svh - 80px); overflow-y: auto; }
  .nav-links.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nav-links > a { min-height: 48px; padding: 14px; border: 1px solid #3f4a63; border-radius: 8px; font-size: 16px; }
  .nav-links .nav-rescue { grid-column: 1 / -1; width: 100%; min-height: 48px; margin-top: 4px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 36px; }
  .hero-copy { gap: 18px; min-width: 0; }
  .hero .eyebrow { max-width: 100%; font-size: 11px; letter-spacing: 1px; }
  .hero h1 { font-size: clamp(44px, 10vw, 74px); line-height: 1.02; overflow-wrap: break-word; }
  .hero-description { font-size: 16px; line-height: 1.65; }
  .coverage { font-size: 12px; gap: 8px; line-height: 1.6; }
  .hero .button-row { width: 100%; display: grid; grid-template-columns: 1fr; gap: 12px; }
  .hero .button-row .button { width: 100%; min-height: 56px; padding: 14px 16px; font-size: 15px; }
  .hero .login-link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 10px; font-size: 14px; }
  .trust-pills { max-width: 100%; gap: 7px; }
  .trust-pills span { white-space: normal; font-size: 12px; padding: 7px 10px; line-height: 1.5; }
  .trip-card { width: 100%; max-width: 520px; justify-self: center; padding: 22px; }
  .trip-timeline li { font-size: 14px; }
  .trip-caption { font-size: 13px; }
  .replay-button { min-height: 44px; font-size: 13px; padding: 12px 0; }
  .tracks-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .track, .plan, .demo-panel, .return-banner { min-width: 0; }
  .track { padding: 24px; }
  .track .eyebrow { font-size: 12px; }
  .feature-list li { font-size: 14px; }
  .feature-list li div { min-width: 0; }
  .track .button, .track-actions, .track-actions .text-link { width: 100%; }
  .track .button { font-size: 15px; padding-inline: 14px; }
  .track-actions .text-link { text-align: center; min-height: 44px; }
  .comparison-table { display: none; }
  .comparison-mobile { display: block; }
  .comparison-mobile .segmented { width: 100%; border-radius: 10px; display: flex; margin-bottom: 14px; }
  .comparison-mobile button { flex: 1; min-width: 0; min-height: 48px; padding: 12px 8px; font-size: 14px; }
  .comparison-mobile dl { margin: 0; background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .comparison-mobile dl > div { padding: 16px; border-bottom: 1px solid #e3e1da; }
  .comparison-mobile dl > div:last-child { border-bottom: 0; }
  .comparison-mobile dt { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
  .comparison-mobile dd { margin: 0; font-size: 15px; line-height: 1.6; }
  .comparison .fine-print, .fine-print { font-size: 12px; }
  .section-heading-row { gap: 20px; }
  .segmented { max-width: 100%; }
  .segmented button { min-height: 48px; padding: 12px 18px; font-size: 14px; }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-grid p:last-child { font-size: 14px; }
  .return-banner { flex-direction: column; align-items: flex-start; padding: 26px; gap: 22px; }
  .return-banner > div { min-width: 0; }
  .return-banner p:not(.kicker) { font-size: 15px; }
  .return-banner .button { width: 100%; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .proof-grid p { font-size: 14px; }
  .proof-grid a { white-space: normal; overflow-wrap: anywhere; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan .eyebrow { font-size: 11px; }
  .plan .muted { font-size: 14px; min-height: 0; }
  .plan .fine-print { font-size: 13px; }
  .plan .button, .plan .text-link { font-size: 15px; min-height: 48px; }
  .plan .text-link { display: flex; align-items: center; padding-top: 12px; }
  .demo-panel { grid-template-columns: minmax(0, 1fr); padding: 26px; gap: 28px; }
  .demo-intro .button { font-size: 15px; width: 100%; }
  .form-grid { gap: 18px; }
  .form-grid label, .rescue-form label { font-size: 15px; }
  .form-grid input, .form-grid select, .rescue-form input { font-size: 16px; min-height: 54px; padding: 14px; }
  .form-grid > .button { font-size: 15px; min-height: 54px; }
  .form-note, .form-grid > .form-note { font-size: 12px; line-height: 1.65; }
  .footer-links { gap: 8px 18px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  .footer-bottom { flex-direction: column; font-size: 12px; line-height: 1.6; padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .mobile-rescue { display: flex; align-items: center; justify-content: space-between; position: fixed; inset: auto 0 0; gap: 12px; z-index: 20; background: var(--navy); border-top: 1px solid #3f4a63; color: var(--cream); padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
  .mobile-rescue > div { min-width: 0; }
  .mobile-rescue span { font-size: 11px; line-height: 1.5; }
  .mobile-rescue .button { flex-shrink: 0; min-height: 48px; font-size: 15px; padding: 12px 18px; }
  body.keyboard-open .mobile-rescue { display: none; }
  dialog { max-height: calc(100svh - 12px); max-height: calc(100dvh - 12px); padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; scroll-padding-bottom: 24px; }
  .sheet-header { position: sticky; top: -12px; background: white; z-index: 2; padding-block: 10px; align-items: flex-start; }
  .sheet-header h2 { font-size: 20px; line-height: 1.4; padding-top: 7px; }
  .close-dialog { width: 44px; height: 44px; }
  .preview-notice { font-size: 12px; }
  .contact-actions .button { min-height: 52px; font-size: 15px; padding-inline: 10px; }
  .service-option { padding: 16px 14px; min-height: 80px; }
  .service-option > span:nth-child(2) { min-width: 0; }
  .service-option small { font-size: 13px; line-height: 1.5; display: block; }
  .text-button { min-height: 44px; font-size: 14px; }
  .toast { width: calc(100% - 36px); max-width: 480px; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > * { grid-column: 1; }
  .proof-grid, .pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: 24px; gap: 10px; }
  .plan h3 { font-size: 22px; }
  .plan-price { font-size: 38px; }
  .plan .button { width: 100%; }
  .proof-grid p { padding: 20px; }
  .proof-grid .mono { font-size: 11px; }
  .footer-top { align-items: flex-start; flex-direction: column; gap: 20px; }
  .footer-top > div:first-child { align-items: flex-start; }
  .footer-top p { font-size: 14px; }
  .footer-contact { font-size: 13px; }
  .footer-contact small { font-size: 12px; }
}
@media (max-width: 480px) {
  .track { padding: 22px 18px; }
  .track h3 { font-size: 24px; line-height: 1.25; }
  .workflow-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .workflow-grid li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding: 20px; }
  .workflow-grid li .mono { grid-row: 1 / 3; padding-top: 3px; }
  .workflow-grid li h3 { grid-column: 2; font-size: 18px; }
  .workflow-grid li p:last-child { grid-column: 2; }
  .return-banner, .demo-panel { padding: 24px 20px; }
  .return-banner h2, .demo-intro h2 { font-size: 38px; }
  .trip-top { flex-wrap: wrap; }
  .trip-card h2 { font-size: 18px; }
  .trip-card { padding: 20px; }
  .mobile-rescue span { display: none; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .mobile-rescue { padding-block: 6px; }
  .mobile-rescue .button { min-height: 44px; padding-block: 10px; }
  dialog { max-height: calc(100dvh - 8px); }
  .sheet-handle { display: none; }
}