/* Keep desktop section titles distinct from card headings; preserve the small-screen scale. */
@media (min-width: 1024px) {
  body.z-type #main {
    --fs-h2: 24px;
  }

  /* Use the established reading measure for plain service paragraphs. */
  body.z-type.z-service #main .section-pad > .container > p[data-type="body"]:not([class]) {
    max-inline-size: 760px;
    text-wrap: pretty;
  }
}

/* Put each existing solution-card action at the same level as other links. */
body[data-site-page="/"] #main .media-card[href^="/services/"] > .media-card__body > .card-link {
  color: var(--brand-blue);
  font-size: var(--type-size-ui);
  font-weight: 600;
  line-height: 24px;
}

body[data-site-page="/"] #main .media-card[href^="/services/"]:is(:hover, :focus-visible) > .media-card__body > .card-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Keep the short solutions introduction from leaving a single word on its last line. */
@media (min-width: 1024px) {
  body[data-site-page="/"] #main .section-head:has(+ .grid-3 > .media-card[href^="/services/"]) > .h2-lead {
    text-wrap: balance;
  }
}

/* Anchor industry system links below their descriptions in multi-column layouts. */
@media (min-width: 640px) {
  body[data-site-page="/solutions/"] .ind-card .ind-desc {
    flex: none;
  }
}

/* Preserve the existing contact actions while enlarging their mobile tap areas. */
@media (max-width: 767px) {
  /* The open menu starts just above the one-pixel header border. */
  body.z-type .site-header #mobile-menu:not([hidden]) {
    max-height: calc(100dvh - var(--type-actual-header, 73px) - max(65px, var(--type-bottom-height, 65px)) + 1px);
  }

  .p1-wechat .cro-actions > a,
  .qr-block .cro-actions > a[download] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
