/* Tractor-trailer air and electrical lines explainer: rig the lines behind the cab, then turn the tractor. Hero, film,
   course offer and return banner reuse spring-brakes.css (.sbp-*); the page keeps its .cl-page film rules below and
   this file styles the simulator as .al-*. The stage's data-rig colors the lamps and callout; is-flex, is-taut and
   is-snag light the glow, the pulled couplers and the sparks; is-moving runs while the cab swings. The script moves
   the tractor and the hose ends by their transform attributes, so no rule here may transform .al-tractor or .al-end. */
.cl-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.al-demo{--al-ok:#4fe08f;--al-warn:#ffb400;--al-bad:#ff5a4e;--al-red:#ef4444;--al-blue:#3cb4f5;--al-green:#2fcf6b;padding-block:64px 72px;background:var(--paper)}
.al-demo-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-areas:"head head" "stage panel";gap:24px 40px;align-items:start}
.al-head{grid-area:head}
.al-stage{grid-area:stage;margin:0;padding:10px;border-radius:16px;background:linear-gradient(170deg,#1d262d,#0d1215 80%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 1px 0 rgb(255 255 255/.06)}
.al-svg{display:block;width:100%;height:auto;border-radius:10px;background:#161d22}
.al-panel{grid-area:panel;display:grid;gap:14px}

/* HUD lamps over the scene; script on */
.al-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.al-stage.is-js .al-hud{display:flex}
.al-lamp{display:inline-flex;align-items:center;gap:7px;margin:0;padding:6px 10px 6px 8px;border-radius:8px;background:#0a0e10;box-shadow:inset 0 0 0 1px rgb(255 255 255/.09);font-size:13px;line-height:1;white-space:nowrap}
.al-lamp i{flex:none;width:9px;height:9px;border-radius:50%;background:#4a555c;transition:background .2s,box-shadow .2s}
.al-lamp span{color:#a7afb6;font-weight:600}
.al-lamp b{color:#edf1f3;font-weight:800;font-variant-numeric:tabular-nums}
.al-lamp[data-al-lamp="angle"] b{min-width:3ch;text-align:right}
.al-lamp.is-ok i{background:var(--al-ok);box-shadow:0 0 0 2px rgb(79 224 143/.18),0 0 10px rgb(79 224 143/.8)}
.al-lamp.is-ok b{color:var(--al-ok)}
.al-lamp.is-info i{background:#9fd3e2;box-shadow:0 0 0 2px rgb(159 211 226/.16),0 0 8px rgb(159 211 226/.6)}
.al-lamp.is-warn i{background:var(--al-warn);box-shadow:0 0 0 2px rgb(255 180 0/.2),0 0 10px rgb(255 180 0/.8)}
.al-lamp.is-warn b{color:var(--al-warn)}
.al-lamp.is-bad i{background:var(--al-bad);box-shadow:0 0 0 2px rgb(255 90 78/.22),0 0 12px rgb(255 90 78/.95)}
.al-lamp.is-bad b{color:#ff9d94}
.al-stage.is-moving .al-lamp.is-bad i{animation:al-blink .5s steps(2,jump-none) infinite}
@keyframes al-blink{50%{background:#5a2a22;box-shadow:none}}

/* the yard */
.al-ground{fill:#1a2126}
.al-bay{fill:none;stroke:#e8c25a;stroke-width:2.4;stroke-dasharray:22 10;opacity:.18}
.al-stain{fill:#0b0f11;opacity:.45}
.al-vignette{pointer-events:none}

/* the tractor */
.al-tire{fill:url(#al-g-tire);stroke:#050708;stroke-width:.8}
.al-tread{fill:none;stroke:#3a4247;stroke-width:1.1;opacity:.75}
.al-flap{fill:#0b0e10}
.al-axle{fill:#2d3438}
.al-diff{fill:#3a4348;stroke:#20262a;stroke-width:1.2}
.al-rail{fill:#2a3136;stroke:#0f1315;stroke-width:.8}
.al-cross{fill:#232a2e}
.al-shaft{stroke:#3d464b;stroke-width:.5}
.al-ujoint{fill:#89949a}
.al-tank{fill:#aab5ba;stroke:#5d686e;stroke-width:.8}
.al-plate-shade{fill:#000;opacity:.45}
.al-plate{stroke:#0c0f11;stroke-width:1}
.al-ramp{fill:#30383d;stroke:#15191c;stroke-width:.8}
.al-plate-edge{fill:none;stroke:#7b878d;stroke-width:1;opacity:.55}
.al-handle{fill:#ffb400}
.al-deck{stroke:#5e6a71;stroke-width:1}
.al-deck-plate{pointer-events:none}
.al-deck-edge{fill:none;stroke:#eef3f5;stroke-width:1;opacity:.55}
.al-coil{fill:#444e54;stroke:#b8c3c8;stroke-width:1.4}
.al-coil-turns{fill:none;stroke:#e3e9ec;stroke-width:.9}
.al-stack-shield{fill:#1e2529}
.al-stack{stroke:#2d363b;stroke-width:.8}
.al-stack-mouth{fill:#0b0d0e}
.al-steer{fill:#101416}
.al-hood{fill:url(#al-g-cab);stroke:#0f2833;stroke-width:1}
.al-hood-crease{fill:none;stroke:#9fd3e2;stroke-width:.8;opacity:.35}
.al-fender{fill:#13303c}
.al-cab-shade{fill:#000;opacity:.4}
.al-cab{stroke:#0f2833;stroke-width:1.2}
.al-backwall{fill:#10252f}
.al-extender{fill:#1a4252}
.al-fairing{stroke:#16414f;stroke-width:1}
.al-fairing-lip{fill:none;stroke:#e3f6fb;stroke-width:1.6;stroke-linecap:round;opacity:.85}
.al-glass{stroke:#0b161c;stroke-width:.8}
.al-marker{fill:#ffb84a}
.al-mirror{fill:#1b2226;stroke:#8a979d;stroke-width:1.4}
.al-outlet{stroke:#0b0e10;stroke-width:1}
.al-outlet-red{fill:var(--al-red)}
.al-outlet-blue{fill:var(--al-blue)}
.al-outlet-green{fill:var(--al-green)}
.al-clip{fill:url(#al-g-chrome);stroke:#2a3237;stroke-width:.8}
.al-clip-shine{fill:none;stroke:#fff;stroke-width:.7;opacity:.8}

/* the trailer nose */
.al-trailer-roof{stroke:#7d868a;stroke-width:1}
.al-roof-bows{fill:none;stroke:#9aa3a6;stroke-width:1;opacity:.55}
.al-rivets{fill:none;stroke:#7c8588;stroke-width:1.2;stroke-dasharray:1 3;opacity:.8}
.al-trailer-name{fill:#4d575c;font-size:10px;font-weight:800;letter-spacing:.22em;text-anchor:middle}
.al-ghost{fill:#dfe6e8;fill-opacity:.1}
.al-ghost-edge{fill:none;stroke:#dfe6e8;stroke-width:1.2;stroke-dasharray:4 3;opacity:.55}
.al-ghost-side{fill:none;stroke:#dfe6e8;stroke-width:1.2;opacity:.35}
.al-wall{stroke:#626c71;stroke-width:.8}
.al-wall-ribs{fill:none;stroke:#77818a;stroke-width:1.2;opacity:.8}
.al-wall-edge{fill:none;stroke:#59636a;stroke-width:1}
.al-post{fill:#c4cbcd;stroke:#646e73;stroke-width:.8}
.al-lamp-amber{fill:#ffb400}
.al-mount{fill:#252c30}
.al-coupler rect,.al-coupler circle{stroke:#0b0e10;stroke-width:.8}
.al-coupler-red rect{fill:#b8262a}
.al-coupler-red circle{fill:#5c1012}
.al-coupler-blue rect{fill:#1c76ad}
.al-coupler-blue circle{fill:#0d3550}
.al-coupler-green circle{fill:#1f8a4a}
.al-coupler-green .al-socket{fill:#0a1f12}

/* kingpin and turn arc */
.al-pin-ring{fill:none;stroke:#ffb400;stroke-width:1;stroke-dasharray:2 4;opacity:.45}
.al-ticks{fill:none;stroke:#ffb400;stroke-width:1.6;stroke-linecap:round;opacity:.75}
.al-arc{fill:none;stroke:#ffb400;stroke-width:3;stroke-linecap:round}
.al-arc-tip{fill:#ffb400;stroke:#14181c;stroke-width:1}
.al-pin{fill:#ffb400;stroke:#14181c;stroke-width:1.4}

/* the three lines */
.al-shadow,.al-glow,.al-hose,.al-sheen{fill:none;stroke-linecap:round;stroke-linejoin:round}
.al-shadow{stroke:#000;stroke-width:5;opacity:.38;transform:translate(5px,7px);transition:transform .35s ease,opacity .35s ease}
.al-shadow-cord{stroke-width:4.2}
.al-stage[data-rig="tight"] .al-shadow{transform:translate(4px,6px)}
.al-stage[data-rig="loose"] .al-shadow{transform:translate(1px,1.4px);opacity:.55}
.al-hose{stroke-width:4.2;transition:stroke .2s}
.al-hose-red{stroke:var(--al-red)}
.al-hose-blue{stroke:var(--al-blue)}
.al-hose-green{stroke:var(--al-green);stroke-width:3.4}
.al-sheen{stroke:#fff;stroke-width:1.1;opacity:.38;transform:translate(-.6px,-.8px)}
.al-sheen-cord{stroke-width:.9}
.al-glow{stroke-width:9;opacity:0;transition:opacity .3s}
.al-glow-red,.al-glow-blue,.al-glow-green{stroke:var(--al-ok)}
.al-stage.is-flex .al-glow{opacity:.2}
.al-stage.is-flex.is-moving .al-glow{opacity:.32}
.al-stage.is-taut .al-glow{stroke:var(--al-bad);opacity:.36;animation:al-strain .45s ease-in-out infinite alternate}
.al-stage.is-taut .al-hose{stroke:#ff3b30}
.al-stage.is-taut .al-hose-green{stroke:#ff6b5e}
.al-stage[data-rig="loose"] .al-glow{stroke:var(--al-warn)}
.al-stage.is-snag .al-glow{opacity:.22}
@keyframes al-strain{from{opacity:.14}to{opacity:.46}}

/* hose ends: glad hands and the 7-way plug */
.al-end-neck{fill:#1b2024}
.al-end-head{stroke:#0b0e10;stroke-width:.8}
.al-end-red .al-end-head{fill:#e23b3f}
.al-end-blue .al-end-head{fill:#2c98d6}
.al-end-green .al-end-head{fill:#25b25c}
.al-end-tab{fill:#c9d2d6}
.al-end-ring{fill:#0d2416}

/* a pulled coupler hisses; a pulled plug sparks */
.al-puff{opacity:0;pointer-events:none;transition:opacity .2s}
.al-puff-air circle{fill:url(#al-g-puff)}
.al-puff-zap circle{fill:url(#al-g-spark)}
.al-puff-zap path{fill:none;stroke:#ffe27a;stroke-width:1.3;stroke-linecap:round}
.al-stage.is-taut .al-puff{opacity:1}
.al-stage.is-taut .al-puff-air circle{animation:al-hiss .7s ease-out infinite}
.al-stage.is-taut .al-puff-air circle:nth-child(2){animation-delay:.23s}
.al-stage.is-taut .al-puff-air circle:nth-child(3){animation-delay:.46s}
.al-stage.is-taut .al-puff-zap{animation:al-zap .32s steps(2,jump-none) infinite}
@keyframes al-hiss{from{opacity:.95;transform:scale(.4)}to{opacity:0;transform:scale(1.6) translateY(6px)}}
@keyframes al-zap{50%{opacity:.25}}

/* sparks where the drooping lines drag */
.al-sparks{opacity:0;pointer-events:none;transition:opacity .2s}
.al-spark-glow{fill:url(#al-g-spark)}
.al-spark-rays{fill:none;stroke:#ffd25a;stroke-width:1.3;stroke-linecap:round}
.al-spark-core{fill:#fff8d6}
.al-stage.is-snag .al-sparks{opacity:.7}
.al-stage.is-snag.is-moving .al-sparks{opacity:1;animation:al-zap .18s steps(2,jump-none) infinite}

/* in-scene callout */
.al-callout-box{fill:#0a0e10;fill-opacity:.86;stroke:rgb(255 255 255/.14);stroke-width:1}
.al-callout-dot{fill:var(--al-ok)}
.al-callout-text{fill:#eef2f4;font-size:9.5px;font-weight:800;letter-spacing:.02em}
.al-stage[data-rig="tight"] .al-callout-dot{fill:var(--al-warn)}
.al-stage[data-rig="loose"] .al-callout-dot{fill:var(--al-warn)}
.al-stage.is-taut .al-callout-dot,.al-stage.is-snag .al-callout-dot{fill:var(--al-bad)}
.al-stage.is-taut .al-callout-box,.al-stage.is-snag .al-callout-box{stroke:var(--al-bad);stroke-opacity:.8}
.al-stage.is-taut .al-callout-box{animation:al-flash .45s ease-in-out infinite alternate}
.al-stage.is-flex .al-callout-box{stroke:var(--al-ok);stroke-opacity:.7}
@keyframes al-flash{to{fill:#3a1010}}

/* the panel */
.al-ask{margin:0;font-size:16px;color:var(--ink)}
.al-ask[hidden],.al-controls[hidden]{display:none}
.al-controls{display:grid;gap:12px}
.al-step{display:grid;gap:8px;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--white,#fffffc)}
.al-step-name{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;font-weight:800;color:var(--ink)}
.al-num{display:inline-grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:#141b20;color:#fff;font-size:12px;font-weight:800}
.al-rigs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.al-rig{display:grid;justify-items:center;align-content:start;gap:4px;min-height:76px;padding:8px 6px 9px;border:1px solid var(--line);border-radius:10px;background:var(--paper,#f6f5ef);color:var(--ink);cursor:pointer;font:inherit;font-size:13px;font-weight:700;line-height:1.2;text-align:center;transition:background .15s,box-shadow .15s,transform .1s}
.al-rig:active,.al-turn:active,.al-reset:active{transform:translateY(1px)}
.al-rig-art{width:48px;height:28px}
.al-rig-post{fill:none;stroke:#8b979e;stroke-width:2;stroke-linecap:round}
.al-rig-deck{fill:none;stroke:#8b979e;stroke-width:2;stroke-dasharray:3 2}
.al-rig-line{fill:none;stroke-width:3;stroke-linecap:round}
.al-rig-dot{fill:#8b979e}
.al-rig-slack .al-rig-line{stroke:#1f9e57}
.al-rig-tight .al-rig-line{stroke:#d9342b}
.al-rig-loose .al-rig-line{stroke:#c98a00}
.al-rig[aria-pressed="true"]{background:#141b20;color:#fff;border-color:#141b20;box-shadow:0 0 0 2px var(--sbp-amber)}
.al-rig[aria-pressed="true"] .al-rig-post,.al-rig[aria-pressed="true"] .al-rig-deck{stroke:#c9d2d8}
.al-rig[aria-pressed="true"] .al-rig-dot{fill:#c9d2d8}
.al-rig[aria-pressed="true"].al-rig-slack .al-rig-line{stroke:var(--al-ok)}
.al-rig[aria-pressed="true"].al-rig-tight .al-rig-line{stroke:#ff6b5e}
.al-rig[aria-pressed="true"].al-rig-loose .al-rig-line{stroke:var(--al-warn)}
.al-steer-row{display:grid;grid-template-columns:auto minmax(0,1fr) 3.2ch;align-items:center;gap:10px;font-size:14px;font-weight:700;color:var(--ink)}
.al-steer-name{color:var(--muted);font-weight:600}
.al-steer-value{font-variant-numeric:tabular-nums;text-align:right}
.al-slider{width:100%;height:30px;margin:0;accent-color:#ffb400;cursor:pointer}
.al-turns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.al-turn{min-height:44px;padding:8px 6px;border:1px solid var(--line);border-radius:9px;background:var(--paper,#f6f5ef);color:var(--ink);cursor:pointer;font:inherit;font-size:13px;font-weight:700;line-height:1.15}
.al-turn[aria-pressed="true"]{background:var(--sbp-amber);border-color:var(--sbp-amber);color:#111}
.al-reset{justify-self:start;min-height:44px;border:1px solid var(--line);background:transparent;border-radius:9px;padding:9px 16px;font:inherit;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer}
.al-rig:focus-visible,.al-turn:focus-visible,.al-reset:focus-visible,.al-slider:focus-visible{outline:3px solid var(--sbp-amber);outline-offset:3px}
.al-status{display:block;padding:14px 16px;border-radius:10px;background:var(--white,#fffffc);border:1px solid var(--line);color:var(--ink);font-size:15px;line-height:1.55}
.al-text{margin:0;font-size:15px;line-height:1.55;color:var(--muted)}

@media (min-width:761px){
  .cl-page .sbp-film-frame.is-wide{aspect-ratio:auto;padding-bottom:58px;background:#0b0d0f}
  .cl-page .sbp-film-frame.is-wide video{aspect-ratio:16/9;width:100%;height:auto}
  .cl-page .sbp-film-frame.is-wide .sbp-play{bottom:58px}
  .cl-page .sbp-film-frame.is-wide .sbp-sound-on{left:12px;right:auto;top:auto;bottom:10px}
  .cl-page .sbp-film-frame.is-wide .sbp-pause{right:12px;top:auto;bottom:10px}
}
@media (max-width:900px){
  .al-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:20px}
}
@media (max-width:760px){
  .al-demo{padding-block:44px 52px}
  .al-stage{padding:8px}
  .al-lamp{padding:5px 8px 5px 7px;font-size:12px;gap:6px}
  .al-step{padding:10px}
  .al-rig{min-height:72px;font-size:12.5px}
}
@media (prefers-reduced-motion:reduce){
  .al-shadow,.al-hose,.al-glow,.al-puff,.al-sparks{transition:none}
  .al-stage .al-glow,.al-stage .al-puff-air circle,.al-stage .al-puff-zap,.al-stage .al-sparks,.al-stage .al-callout-box,.al-stage .al-lamp i{animation:none!important}
}
