/* MedicoWize Button Typography Intelligence — v0.6.5.
 * Public button/control labels are exactly 10% smaller than the qualified
 * v0.6.4 readable-text result. Headings, titles, subtitles and icons remain
 * outside this layer.
 */
body.medicowize-public {
  --mw-button-text-reduction: .90;
  --mw-button-readable-text-scale: 1.08;
}

body.medicowize-public :is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .mw-button,
  .mw-header__portal,
  .mw-header__cta,
  .mw-mobile-menu__actions a,
  .mw-mobile-sticky-cta,
  .contact-card__button,
  .about-contact-card__button,
  .contact-submit,
  .portal-mini a
) {
  --mw-readable-text-scale: var(--mw-button-readable-text-scale);
}

/* Icon-only controls keep their approved glyph size. */
body.medicowize-public :is(
  .mw-menu-toggle,
  .mw-form-close,
  [data-copy-link],
  .insights-search button
) {
  --mw-readable-text-scale: 1.20;
}

/* These controls inherit their label size instead of declaring a generated
 * font-size, so 90% is applied directly to their inherited baseline. */
body.medicowize-public :is(
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .mw-form-primary,
  .mw-form-secondary
) {
  font-size: 90%;
}

/* These two approved controls place their visible label in a strong child,
 * so their label requires an explicit, audited 0.90 calculation. */
body.medicowize-public-home .mw-route-card__copy > strong {
  font-size: calc(12px * var(--mw-button-text-reduction));
}

body.medicowize-public-home .mw-faq-button strong {
  font-size: calc(14px * var(--mw-button-text-reduction));
}

body.medicowize-public .mw-form-route strong {
  font-size: calc(14px * var(--mw-button-text-reduction));
}

/* Mobile Home uses later approved label bases in home.css. */
@media (max-width: 600px) {
  body.medicowize-public-home .mw-route-card__copy > strong {
    font-size: calc(9px * var(--mw-button-text-reduction));
  }

  body.medicowize-public-home .mw-faq-button strong {
    font-size: calc(11px * var(--mw-button-text-reduction));
  }

  /* Disable the old short-phone compression sizes. The Hero is natural-height
   * in v0.6.5, so readable copy no longer needs to be squeezed to expose rail. */
  body.medicowize-public-home .mw-hero__content .mw-eyebrow {
    font-size: calc(8.5px * var(--mw-readable-text-scale));
  }

  body.medicowize-public-home .mw-hero__content > p {
    font-size: calc(13px * var(--mw-readable-text-scale));
  }

  body.medicowize-public-home .mw-hero__content .mw-button {
    font-size: calc(10px * var(--mw-button-readable-text-scale));
  }

  body.medicowize-public-home .mw-proof {
    font-size: calc(9px * var(--mw-readable-text-scale));
  }
}
