/* The interactive tools of four Air Brakes explainers without a film: spring brakes (.sk-), air leakage rate (.lk-),
   low air pressure warning (.lw-) and braking with ABS (.ax-). Hero, course offer and return banner reuse
   spring-brakes.css (.sbp-*); .abt-* is the shared demo frame: stage, console, buttons, status and notes. Each script
   sets data-* states on its stage; without script the stage shows a still picture and the notes explain it. Every SVG
   text label is at least 11.5px in the 360-wide viewBox. */
.abt-page{--abt-ok:#4ade80;--abt-warn:#fbbf24;--abt-bad:#ef4444;--abt-air:#6ed2ff;--abt-console:#151b20}
.abt-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.abt-page .sbp-hero-grid.is-no-film .sbp-hero-text{max-width:760px}
.abt-demo{padding-block:56px 64px;background:var(--paper)}
.abt-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}
.abt-head{grid-area:head}
.abt-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)}
.abt-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.abt-panel{grid-area:panel;display:grid;gap:14px;min-width:0}
.abt-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.abt-stage.is-js .abt-hud{display:flex}
.abt-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}
.abt-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166}
.abt-chip span{color:#a9b3b8;font-weight:600}
.abt-chip b{color:#e8eef0;font-weight:800}
.abt-chip.is-ok i{background:var(--abt-ok)}
.abt-chip.is-warn i{background:var(--abt-warn)}
.abt-chip.is-bad i{background:var(--abt-bad)}
.abt-part{fill:#d3dade;font-size:11.5px;font-weight:800;letter-spacing:.02em;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.abt-mid{text-anchor:middle}
.abt-end{text-anchor:end}
.abt-card{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1}
.abt-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.abt-big{fill:#fff;font-size:18px;font-weight:900}
.abt-sub{fill:#d3dade;font-size:12px;font-weight:700}
.abt-controls[hidden],.abt-row[hidden]{display:none}
.abt-controls{display:grid;gap:12px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,var(--abt-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.abt-group{display:grid;gap:6px}
.abt-label{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.abt-row{display:grid;gap:6px}
.abt-row-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.abt-row-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.abt-btn{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;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:15px;font-weight:700;line-height:1.2;text-align:center;cursor:pointer;transition:transform .08s,box-shadow .08s}
.abt-btn:hover{background:linear-gradient(180deg,#38434b,#20282d)}
.abt-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.abt-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #06090b}
.abt-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.abt-btn:disabled{opacity:.45;cursor:default;transform:none}
.abt-name{display:grid;gap:3px;min-width:0}
.abt-name small{color:#a9b3b8;font-size:12.5px;font-weight:600}
.abt-reset{justify-self:start;gap:8px;min-height:44px;padding:8px 16px 8px 12px}
.abt-reset-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.abt-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid var(--abt-warn);border-radius:0 10px 10px 0;background:var(--white,#fffffc);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45}
.abt-status.is-ok{border-left-color:#1f9d57}
.abt-status.is-bad{border-left-color:#d0453a}
.abt-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}
.abt-text strong{display:block;margin-bottom:2px;font-weight:700}

/* spring brakes: the chamber cutaway */
.sk-housing{fill:#2b3439;stroke:#7d888c;stroke-width:2}
.sk-wall{fill:#59636a}
.sk-air{fill:var(--abt-air);fill-opacity:.55;transition:opacity .4s}
.sk-coil{fill:none;stroke:#e8eef0;stroke-width:4;stroke-linejoin:round}
.sk-spring{transform-box:fill-box;transform-origin:left center;transform:scaleX(.42);transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
.sk-piston{transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
.sk-rod-move{transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
.sk-plate{fill:#c9d0d2;stroke:#2a3133;stroke-width:1.5}
.sk-rod{stroke:#d3dade;stroke-width:5;stroke-linecap:round}
.sk-service-air{fill:var(--abt-air);fill-opacity:0;transition:fill-opacity .3s}
.sk-drum{fill:#4b5559;stroke:#8f9a9d;stroke-width:2}
.sk-shoe{fill:none;stroke:#f59e0b;stroke-width:5;stroke-linecap:round;transform-box:view-box;transform-origin:312px 150px;transform:scale(.82);transition:transform .45s}
.sk-arm{fill:#9aa5aa;stroke:#2a3133;stroke-width:1.2;transform-box:view-box;transform-origin:312px 150px;transition:transform .45s}
.sk-knob{fill:#facc15;stroke:#78350f;stroke-width:1.5}
.sk-knob-move{transition:transform .3s}
.sk-knob-text{fill:#1b1300;font-size:11.5px;font-weight:900;text-anchor:middle}
.sk-bar-bg{fill:#080b0d;stroke:#59636a;stroke-width:1}
.sk-bar{fill:var(--abt-air);transform-box:fill-box;transform-origin:left center;transition:transform .2s linear}
.sk-stage[data-spring="held"] .sk-air-spring{opacity:1}
.sk-stage[data-spring="applied"] .sk-air-spring{opacity:0}
.sk-stage[data-spring="applied"] .sk-spring{transform:scaleX(1)}
.sk-stage[data-spring="applied"] .sk-piston{transform:translateX(56px)}
.sk-stage[data-spring="applied"] .sk-rod-move,.sk-stage[data-service="on"] .sk-rod-move{transform:translateX(14px)}
.sk-stage[data-service="on"] .sk-service-air{fill-opacity:.55}
.sk-stage[data-spring="applied"] .sk-shoe,.sk-stage[data-service="on"] .sk-shoe{transform:scale(1)}
.sk-stage[data-spring="applied"] .sk-arm,.sk-stage[data-service="on"] .sk-arm{transform:rotate(16deg)}
.sk-stage[data-knob="out"] .sk-knob-move{transform:translateY(-6px)}
.sk-stage[data-spring="applied"] .sk-state{fill:#fca5a5}

/* air leakage rate: the gauge and the one-minute timer */
.lk-face{fill:#f3efe4;stroke:#7d888c;stroke-width:3}
.lk-tick{stroke:#2a3133;stroke-width:1.6}
.lk-num{fill:#1b2227;font-size:12px;font-weight:800;text-anchor:middle}
.lk-needle{fill:#d0453a;transform-box:view-box;transform-origin:110px 140px;transition:transform 2.4s linear}
.lk-cap{fill:#2a3133}
.lk-read{font-size:15px}
.lk-clock{fill:#080b0d;stroke:#59636a;stroke-width:2}
.lk-sweep{fill:none;stroke:var(--abt-warn);stroke-width:7;stroke-linecap:round;stroke-dasharray:251.3;stroke-dashoffset:251.3;transform-box:view-box;transform-origin:282px 86px;transform:rotate(-90deg)}
.lk-stage[data-phase="running"] .lk-sweep{stroke-dashoffset:0;transition:stroke-dashoffset 2.4s linear}
.lk-stage[data-phase="judge"] .lk-sweep,.lk-stage[data-phase="done"] .lk-sweep{stroke-dashoffset:0}
.lk-stage[data-verdict="ok"] .lk-limit{fill:#86efac}
.lk-stage[data-verdict="bad"] .lk-limit{fill:#fca5a5}

/* low air pressure warning: the dash and the road */
.lw-dash{fill:#11171b;stroke:#3a4246;stroke-width:1.5}
.lw-bar-bg{fill:#080b0d;stroke:#59636a;stroke-width:1}
.lw-bar{fill:var(--abt-air);transform-box:fill-box;transform-origin:left center;transition:transform .2s linear}
.lw-lamp{fill:#3b1513;stroke:#5b2622;stroke-width:1.5}
.lw-lamp-text{fill:#7a3b36;font-size:11.5px;font-weight:900;text-anchor:middle}
.lw-stage[data-lamp="on"] .lw-lamp{fill:#ef4444;stroke:#fecaca}
.lw-stage[data-lamp="on"] .lw-lamp-text{fill:#fff}
.lw-wave{fill:none;stroke:#fecaca;stroke-width:2;stroke-linecap:round;opacity:0}
.lw-stage[data-lamp="on"] .lw-wave{opacity:1}
.lw-knob{fill:#facc15;stroke:#78350f;stroke-width:1.5}
.lw-knob-move{transition:transform .25s}
.lw-stage[data-knob="out"] .lw-knob-move{transform:translateY(-7px)}
.lw-road{fill:#2a3034}
.lw-lane{stroke:#fde68a;stroke-width:3;stroke-dasharray:16 14}
.lw-stage[data-moving="yes"] .lw-lane{animation:lw-roll .5s linear infinite}
@keyframes lw-roll{to{stroke-dashoffset:-30}}
.lw-truck-cab{fill:#d0453a;stroke:#0b0d0f;stroke-width:1.2}
.lw-truck-box{fill:#c9d0d2;stroke:#0b0d0f;stroke-width:1.2}
.lw-wheel{fill:#0b0d0f;stroke:#59636a;stroke-width:2}
.lw-skid{fill:none;stroke:#0b0d0f;stroke-width:4;opacity:0}
.lw-stage[data-outcome="spring"] .lw-skid{opacity:.8}
.lw-stage[data-outcome="spring"] .lw-speed{fill:#fca5a5}

/* braking with ABS: the rig from above */
.ax-road{fill:#2a3034}
.ax-lane{stroke:#fde68a;stroke-width:2.5;stroke-dasharray:14 12}
.ax-trailer{fill:#c9d0d2;stroke:#0b0d0f;stroke-width:1.2}
.ax-cab{fill:#2563eb;stroke:#0b0d0f;stroke-width:1.2}
.ax-tire{fill:#0b0d0f}
.ax-abs{fill:#facc15;stroke:#78350f;stroke-width:1;opacity:0;transition:opacity .2s}
.ax-abs-text{fill:#1b1300;font-size:11.5px;font-weight:900;text-anchor:middle;opacity:0;transition:opacity .2s}
.ax-stage[data-rig="tractor"] .ax-on-tractor,.ax-stage[data-rig="trailer"] .ax-on-trailer,.ax-stage[data-rig="all"] :is(.ax-on-tractor,.ax-on-trailer){opacity:1}
.ax-trailer-move{transform-box:view-box;transform-origin:226px 150px;transition:transform .6s cubic-bezier(.3,1.3,.5,1)}
.ax-tractor-move{transform-box:view-box;transform-origin:226px 150px;transition:transform .6s cubic-bezier(.3,1.3,.5,1)}
.ax-stage[data-swing="trailer"] .ax-trailer-move{transform:rotate(-12deg)}
.ax-stage[data-swing="jackknife"] .ax-tractor-move{transform:rotate(14deg)}
.ax-stage[data-swing="worse"][data-rig="tractor"] .ax-trailer-move{transform:rotate(-26deg)}
.ax-stage[data-swing="worse"][data-rig="trailer"] .ax-tractor-move{transform:rotate(30deg)}
.ax-car{fill:#f59e0b;stroke:#0b0d0f;stroke-width:1.2;opacity:0;transition:opacity .2s}
.ax-stage[data-situation="emergency"] .ax-car{opacity:1}
.ax-slow{fill:#a3a3a3;stroke:#0b0d0f;stroke-width:1.2;opacity:0;transition:opacity .2s}
.ax-stage[data-situation="traffic"] .ax-slow{opacity:1}

@media (max-width:900px){
  .abt-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:16px}
}
@media (max-width:760px){
  .abt-demo{padding-block:36px 44px}
  .abt-stage{margin-inline:-8px;padding:8px 6px 6px;border-radius:14px}
  .abt-svg{border-radius:8px}
  .abt-hud{gap:4px;padding:0 0 6px}
  .abt-chip{padding:4px 6px 4px 5px;font-size:11px;gap:4px}
  .abt-chip i{width:8px;height:8px}
  .abt-panel{gap:10px}
  .abt-controls{gap:10px;margin-inline:-8px;padding:12px 10px}
  .abt-btn{padding:8px 6px;font-size:14px}
  .abt-name small{font-size:12px}
  .abt-status{min-height:8.8em;padding:10px 12px;font-size:15px}
  .abt-text{font-size:16px}
}
@media (max-width:380px){
  .abt-chip span{display:none}
}
@media (prefers-reduced-motion:reduce){
  .abt-demo *{transition:none!important;animation:none!important}
}
