/* Responsive / retina maintenance patch. The v3 design, content and artwork remain unchanged. */
/* Native closed disclosures are not active layout or touch targets. Open menus retain the design. */
.nav-group:not([open]) > .mega-menu,
.expanded-mobile details:not([open]) > .mobile-sub { display: none; }

/* Let genuine grid/flex children shrink instead of expanding their containing track. */
.connected > *, .pipeline-step, .extension-hero-grid > *, .extension-delivery > *,
.knowledge-bottom > *, .industry-grid > *, .directory-grid > *, .form-grid > *,
.mega-links > a, .mega-links > a > span { min-width: 0; }
.mega-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega-links strong, .mega-links small { overflow-wrap: anywhere; }
.mega-menu { max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); overflow-y: auto; overscroll-behavior: contain; }
.expanded-mobile { overscroll-behavior: contain; }
.enquiry-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }

@media (max-width: 1000px) {
  .expanded-mobile { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); }
  .expanded-mobile .mobile-sub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expanded-mobile .mobile-sub a { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 820px) {
  /* 16 CSS px avoids mobile browser input zoom; preserve the existing field styling. */
  .field input, .field select, .field textarea, .directory-search input,
  .demo-controls input, .demo-controls select, .demo-question-form input {
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
  }
  .field input, .field select, .demo-controls input, .demo-controls select,
  .demo-question-form input { min-height: 44px; }
  .directory-search { min-height: 44px; }
  .directory-search input { width: 100%; }
  .menu-toggle, .dialog-close {
    min-width: 44px; min-height: 44px; display: inline-flex;
    align-items: center; justify-content: center;
  }
  .button, .form .button, .filter-chip, .demo-tabs button,
  .sample-questions button, .mini-panel .approve-button { min-height: 44px; }
  .text-link, .footer-column a, .legal-index a, .expanded-mobile a {
    min-height: 44px; min-width: 44px;
  }
  .footer-column a, .legal-index a, .expanded-mobile a {
    display: flex; align-items: center; max-width: 100%; overflow-wrap: anywhere;
  }
  .expanded-footer .footer-column { gap: 0; }
  .breadcrumb a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
  .faq-item summary { min-height: 44px; }
  .demo-tabs, .button-row, .filter-group { max-width: 100%; }
  .demo-tabs button, .filter-chip { max-width: 100%; }
}

@media (max-width: 600px) {
  /* Keep the original heading size, allowing the highlighted phrase to wrap on narrow screens. */
  .contact-hero .hero-underline { white-space: normal; }
  .contact-hero h1 { overflow-wrap: normal; }
  .statement-panel h2 { font-size: clamp(2rem, 9.2vw, 2.4rem); }
  .connected { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-heading { white-space: normal; }
  .mini-panel dl > div { grid-template-columns: minmax(0, .45fr) minmax(0, .55fr); }
  .mini-panel dt, .mini-panel dd { min-width: 0; }
  .mini-panel dd { white-space: normal; }
  .mini-panel .attachment { white-space: normal; overflow-wrap: anywhere; }
  .industry-grid { grid-template-columns: minmax(0, 1fr); }
  .industry-tile > strong { min-width: 0; overflow-wrap: anywhere; }
  .breadcrumb { row-gap: 0; }
  .demo-question-form { min-width: 0; }
  .routing-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .routing-stages > span { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 374px) {
  /* The four-step example is readable in one column where two cards cannot fit. */
  .pipeline { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .pipeline-step:not(:last-child)::after { display: none; }
  .mini-panel { min-height: 0; font-size: .8rem; }
  .mini-panel .attachment, .mini-panel .approve-button { font-size: .75rem; }
  .mini-heading { font-size: .76rem; }
  .industry-tile { gap: .6rem; padding: 1rem; }
  .industry-tile > .icon-badge { width: 2.5rem; height: 2.5rem; }
  .industry-tile > .icon-badge .icon { width: 1.45rem; height: 1.45rem; }
  .industry-tile > strong { font-size: 1rem; }
}
