.image-compare { margin: 1.5rem 0; width: 100%; }
.post-content > figure.image-compare { box-sizing: border-box; padding: 0 20px; margin: 24px auto 0; }
/* Reset the theme's generic 800px div column inside the comparison. */
.post-content .image-compare > .image-compare__stage { width: 100%; max-width: none; box-sizing: border-box; margin: 0; padding: 0; }
.image-compare__stage { position: relative; overflow: hidden; isolation: isolate; background: #222; border-radius: 6px; }
.image-compare .image-compare__stage img { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; pointer-events: none; }
.image-compare .image-compare__stage .image-compare__base { position: relative; height: auto; }
.image-compare .image-compare__stage .image-compare__before { position: absolute; inset: 0; height: 100%; object-fit: contain; background: #222; clip-path: inset(0 calc(100% - var(--compare-position)) 0 0); }
.image-compare__label { position: absolute; top: 12px; padding: 3px 9px; color: #fff; background: #0009; border-radius: 4px; font: 14px/1.5 sans-serif; pointer-events: none; }
.image-compare__label--before { left: 12px; }
.image-compare__label--after { right: 12px; }
.image-compare__divider { position: absolute; top: 0; bottom: 0; left: var(--compare-position); width: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 0 3px #0008); }
.image-compare__divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid #fff; border-radius: 50%; background: #222a; color: #fff; font: bold 25px/1 sans-serif; white-space: pre; }
.image-compare .image-compare__range { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.image-compare__stage:focus-within { outline: 3px solid #78b9ff; outline-offset: 3px; }
.image-compare figcaption { margin-top: 8px; text-align: center; font-size: .9em; }
