/* Trailer-rollover-and-jackknife explainer: two views in one SVG. The rollover view is the back of a trailer in a left
   curve, with the cargo, its center of gravity (CG) and a risk card; the rig tips over its outside wheels. The skid view
   is the rig from above, the driver's left mirror and a trailer brake card; the trailer swings around the kingpin.
   Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .rj-*. The script
   sets the stage's data-mode (roll, skid), data-load (low, high), data-turn (slow, fast), data-tilt (0, 3, 5, 9),
   data-risk (low, raised, roll) and data-skid (locked, straight, jackknife). Without script the picture shows high,
   off-center cargo too fast in the curve. Every SVG text label is at least 11.5px in the 360-wide viewBox. */
.rj-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.rj-demo{padding-block:64px 72px;background:var(--paper)}
.rj-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}
.rj-head{grid-area:head}
.rj-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)}
.rj-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.rj-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: view, state and angle; script on */
.rj-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.rj-stage.is-js .rj-hud{display:flex}
.rj-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}
.rj-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166;transition:background .2s,box-shadow .2s}
.rj-chip span{color:#a9b3b8;font-weight:600}
.rj-chip b{color:#e8eef0;font-weight:800}
.rj-chip-view i{background:#38bdf8}
.rj-stage[data-mode="roll"][data-risk="low"] .rj-chip-state i,.rj-stage[data-mode="skid"][data-skid="straight"] .rj-chip-state i{background:#31d67b;box-shadow:0 0 0 2px rgb(49 214 123/.18),0 0 10px rgb(49 214 123/.8)}
.rj-stage[data-mode="roll"][data-risk="low"] .rj-chip-state b,.rj-stage[data-mode="skid"][data-skid="straight"] .rj-chip-state b{color:#31d67b}
.rj-stage[data-mode="roll"][data-risk="raised"] .rj-chip-state i,.rj-stage[data-mode="skid"][data-skid="locked"] .rj-chip-state i{background:#fbbf24;box-shadow:0 0 0 2px rgb(251 191 36/.2),0 0 10px rgb(251 191 36/.8)}
.rj-stage[data-mode="roll"][data-risk="raised"] .rj-chip-state b,.rj-stage[data-mode="skid"][data-skid="locked"] .rj-chip-state b{color:#fde68a}
.rj-stage[data-mode="roll"][data-risk="roll"] .rj-chip-state i,.rj-stage[data-mode="skid"][data-skid="jackknife"] .rj-chip-state i{background:#ef4444;box-shadow:0 0 0 2px rgb(239 68 68/.2),0 0 10px rgb(239 68 68/.85)}
.rj-stage[data-mode="roll"][data-risk="roll"] .rj-chip-state b,.rj-stage[data-mode="skid"][data-skid="jackknife"] .rj-chip-state b{color:#fca5a5}
.rj-chip-angle i{background:#d3dade}

/* one view at a time */
.rj-view{display:none}
.rj-stage[data-mode="roll"] .rj-view-roll,.rj-stage[data-mode="skid"] .rj-view-skid{display:inline}

/* labels: every SVG label 11.5px or larger */
.rj-cap{fill:#b6c0c5;font-size:12px;font-weight:800;letter-spacing:.02em}
.rj-part{fill:#d3dade;font-size:12px;font-weight:800;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.rj-part-mid{text-anchor:middle}
.rj-part-end{text-anchor:end}
.rj-row{fill:#b6c0c5;font-size:12px;font-weight:700}
.rj-val{fill:#e8eef0;font-size:12.5px;font-weight:800}
.rj-bad{fill:#fca5a5}
.rj-card-box{fill:#080b0d;fill-opacity:.9;stroke:#59636a;stroke-width:1;transition:stroke .2s}
.rj-card-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-anchor:middle;text-transform:uppercase}
.rj-card-big{fill:#e8eef0;font-size:15px;font-weight:900;letter-spacing:.04em;text-anchor:middle}
.rj-card-sub{fill:#d3dade;font-size:12px;font-weight:700;text-anchor:middle}
.rj-badge rect{fill:#3b1d0a;stroke:#ffb400;stroke-width:1}
.rj-badge-txt{fill:#fde68a;font-size:12.5px;font-weight:800;text-anchor:middle}

/* the rollover view: road, curve, rig and cargo */
.rj-road{stroke:none}
.rj-ground{fill:none;stroke:#8f9a9d;stroke-width:1.4}
.rj-curve{fill:none;stroke:#d3dade;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.rj-stage[data-turn="fast"] .rj-curve{stroke:#fca5a5;stroke-width:3}
.rj-turn,.rj-load,.rj-risk,.rj-cargo,.rj-skid,.rj-m-tr{display:none}
.rj-stage[data-turn="slow"] .rj-turn-slow,.rj-stage[data-turn="fast"] .rj-turn-fast{display:inline}
.rj-stage[data-load="low"] .rj-load-low,.rj-stage[data-load="high"] .rj-load-high{display:inline}
.rj-stage[data-load="low"] .rj-cargo-low,.rj-stage[data-load="high"] .rj-cargo-high{display:inline}
.rj-stage[data-risk="low"] .rj-risk-low,.rj-stage[data-risk="raised"] .rj-risk-raised,.rj-stage[data-risk="roll"] .rj-risk-roll{display:inline}
.rj-risk-low{fill:#31d67b}
.rj-risk-raised{fill:#fbbf24}
.rj-risk-roll{fill:#fca5a5}
.rj-stage[data-risk="low"] .rj-view-roll .rj-card-box{stroke:#31d67b}
.rj-stage[data-risk="raised"] .rj-view-roll .rj-card-box{stroke:#fbbf24}
.rj-stage[data-risk="roll"] .rj-view-roll .rj-card-box{stroke:#ef4444}
.rj-box{stroke:#7b858a;stroke-width:1}
.rj-hold{stroke:#0b0e10;stroke-width:1}
.rj-floor,.rj-frame{fill:#4a555b}
.rj-tire{fill:#15191c;stroke:#050607;stroke-width:1}
.rj-crate{stroke:#6b4a22;stroke-width:1}
.rj-cg{fill:#0d1114;stroke:#fde68a;stroke-width:2}
.rj-cg-cross{fill:none;stroke:#fde68a;stroke-width:1.6}
.rj-cg-line{fill:none;stroke:#fde68a;stroke-width:1.4;stroke-dasharray:3 3}
.rj-rig{transform-box:view-box;transform-origin:188px 232px;transition:transform .5s cubic-bezier(.3,1.2,.55,1)}
.rj-stage[data-tilt="3"] .rj-rig{transform:rotate(3deg)}
.rj-stage[data-tilt="5"] .rj-rig{transform:rotate(5deg)}
.rj-stage[data-tilt="9"] .rj-rig{transform:rotate(9deg)}
.rj-lift{opacity:0;transition:opacity .2s}
.rj-stage[data-risk="raised"] .rj-lift,.rj-stage[data-risk="roll"] .rj-lift{opacity:1}

/* the skid view: lane, rig and mirror */
.rj-edge{fill:none;stroke:#e8eef0;stroke-width:2}
.rj-lane{fill:none;stroke:#fbbf24;stroke-width:2;stroke-dasharray:12 10}
.rj-cab{fill:#c2410c;stroke:#7c2d12;stroke-width:1}
.rj-chassis{fill:#4a555b}
.rj-pin{fill:#fde68a}
.rj-wheel{fill:#0b0d0f}
.rj-deck{stroke:#7b858a;stroke-width:1}
.rj-travel{fill:none;stroke:#d3dade;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rj-marks{fill:none;stroke:#0b0d0f;stroke-width:4;stroke-linecap:round;opacity:0;transition:opacity .2s}
.rj-stage[data-skid="locked"] .rj-marks,.rj-stage[data-skid="jackknife"] .rj-marks{opacity:.9}
.rj-trailer{transform-box:view-box;transform-origin:170px 100px;transition:transform .8s cubic-bezier(.3,1,.5,1)}
.rj-stage[data-skid="locked"] .rj-trailer{transform:rotate(14deg)}
.rj-stage[data-skid="jackknife"] .rj-trailer{transform:rotate(55deg)}
.rj-mirror{fill:#20282e;stroke:#8f9a9d;stroke-width:2}
.rj-m-road{fill:none;stroke:#8f9a9d;stroke-width:1.4}
.rj-m-tr{fill:#d7dcde;stroke:#7b858a;stroke-width:1}
.rj-stage[data-skid="straight"] .rj-m-line,.rj-stage[data-skid="locked"] .rj-m-swing,.rj-stage[data-skid="jackknife"] .rj-m-jack{display:inline}
.rj-stage[data-skid="straight"] .rj-skid-straight,.rj-stage[data-skid="locked"] .rj-skid-locked,.rj-stage[data-skid="jackknife"] .rj-skid-jackknife{display:inline}
.rj-skid-straight .rj-card-big{fill:#31d67b}
.rj-skid-locked .rj-card-big{fill:#fbbf24}
.rj-skid-jackknife .rj-card-big{fill:#fca5a5}
.rj-stage[data-skid="straight"] .rj-view-skid .rj-card-box{stroke:#31d67b}
.rj-stage[data-skid="locked"] .rj-view-skid .rj-card-box{stroke:#fbbf24}
.rj-stage[data-skid="jackknife"] .rj-view-skid .rj-card-box{stroke:#ef4444}

/* motion, script on: a locked trailer shudders */
.rj-stage.is-js[data-mode="skid"][data-skid="locked"] .rj-marks{animation:rj-pulse .6s ease-in-out infinite alternate}
@keyframes rj-pulse{to{opacity:.4}}

/* controls: one dark console, every button the same dark face and white text, amber when active or focused */
.rj-ask{margin:0;color:var(--ink);font-size:20px;line-height:1.25}
.rj-ask[hidden],.rj-controls[hidden],.rj-set[hidden]{display:none}
.rj-ask b{font-weight:800}
.rj-controls{display:grid;gap:10px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,#151b20);box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.rj-set{display:grid;gap:10px}
.rj-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}
.rj-btn:hover{background:linear-gradient(180deg,#38434b,#20282d)}
.rj-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.rj-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #06090b}
.rj-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.rj-btn-wide{min-height:64px}
.rj-name{display:grid;gap:3px;min-width:0}
.rj-name small{color:#a9b3b8;font-size:13px;font-weight:600}
.rj-group{display:grid;gap:6px}
.rj-label{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.rj-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.rj-btn-seg{justify-content:center;padding:8px 6px;text-align:center;font-size:15px}
.rj-icon{flex:none;width:44px;height:30px}
.rj-icon-glass{fill:#40525e;stroke:#d7dddd;stroke-width:2}
.rj-icon-lever{fill:#8f9a9d}
.rj-icon-ok{fill:none;stroke:#bbf7d0;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rj-icon-x{fill:none;stroke:#fca5a5;stroke-width:2.2;stroke-linecap:round}
.rj-reset{justify-self:start;gap:8px;min-height:44px;padding:8px 16px 8px 12px;font-size:15px}
.rj-reset-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rj-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid #fbbf24;border-radius:0 10px 10px 0;background:var(--white,#fffffc);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45;transition:border-color .2s}
.rj-stage[data-mode="roll"][data-risk="low"]~.rj-panel .rj-status,.rj-stage[data-mode="skid"][data-skid="straight"]~.rj-panel .rj-status{border-left-color:#31d67b}
.rj-stage[data-mode="roll"][data-risk="roll"]~.rj-panel .rj-status,.rj-stage[data-mode="skid"][data-skid="jackknife"]~.rj-panel .rj-status{border-left-color:#ef4444}
.rj-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}

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