/* base: site-kit/before-after @ e0d86ab (1.0.1), copied 2026-11-26. Do not edit; change the kit and re-vendor. */
/* site-kit before-after 1.0.1. Reads only --kit-* tokens. Spec and numbers: README.md.

   Three looks from one markup (markup.html):
   - The compare (JS running): the before photo over the after one, clipped at the line.
   - No JS: the two photos side by side (one above the other in a box under 520px), each with its own label.
     Chosen by @media (scripting: none), so nothing moves when the script starts: no layout shift.
   - .kit-ba-pair: always the still pair, for two photos that were not taken from the same spot.
   The stage's shape is --kit-ba-ratio (3 / 2); a site may set a height on .kit-ba-stage instead. */

/* The root and the stage are size containers: the line and handle are placed in cqw of the stage (so they meet the
   clip edge exactly), and the no-JS pair stacks by the root's width. So the root needs a width of its own (a block, or a grid track); as a shrink-to-fit flex item it would be 0 wide. */
.kit-ba { --kit-ba-pos: 50%; --kit-ba-p: 50; margin: 0; container-type: inline-size; }
.kit-ba-stage {
  position: relative; container-type: inline-size; aspect-ratio: var(--kit-ba-ratio, 3 / 2); overflow: hidden; overflow: clip; isolation: isolate;
  border-radius: var(--kit-ba-radius, var(--kit-radius-card, 14px)); background: var(--kit-ba-ground, var(--kit-paper, #ddd));
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.kit-ba.is-live .kit-ba-stage { cursor: ew-resize; }
.kit-ba-pane { position: absolute; inset: 0; margin: 0; }
.kit-ba-pane picture { display: contents; }
.kit-ba-pane img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.kit-ba-before { z-index: 1; clip-path: inset(0 calc(100% - var(--kit-ba-pos)) 0 0); }

/* The labels: one per pane, in the markup. The before label rides on the clipped photo, so it leaves with it. */
.kit-ba-tag {
  position: absolute; top: var(--kit-ba-inset, 12px); z-index: 1;
  padding: 5px 12px; border-radius: 999px; pointer-events: none;
  background: var(--kit-ba-tag-bg, rgba(14, 14, 18, .82)); color: var(--kit-ba-tag-fg, #fff);
  font-family: var(--kit-font, inherit); font-size: 14px; line-height: 1.3; font-weight: var(--kit-weight-strong, 600);
}
.kit-ba-before .kit-ba-tag { left: var(--kit-ba-inset, 12px); }
.kit-ba-after .kit-ba-tag { right: var(--kit-ba-inset, 12px); }

/* The line and its handle. The line moves by transform; the handle stays whole inside the stage at either end. */
.kit-ba-line {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none;
  width: var(--kit-ba-line-w, 3px); margin-left: calc(var(--kit-ba-line-w, 3px) / -2);
  background: var(--kit-ba-line, #fff); box-shadow: 0 0 0 1px rgba(0, 0, 0, .16);
  transform: translateX(calc(var(--kit-ba-p) * 1cqw));
}
.kit-ba-handle {
  --r: calc(var(--kit-ba-handle, 48px) / 2);
  position: absolute; top: 50%; left: 0; z-index: 3; box-sizing: border-box;
  width: var(--kit-ba-handle, 48px); height: var(--kit-ba-handle, 48px); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  display: grid; place-items: center; border-radius: 50%; cursor: ew-resize; outline: none;
  background: var(--kit-ba-handle-bg, #fff); color: var(--kit-ba-handle-fg, #15151a);
  border: var(--kit-ba-handle-ring, 3px) solid var(--kit-ba-line, #fff);
  box-shadow: var(--kit-ba-handle-shadow, 0 2px 4px rgba(0, 0, 0, .18), 0 6px 16px rgba(0, 0, 0, .18));
  translate: clamp(var(--r), calc(var(--kit-ba-p) * 1cqw), calc(100cqw - var(--r))) 0;
}
.kit-ba-handle svg { width: 24px; height: 24px; }
.kit-ba-handle:focus-visible { outline: 3px solid var(--kit-ba-focus, var(--kit-accent, currentColor)); outline-offset: 3px; }
.kit-ba.is-pointer .kit-ba-handle:focus-visible { outline: none; }  /* focused by a press: no ring until a key */
/* Pressed: the handle sinks while a press or a finger holds the line. */
.kit-ba.is-dragging .kit-ba-stage { cursor: grabbing; }
@media (hover: hover) and (pointer: fine) {
  .kit-ba-handle:hover { background: var(--kit-ba-handle-hover, #f7f7f7); }
}
/* After hover: a mouse press is hover and active at once, so the press has to win (1.0.1). */
.kit-ba.is-dragging .kit-ba-handle, .kit-ba-handle:active { scale: var(--kit-ba-press, .92); background: var(--kit-ba-handle-press, #f1f1f1); }
.kit-ba-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Until both photos decode, no line: nobody sees a line over half a photo. */
.kit-ba.is-live:not([data-kit-ba-ready]) :is(.kit-ba-line, .kit-ba-handle) { opacity: 0; }
.kit-ba-line { transition: opacity 250ms var(--kit-ease, ease-out); }
.kit-ba-handle { transition: opacity 250ms var(--kit-ease, ease-out), scale 90ms var(--kit-ease, ease-out), background-color 150ms ease; }

/* The still pair: no JS, or .kit-ba-pair. */
@media (scripting: none) {
  .kit-ba-stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--kit-ba-gap, 8px); aspect-ratio: auto; height: auto; overflow: visible; background: none; border-radius: 0; cursor: auto; touch-action: auto; -webkit-user-select: auto; user-select: auto; }
  .kit-ba-pane { position: relative; inset: auto; aspect-ratio: var(--kit-ba-ratio, 3 / 2); overflow: hidden; border-radius: var(--kit-ba-radius, var(--kit-radius-card, 14px)); }
  .kit-ba-before { order: -1; clip-path: none; }
  @container (max-width: 520px) { .kit-ba-stage { grid-template-columns: 1fr; } }
}
.kit-ba-pair .kit-ba-stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--kit-ba-gap, 8px); aspect-ratio: auto; height: auto; overflow: visible; background: none; border-radius: 0; cursor: auto; touch-action: auto; -webkit-user-select: auto; user-select: auto; }
.kit-ba-pair .kit-ba-pane { position: relative; inset: auto; }
.kit-ba-pair .kit-ba-pane img { height: auto; aspect-ratio: var(--kit-ba-ratio, 3 / 2); border-radius: var(--kit-ba-radius, var(--kit-radius-card, 14px)); }
.kit-ba-pair .kit-ba-before { order: -1; clip-path: none; }
@container (max-width: 520px) { .kit-ba-pair .kit-ba-stage { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .kit-ba :is(.kit-ba-line, .kit-ba-handle) { transition: none; }
}
