/* Final visual alignment. Media, source artwork and font roles stay unchanged. */
:root { --content-gutter: 64px; }
.shell.mdi-main-content {
  width: calc(100% - var(--content-gutter) * 2);
  max-width: none;
}
#advantages .approach-cards-shell {
  width: calc(100% - var(--content-gutter) * 2);
}
.mdi-main-content > .mdi-evidence {
  width: auto;
  position: static;
  transform: none;
}
#advantages .approach-heading-wordmark { line-height: inherit; }

/* Meet the original 1200px text axis at normal desktop widths, while the
   catalog continues to expand on ultrawide screens. */
@media (min-width: 1200px) {
  :root { --content-gutter: clamp(64px, calc((100vw - 1200px) / 2), 120px); }
  #mdi-photo #rec2069312641 [data-elem-id="1773412446691000001"] .tn-atom {
    font-size: 24px;
    line-height: 1.4;
  }
}
@media (max-width: 1100px) { :root { --content-gutter: 40px; } }
@media (max-width: 760px) { :root { --content-gutter: 24px; } }
@media (max-width: 360px) { :root { --content-gutter: 20px; } }

/* Original desktop records use fixed artboard axes. Shift their text/artwork
   together to the fluid page axis; their full-bleed media stages are siblings.
   Active tab underlines are excluded because their controller measures the
   translated tab position and writes the underline's left coordinate. */
@media (min-width: 981px) {
  .eli-copy { --legacy-axis: 820px; }
  .eli-copy #rec3228403701 { --legacy-axis: 800px; }
  .eli-copy #rec3228403701 .t396__artboard > :is(.t396__elem, .tn-group):not(.uc-baw-tab-underline):not(.line),
  .eli-copy #rec4518410701 .t396__artboard > :is(.t396__elem, .tn-group):not(.uc-baw-tab-underline):not(.line),
  .eli-copy #rec2069312641 .t396__artboard > .t396__elem {
    translate: calc(var(--content-gutter) - (var(--eli-viewport, 100vw) - var(--legacy-axis)) / 2) 0;
  }
  #contact.mdi-footer { --footer-axis: calc(100% - var(--content-gutter) * 2); }
  #contact .mdi-footer-bottom { width: 100%; max-width: none; }
}
@media (min-width: 1200px) {
  .eli-copy, .eli-copy #rec3228403701 { --legacy-axis: 1040px; }
}
@media (min-width: 1400px) {
  .eli-copy, .eli-copy #rec3228403701 { --legacy-axis: 1200px; }
}
@media (min-width: 1648px) {
  .eli-copy, .eli-copy #rec3228403701 { --legacy-axis: 1368px; }
}

/* Readable captions outside the photographs; the banner artwork is untouched. */
#mdi-residents .mdi-review-card .mdi-review-caption,
.mdi-evidence-awards figcaption,
.mdi-founder-photo figcaption { font-size: 12px; }

@media (max-width: 980px) {
  /* Only the text records move. Comparison and construction photos stay full bleed. */
  .eli-copy #rec3273225601 [data-group-id="1787568084243000001"],
  .eli-copy #rec3870405401 [data-group-id="1788181345870000001"] {
    left: var(--content-gutter);
    width: calc(100% - var(--content-gutter) * 2);
  }
  /* The source centers this oversized strip against a375px artboard even
     on320px screens, clipping its first tab. Keep its scroll start in view. */
  .eli-copy #rec3870405501 [data-group-id="1788184843570000001"] {
    left: var(--content-gutter);
  }
  .eli-copy #rec3273225701 { --tabs-axis: 640px; }
  .eli-copy #rec3273225701 .t396__artboard > .t396__elem {
    translate: calc(var(--content-gutter) - (var(--eli-viewport, 100vw) - var(--tabs-axis)) / 2 - 10px) 0;
  }
  /* Let the gallery heading reserve its real height instead of overlapping
     its subtitle when the narrower text column wraps. */
  #mdi-photo #rec2069312641 .t396__artboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    padding: 32px var(--content-gutter);
    box-sizing: border-box;
  }
  #mdi-photo #rec2069312641 [data-elem-id="1698252988979"],
  #mdi-photo #rec2069312641 [data-elem-id="1773412446691000001"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }
  #mdi-photo #rec2069312641 [data-elem-id="1698252988979"] { order: -1; }
}
@media (max-width: 639px) {
  .eli-copy #rec3273225701 { --tabs-axis: 480px; }
}
@media (max-width: 479px) {
  .eli-copy #rec3273225701 { --tabs-axis: 375px; }
}
@media (max-width: 374px) {
  .eli-copy #rec3273225701 { --tabs-axis: 320px; }
}
@media (max-width: 650px) {
  .property-context input,
  .property-field textarea,
  .property-field select { font-size: 16px; }
}
@media (max-width: 760px) {
  #contact .shell {
    width: calc(100% - var(--content-gutter) * 2);
    max-width: 620px;
  }
  #contact .mdi-footer-headquarters {
    left: max(var(--content-gutter), calc(50% - 310px));
  }
}
@media (max-width: 374px) {
  #contact .mdi-footer-brand { gap: 24px; }
  #contact .mdi-footer-brand p::before { left: -12px; }
}

/* Nine useful links no longer spill into an implicit third column. The
   newsletter owns a full row; eight social links stay inside two columns. */
@media (min-width: 980px) {
  #contact [aria-labelledby="footer-useful-title"] ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-rows: minmax(24px, auto);
    gap: 10px 12px;
  }
  #contact [aria-labelledby="footer-useful-title"] li:first-child {
    grid-column: 1 / -1;
  }
  #contact [aria-labelledby="footer-useful-title"] li { min-width: 0; }
  #contact [aria-labelledby="footer-useful-title"] [data-footer-social] {
    min-height: 24px;
    gap: 8px;
    white-space: normal;
    line-height: 1.4;
  }
}
