/* Slack adjuster free-play explainer: an S-cam brake at one wheel with a brake chamber, push rod and slack adjuster arm,
   and a scale where 20 units of the 360-wide viewBox are 1 inch. Hero, film, course offer and return banner reuse
   spring-brakes.css (.sbp-*); this file styles only .sa-*. The script sets the stage's data-chocked (no, yes),
   data-released (no, yes), data-mode (manual, auto), data-play (0, 0.5, 1, 1.5, 2) and data-verdict (none, ok, limit,
   out) states, the arm angle and the readouts. Without script the picture shows the brake before the check. Every SVG
   text label is at least 11.5px in the 360-wide viewBox. */
.sa-page{--sa-ok:#4ade80;--sa-limit:#fbbf24;--sa-out:#ef4444;--sa-console:#151b20}
.sa-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.sa-demo{padding-block:64px 72px;background:var(--paper)}
.sa-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}
.sa-head{grid-area:head}
.sa-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)}
.sa-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.sa-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: chocks, parking brakes, adjuster type and free play; script on */
.sa-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.sa-stage.is-js .sa-hud{display:flex}
.sa-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}
.sa-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166}
.sa-chip span{color:#a9b3b8;font-weight:600}
.sa-chip b{color:#e8eef0;font-weight:800}
.sa-stage[data-chocked="yes"] .sa-chip-chock i{background:var(--sa-limit)}
.sa-chip-park i{background:var(--sa-out)}
.sa-stage[data-released="yes"] .sa-chip-park i{background:var(--sa-ok)}
.sa-chip-mode i{background:#d3dade}
.sa-stage[data-verdict="ok"] .sa-chip-play i,.sa-stage[data-verdict="limit"] .sa-chip-play i{background:var(--sa-ok)}
.sa-stage[data-verdict="out"] .sa-chip-play i{background:var(--sa-out)}

/* the wheel, chocks and chamber */
.sa-ground{fill:none;stroke:#59636a;stroke-width:1.5}
.sa-tire{stroke:#070909;stroke-width:1.5}
.sa-drum{fill:#4b5559;stroke:#8f9a9d;stroke-width:2}
.sa-hub{fill:#8f9a9d;stroke:#2a3133;stroke-width:1.5}
.sa-chock{fill:var(--sa-limit);stroke:#78350f;stroke-width:1.2}
.sa-chocks{opacity:0;transition:opacity .2s}
.sa-stage[data-chocked="yes"] .sa-chocks{opacity:1}
.sa-bracket{fill:#3a4246;stroke:#1b2227;stroke-width:1}
.sa-chamber{stroke:#2a3133;stroke-width:1.5}
.sa-rod{stroke:#d3dade;stroke-width:4;stroke-linecap:round}

/* the slack adjuster arm: green within the limit, red when out */
.sa-arm-body{fill:#9aa5aa;stroke:#2a3133;stroke-width:1.2}
.sa-clevis{fill:#e8eef0;stroke:#2a3133;stroke-width:1.5}
.sa-stage[data-verdict="ok"] .sa-arm-body,.sa-stage[data-verdict="limit"] .sa-arm-body{fill:var(--sa-ok)}
.sa-stage[data-verdict="out"] .sa-arm-body{fill:var(--sa-out)}
.sa-shaft{fill:#59636a;stroke:#d3dade;stroke-width:1.5}
.sa-hand{opacity:0}
.sa-stage[data-play="0.5"] .sa-hand,.sa-stage[data-play="1"] .sa-hand,.sa-stage[data-play="1.5"] .sa-hand,.sa-stage[data-play="2"] .sa-hand{opacity:1}
.sa-glove{fill:#f59e0b;stroke:#78350f;stroke-width:1.2}
.sa-cuff{fill:#1e3a4a;stroke:#0b1820;stroke-width:1}

/* the scale */
.sa-tick{fill:none;stroke:#b6c0c5;stroke-width:1.2}
.sa-limit{fill:none;stroke:var(--sa-limit);stroke-width:2;stroke-dasharray:3 2}
.sa-part,.sa-scale{fill:#d3dade;font-size:11.5px;font-weight:800;letter-spacing:.02em;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.sa-scale{fill:#fde68a}
.sa-part-mid{text-anchor:middle}
.sa-part-end{text-anchor:end}

/* the cards */
.sa-card{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1}
.sa-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.sa-big{fill:#fff;font-size:20px;font-weight:900}
.sa-mid{fill:#fff;font-size:17px;font-weight:900}
.sa-sub{fill:#d3dade;font-size:12px;font-weight:700}
.sa-stage[data-verdict="out"] .sa-big{fill:#fca5a5}
.sa-stage[data-released="no"] .sa-mid{fill:#fca5a5}
.sa-rule{fill:#fde68a;font-size:12px;font-weight:800}

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

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