/* Old site / new site slider (2026-11-12, moved from /lab/ idea 1). Used on /audit/; js/ba-slider.js drives it.
   Four pairs (bakery, hair salon, plumber, dental). The new site is on the left (its headline and main button are on the left),
   the old one on the right. Two views (Computer / Phone buttons, .ba-shell[data-view]):
   - Computer: 1200x900 shots. Phones show a square crop (no taller than 55% of the screen): the left of the new site, the middle of the old.
   - Phone: 780x1440 shots (390 wide at 2x; the old site is its desktop layout shrunk, as a phone really shows it) in a phone-shaped frame,
     centred, no taller than 58% of the screen. Phones start in this view. */
.ba-sec{padding-top:0}
.ba-wrap{max-width:960px}
.ba-h{margin-top:clamp(10px,1.4vw,16px);font-size:clamp(32px,4.4vw,60px);line-height:1;letter-spacing:-.045em;font-weight:600}
.ba-note{margin-top:14px;max-width:34em;color:var(--graphite)}
.ba-bar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 20px;margin:clamp(20px,2.4vw,28px) 0 14px}
.ba-pick{display:flex;flex-wrap:wrap;gap:8px}
.ba-pick button{min-height:44px;padding:0 16px;border:1px solid var(--ink);background:transparent;color:var(--ink);font:500 15px/1 var(--sans);cursor:pointer;
  -webkit-tap-highlight-color:transparent;transition:background-color var(--t-1),color var(--t-1)}
.ba-pick button[aria-pressed="true"]{background:var(--ink);color:var(--bone)}
.ba-pick button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media (hover:hover){.ba-pick button[aria-pressed="false"]:hover{background:var(--linen)}}

.ba{--x:60%;position:relative;overflow:hidden;aspect-ratio:4/3;background:var(--linen);border:1px solid var(--ink);
  touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:ew-resize;-webkit-tap-highlight-color:transparent;contain:layout paint}
.ba-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:0 0;pointer-events:none;-webkit-user-drag:none}
.ba-top{position:absolute;inset:0;clip-path:inset(0 calc(100% - var(--x)) 0 0)}
.ba-line{position:absolute;top:0;bottom:0;left:var(--x);width:2px;margin-left:-1px;background:var(--bone);box-shadow:0 0 0 1px rgba(17,17,17,.35);pointer-events:none;will-change:left}
.ba-knob{position:absolute;top:50%;left:var(--x);width:52px;height:52px;margin:-26px 0 0 -26px;display:grid;place-items:center;
  border:1px solid var(--ink);border-radius:50%;background:var(--bone);color:var(--ink);cursor:ew-resize;touch-action:none;padding:0;
  box-shadow:0 6px 20px rgba(17,17,17,.22)}
.ba-knob:focus-visible{outline:2px solid var(--bone);outline-offset:3px;box-shadow:0 0 0 5px var(--ink)}
.ba-tag{position:absolute;top:12px;padding:7px 11px;background:var(--ink);color:var(--bone);pointer-events:none;transition:opacity var(--t-2)}
.ba-tag-new{left:12px;background:var(--bone);color:var(--ink);border:1px solid var(--ink)}
.ba-tag-old{right:12px}
.ba[data-side="new"] .ba-tag-old,.ba[data-side="old"] .ba-tag-new{opacity:0}
.ba-shell[data-view="m"]{display:flex;justify-content:center;padding:9px 0}
.ba-shell[data-view="m"] .ba{aspect-ratio:390/720;height:min(58vh,620px);height:min(58svh,620px);width:auto;max-width:calc(100% - 18px);max-height:none;margin-inline:0;
  border:1px solid var(--ink);border-radius:30px;box-shadow:0 0 0 7px var(--bone),0 0 0 8px var(--ink)}
.ba-shell[data-view="m"] .ba-img{object-position:0 0}
.ba-shell[data-view="m"] .ba-tag{top:36%;padding:5px 8px;font-size:11px}   /* over the photo, clear of the logo and phone number */
.ba-shell[data-view="m"] .ba-tag-new{left:14px}
.ba-shell[data-view="m"] .ba-tag-old{right:14px}
.ba-shell[data-view="m"] .ba-knob{width:48px;height:48px;margin:-24px 0 0 -24px}
.ba-cap{margin-top:12px;color:var(--stone-text);font-size:15px}
.ba-cap a{color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
/* phones: full width, a square crop of the left side, so the headline on both sites is big enough to read */
@media (max-width:700px){
  .ba{--x:66%;aspect-ratio:1/1;max-height:55vh;max-height:55svh;margin-inline:calc(-1 * var(--gut));border-left:0;border-right:0}
  .ba-base{object-position:50% 0}
  .ba-knob{width:56px;height:56px;margin:-28px 0 0 -28px}
  .ba-bar{gap:8px}
  .ba-pick{gap:6px}
  .ba-pick button{padding:0 12px;font-size:14.5px}
}
@media (prefers-reduced-motion:reduce){.ba-tag,.ba-pick button{transition:none}}
@media (min-width:701px){.ba-shell[data-view="m"] + .ba-cap{text-align:center}}
