/* Optimized images (engine/tools/optimize-images.mjs) keep their original shape: a resized WebP can be a fraction
   of a pixel off, which showed as 1px shifts. Zero specificity, so any aspect-ratio or height the site's CSS sets
   still wins. Only images that carry --ar. (Divi sites get this from divi-lite.css; AirPro has no such file.) */
:where(img[data-opt][style*="--ar"]) { aspect-ratio: var(--ar); }

/* Home hero (LayerSlider, drawn by site.js): until the script lays it out, give the box the height it will get
   (420px, scaled by width/1140 below 1140px) instead of the markup's fixed 1140x420, so nothing below it jumps
   (Lighthouse CLS 0.24 on phones). The script adds .ls-container and sets the exact size. */
.ls-wp-container:not(.ls-container) { max-width: 100%; height: min(420px, calc(100vw * 420 / 1140)) !important; }
