/* Backing-a-heavy-vehicle explainer: a top-down loading yard. A tractor-trailer waits to back into a bay with a low
   post at each stall corner and an overhead pipe, both hidden until the driver gets out and looks. The rig carries a
   green driver sight wedge and a red blind zone. Hero, film, course offer and return banner reuse spring-brakes.css
   (.sbp-*); this file styles only .bk-*. The script sets the stage's data-bk-side, data-bk-walk, data-bk-helper,
   data-bk-pos and data-bk-result states. Without script the picture shows the rig waiting on the driver side with
   nothing checked. */
.bk-page{--bk-go:#31d67b;--bk-sig:#fbbf24;--bk-red:#ef4444;--bk-console:#151b20}
.bk-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.bk-demo{padding-block:64px 72px;background:var(--paper)}
.bk-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}
.bk-head{grid-area:head}
.bk-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)}
.bk-svg{display:block;width:100%;height:auto;border-radius:10px;background:#171b1f}
.bk-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: backing side, walk-around and helper; script on */
.bk-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.bk-stage.is-js .bk-hud{display:flex}
.bk-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}
.bk-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}
.bk-chip span{color:#a9b3b8;font-weight:600}
.bk-chip b{color:#e8eef0;font-weight:800}
.bk-stage[data-bk-side="driver"] .bk-chip-side i,.bk-stage[data-bk-walk="yes"] .bk-chip-walk i,.bk-stage[data-bk-helper="yes"] .bk-chip-helper i{background:var(--bk-go);box-shadow:0 0 0 2px rgb(49 214 123/.18),0 0 10px rgb(49 214 123/.8)}
.bk-stage[data-bk-side="driver"] .bk-chip-side b,.bk-stage[data-bk-walk="yes"] .bk-chip-walk b,.bk-stage[data-bk-helper="yes"] .bk-chip-helper b{color:var(--bk-go)}
.bk-stage[data-bk-side="passenger"] .bk-chip-side i{background:var(--bk-red);box-shadow:0 0 0 2px rgb(239 68 68/.2),0 0 10px rgb(239 68 68/.85)}
.bk-stage[data-bk-side="passenger"] .bk-chip-side b{color:#fca5a5}
.bk-stage[data-bk-walk="no"] .bk-chip-walk i{background:var(--bk-sig);box-shadow:0 0 0 2px rgb(251 191 36/.2)}

/* the yard and dock; every teaching label is at least 12px in the 360 wide picture, with no letter spacing so words
   stay apart on a phone */
.bk-label{fill:#e8eef0;font-size:12px;font-weight:800;letter-spacing:0;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.bk-label-mid{text-anchor:middle}
.bk-label-end{text-anchor:end}
.bk-label-dim{fill:#d3dade;letter-spacing:.06em}
.bk-label-door{fill:#fff;stroke:#1f3a5c}
.bk-label-go{fill:#6ef0a6}
.bk-label-stop{fill:#ffb4b4}
.bk-label-warn{fill:#fde68a}
.bk-label-ok{fill:#6ef0a6}
.bk-label-light{fill:#ffffff}
.bk-dock{stroke:#14181b;stroke-width:1}
.bk-door{fill:#1b2126;stroke:#6b767c;stroke-width:1}
.bk-door-yours{fill:#2b5d93;stroke:#9cc8f5;stroke-width:1.4}
.bk-stall{fill:none;stroke:#f4f1e6;stroke-width:2.4;stroke-opacity:.8}
.bk-lane{fill:none;stroke:#f4f1e6;stroke-width:1.2;stroke-opacity:.25;stroke-dasharray:8 8}
.bk-route{fill:none;stroke:var(--bk-sig);stroke-width:2.2;stroke-dasharray:5 5;stroke-linecap:round;opacity:0;transition:opacity .25s}
.bk-stage[data-bk-walk="yes"][data-bk-pos="start"][data-bk-side="driver"] .bk-route-driver,
.bk-stage[data-bk-walk="yes"][data-bk-pos="start"][data-bk-side="passenger"] .bk-route-passenger{opacity:.9}

/* the rig; its poses for each side. The driver-side back runs start, swing, turn, parked: the rear starts under the
   bay, swings up toward the driver window and comes in square, so every frame between these poses keeps the trailer and
   cab at least 5 px clear of both corner posts (tests/backing_a_heavy_vehicle.cjs checks the interpolated path) */
.bk-rig{transform-box:view-box;transform-origin:0 0;transform:translate(206px,238px) rotate(-90deg)}
.bk-stage[data-bk-side="passenger"] .bk-rig{transform:translate(170px,236px) rotate(90deg)}
.bk-stage[data-bk-pos="swing"] .bk-rig{transform:translate(214px,228px) rotate(-46deg)}
.bk-stage[data-bk-pos="turn"] .bk-rig{transform:translate(184px,200px) rotate(-4deg)}
.bk-stage[data-bk-pos="parked"] .bk-rig{transform:translate(180px,104px) rotate(0deg)}
.bk-stage[data-bk-pos="hit"] .bk-rig{transform:translate(180px,200px) rotate(-40deg)}
.bk-stage[data-bk-side="passenger"][data-bk-pos="hit"] .bk-rig{transform:translate(180px,200px) rotate(40deg)}
.bk-stage[data-bk-side="passenger"][data-bk-pos="short"] .bk-rig{transform:translate(196px,214px) rotate(55deg)}
.bk-stage.is-js .bk-rig{transition:transform .9s ease-in-out}
.bk-zone{fill:var(--bk-red);fill-opacity:.2;stroke:var(--bk-red);stroke-opacity:.6;stroke-width:1;stroke-dasharray:4 3;transition:opacity .25s}
.bk-cone{fill:var(--bk-go);fill-opacity:.22;stroke:var(--bk-go);stroke-opacity:.75;stroke-width:1;transition:opacity .25s}
.bk-stage:not([data-bk-pos="start"]) .bk-zone,.bk-stage:not([data-bk-pos="start"]) .bk-cone{opacity:0}
.bk-trailer{stroke:#59646a;stroke-width:1}
.bk-ribs{fill:none;stroke:#7f8a90;stroke-width:.8}
.bk-doors{fill:#4b555b}
.bk-tail{fill:#ff3b30}
.bk-hitch{fill:#262d32;stroke:#11161a;stroke-width:1}
.bk-cab{stroke:#5f170c;stroke-width:1}
.bk-glass{fill:#9ed3f0}
.bk-mirror{fill:#d7dddd}
.bk-seat{fill:#fde68a;stroke:#5f170c;stroke-width:.8}

/* the hazards: hidden until you get out and look, or until you hit one */
.bk-hazard{opacity:0;transition:opacity .3s}
.bk-stage[data-bk-walk="yes"] .bk-hazard,.bk-stage[data-bk-result="hit"] .bk-hazard{opacity:1}
.bk-pipe{fill:none;stroke:#c9d0d2;stroke-width:4;stroke-linecap:round;stroke-opacity:.9}
.bk-post{fill:var(--bk-sig);stroke:#3b2a05;stroke-width:1.4}
.bk-check{opacity:0}
.bk-stage[data-bk-walk="yes"] .bk-check{opacity:1}
.bk-stage[data-bk-result="hit"] .bk-post{fill:var(--bk-red);stroke:#fff}

/* side labels show only while the rig waits */
.bk-tags{display:none}
.bk-stage[data-bk-pos="start"][data-bk-side="driver"] .bk-tags-driver,
.bk-stage[data-bk-pos="start"][data-bk-side="passenger"] .bk-tags-passenger{display:inline}

/* the helper */
.bk-helper{opacity:0;transition:opacity .25s}
.bk-stage[data-bk-helper="yes"][data-bk-side="driver"] .bk-helper-driver,
.bk-stage[data-bk-helper="yes"][data-bk-side="passenger"] .bk-helper-passenger{opacity:1}
.bk-helper-body{fill:#f97316;stroke:#3a1a05;stroke-width:1}
.bk-helper-stripe{fill:none;stroke:#fef9c3;stroke-width:1.6}
.bk-helper-head{fill:#f2d1b3;stroke:#3a1a05;stroke-width:.8}
.bk-stop{display:none}
.bk-stage[data-bk-result="best"] .bk-stop{display:inline}
.bk-stop rect{fill:#b91c1c;stroke:#fff;stroke-width:1}
.bk-stop text{fill:#fff;font-size:11px;font-weight:900;letter-spacing:.04em;text-anchor:middle}

/* the outcome card */
.bk-card{display:none}
.bk-stage:not([data-bk-result="none"]) .bk-card{display:inline}
.bk-card-box{fill:#080b0d;stroke:#59636a;stroke-width:1.2}
.bk-card-big{font-size:12px;font-weight:900;letter-spacing:.05em;text-anchor:middle}
.bk-card-sub{fill:#d3dade;font-size:10px;font-weight:700;text-anchor:middle}
.bk-out{display:none}
.bk-stage[data-bk-result="safe"] .bk-out-safe,.bk-stage[data-bk-result="best"] .bk-out-best,
.bk-stage[data-bk-result="hit"] .bk-out-hit,.bk-stage[data-bk-result="blind"] .bk-out-blind{display:inline}
.bk-out-safe .bk-card-big,.bk-out-best .bk-card-big{fill:var(--bk-go)}
.bk-out-hit .bk-card-big{fill:#fca5a5}
.bk-out-blind .bk-card-big{fill:var(--bk-sig)}
.bk-stage[data-bk-result="safe"] .bk-card-box,.bk-stage[data-bk-result="best"] .bk-card-box{stroke:var(--bk-go)}
.bk-stage[data-bk-result="hit"] .bk-card-box{stroke:var(--bk-red)}
.bk-stage[data-bk-result="blind"] .bk-card-box{stroke:var(--bk-sig)}

/* controls: one dark console, every button the same dark face and white text, amber when active or focused */
.bk-ask{margin:0;color:var(--ink);font-size:20px;line-height:1.25}
.bk-ask[hidden],.bk-controls[hidden]{display:none}
.bk-ask b{font-weight:800}
.bk-controls{display:grid;gap:10px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,var(--bk-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.bk-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}
.bk-btn:hover{background:linear-gradient(180deg,#38434b,#20282d)}
.bk-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.bk-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #06090b}
.bk-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.bk-btn-wide{min-height:64px}
.bk-name{display:grid;gap:3px;min-width:0}
.bk-name small{color:#a9b3b8;font-size:13px;font-weight:600}
.bk-group{display:grid;gap:6px}
.bk-label-text{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.bk-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.bk-btn-seg{justify-content:center;padding:8px 6px;text-align:center;font-size:15px}
.bk-icon{flex:none;width:44px;height:30px}
.bk-icon-line{fill:none;stroke:#3d464b;stroke-width:2}
.bk-icon-head{fill:#e9eef0}
.bk-icon-figure{fill:none;stroke:#e9eef0;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.bk-icon-eye{fill:none;stroke:#fde68a;stroke-width:1.6;stroke-linecap:round}
.bk-icon-stop{fill:#dc2626}
.bk-icon-trailer{fill:#d7dddd}
.bk-icon-arrow{fill:none;stroke:#fde68a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bk-reset{justify-self:start;gap:8px;min-height:44px;padding:8px 16px 8px 12px;font-size:15px}
.bk-reset-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bk-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid var(--bk-sig);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}
.bk-stage[data-bk-result="safe"]~.bk-panel .bk-status,.bk-stage[data-bk-result="best"]~.bk-panel .bk-status{border-left-color:var(--bk-go)}
.bk-stage[data-bk-result="hit"]~.bk-panel .bk-status{border-left-color:var(--bk-red)}
.bk-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}

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