/* Skid recovery explainer: a tractor-semitrailer seen from above on a wet road. Hero, film, course offer and return
   banner reuse spring-brakes.css (.sbp-*); this file styles only .wr-*. The script sets the stage's data-mode (braking,
   power, front), data-phase (ready, skid, done, crash) and data-wheels (rolling, locked, spinning), the tractor angle and
   the readouts. Without script the picture shows the rig in line. Every SVG text label is at least 11.5px in the
   360-wide viewBox. */
.wr-page{--wr-roll:#31d67b;--wr-lock:#ef4444;--wr-spin:#fb923c;--wr-path:#fde68a;--wr-console:#151b20}
.wr-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.wr-demo{padding-block:64px 72px;background:var(--paper)}
.wr-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}
.wr-head{grid-area:head}
.wr-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)}
.wr-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.wr-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD; script on */
.wr-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.wr-stage.is-js .wr-hud{display:flex}
.wr-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}
.wr-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166}
.wr-chip span{color:#a9b3b8;font-weight:600}
.wr-chip b{color:#e8eef0;font-weight:800}
.wr-chip-mode i{background:var(--wr-path)}
.wr-chip-wheels i{background:var(--wr-roll)}
.wr-stage[data-wheels="locked"] .wr-chip-wheels i{background:var(--wr-lock)}
.wr-stage[data-wheels="spinning"] .wr-chip-wheels i{background:var(--wr-spin)}
.wr-chip-angle i{background:#d3dade}
.wr-stage[data-phase="crash"] .wr-chip-angle i{background:var(--wr-lock);box-shadow:0 0 0 2px rgb(239 68 68/.3)}

/* the road */
.wr-shoulder{fill:#2a2f2a}
.wr-edge{fill:none;stroke:#e8eef0;stroke-opacity:.7;stroke-width:1.6}
.wr-center{fill:none;stroke:#fde68a;stroke-opacity:.75;stroke-width:1.8}
.wr-rain{fill:none;stroke:#9cc9e0;stroke-opacity:.45;stroke-width:1.2;stroke-linecap:round}

/* the path the driver wants, the plowing front and the skid marks */
.wr-path{fill:none;stroke:var(--wr-path);stroke-width:2;stroke-dasharray:5 4;stroke-linecap:round}
.wr-path-curve{display:none}
.wr-stage[data-mode="front"] .wr-path-lane{display:none}
.wr-stage[data-mode="front"] .wr-path-curve{display:inline}
.wr-plow{fill:none;stroke:var(--wr-lock);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .25s}
.wr-stage[data-mode="front"][data-phase="skid"] .wr-plow{opacity:1}
.wr-marks{fill:none;stroke:#0a0c0d;stroke-opacity:.85;stroke-width:4;stroke-linecap:round;opacity:0;transition:opacity .25s}
.wr-stage[data-phase="skid"] .wr-marks,.wr-stage[data-phase="crash"] .wr-marks{opacity:1}
.wr-stage[data-mode="front"] .wr-marks{opacity:0}

/* the rig */
.wr-tractor,.wr-trailer{transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
.wr-box{fill:#c9d1d4;stroke:#2a3133;stroke-width:1.2}
.wr-frame{fill:#59636a;stroke:#2a3133;stroke-width:1}
.wr-kingpin{fill:#fde68a;stroke:#2a3133;stroke-width:1}
.wr-cab{fill:#ffb400;stroke:#5c3d00;stroke-width:1.2}
.wr-glass{fill:#1e3a4a}
.wr-tire{fill:#15191c;stroke:#59636a;stroke-width:1}
.wr-drive{fill:var(--wr-roll);stroke:#0d1114;stroke-width:1}
.wr-stage[data-wheels="locked"] .wr-drive{fill:var(--wr-lock)}
.wr-stage[data-wheels="spinning"] .wr-drive{fill:var(--wr-spin)}

/* the cards */
.wr-card{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1}
.wr-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.wr-big{fill:#fff;font-size:22px;font-weight:900}
.wr-stage[data-phase="done"] .wr-big{fill:var(--wr-roll)}
.wr-stage[data-phase="crash"] .wr-big{fill:var(--wr-lock)}
.wr-warnbox{fill:var(--wr-lock);opacity:0;transition:opacity .2s}
.wr-warn{fill:#fff;font-size:17px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;opacity:0;transition:opacity .2s}
.wr-stage[data-phase="crash"] .wr-warnbox,.wr-stage[data-phase="crash"] .wr-warn{opacity:1}
.wr-mid{text-anchor:middle}
.wr-legend{fill:#e8eef0;font-size:12.5px;font-weight:700}
.wr-key-roll{fill:var(--wr-roll)}
.wr-key-lock{fill:var(--wr-lock)}
.wr-key-spin{fill:var(--wr-spin)}
.wr-rule{fill:#fde68a;font-size:12.5px;font-weight:800}

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

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