/* CDL stopping-distance explainer: a flatbed truck above a distance bar drawn to scale (100 units are 300 ft, one
   football field). The bar is split into perception, reaction, air brake lag and braking bands. Hero, film, course
   offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .sd-*. The script sets the stage's
   data-speed, data-brake (hydraulic, air), data-surface (dry, wet) and data-load (loaded, empty) states, the band
   widths, the truck position and the readouts. Without script the picture shows the manual's 55 mph example. Every
   SVG text label is at least 11.5px in the 360-wide viewBox. */
.sd-page{--sd-p:#38bdf8;--sd-r:#a78bfa;--sd-l:#fb923c;--sd-b:#ef4444;--sd-console:#151b20}
.sd-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.sd-demo{padding-block:64px 72px;background:var(--paper)}
.sd-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}
.sd-head{grid-area:head}
.sd-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)}
.sd-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.sd-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: speed, brakes, road and load; script on */
.sd-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.sd-stage.is-js .sd-hud{display:flex}
.sd-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}
.sd-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166}
.sd-chip span{color:#a9b3b8;font-weight:600}
.sd-chip b{color:#e8eef0;font-weight:800}
.sd-chip-speed i{background:var(--sd-p)}
.sd-chip-brake i{background:#8f9a9d}
.sd-stage[data-brake="air"] .sd-chip-brake i{background:var(--sd-l)}
.sd-chip-surface i{background:#d3dade}
.sd-stage[data-surface="wet"] .sd-chip-surface i{background:#7dd3fc;box-shadow:0 0 0 2px rgb(125 211 252/.2)}
.sd-chip-load i{background:#d3dade}
.sd-stage[data-load="empty"] .sd-chip-load i{background:#3a4246}

/* scene: road, rain and the hazard post */
.sd-rain{fill:none;stroke:#9cc9e0;stroke-opacity:.45;stroke-width:1.2;stroke-linecap:round;opacity:0;transition:opacity .3s}
.sd-stage[data-surface="wet"] .sd-rain{opacity:1}
.sd-road{stroke:#0b0d0f;stroke-width:1}
.sd-wet{opacity:0;transition:opacity .3s}
.sd-stage[data-surface="wet"] .sd-wet{opacity:1}
.sd-lane{fill:none;stroke:#e8eef0;stroke-opacity:.55;stroke-width:1.6}
.sd-post{fill:none;stroke:#fde68a;stroke-width:1.6;stroke-dasharray:4 3}
.sd-part,.sd-scale,.sd-field{fill:#d3dade;font-size:11.5px;font-weight:800;letter-spacing:.03em;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.sd-part{text-transform:uppercase}
.sd-field{fill:#b6c0c5;font-weight:700}
.sd-part-mid{text-anchor:middle}
.sd-part-end{text-anchor:end}

/* the truck: a flatbed, with cargo when loaded */
.sd-deck{fill:#6b767b;stroke:#2a3133;stroke-width:1}
.sd-cargo rect{fill:#c08a4a;stroke:#6b4a24;stroke-width:1}
.sd-stage[data-load="empty"] .sd-cargo{display:none}
.sd-cab{fill:#d9dee0;stroke:#2a3133;stroke-width:1.2}
.sd-window{fill:#1e3a4a}
.sd-wheel{fill:#15191c;stroke:#59636a;stroke-width:1.6}
.sd-stopline{fill:none;stroke:var(--sd-b);stroke-width:2.4;stroke-linecap:round}

/* the distance bar */
.sd-track{fill:#1f262b;stroke:#3a4246;stroke-width:1}
.sd-seg{stroke:#0d1114;stroke-width:.8}
.sd-seg-p,.sd-key-p{fill:var(--sd-p)}
.sd-seg-r,.sd-key-r{fill:var(--sd-r)}
.sd-seg-l,.sd-key-l{fill:var(--sd-l)}
.sd-seg-b,.sd-key-b{fill:var(--sd-b)}
.sd-tick{fill:none;stroke:#8f9a9d;stroke-width:1;stroke-dasharray:2 2}

/* the cards */
.sd-card{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1}
.sd-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sd-big{fill:#fff;font-size:26px;font-weight:900}
.sd-mph{fill:#fff;font-size:22px;font-weight:900}
.sd-sub{fill:#d3dade;font-size:12px;font-weight:700}

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

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