/* Preserve the established magnet palette and typography; resolve layout conflicts. */
#site-results small { color: #426379; }

html:root body.em-gallery-refined#top#top .forms-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--em3-form-columns, 4), minmax(0, 1fr)) !important;
  gap: 24px !important;
  align-items: stretch;
}
html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-column: auto !important;
  order: 0 !important;
  gap: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  border: 1px solid #d4e1e9 !important;
  background: #fff !important;
}
html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 16px !important;
  margin: 0 !important;
  box-sizing: border-box;
}
html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card > figcaption {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  min-width: 0 !important;
  padding: 18px !important;
}
html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card > figcaption h3 {
  overflow-wrap: normal !important;
  word-break: normal !important;
}
html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card > figcaption a {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  min-height: 44px;
}
html:root body.empire-type-e#top#top .emh-capability-band .em2-supply-layout figcaption {
  color: #d7e7f1 !important;
}
.comparison-output { min-width: 0; }
.comparison-output:empty { display: none; }
.comparison-output > .comparison-scroll { margin-top: 0; }
.comparison-scroll:focus-visible { outline: 2px solid #084d74; outline-offset: 2px; }
.grade-comparison .grade-comparison-table th { overflow-wrap: normal; word-break: normal; }
.grade-comparison .grade-comparison-table a { overflow-wrap: normal; word-break: normal; }

html:root body.empire-type-e#top#top .d-advantages :is(h3,h3 a) { color: #113a53 !important; }
html:root body.empire-type-e#top#top .d-advantages p { color: #314e62 !important; }
html:root body.empire-type-e#top#top .d-advantages svg { color: #326a8b !important; }
html:root body.empire-type-e#top#top .site-footer .footer-legal-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
}
html:root body.empire-type-e#top#top .footer-legal-links > a,
html:root body.empire-type-e#top#top .footer-legal-links > button {
  display: inline-flex; align-items: center; min-height: 44px;
  margin: 0; padding: 8px 0; border-left: 0;
}
html:root body.page-engineering-reference#top#top .engineering-reference figure > img {
  height: auto !important; aspect-ratio: 3 / 2; object-fit: contain;
}
html:root body.page-engineering-reference#top#top .engineering-reference figure > figcaption { margin-top: 12px; }
html:root body.page-industries#top#top .ri-applications { grid-template-columns: minmax(0, 1fr); gap: 36px; }
html:root body.page-industries#top#top .ri-applications > .ri-application {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px; align-items: center; grid-column: auto;
}
html:root body.page-industries#top#top .ri-applications > .ri-application > .ri-scene { height: auto; min-height: 0; }
html:root body.page-industries#top#top .ri-application-copy { padding: 0; }
html:root body.page-industries#top#top .ri-application .ri-description { min-height: 0; }
html:root body.page-industries#top#top .ri-applications .ri-scene img { object-position: center; }
html:root body.page-industries#top#top .ri-feature-robotics .ri-requirements > summary::after { color: #113a53 !important; }
html:root body.page-industries#top#top .strict-industry-routes { display: flex; flex-wrap: wrap; gap: 12px 24px; }
html:root body.page-industries#top#top .strict-industry-routes > a { display: inline-flex; align-items: center; min-height: 44px; }
.comparison-table-title { margin: 0 0 12px; font-weight: 600; }
html:root body.page-production-sites#top#top #network .corporate-factory-nodes {
  position: static !important; inset: auto !important; transform: none; z-index: auto;
  padding: 0 !important; margin: 24px 0 0 !important; background: transparent !important;
}
html:root body.em-family-utility#top#top .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
html:root body.page-contact#top#top #rfq-upgrade-form .rfqu-consent input[type="checkbox"] {
  flex: 0 0 20px !important; width: 20px !important; min-width: 20px !important; height: 20px !important;
}
html:root body.page-flexible-magnets#top#top #supply-formats > summary {
  display: grid !important; grid-template-columns: minmax(0, 1fr) 1em; gap: 8px 16px;
}
html:root body.page-flexible-magnets#top#top #supply-formats > summary > span { grid-column: 1; min-width: 0 !important; white-space: normal; }
html:root body.page-flexible-magnets#top#top #supply-formats > summary > small {
  grid-column: 1; min-width: 0 !important; max-width: 100%; white-space: normal;
  justify-self: start; margin: 0 !important; text-align: left;
}
html:root body.page-flexible-magnets#top#top #supply-formats > summary::after {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-left: 0;
}
html:root body.page-assemblies#top#top #supply-boundary .corporate-boundary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html:root body.em-directory-phase3#top#top .em3-catalog-picture img {
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
  object-fit: contain !important;
}
html:root body.page-downloads#top#top .dl-filter-section + .r2-library-nav {
  width: 100%; max-width: none; margin: 0;
  padding: 0 var(--emh-gutter, 64px) 28px; box-sizing: border-box;
}
html:root body.page-flexible-magnets#top#top .choice-columns.emh-choice-columns { column-gap: 32px !important; }

@media (max-width: 760px) {
  html:root body.empire-type-e#top#top .site-header { padding-top: 10px !important; padding-bottom: 10px !important; row-gap: 4px !important; }
  html:root body.page-about#top#top .company-visual-route { display: flex; flex-wrap: wrap; gap: 12px 24px; }
  html:root body.page-about#top#top .company-visual-route > div { min-width: 0; }
  html:root body.page-about#top#top .company-visual-route a { display: inline-flex; align-items: center; min-height: 44px; }
  html:root body.page-production-sites#top#top .network-visual { padding: 20px; }
  html:root body.page-industries#top#top .ri-applications > .ri-application { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  html:root body.page-engineering-reference#top#top .er-interface-grid dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  html:root body.page-engineering-reference#top#top .er-interface-grid dd { margin: 0; }
  html:root body.page-assemblies#top#top #supply-boundary .corporate-boundary-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html:root body.page-index#top#top .d-collection .d-product-copy { padding-left: 16px; padding-right: 16px; }
  html:root body.page-downloads#top#top .dl-filter-section + .r2-library-nav { position: static; inset: auto; padding: 0 20px 24px; }
}

@media (max-width: 1100px) {
  html:root body.em-gallery-refined#top#top .forms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 540px) {
  html:root body.em-gallery-refined#top#top .forms-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  html:root body.em-gallery-refined#top#top .forms-grid .type-e-form-card > figcaption {
    padding: 16px !important;
  }
}
