/* Before/after picture with a draggable divider: /settings' Tidy up and the
   /use-cases page. The after picture is clipped from the left at --x; the
   range input lies invisibly over the whole frame so dragging anywhere moves
   it. The page's own script sets --x from the input (and adds .dragging while
   it does, so the divider follows the pointer without easing). */
.sr-compare { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: var(--radius-lg); margin-bottom: 10px; background: var(--surface-sunken); user-select: none; }
.sr-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-compare-after { clip-path: inset(0 0 0 var(--x, 50%)); transition: clip-path var(--duration-slow) var(--ease-standard); }
.sr-compare-bar { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; transition: left var(--duration-slow) var(--ease-standard); }
.sr-compare-bar::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314120F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 3 12 9 18'/%3E%3Cpolyline points='15 6 21 12 15 18'/%3E%3C/svg%3E") center/18px no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.sr-compare.dragging .sr-compare-after, .sr-compare.dragging .sr-compare-bar { transition: none; }
.sr-compare-tag { position: absolute; top: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(20, 16, 12, .55); backdrop-filter: blur(10px); padding: 3px 9px; border-radius: var(--radius-pill); pointer-events: none; }
.sr-compare-tag.is-before { left: 12px; }
.sr-compare-tag.is-after { right: 12px; }
.sr-compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.sr-compare:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sr-compare-after, .sr-compare-bar { transition: none; } }
