/* Scoped card fitting: preserve complete images, card structure and source files. */
html body :is(.card-image,.system-card-media,.commercial-guide-media,.do-product-art,.rp-detail-media,.curated-card-image){padding:4px!important;box-sizing:border-box}
html body :is(.card-image,.system-card-media,.commercial-guide-media,.do-product-art,.rp-stage,.rp-detail-media,.rp-slide,.rp-thumb,.cw-photo-stage,.mega-series-thumb,.mega-preview-frame,.curated-card-image,.dl-cover) img{
 object-fit:contain!important;object-position:center!important;transform:none!important;
 max-width:100%!important;max-height:100%!important;
}
html body :is(.card-image,.system-card-media,.commercial-guide-media,.curated-card-image,.mega-series-thumb,.mega-preview-frame) img{width:100%!important;height:100%!important;padding:0!important}
html body .rp-detail-media img{width:100%!important;height:auto!important;max-height:460px!important}
html body .rp-slide img{object-fit:contain!important}
html body :is(.mega-series-thumb,.mega-preview-frame){padding:2px!important}
/* Remove the previous guessed crop; only measured, asset-specific bounds follow. */
html body .mega-preview-frame img{object-view-box:none!important}
html body .hardware-sample button{padding:4px!important}
html body .hardware-sample img{object-fit:contain!important;transform:none!important;width:100%!important}
html body .door-function-visuals img{padding:4px!important;object-fit:contain!important}
/* Photo and diagram cards follow their source ratio rather than cutting edges off. */
html body :is(.project-card-media,.guide-card-media,.guide-media,.glass-image-button,.application-media,.loe-visual button){height:auto!important;min-height:0!important;aspect-ratio:auto!important;align-self:start}
/* Portfolio styles previously forced 4:3 even after the image became uncropped. */
#main-content .project-card .project-card-media{height:auto!important;min-height:0!important;aspect-ratio:auto!important}
html body :is(.project-card-media,.guide-card-media,.guide-media,.glass-image-button,.application-media,.loe-visual,.guide-detail-visual,.commercial-proof-image,.layout-card,.design-topic-card,.dl-story figure,.dl-full-board,.simulated-hung-application) img{
 position:static!important;display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
 aspect-ratio:auto!important;object-fit:contain!important;transform:none!important;
}
html body .design-hardware-picture{height:auto!important;min-height:0!important;padding:4px!important}
html body .design-topic-grid{align-items:start}
html body .dl-cover{padding:4px!important}
html body .commercial-guide-card:hover img,html body .system-card:hover img,html body .curated-design-card:hover img{transform:none!important}
/* Project gallery and related-story cards retain every edge of the photograph. */
html body .project-editorial-gallery button{height:auto!important;min-height:0!important}
html body :is(.project-editorial-gallery,.related-grid,.guide-related) img{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:auto!important;object-fit:contain!important;transform:none!important}
html body .project-slide-thumbs img{object-fit:contain!important;transform:none!important}
html body .resource-card-photo{object-fit:contain!important;transform:none!important}
html body .project-menu-card{aspect-ratio:1;min-height:0!important}
html body .project-menu-photo{height:100%!important;transform:none!important}
html body .sk-control-columns img{object-fit:contain!important;transform:none!important}
#main-content :is(.rp-hero-visual-frame,.project-hero-slide,.dl-hero-media,.diagram-link,.m8-fit-photo) img{object-fit:contain!important;object-position:center!important;transform:none!important}
@media(max-width:700px){
 html body :is(.card-image,.system-card-media,.commercial-guide-media,.do-product-art,.rp-detail-media){padding:3px!important}
 html body .rp-detail-media{min-height:0!important}
}
