.purr_decoder_mount {
  width: min(1200px, calc(100vw - 2rem));
  margin-inline: auto;
}

.purr_decoder_window {
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(29, 36, 64, 0.22);
  border-radius: clamp(1.25rem, 2vw, 2rem);
  background: #ffffff;
  box-shadow: 0 2rem 5rem rgba(29, 36, 64, 0.16);
}

.purr_decoder_compare {
  --decoder-split: 88%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
  cursor: ew-resize;
  touch-action: pan-y;
}

.purr_decoder_video,
.purr_decoder_source,
.purr_decoder_source img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.purr_decoder_video,
.purr_decoder_source img {
  object-fit: cover;
}

.purr_decoder_video {
  background: #ffffff;
}

.purr_decoder_source {
  z-index: 1;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--decoder-split)) 0 0);
  will-change: clip-path;
}

.purr_decoder_source img {
  max-width: none;
}

.purr_decoder_divider {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: var(--decoder-split);
  width: 2px;
  pointer-events: none;
  background: #a2f404;
  box-shadow: 0 0 1.5rem rgba(162, 244, 4, 0.9);
  transform: translateX(-50%);
  will-change: left;
}

.purr_decoder_handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.35rem;
  place-content: center;
  width: clamp(3.4rem, 6vw, 4.5rem);
  aspect-ratio: 1;
  border: 2px solid #1d2440;
  border-radius: 50%;
  color: #1d2440;
  background: #a2f404;
  box-shadow: 0 0 0 0.45rem rgba(162, 244, 4, 0.2), 0 0 2rem rgba(162, 244, 4, 0.55);
  transform: translate(-50%, -50%);
}

.purr_decoder_handle::before,
.purr_decoder_handle::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.purr_decoder_handle::after {
  transform: rotate(225deg);
}

.purr_decoder_range {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.purr_decoder_range:focus-visible + .purr_decoder_focus_ring {
  position: absolute;
  z-index: 5;
  inset: 0.5rem;
  border: 3px solid #a2f404;
  border-radius: 1rem;
  pointer-events: none;
}

@media (max-width: 767px) {
  .purr_decoder_compare {
    aspect-ratio: 4 / 5;
  }
}
