/* Correct shared layout failures without changing the approved desktop design. */
.ml-news-launch .ml-news-hero-media img {
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain;
}
.ml-file-error { color: #9b1723; font-weight: 600; }
.ml-system-page {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 40px));
  min-height: 65vh;
  margin: 0 auto;
  padding: 140px 0 72px;
}
.ml-system-page h1 { font: 600 clamp(34px, 5vw, 54px)/1.12 var(--ml-display); color: var(--ml-navy); }
.ml-system-page .wp-block-post-template { display: grid; gap: 28px; padding: 0; }
.ml-system-page .wp-block-post-title { font-size: 28px; line-height: 1.2; }
.ml-series-breadcrumbs a,
.ml-products-hero .ml-series-breadcrumbs a { color: #c8dcff; }
.ml-series-breadcrumbs a:hover,
.ml-series-breadcrumbs a:focus-visible { color: #fff; }
@media (max-width: 1024px) {
  .ml-footer-grid.wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
  }
  .ml-footer-grid.wp-block-columns > .wp-block-column {
    min-width: 0;
    margin: 0;
  }
  .ml-footer-grid .wp-block-column:has(a[href^="mailto:"]) {
    grid-column: span 2;
  }
  .ml-footer-grid h5 { overflow-wrap: normal; word-break: normal; }
  .ml-footer-social p { display: flex; flex-wrap: wrap; gap: 8px; }
  .ml-footer-social a { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; }
}

@media (max-width: 782px) {
  .ml-product-card.wp-block-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    height: auto !important;
    min-height: 0 !important;
    gap: 0;
  }
  .ml-product-card.wp-block-columns > .wp-block-column {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
  }
  .ml-product-card > .wp-block-column:not(.ml-product-copy) { grid-row: 1; }
  .ml-product-card > .ml-product-copy { grid-row: 2; }
  .ml-custom-visual,
  .ml-custom-visual .wp-block-image,
  .ml-custom-visual img {
    height: auto !important;
    min-height: 0 !important;
  }
  .ml-custom-visual img {
    display: block;
    width: 100%;
    object-fit: contain !important;
  }
}

@media (max-width: 600px) {
  .ml-footer-grid.wp-block-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .ml-footer-brand { grid-column: 1 / -1; }
  .ml-footer-grid .wp-block-column:has(a[href^="mailto:"]) { grid-column: 1 / -1; }
}

/* Reviewed mobile/tablet header grouping. */
@media (max-width: 1024px) {
  .ml-header-inner > .ml-header-actions {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  .ml-header-inner > .ml-primary-nav {
    order: 3;
    flex: 0 0 auto;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Mobile entrances retain motion without horizontal overflow. */
@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .ml-reveal:not(.is-visible) { transform: translateY(20px); }
}
