/* Restore the standalone HTML's browser defaults before its unchanged CSS.
   Cabinet typography must not alter the supplied landing design. */
body:has(.phone-landing) {
  font-size: 16px;
  line-height: normal;
  padding-bottom: 0;
}

/* Keep the desktop scroll story on phones: one pinned device, four screens.
   The original animation script remains the single source of chapter state. */
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .phone-landing .story-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    gap: 16px;
    padding-inline: 16px;
    --story-phone-zoom: .42;
  }

  .phone-landing .story-phone-pin {
    display: flex;
    top: 100px;
    height: calc(100svh - 100px);
    min-width: 0;
  }

  .phone-landing .story-phone-pin .phone-device {
    width: 280px;
    flex-shrink: 0;
    zoom: var(--story-phone-zoom);
  }

  .phone-landing .story-chapter {
    min-height: 100svh;
    padding: 70px 0;
  }

  .phone-landing .chapter-phone-inline { display: none; }
}

@media (min-width: 360px) and (max-width: 860px) {
  .phone-landing .story-grid { --story-phone-zoom: .48; }
}
@media (min-width: 430px) and (max-width: 860px) {
  .phone-landing .story-grid { --story-phone-zoom: .58; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .phone-landing .story-grid { --story-phone-zoom: .8; }
}
@media (max-width: 860px) and (max-height: 500px) {
  .phone-landing .story-grid { --story-phone-zoom: .42; }
}

@media (max-width: 599px) and (prefers-reduced-motion: no-preference) {
  .phone-landing .story-chapter .h1 { font-size: 22px; line-height: 1.16; }
  .phone-landing .story-chapter .h1 em {
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
  }
  .phone-landing .story-chapter .ch-h { font-size: 20px; }
  .phone-landing .story-chapter .hero-lede,
  .phone-landing .story-chapter .ch-p { font-size: 13px; line-height: 1.6; }
  .phone-landing .story-chapter .eyebrow-plain,
  .phone-landing .story-chapter .hero-note { font-size: 11px; }
  .phone-landing .story-chapter .hero-actions > a {
    width: 100%;
    min-height: 44px;
    padding: 12px 8px;
    font-size: 11px;
    text-align: center;
  }
  .phone-landing .story-chapter .how-step { gap: 8px; }
  .phone-landing .story-chapter .how-step .n { width: 24px; height: 24px; }
  .phone-landing .story-chapter .how-step b { font-size: 13px; }
  .phone-landing .story-chapter .how-step p { font-size: 12px; }
}

:where(.phone-landing) button {
  font: revert;
}

/* Anchor navigation must clear the fixed header without shifting the layout. */
.phone-landing #how,
.phone-landing #faq {
  scroll-margin-top: 100px;
}

/* Keep the original label and type size when only a little space is missing. */
@media (min-width: 375px) and (max-width: 389px) {
  .phone-landing .nav-cta > .btn-lime {
    padding-inline: 12px;
  }
}

/* Keep all three header actions inside the smallest phone viewports.
   The supplied design and animation remain unchanged at 390px and wider. */
@media (max-width: 374px) {
  .phone-landing .nav {
    padding: 10px;
    gap: 6px;
  }

  .phone-landing .nav .logo-row {
    gap: 6px;
    font-size: 14px;
  }

  .phone-landing .nav .logo-mark {
    width: 28px;
    height: 28px;
  }

  .phone-landing .nav-cta {
    gap: 6px;
  }

  .phone-landing .nav-cta > .btn-lime {
    padding: 12px 10px;
    font-size: 12px;
    min-height: 44px;
  }
}

/* SEO accessibility and policy navigation, scoped to the public landing. */
.phone-landing .plan-price .per { color: var(--muted); }
.phone-landing .foot-legal { margin-top: 16px; gap: 4px 22px; }
.phone-landing .foot-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.phone-landing .foot-legal a:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
