/* ABS malfunction lamp explainer: a dash card with the yellow lamp at start-up and a moment later, a brakes card, a
   tractor-semitrailer seen from its left side with the tractor and trailer lamp positions, and three build-date tiles.
   Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .ab-*. The script
   sets the stage's data-lamp (check, fault, older), data-unit (tractor, trailer), data-date (97, 98, 99), data-built
   (before, after) and data-braking (no, yes) states and the readouts. Without script the picture shows the bulb check on
   the tractor. Every SVG text label is at least 11.5px in the 360-wide viewBox. */
.ab-page{--ab-amber:#facc15;--ab-ok:#4ade80;--ab-red:#ef4444;--ab-console:#151b20}
.ab-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.ab-demo{padding-block:64px 72px;background:var(--paper)}
.ab-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}
.ab-head{grid-area:head}
.ab-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)}
.ab-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.ab-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: lamp, where you look, ABS and the regular brakes; script on */
.ab-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.ab-stage.is-js .ab-hud{display:flex}
.ab-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}
.ab-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166}
.ab-chip span{color:#a9b3b8;font-weight:600}
.ab-chip b{color:#e8eef0;font-weight:800}
.ab-chip-lamp i{background:var(--ab-amber)}
.ab-chip-unit i{background:#d3dade}
.ab-chip-abs i{background:var(--ab-ok)}
.ab-stage[data-lamp="fault"] .ab-chip-abs i{background:var(--ab-amber)}
.ab-chip-brakes i{background:var(--ab-ok)}

/* the dash card: lamp a is lit at start-up in every system; lamp b stays lit only with a fault */
.ab-card{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1}
.ab-lamp{fill:#2a2410;stroke:#59636a;stroke-width:1.2}
.ab-lamp-a,.ab-stage[data-lamp="fault"] .ab-lamp-b{fill:var(--ab-amber);stroke:#fef08a}
.ab-lamp-text{fill:#6b6440;font-size:15px;font-weight:900;letter-spacing:.08em}
.ab-lamp-text-a,.ab-stage[data-lamp="fault"] .ab-lamp-text-b{fill:#1a1505}
.ab-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.ab-big{fill:var(--ab-ok);font-size:22px;font-weight:900}
.ab-sub{fill:#d3dade;font-size:12px;font-weight:700}
.ab-stage[data-lamp="fault"] .ab-sub{fill:#fde68a}
.ab-small{fill:#d3dade;font-size:11.5px;font-weight:700}
.ab-part-mid{text-anchor:middle}
.ab-part-end{text-anchor:end}

/* the rig */
.ab-ground{fill:none;stroke:#59636a;stroke-width:1.5}
.ab-trailer{fill:#c9d0d3;stroke:#2a3133;stroke-width:1.2}
.ab-cab{fill:#3b82c4;stroke:#14324d;stroke-width:1.2}
.ab-window{fill:#0f2533;stroke:#14324d;stroke-width:1}
.ab-wheel{fill:#15191c;stroke:#59636a;stroke-width:2}
.ab-marker{fill:var(--ab-red);stroke:#7f1d1d;stroke-width:.8}
.ab-stop{fill:#5b1a1a}
.ab-stage[data-braking="yes"] .ab-stop{fill:var(--ab-red)}
.ab-dot{fill:#4a4320;stroke:#1a1505;stroke-width:1}
.ab-glow{opacity:0}
.ab-stage[data-lamp="fault"][data-unit="tractor"] .ab-dot-tractor,.ab-stage[data-lamp="fault"][data-unit="trailer"] .ab-dot-trailer{fill:var(--ab-amber)}
.ab-stage[data-lamp="fault"][data-unit="tractor"] .ab-glow-tractor,.ab-stage[data-lamp="fault"][data-unit="trailer"] .ab-glow-trailer{opacity:1}
.ab-ring{fill:none;stroke:var(--ab-amber);stroke-width:2;stroke-dasharray:3 2;opacity:0}
.ab-stage[data-unit="tractor"] .ab-ring-tractor,.ab-stage[data-unit="trailer"] .ab-ring-trailer{opacity:1}
.ab-part{fill:#1b2227;font-size:11.5px;font-weight:800}
.ab-where{fill:#fde68a;font-size:12px;font-weight:800}
.ab-note{fill:#b6c0c5;font-size:12px;font-weight:700}

/* the build-date tiles: the chosen one is ringed, green when ABS is required */
.ab-tile rect{fill:#080b0d;stroke:#3a4246;stroke-width:1}
.ab-year{fill:#fff;font-size:14px;font-weight:900}
.ab-stage[data-date="97"] .ab-tile-97 rect,.ab-stage[data-date="98"] .ab-tile-98 rect,.ab-stage[data-date="99"] .ab-tile-99 rect{stroke:var(--ab-ok);stroke-width:2.5}
.ab-stage[data-built="before"][data-date="97"] .ab-tile-97 rect,.ab-stage[data-built="before"][data-date="98"] .ab-tile-98 rect,.ab-stage[data-built="before"][data-date="99"] .ab-tile-99 rect{stroke:#8f9a9d;stroke-dasharray:4 3}

/* controls: one dark console, every button the same dark face and white text, amber when active or focused */
.ab-controls[hidden]{display:none}
.ab-controls{display:grid;gap:12px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,var(--ab-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.ab-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}
.ab-btn:hover{background:linear-gradient(180deg,#38434b,#20282d)}
.ab-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.ab-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #06090b}
.ab-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.ab-name{display:grid;gap:3px;min-width:0}
.ab-name small{color:#a9b3b8;font-size:13px;font-weight:600}
.ab-group{display:grid;gap:6px}
.ab-label{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.ab-seg-row{display:grid;gap:6px}
.ab-seg-1{grid-template-columns:minmax(0,1fr)}
.ab-seg-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ab-seg-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.ab-btn-seg{justify-content:center;padding:8px 6px;text-align:center;font-size:15px}
.ab-brake{justify-content:center;text-align:center;box-shadow:inset 0 0 0 2px #7f1d1d,0 3px 0 #06090b,0 8px 16px -10px rgb(0 0 0/.7)}
.ab-reset{justify-self:start;gap:8px;min-height:44px;padding:8px 16px 8px 12px;font-size:15px}
.ab-reset-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ab-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid var(--ab-amber);border-radius:0 10px 10px 0;background:var(--white,#fffffc);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45}
.ab-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}
.ab-text strong{display:block;margin-bottom:2px;font-weight:700}

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