/* Cargo tie-down explainer: a flatbed truck with a header board and a crate drawn to scale (6.5 units per foot), held
   by up to eight straps, under three cards and above a verdict box. Hero, film, course offer and return banner reuse
   spring-brakes.css (.sbp-*); this file styles only .tw-*. The script sets the stage's data-length, data-weight,
   data-straps, data-front (none, blocking, bracing), data-manual, data-rule and data-wll (ok, short) and data-verdict
   (pass, fail) states, the crate width, the strap positions and the readouts. Without script the picture shows a
   20 ft, 20,000 lb load with two straps. Every SVG text label is at least 11.5px in the 360-wide viewBox. */
.tw-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.tw-demo{padding-block:64px 72px;background:var(--paper)}
.tw-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}
.tw-head{grid-area:head}
.tw-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)}
.tw-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.tw-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: cargo, weight and straps; script on */
.tw-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.tw-stage.is-js .tw-hud{display:flex}
.tw-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}
.tw-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}
.tw-chip span{color:#a9b3b8;font-weight:600}
.tw-chip b{color:#e8eef0;font-weight:800}
.tw-chip-length i,.tw-chip-weight i{background:#c99a5b}
.tw-chip-straps i{background:#facc15}
.tw-stage[data-verdict="pass"] .tw-chip-straps i{background:#31d67b}
.tw-stage[data-verdict="fail"] .tw-chip-straps i{background:#ef4444}

/* the cards and the verdict box */
.tw-box{fill:#080b0d;fill-opacity:.88;stroke:#59636a;stroke-width:1.2;transition:stroke .2s}
.tw-stage[data-manual="ok"] .tw-card-manual .tw-box,.tw-stage[data-rule="ok"] .tw-card-rule .tw-box,.tw-stage[data-wll="ok"] .tw-card-wll .tw-box{stroke:#31d67b}
.tw-stage[data-manual="short"] .tw-card-manual .tw-box,.tw-stage[data-rule="short"] .tw-card-rule .tw-box,.tw-stage[data-wll="short"] .tw-card-wll .tw-box{stroke:#ef4444}
.tw-stage[data-verdict="pass"] .tw-verdict-box{stroke:#31d67b;stroke-width:2}
.tw-stage[data-verdict="split"] .tw-verdict-box{stroke:#facc15;stroke-width:2}
.tw-stage[data-verdict="fail"] .tw-verdict-box{stroke:#ef4444;stroke-width:2}
.tw-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.06em}
.tw-big{fill:#fff;font-size:18px;font-weight:900}
.tw-sub{fill:#d3dade;font-size:11.5px;font-weight:700}
.tw-mark{font-size:11.5px;font-weight:900;letter-spacing:.06em}
.tw-stage[data-manual="ok"] .tw-card-manual .tw-mark,.tw-stage[data-rule="ok"] .tw-card-rule .tw-mark,.tw-stage[data-wll="ok"] .tw-card-wll .tw-mark{fill:#86efac}
.tw-stage[data-manual="short"] .tw-card-manual .tw-mark,.tw-stage[data-rule="short"] .tw-card-rule .tw-mark,.tw-stage[data-wll="short"] .tw-card-wll .tw-mark{fill:#fca5a5}
.tw-verdict{font-size:17px;font-weight:900;letter-spacing:.05em}
.tw-stage[data-verdict="pass"] .tw-verdict{fill:#86efac}
.tw-stage[data-verdict="split"] .tw-verdict{fill:#fde68a}
.tw-stage[data-verdict="fail"] .tw-verdict{fill:#fca5a5}
.tw-why{fill:#e8eef0;font-size:12.5px;font-weight:700}
.tw-sum{fill:#fde68a;font-size:12px;font-weight:800}

/* labels in the scene */
.tw-t{fill:#e8eef0;font-size:11.5px;font-weight:800;letter-spacing:.03em;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.tw-t-part{fill:#d3dade;font-size:11.5px}
.tw-t-act{fill:#fde68a;font-size:11.5px;font-weight:900}
.tw-t-load{fill:#fff;font-size:12px;font-weight:900}

/* the truck */
.tw-ground{fill:#2b3237}
.tw-cab{stroke:#16222c;stroke-width:1.2}
.tw-glass{fill:#1b2a35;stroke:#9cc9e0;stroke-opacity:.4;stroke-width:1}
.tw-header{fill:#8f9a9d;stroke:#2a3133;stroke-width:1}
.tw-deck{fill:#59636a;stroke:#2a3133;stroke-width:1}
.tw-wheel{fill:#15191c;stroke:#59636a;stroke-width:2}

/* the cargo, blocking and bracing */
.tw-crate{stroke:#5a3d1c;stroke-width:1.2;transition:width .3s}
.tw-wood{fill:#b07a3a;stroke:#5a3d1c;stroke-width:1}
.tw-brace{fill:none;stroke:#b07a3a;stroke-width:5;stroke-linecap:round}
.tw-blocking,.tw-bracing{display:none}
.tw-stage[data-front="blocking"] .tw-blocking,.tw-stage[data-front="bracing"] .tw-bracing{display:inline}

/* the straps: only the ones in use show */
.tw-strap{display:none;transition:transform .3s}
.tw-strap.is-on{display:inline}
.tw-band{fill:#facc15;stroke:#6b5410;stroke-width:.6}
.tw-ratchet{fill:#9aa5aa;stroke:#2a3133;stroke-width:.8}

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

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