/* Shared mobile typography, matching the header's mobile breakpoint. */
/* Keep the root size stable: rem also sizes the logo and layout. */
@media screen and (max-width: 1023px) {
  :root {
    --mobile-type-caption: 0.875rem;
    --mobile-type-body: 1rem;
    --mobile-type-lead: 1.125rem;
    --mobile-type-card-title: 1.5rem;
    --mobile-type-section-title: clamp(2.25rem, 9vw, 2.75rem);
    --mobile-type-page-title: clamp(2.25rem, 9vw, 3rem);
  }

  body {
    font-size: var(--mobile-type-body);
    line-height: 1.75;
  }

  /* Reading copy, lists and form controls share a 16px minimum at default zoom. */
  body :is(
    .section-heading > p,
    .section-heading > div:last-child:not(:first-child),
    .solution-card p:not(.solution-subtitle),
    .solution-subtitle,
    .solutions-viewport.swiper-initialized .solution-subtitle,
    .solutions-viewport.swiper-initialized .solution-card p:not(.solution-subtitle),
    .service-banner :is(p:not(.eyebrow), .rich-text),
    .company-copy p,
    .faq-answer,
    .faq-page-layout .faq-answer,
    .contact-copy > p:not(.eyebrow),
    .contact-copy address > a,
    .support-intro > :is(p:not(.eyebrow), .support-intro-text),
    .inner-cta p:not(.eyebrow),
    .prose p,
    .prose > :is(ul, ol):not([class]),
    .about-story-content > :is(ul, ol),
    .about-scope p:not(.eyebrow),
    .process-grid p,
    .product-platforms p,
    .check-list li,
    .platform-box > div > span,
    .service-detail-grid p,
    .archive-card-body > p,
    .filter-empty p:not(.filter-empty-title),
    .help-card p,
    .download-description,
    .download-help p,
    .contact-location-heading p:not(.eyebrow),
    .field input,
    .field select,
    .field textarea,
    .custom-select-trigger,
    .custom-select-option,
    .archive-search input,
    .search-dialog .search-field input
  ) {
    font-size: var(--mobile-type-body);
  }

  body :is(.hero-description, .page-lead, .prose .lead, .article-prose) {
    font-size: var(--mobile-type-lead);
    line-height: 1.8;
  }

  /* Labels, dates and supporting information remain smaller than reading copy. */
  body :is(
    .eyebrow,
    .hero-copy > .eyebrow,
    .page-hero .section-kicker,
    .service-banner .eyebrow,
    .prose .eyebrow,
    .inner-cta .eyebrow,
    .article-hero .section-kicker,
    .article-toc > .eyebrow,
    .hero-footnote p,
    .partner-strip > p,
    .partner-link,
    .card-number,
    .home-solutions .card-number,
    .solution-tags span,
    .solutions-viewport.swiper-initialized .solution-tags span,
    .solutions-position,
    .profile-corner,
    .company-note,
    .company-emblem-caption,
    .filter-count,
    .article-meta,
    .archive-card .article-meta,
    .faq-list summary > span,
    .form-heading > span,
    .field label,
    .form-note,
    .wpcf7-not-valid-tip,
    .contact-form .wpcf7-acceptance label,
    .footer-tagline,
    .footer-location,
    .footer-bottom,
    .back-top,
    .breadcrumb,
    .process-number,
    .resource-number,
    .home-resource-links strong + span,
    .resource-links small,
    .archive-card-art small,
    .download-format,
    .file-size,
    .download-card dl > div,
    .article-byline,
    .kb-article-image figcaption,
    .search-dialog kbd,
    .search-suggestions,
    .search-suggestions button,
    .search-dialog .search-hint,
    .search-group-title,
    .search-results .search-result small,
    .search-empty > span:not(.search-empty-icon),
    .search-footer,
    .search-footer .text-link,
    .knowledge-search-trigger small,
    .support-intro > .support-ticket-note,
    .map-reset,
    .contact-map-canvas .map-office-label,
    .map-office-popup,
    .map-status,
    .menu-caption,
    .submenu small,
    .news-menu-links time,
    .news-menu-preview > span:not(.menu-caption)
  ) {
    font-size: var(--mobile-type-caption);
  }

  body :is(
    .button,
    .contact-form .button,
    .download-card .button,
    .inner-cta .button,
    .text-link,
    .card-link,
    .solutions-viewport.swiper-initialized .card-link,
    .filter-button,
    .archive-toolbar .filter-button,
    .faq-sidebar .filter-button,
    .faq-list summary,
    .faq-page-layout .faq-list summary,
    .faq-answer a,
    .faq-page-layout .faq-answer > a,
    .footer-column a,
    .footer-column .footer-title,
    .section-nav > a,
    .scope-links a,
    .filter-empty button,
    .archive-load-more,
    .article-toc > a,
    .article-actions .text-link,
    .search-dialog .search-dialog-title,
    .search-scopes button,
    .search-result-title,
    .search-empty,
    .search-empty .text-link,
    .knowledge-search-trigger strong,
    .submenu > a,
    .submenu .menu-overview,
    .mobile-contact,
    .news-menu-intro > p:not(.news-menu-heading),
    .news-menu-intro .text-link,
    .news-menu-links span,
    .news-menu-preview p
  ) {
    font-size: var(--mobile-type-body);
  }

  /* Preserve heading hierarchy across landing pages, cards and imported articles. */
  body :is(.hero h1) {
    font-size: clamp(2.5rem, 10vw, 3.25rem);
  }
  body .page-hero h1 {
    font-size: var(--mobile-type-page-title);
  }
  body .article-hero h1 {
    font-size: clamp(1.875rem, 7.5vw, 2.5rem);
  }
  body :is(
    h2,
    .home-solutions h2,
    .company-heading h2,
    .support-intro h2,
    .prose h2,
    .about-scope h2,
    .service-detail-grid h2,
    .inner-cta h2,
    .contact-copy h2,
    .inner-page .contact-copy h2,
    .contact-location-heading h2
  ) {
    font-size: var(--mobile-type-section-title);
  }
  body :is(
    .service-banner :is(h2, h3),
    .home-solutions .service-banner h3,
    .archive-card :is(h2, h3),
    .related-grid .archive-card :is(h2, h3),
    .related-viewport.swiper-initialized .archive-card :is(h2, h3),
    .help-card h2,
    .download-help h2,
    .filter-empty .filter-empty-title,
    .product-platforms h3,
    .form-heading h3
  ) {
    font-size: var(--mobile-type-card-title);
    line-height: 1.4;
  }
  body :is(
    .solution-card :is(h2, h3),
    .home-solutions .solution-card h3,
    .solutions-viewport.swiper-initialized .solution-card :is(h2, h3),
    .download-card h2
  ) {
    font-size: 2rem;
  }
  body .solutions-viewport.swiper-initialized #commerce :is(h2, h3) {
    font-size: var(--mobile-type-card-title);
    overflow-wrap: anywhere;
  }
  body :is(
    .solution-card :is(h2, h3) > span,
    .home-solutions .solution-card h3 > span,
    .solutions-viewport.swiper-initialized .solution-card :is(h2, h3) > span
  ) {
    font-size: var(--mobile-type-card-title);
  }
  body .article-prose h2 {
    font-size: 1.75rem;
  }
  body .article-prose h3 {
    font-size: 1.375rem;
  }
  body :is(.process-grid h3, .home-resource-links strong, .news-menu-heading, .news-menu-preview strong) {
    font-size: 1.25rem;
  }
  body :is(.resource-links strong, .map-office-popup strong) {
    font-size: var(--mobile-type-lead);
  }

  /* Diagram annotations have their own floor; they are not reading paragraphs. */
  body :is(.hero-art .art-heading, .hero-art .system-node strong, .hero-art .system-core strong) {
    font-size: var(--mobile-type-caption);
  }
  body :is(
    .hero-art .system-node span,
    .hero-art .system-core > span,
    .hero-art .art-bottom span,
    .product-art-caption,
    .product-art-bottom,
    .product-art > span:last-of-type,
    .page-signature > p,
    .partner-name span:not(.epsilon-symbol)
  ) {
    font-size: 0.75rem;
  }

  /* Larger labels must be allowed to wrap inside narrow controls and columns. */
  .filter-group {
    flex-wrap: wrap;
  }
  .filter-button {
    white-space: normal;
  }
  .breadcrumb,
  .article-meta,
  .footer-bottom,
  .contact-form .wpcf7-acceptance,
  .archive-card-body,
  .download-description,
  .solution-tags span,
  .article-prose,
  .prose {
    overflow-wrap: anywhere;
  }
  .contact-form .wpcf7-acceptance label {
    line-height: 1.6;
  }
  .knowledge-search-trigger > span {
    min-width: 0;
  }
  .knowledge-search-trigger strong,
  .knowledge-search-trigger small {
    white-space: normal;
  }
  .search-toolbar {
    flex-wrap: wrap;
  }

  /* The consent UI is injected by Complianz, outside the theme's text classes. */
  .cmplz-cookiebanner {
    --cmplz_text_font_size: var(--mobile-type-body);
    --cmplz_link_font_size: var(--mobile-type-caption);
    --cmplz_button_font_size: var(--mobile-type-body);
    --cmplz_title_font_size: var(--mobile-type-lead);
    --cmplz_category_body_font_size: var(--mobile-type-caption);
    --cmplz_category_header_title_font_size: var(--mobile-type-body);
    --cmplz_category_header_active_font_size: var(--mobile-type-caption);
  }
  body .cmplz-cookiebanner .cmplz-message {
    line-height: 1.65;
  }
  body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    height: auto;
    min-height: 44px;
  }
}
