/* How-far-ahead-to-look explainer: an overhead road with a tractor-trailer, a seconds-ahead ruler and a glowing sight
   beam. Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .la-*. The
   script sets the stage's data-road (city or highway), data-look (short or far), data-hazard (none or on) and
   data-mode (scan, stare, seen, late, stop, lane or panic). Without script the picture shows a city street with the
   driver scanning 12 to 15 seconds ahead. */
.la-page{--la-beam:#fbbf24;--la-go:#31d67b;--la-red:#ef4444;--la-console:#151b20}
.la-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.la-demo{padding-block:64px 72px;background:var(--paper)}
.la-demo-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);grid-template-areas:"head head" "stage panel";gap:24px 40px;align-items:start}
.la-head{grid-area:head}
.la-stage{grid-area:stage;margin:0;padding:10px;border-radius:16px;background:linear-gradient(170deg,#222a30,#0d1114 80%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 1px 0 rgb(255 255 255/.06)}
.la-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316;overflow:hidden}
.la-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: setting, scan target and distance; script on */
.la-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.la-stage.is-js .la-hud{display:flex}
.la-chip{display:inline-flex;align-items:center;gap:7px;margin:0;padding:6px 10px 6px 8px;border-radius:8px;background:#080b0d;box-shadow:inset 0 0 0 1px rgb(255 255 255/.09);font-size:13px;line-height:1;white-space:nowrap}
.la-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166;transition:background .2s,box-shadow .2s}
.la-chip span{color:#a9b3b8;font-weight:600}
.la-chip b{color:#e8eef0;font-weight:800}
.la-chip-road i{background:#94a3b8}
.la-stage[data-look="far"] .la-chip-look i{background:var(--la-go);box-shadow:0 0 0 2px rgb(49 214 123/.18),0 0 10px rgb(49 214 123/.8)}
.la-stage[data-look="far"] .la-chip-look b{color:var(--la-go)}
.la-stage[data-look="short"] .la-chip-look i{background:var(--la-red);box-shadow:0 0 0 2px rgb(239 68 68/.2),0 0 10px rgb(239 68 68/.85)}
.la-stage[data-look="short"] .la-chip-look b{color:#fca5a5}
.la-chip-dist i{background:var(--la-beam);box-shadow:0 0 0 2px rgb(251 191 36/.2)}

/* the ground: city street or highway */
.la-city,.la-city-marks,.la-hwy,.la-road-xing,.la-signal,.la-dist-city,.la-dist-hwy{display:none}
.la-stage[data-road="city"] :is(.la-city,.la-city-marks,.la-road-xing,.la-signal,.la-dist-city){display:inline}
.la-stage[data-road="highway"] :is(.la-hwy,.la-dist-hwy){display:inline}
.la-walk{fill:#4b5459}
.la-bldg{fill:#1c2429;stroke:#2f393f;stroke-width:1}
.la-xing{fill:#4b5459}
.la-crosswalk{fill:none;stroke:#e8eef0;stroke-width:6;stroke-dasharray:4 4;opacity:.75}
.la-stopline{fill:none;stroke:#f2f6f7;stroke-width:3}
.la-grass{fill:#17261c}
.la-shoulder{fill:#3a4246}
.la-edge{fill:none;stroke:#e8eef0;stroke-width:1.6;opacity:.85}
.la-lane{fill:none;stroke:#f2f6f7;stroke-width:2.2;stroke-dasharray:12 12}

/* hazards: a changing signal with cross traffic in the city, stopped traffic with brake lights on the highway */
.la-signal-box{fill:#0a0d0f;stroke:#59636a;stroke-width:1}
.la-lamp{fill:#2a3133;transition:fill .25s}
.la-stage[data-hazard="none"] .la-lamp-green{fill:#22c55e}
.la-stage[data-mode="seen"] .la-lamp-amber,.la-stage[data-mode="late"] .la-lamp-amber{fill:#fbbf24}
.la-stage:is([data-mode="stop"],[data-mode="panic"]) .la-lamp-red{fill:#ef4444}
.la-hz{display:none}
.la-stage[data-road="city"][data-hazard="on"] .la-hz-city,.la-stage[data-road="highway"][data-hazard="on"] .la-hz-hwy{display:inline}
.la-car{stroke:#0a0d0f;stroke-width:1}
.la-car-blue{fill:#3b82f6}
.la-car-gold{fill:#d4a017}
.la-car-glass{fill:#0f172a;opacity:.85}
.la-brake{fill:#ff3b30}
.la-stage.is-js[data-hazard="on"] .la-brake{animation:la-blink .6s steps(2,start) infinite}
.la-skid{fill:none;stroke:#05070a;stroke-width:3.2;stroke-linecap:round;opacity:0;transition:opacity .2s}
.la-stage[data-mode="panic"] .la-skid{opacity:.9}

/* the rig: truck, beam, focus and the unscanned road beyond a short look */
.la-rig{transform-box:view-box;transition:transform .9s linear}
.la-beam{fill:url(#la-g-beam);stroke:var(--la-beam);stroke-width:1;stroke-opacity:.6;transition:opacity .25s}
.la-beam-short{display:none}
.la-stage[data-look="short"] .la-beam-far{display:none}
.la-stage[data-look="short"] .la-beam-short{display:inline;fill:#fbbf24;fill-opacity:.4}
.la-veil{display:none;transition:opacity .3s}
.la-veil rect{fill:#04070a;opacity:.62}
.la-veil-txt{fill:#e8eef0;font-size:11px;font-weight:800;letter-spacing:.06em;text-anchor:middle;text-transform:uppercase;paint-order:stroke;stroke:#04070a;stroke-width:3px;stroke-linejoin:round}
.la-stage[data-look="short"] .la-veil{display:inline}
.la-stage[data-mode="panic"] .la-veil{opacity:0}
.la-focus{transform-box:view-box;transform:translate(196px,64px)}
.la-focus circle{fill:none;stroke:#fff7d6;stroke-width:1.8}
.la-focus circle+circle{fill:#fff7d6;stroke:none}
.la-stage[data-look="short"] .la-focus{transform:translate(215px,184px)}
.la-trailer{stroke:#2a3133;stroke-width:1}
.la-hitch{fill:#1f2937}
.la-cab{stroke:#450a0a;stroke-width:1}
.la-windshield{fill:#0f172a}

/* how the rig moves when the hazard plays out */
.la-stage[data-road="city"][data-mode="seen"] .la-rig{transform:translateY(-40px)}
.la-stage[data-road="city"][data-mode="stop"] .la-rig{transform:translateY(-114px);transition:transform 1.8s cubic-bezier(.2,.6,.3,1)}
.la-stage[data-road="highway"][data-mode="seen"] .la-rig{transform:translateY(-40px)}
.la-stage[data-road="highway"][data-mode="lane"] .la-rig{transform:translate(-70px,-90px);transition:transform 1.8s ease-in-out}
.la-stage[data-mode="late"] .la-rig{transform:translateY(-80px)}
.la-stage[data-road="city"][data-mode="panic"] .la-rig{transform:translateY(-124px);transition:transform .28s cubic-bezier(.1,.9,.2,1)}
/* 3 to 4 s at highway speed is about 300 feet, short of the 419 feet a truck needs from 55 mph: nose to bumper */
.la-stage[data-road="highway"][data-mode="panic"] .la-rig{transform:translateY(-127px);transition:transform .5s cubic-bezier(.25,.7,.4,1)}
.la-stage.is-snap .la-rig{transition:none}
.la-impact{display:none}
.la-impact-star{fill:none;stroke:#fbbf24;stroke-width:2.4;stroke-linecap:round}
.la-stage[data-road="highway"][data-mode="panic"] .la-impact{display:inline}
.la-stage.is-js[data-road="highway"][data-mode="panic"] .la-impact{animation:la-hit .5s .4s both}
.la-stage.is-js[data-mode="panic"] .la-truck{animation:la-jolt .45s ease-out}

/* ruler and distance labels: every teaching label is at least 9.5px in the 360 wide view */
.la-ruler-line{fill:none;stroke:#e8eef0;stroke-width:1.4;opacity:.75}
.la-ruler-tick{fill:none;stroke:#e8eef0;stroke-width:1.6}
.la-label{fill:#e8eef0;font-size:10px;font-weight:800;letter-spacing:.02em;paint-order:stroke;stroke:#0b1013;stroke-width:3px;stroke-linejoin:round}
.la-label-end{text-anchor:end}
.la-label-strong{fill:#fde68a;font-size:10.5px}
.la-bracket{fill:none;stroke:#fde68a;stroke-width:1.6}
.la-bracket-short{stroke:#fca5a5}
.la-stage[data-look="far"] .la-bracket-short{opacity:.6}
.la-stage[data-look="short"] .la-bracket-far{opacity:.6}

/* the card */
.la-card-box{fill:#080b0d;stroke:#59636a;stroke-width:1.2;transition:stroke .2s}
.la-card-big{font-size:11.5px;font-weight:900;letter-spacing:.04em;text-anchor:middle}
.la-card-sub{fill:#d4dbde;font-size:9.5px;font-weight:700;text-anchor:middle}
.la-mode{display:none}
.la-stage:is([data-mode="scan"]) .la-mode-scan,.la-stage[data-mode="stare"] .la-mode-stare,
.la-stage[data-mode="seen"] .la-mode-seen,.la-stage[data-mode="late"] .la-mode-late,
.la-stage[data-mode="stop"] .la-mode-stop,.la-stage[data-mode="lane"] .la-mode-lane,
.la-stage[data-mode="panic"] .la-mode-panic{display:inline}
.la-mode-scan .la-card-big,.la-mode-seen .la-card-big,.la-mode-stop .la-card-big,.la-mode-lane .la-card-big{fill:var(--la-go)}
.la-mode-stare .la-card-big,.la-mode-late .la-card-big{fill:#fde68a}
.la-mode-panic .la-card-big{fill:#fca5a5}
.la-stage:is([data-mode="scan"],[data-mode="seen"],[data-mode="stop"],[data-mode="lane"]) .la-card-box{stroke:var(--la-go)}
.la-stage:is([data-mode="stare"],[data-mode="late"]) .la-card-box{stroke:var(--la-beam)}
.la-stage[data-mode="panic"] .la-card-box{stroke:var(--la-red);stroke-width:2}

/* motion, script on: the road flows past and the driver's attention sweeps near and far */
.la-stage.is-js .la-lane{animation:la-road .6s linear infinite}
.la-stage.is-js:is([data-mode="stop"],[data-mode="panic"]) .la-lane{animation:none}
.la-stage.is-js[data-look="far"] .la-focus{animation:la-sweep 3.2s ease-in-out infinite}
@keyframes la-road{to{stroke-dashoffset:-24}}
@keyframes la-sweep{0%,100%{transform:translate(196px,64px)}25%{transform:translate(150px,120px)}50%{transform:translate(214px,192px)}75%{transform:translate(170px,96px)}}
@keyframes la-jolt{0%{transform:translateY(0)}20%{transform:translate(-2px,-5px)}45%{transform:translate(2px,3px)}70%{transform:translate(-1px,-2px)}100%{transform:translateY(0)}}
@keyframes la-blink{to{opacity:.35}}
@keyframes la-hit{0%{opacity:0}40%{opacity:1}100%{opacity:1}}

/* controls: one dark console, every button the same dark face and white text, amber when active or focused */
.la-ask{margin:0;color:var(--ink);font-size:20px;line-height:1.25}
.la-ask[hidden],.la-controls[hidden]{display:none}
.la-ask b{font-weight:800}
.la-controls{display:grid;gap:10px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,var(--la-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.la-btn{position:relative;display:flex;align-items:center;gap:12px;min-width:0;min-height:48px;padding:10px 12px;border:0;border-radius:12px;background:linear-gradient(180deg,#303a41,#1b2227);box-shadow:inset 0 1px 0 rgb(255 255 255/.1),0 3px 0 #06090b,0 8px 16px -10px rgb(0 0 0/.7);color:#fff;font:inherit;font-size:16px;font-weight:700;line-height:1.2;text-align:left;cursor:pointer;transition:transform .08s,box-shadow .12s,background .12s}
.la-btn:hover{background:linear-gradient(180deg,#38434b,#20282d)}
.la-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.la-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #06090b}
.la-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.la-btn-wide{min-height:64px}
.la-name{display:grid;gap:3px;min-width:0}
.la-name small{color:#a9b3b8;font-size:13px;font-weight:600}
.la-group{display:grid;gap:6px}
.la-label-ui{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.la-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.la-btn-seg{justify-content:center;padding:8px 8px;text-align:center;font-size:15px}
.la-icon{flex:none;width:44px;height:30px}
.la-icon-sign{fill:#fbbf24;stroke:#0a0d0f;stroke-width:1.4;stroke-linejoin:round}
.la-icon-mark{fill:none;stroke:#0a0d0f;stroke-width:3;stroke-linecap:round}
.la-reset{justify-self:start;gap:8px;min-height:44px;padding:8px 16px 8px 12px;font-size:15px}
.la-reset-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.la-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid var(--la-go);border-radius:0 10px 10px 0;background:var(--white,#fffffc);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45;transition:border-color .2s}
.la-stage:is([data-mode="stare"],[data-mode="late"])~.la-panel .la-status{border-left-color:var(--la-beam)}
.la-stage[data-mode="panic"]~.la-panel .la-status{border-left-color:var(--la-red)}
.la-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}

@media (min-width:761px){
  .la-page .sbp-film-frame.is-wide{aspect-ratio:auto;padding-bottom:58px;background:#0b0d0f}
  .la-page .sbp-film-frame.is-wide video{aspect-ratio:16/9;width:100%;height:auto}
  .la-page .sbp-film-frame.is-wide .sbp-play{bottom:58px}
  .la-page .sbp-film-frame.is-wide .sbp-sound-on{left:12px;right:auto;top:auto;bottom:10px}
  .la-page .sbp-film-frame.is-wide .sbp-pause{right:12px;top:auto;bottom:10px}
}
@media (max-width:900px){
  .la-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:16px}
}
@media (max-width:760px){
  .la-page .sbp-answer-text{font-size:21px}
  .la-page .sbp-lead{margin-top:12px;font-size:15.5px;line-height:1.5}
  .la-demo{padding-block:36px 44px}
  .la-stage{margin-inline:-8px;padding:8px 6px 6px;border-radius:14px}
  .la-svg{border-radius:8px}
  .la-hud{gap:5px;padding:0 0 8px}
  .la-chip{padding:5px 7px 5px 6px;font-size:11.5px;gap:5px}
  .la-chip i{width:8px;height:8px}
  .la-panel{gap:10px}
  .la-ask{font-size:18px}
  .la-controls{gap:8px;margin-inline:-8px;padding:12px 10px}
  .la-btn{padding:8px 9px;gap:8px;font-size:15px}
  .la-btn-wide{min-height:60px}
  .la-btn-seg{padding:8px 6px;font-size:14px}
  .la-icon{width:38px;height:26px}
  .la-name small{font-size:12px}
  .la-status{min-height:8.8em;padding:10px 12px;font-size:15px}
  .la-text{font-size:16px}
}
@media (max-width:380px){
  .la-chip{padding:5px 6px;font-size:11px;gap:4px}
}
@media (prefers-reduced-motion:reduce){
  .la-page .la-demo *{transition:none!important;animation:none!important}
}
