/* Phone pass (Nov 15): fixes for 375 to 430px screens. Loaded last, after every page stylesheet. */

@media (max-width: 820px) {
  /* Header: the phone icon was a 17px tap target; give it a 44px round button like the menu button */
  .top__tel { min-width: 2.75rem; min-height: 2.75rem; justify-content: center; border: 1px solid var(--rule-2); border-radius: 999px; }
  .top__logo { display: inline-flex; align-items: center; min-height: 2.75rem; }

  /* Tap targets under 44px: card links, "Learn more", "Read more client stories", TV stories, office list, calculator term pills */
  .who__card a, .feat__more a, .voices__more a, .stories a, .office__list a, .hero__proof--inline { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .seg label { display: flex; min-height: 2.75rem; }
  .seg span { flex: 1; min-height: 2.75rem; display: flex; align-items: center; justify-content: center; }

  /* Phone and email links inside sentences: taller hit area without moving the text */
  main p a[href^="tel:"], main p a[href^="mailto:"], main li a[href^="tel:"], .pop-link { padding-block: .8rem; }

  /* /book/ guided chat: Back button and the call link under the chat were 40px and 16px tall */
  .gb .gb__back, .gb__back { min-height: 2.75rem; }
  .gb__foot a { display: inline-flex; align-items: center; min-height: 2.75rem; }

  /* Footer: links were 16 to 24px tall; make every footer link a 44px row */
  .foot__links { gap: 0; }
  .foot__links a, .foot__social a, .foot__legal nav a, .foot__grid p a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .foot__social { gap: 0 1.25rem; margin-top: .5rem; }
  .foot__legal nav { gap: 0 1.25rem; }
  .foot__legal { font-size: .92rem; }
  /* Footer end: keep the last lines clear of the chat launcher and Follow us button, not only the call bar */
  .foot { padding-bottom: calc(9.5rem + env(safe-area-inset-bottom)); }

  /* Open menu: hide the floating chat bubble and Follow us button so they do not cover menu links */
  body:has(#drawer:not([hidden])) :is(.apchat-peek, .social-dock) { display: none; }
  /* Credit Rebuilding Plan pop-ups: close button was 40px */
  dialog.pop [data-close] { min-width: 2.75rem; min-height: 2.75rem; }

  /* Readability: real content that was set below 16px */
  .plan__fee, .example p, .feat__b p:not(.proj__tag):not(.feat__more) { font-size: 1rem; }
  .fine, .calc__fine { font-size: .9375rem; }
  .who__tag, .proj__tag, .seen__h, .quote figcaption small, .plan__price small, main legend small, main label small { font-size: .85rem; }
}

@media (max-width: 560px) {
  /* Chat greeting bubble sat mid screen over the hero buttons; dock it beside the chat launcher, just above the call bar */
  /* (body prefix: chat.css is injected after this file) */
  body .apchat-peek { right: 4.6rem; bottom: calc(5.4rem + env(safe-area-inset-bottom)); width: auto; left: .9rem; max-width: 19rem; margin-left: auto; }
  body .apchat-peek__body img { display: none; }
}

/* footer legal links on phones: two even columns, Terms & Conditions last (CJ, Nov 15) */
@media (max-width: 560px) { .foot__legal nav { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 1rem; } }

/* Serge, Nov 15: big page headlines about 25 to 30% smaller on phones */
@media (max-width: 720px) {
  .display { font-size: 1.62rem !important; line-height: 1.08; }
  .display--md { font-size: 1.42rem !important; }
  .display--sm { font-size: 1.2rem !important; }
  .sechead__t { font-size: 1.15rem; }
}
