.project-photo,
.project-comparison {
  margin: 0;
  min-width: 0;
}

.project-photo > img,
.project-comparison__stage {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(16 47 67 / 12%);
}

.project-photo > img {
  height: auto;
}

.project-comparison__stage {
  position: relative;
  overflow: hidden;
  background: #102f43;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
}

.project-comparison__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.project-comparison__before {
  clip-path: inset(0 50% 0 0);
}

.project-comparison__divider {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 2px;
  background: #fff;
  pointer-events: none;
}

.project-comparison__divider::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: #102f43;
  box-shadow: 0 2px 10px rgb(0 0 0 / 25%);
  font-size: 21px;
  font-weight: 700;
}

.project-comparison__label {
  position: absolute;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  background: #102f43;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  pointer-events: none;
}

.project-comparison__label--before { left: 12px; }
.project-comparison__label--after { right: 12px; }

.project-comparison__controls {
  margin-top: 10px;
}

.project-comparison__controls[hidden] {
  display: none;
}

.project-comparison__controls label {
  display: block;
  margin-bottom: 2px;
  color: #102f43;
  font-size: 12px;
  font-weight: 600;
}

.project-comparison__controls input {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: #cb1a23;
  cursor: ew-resize;
}

.project-comparison__controls input:focus-visible {
  outline: 2px solid #102f43;
  outline-offset: 3px;
  border-radius: 3px;
}

.project-photo figcaption,
.project-comparison figcaption {
  margin-top: 10px;
  color: #4c5c66;
  font-size: 13px;
  line-height: 1.5;
}

.project-photo figcaption a,
.project-comparison figcaption a {
  color: #102f43;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
