/* Fleet before & after, shared by the fleet ad landing page (fleet-quote, lp.css world) and the fleet service page
   (fleet-branding, presentation.css world). Markup: tools/build_lp.py ba_section (tools/build_ba.py writes the service-page copy);
   script: src/ba.js; brief: leadgend-reports/tintandwrap-fleet-ba/BRIEF.md (2026-11-19).
   One drag-to-compare frame (before underneath, after clipped from the divider rightward) with a tablist of pairs, then a
   swipe row of cards: the after large, the before as a small print in the corner that swaps on tap.
   Tokens are local so the block works on both pages; --ba-gutter is the page's side padding (the phone frame runs edge to edge). */
html:not(#tw-type) .lp-ba{--ba-ink:#f4efe8;--ba-soft:#d3c8be;--ba-line:#ffffff1f;--ba-coral:#f59154;--ba-black:#050404;--ba-gutter:var(--lp-gutter,6vw)}
html:not(#tw-type) .lp-ba{display:grid;grid-template-columns:minmax(0,1fr);border-bottom:1px solid var(--ba-line)}
html:not(#tw-type) .lp-ba h2{margin-bottom:28px}
html:not(#tw-type) .lp-ba__frame{position:relative;aspect-ratio:3/2;overflow:hidden;border-radius:4px;background:var(--ba-black);touch-action:pan-y;cursor:ew-resize;user-select:none;-webkit-user-select:none;transition:opacity .12s ease}
html:not(#tw-type) .lp-ba__frame.is-switching{opacity:0}
html:not(#tw-type) .lp-ba__frame:has(.lp-ba__range:focus-visible){outline:2px solid var(--ba-coral);outline-offset:3px}
html:not(#tw-type) .lp-ba__layer{position:absolute;inset:0}
html:not(#tw-type) .lp-ba__layer--after{clip-path:inset(0 0 0 var(--compare,50%))}
html:not(#tw-type) .lp-ba__layer img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
html:not(#tw-type) .lp-ba__label{position:absolute;top:12px;left:12px;padding:5px 9px;border-radius:3px;background:#050404d9;color:#fff;font:600 13px/1.2 Saira,Arial,sans-serif;letter-spacing:.03em}
html:not(#tw-type) .lp-ba__layer--after .lp-ba__label{left:auto;right:12px}
html:not(#tw-type) .lp-ba__line{position:absolute;top:0;bottom:0;left:var(--compare,50%);width:2px;margin-left:-1px;background:var(--ba-ink);box-shadow:0 0 0 1px #0505048c;pointer-events:none}
html:not(#tw-type) .lp-ba__disc{position:absolute;left:50%;top:88%;display:grid;place-items:center;width:40px;height:40px;transform:translate(-50%,-50%);border:1.5px solid var(--ba-ink);border-radius:50%;background:#050404e6;color:var(--ba-coral);box-shadow:0 4px 14px #00000073;transition:border-color .2s}
html:not(#tw-type) .lp-ba__disc svg{width:22px;height:22px}
html:not(#tw-type) .lp-ba__frame:has(.lp-ba__range:focus-visible) .lp-ba__disc{border-color:var(--ba-coral)}
html:not(#tw-type) .lp-ba__range{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;pointer-events:none;appearance:none;-webkit-appearance:none;background:transparent}
html:not(#tw-type) .lp-ba__hint{margin-top:12px;font-size:13px;line-height:1.4;color:var(--ba-soft)}
html:not(#tw-type) .lp-ba__tabs{display:grid;grid-template-columns:minmax(0,1fr);margin-top:24px}
html:not(#tw-type) .lp-ba__tab{position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:48px;padding:12px 0 10px;border:0;border-top:1px solid var(--ba-line);background:none;color:var(--ba-soft);font:inherit;text-align:left;cursor:pointer}
html:not(#tw-type) .lp-ba__tab b{font-size:16px;font-weight:700;line-height:1.25;color:var(--ba-soft);transition:color .2s}
html:not(#tw-type) .lp-ba__tab span{font-size:13px;line-height:1.35;color:var(--ba-soft)}
html:not(#tw-type) .lp-ba__tab:hover b{color:#fff}
html:not(#tw-type) .lp-ba__tab[aria-selected="true"] b{color:#fff}
html:not(#tw-type) .lp-ba__tab[aria-selected="true"]::before{content:"";position:absolute;left:0;top:-1px;width:44px;height:2px;background:var(--ba-coral)}
html:not(#tw-type) .lp-ba__tab:focus-visible{outline:2px solid var(--ba-coral);outline-offset:2px}
html:not(#tw-type) .lp-ba__quote{display:none;align-items:center;justify-content:center;min-height:54px;margin-top:24px}
/* the landing page's version is outlined (its one gradient action is the form); the service page uses the site's gradient .pill */
html:not(#tw-type) .lp-ba__quote:not(.pill){padding:0 22px;border:1px solid #ffffff4d;border-radius:3px;background:#0505048c;color:#fff;font:700 16px/1 Saira,Arial,sans-serif;letter-spacing:.02em;text-decoration:none;transition:border-color .2s,background .2s}
html:not(#tw-type) .lp-ba__quote:not(.pill):hover{border-color:#fff;background:#050404cc;color:#fff}
html:not(#tw-type) .lp-ba__quote:focus-visible{outline:2px solid var(--ba-coral);outline-offset:2px}
html:not(#tw-type) .lp-ba__quote:not(.pill):visited{color:#fff}
html:not(#tw-type) .lp-ba__more{margin-top:clamp(56px,7vw,88px);min-width:0}
html:not(#tw-type) .lp-ba__more-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
html:not(#tw-type) .lp-ba__more h3{font-size:clamp(28px,2.2vw,34px);line-height:1}
html:not(#tw-type) .lp-ba__nav{display:none;gap:8px}
html:not(#tw-type) .lp-ba__step{min-height:44px;padding:0 16px;border:1px solid #ffffff4d;border-radius:3px;background:#0505048c;color:#fff;font:700 14px/1 Saira,Arial,sans-serif;letter-spacing:.02em;cursor:pointer;transition:border-color .2s,background .2s,opacity .2s}
html:not(#tw-type) .lp-ba__step:hover{border-color:#fff;background:#050404cc}
html:not(#tw-type) .lp-ba__step[aria-disabled="true"]{opacity:.38;cursor:default;border-color:#ffffff4d;background:#0505048c}
html:not(#tw-type) .lp-ba__step:focus-visible{outline:2px solid var(--ba-coral);outline-offset:2px}
html:not(#tw-type) .lp-ba__row{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scroll-padding-inline:0;padding-bottom:14px;scrollbar-width:thin;scrollbar-color:var(--ba-coral) #ffffff14}
html:not(#tw-type) .lp-ba__row::-webkit-scrollbar{height:6px}
html:not(#tw-type) .lp-ba__row::-webkit-scrollbar-track{background:#ffffff14;border-radius:3px}
html:not(#tw-type) .lp-ba__row::-webkit-scrollbar-thumb{background:var(--ba-coral);border-radius:3px}
html:not(#tw-type) .lp-ba__row:focus-visible{outline:2px solid var(--ba-coral);outline-offset:4px}
html:not(#tw-type) .lp-ba-card{flex:0 0 calc((100% - 3 * 14px) / 3.25);margin:0;scroll-snap-align:start}
html:not(#tw-type) .lp-ba-card:last-child{margin-right:18px}
html:not(#tw-type) .lp-ba-card__media{position:relative;aspect-ratio:3/2;overflow:hidden;border-radius:4px;background:#14110f;transition:opacity .11s ease}
html:not(#tw-type) .lp-ba-card__media.is-swapping{opacity:0}
html:not(#tw-type) .lp-ba-card__img{display:block;object-fit:cover}
html:not(#tw-type) .lp-ba-card__img--after{position:absolute;inset:0;width:100%;height:100%}
html:not(#tw-type) .lp-ba-card__swap{position:absolute;top:10px;left:10px;width:34%;aspect-ratio:3/2;padding:0;border:2px solid var(--ba-black);border-radius:3px;background:#14110f;box-shadow:0 6px 18px #0000008c,0 1px 3px #00000080;cursor:pointer;overflow:hidden;transition:transform .2s cubic-bezier(.16,1,.3,1)}
html:not(#tw-type) .lp-ba-card__swap:hover{transform:translateY(-1px)}
html:not(#tw-type) .lp-ba-card__swap:focus-visible{outline:2px solid var(--ba-coral);outline-offset:2px}
html:not(#tw-type) .lp-ba-card__swap .lp-ba-card__img{width:100%;height:100%}
html:not(#tw-type) .lp-ba-card__tag{position:absolute;left:5px;bottom:5px;padding:2px 6px;border-radius:3px;background:#050404d9;color:#fff;font:600 11px/1.3 Saira,Arial,sans-serif;letter-spacing:.03em;pointer-events:none}
html:not(#tw-type) .lp-ba-card__tag--after{left:auto;bottom:auto;top:10px;right:10px;padding:4px 8px;font-size:13px}
html:not(#tw-type) .lp-ba-card figcaption{display:grid;gap:2px;margin-top:12px;font-size:13px;line-height:1.35;color:var(--ba-soft)}
html:not(#tw-type) .lp-ba-card figcaption b{color:#fff;font-size:16px;font-weight:700}
@media (prefers-reduced-motion:reduce){html:not(#tw-type) .lp-ba__frame,html:not(#tw-type) .lp-ba-card__media,html:not(#tw-type) .lp-ba-card__swap{transition:none}}
@media (pointer:fine) and (min-width:700px){html:not(#tw-type) .lp-ba__nav{display:flex}}
@media (min-width:700px){
  html:not(#tw-type) .lp-ba__tabs{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}
  html:not(#tw-type) .lp-ba__quote{display:inline-flex;justify-self:start}
  html:not(#tw-type) .lp-ba-card{flex-basis:calc((100% - 2 * 14px) / 2.25)}
}
@media (min-width:1100px){
  html:not(#tw-type) .lp-ba{grid-template-columns:minmax(0,2fr) minmax(300px,1fr);grid-template-rows:auto auto 1fr auto;column-gap:48px}
  html:not(#tw-type) .lp-ba h2{grid-column:2;grid-row:1;margin:0 0 28px}
  html:not(#tw-type) .lp-ba__stage{grid-column:1;grid-row:1/span 4;align-self:start;width:100%;max-width:calc((100svh - 160px) * 1.5)}
  html:not(#tw-type) .lp-ba__disc{width:52px;height:52px}
  html:not(#tw-type) .lp-ba__disc svg{width:26px;height:26px}
  html:not(#tw-type) .lp-ba__tabs{grid-column:2;grid-row:2;grid-template-columns:minmax(0,1fr);margin-top:0}
  html:not(#tw-type) .lp-ba__tab{min-height:56px}
  html:not(#tw-type) .lp-ba__tab b{font-size:18px}
  html:not(#tw-type) .lp-ba__quote{grid-column:2;grid-row:4;align-self:end;justify-self:stretch;margin-top:24px}
  html:not(#tw-type) .lp-ba__more{grid-column:1/-1;grid-row:5}
  html:not(#tw-type) .lp-ba-card{flex-basis:calc((100% - 3 * 14px) / 3.25)}
}
@media (min-width:1280px){html:not(#tw-type) .lp-ba__tab{min-height:68px}}
@media (max-width:699px){
  html:not(#tw-type) .lp-ba__frame{margin-inline:calc(-1 * var(--ba-gutter));border-radius:0}
  html:not(#tw-type) .lp-ba__row{gap:10px;margin-inline:calc(-1 * var(--ba-gutter));padding-inline:var(--ba-gutter);scroll-padding-inline:var(--ba-gutter);scrollbar-width:none}
  html:not(#tw-type) .lp-ba__row::-webkit-scrollbar{display:none}
  html:not(#tw-type) .lp-ba-card{flex-basis:84%}
  html:not(#tw-type) .lp-ba-card__swap{top:8px;left:8px}
}
/* The fleet service page (fleet-branding): the page's own section spacing (.section 7vw / 6vw), its heading size (typography.css
   h2, 40px / 28px) and no rule under the section; there is no sticky quote bar there, so the outlined link shows at every width. */
html:not(#tw-type) .lp-ba--page{--ba-gutter:7vw;border-bottom:0}
html:not(#tw-type) .lp-ba--page .lp-ba__quote{display:inline-flex;justify-self:start;min-width:220px;padding:0 28px;font-size:18px}
@media (min-width:1100px){html:not(#tw-type) .lp-ba--page .lp-ba__quote{justify-self:stretch}}
@media (max-width:800px){html:not(#tw-type) .lp-ba--page{--ba-gutter:6vw}}
/* the gallery link under the cards (on the landing page lp.css styles it as .lp-work__more; the service page needs its own) */
html:not(#tw-type) .lp-ba__gallery{margin-top:22px}
html:not(#tw-type) .lp-ba__gallery a{color:var(--ba-ink);font-weight:600;text-decoration:underline;text-decoration-color:var(--ba-coral);text-underline-offset:5px;text-decoration-thickness:1px}
html:not(#tw-type) .lp-ba__gallery a:hover{color:#fff;text-decoration-thickness:2px}
html:not(#tw-type) .lp-ba__gallery a:visited{color:var(--ba-ink)}
