/* Air-line-color-code explainer: a tractor-to-trailer air circuit. The blue service hose and the red emergency hose run
   from the foot brake and the red air supply knob, through the tractor protection valve and the glad hands, to the
   trailer relay valve, air tank and spring brake chamber. Hero, film, course offer and return banner reuse
   spring-brakes.css (.sbp-*); this file styles only .lc-*. The script sets the stage's data-mode (idle, blue, red,
   cross, break), data-lines, data-hose, data-tank, data-spring, data-tpv, data-knob and data-foot states. Without script
   the picture shows the lines coupled right, the tank charged and the spring brakes released. Every SVG text label is
   at least 11.5px in the 360-wide viewBox. */
.lc-page{--lc-blue:#3b82f6;--lc-blue-hi:#93c5fd;--lc-red:#ef4444;--lc-red-hi:#fca5a5;--lc-go:#31d67b;--lc-warn:#fbbf24;--lc-console:#151b20}
.lc-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.lc-demo{padding-block:64px 72px;background:var(--paper)}
.lc-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}
.lc-head{grid-area:head}
.lc-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)}
.lc-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.lc-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: air lines, trailer tank and spring brakes; script on */
.lc-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.lc-stage.is-js .lc-hud{display:flex}
.lc-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}
.lc-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:var(--lc-go);box-shadow:0 0 0 2px rgb(49 214 123/.18),0 0 10px rgb(49 214 123/.7);transition:background .2s,box-shadow .2s}
.lc-chip span{color:#a9b3b8;font-weight:600}
.lc-chip b{color:#e8eef0;font-weight:800}
.lc-stage[data-lines="crossed"] .lc-chip-lines i,.lc-stage[data-hose="broken"] .lc-chip-lines i,
.lc-stage[data-tank="empty"] .lc-chip-tank i,.lc-stage[data-tank="cutoff"] .lc-chip-tank i,
.lc-stage[data-spring="locked"] .lc-chip-spring i{background:var(--lc-red);box-shadow:0 0 0 2px rgb(239 68 68/.2),0 0 10px rgb(239 68 68/.85)}
.lc-stage[data-lines="crossed"] .lc-chip-lines b,.lc-stage[data-hose="broken"] .lc-chip-lines b,
.lc-stage[data-tank="empty"] .lc-chip-tank b,.lc-stage[data-tank="cutoff"] .lc-chip-tank b,
.lc-stage[data-spring="locked"] .lc-chip-spring b{color:var(--lc-red-hi)}

/* the schematic */
.lc-side{fill:#151c21;stroke:#2c353b;stroke-width:1}
.lc-nose{fill:none;stroke:#59636a;stroke-width:1.4;stroke-dasharray:4 4}
.lc-t{fill:#d3dade;font-size:11.5px;font-weight:800;letter-spacing:.03em;paint-order:stroke;stroke:#0d1114;stroke-width:2.6px;stroke-linejoin:round}
.lc-t-side{fill:#8f9a9d;font-size:12px;letter-spacing:.1em}
.lc-t-mid{text-anchor:middle}
.lc-t-end{text-anchor:end}
.lc-t-blue{fill:var(--lc-blue-hi)}
.lc-t-red{fill:var(--lc-red-hi)}
.lc-t-tank{fill:#fff}
.lc-t-badge{fill:#1a1300;stroke:none;letter-spacing:0}
.lc-t-key{fill:#d3dade;font-size:11.5px}
.lc-pipe{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;transition:opacity .25s}
.lc-p-blue{stroke:var(--lc-blue)}
.lc-p-red{stroke:var(--lc-red)}
.lc-p-air{stroke:#6b767b;stroke-width:3}
.lc-key{fill:none;stroke-width:5;stroke-linecap:round}
.lc-key-blue{stroke:var(--lc-blue)}
.lc-key-red{stroke:var(--lc-red)}

/* foot brake and air supply knob */
.lc-foot{transform-box:view-box;transform-origin:44px 40px;transition:transform .2s}
.lc-stage[data-foot="down"] .lc-foot{transform:rotate(-14deg)}
.lc-foot-arm{fill:none;stroke:#8f9a9d;stroke-width:3;stroke-linecap:round}
.lc-foot-pad{fill:#4a555b;stroke:#8f9a9d;stroke-width:1;transition:fill .2s}
.lc-stage[data-foot="down"] .lc-foot-pad{fill:var(--lc-warn)}
.lc-knob{transform-box:view-box;transition:transform .2s}
.lc-stage[data-knob="out"] .lc-knob{transform:translateX(-8px)}
.lc-knob-face{fill:#c81e1e;stroke:#fca5a5;stroke-width:1.2}
.lc-knob-stem{fill:none;stroke:#8f9a9d;stroke-width:4}

/* tractor protection valve */
.lc-tpv{fill:url(#lc-g-metal);stroke:#2a3133;stroke-width:1.2;transition:stroke .2s}
.lc-tpv-shut{fill:none;stroke:var(--lc-red);stroke-width:4;stroke-linecap:round;opacity:0;transition:opacity .2s}
.lc-stage[data-tpv="closed"] .lc-tpv{stroke:var(--lc-red);stroke-width:2.4}
.lc-stage[data-tpv="closed"] .lc-tpv-shut{opacity:1}

/* hoses and glad hands */
.lc-hose-line{fill:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.lc-hose-blue{stroke:var(--lc-blue)}
.lc-hose-red{stroke:var(--lc-red)}
.lc-gh{stroke:#0d1114;stroke-width:1.2}
.lc-gh-blue{fill:var(--lc-blue)}
.lc-gh-red{fill:var(--lc-red)}
.lc-gh-fixed{stroke:#d3dade}
.lc-seal{fill:none;stroke:#0b0d0f;stroke-width:2}
.lc-badge rect{fill:var(--lc-warn)}
.lc-puff{fill:none;stroke:#e0f2fe;stroke-width:1.8;stroke-linecap:round;stroke-dasharray:3 3}
.lc-hose-x,.lc-hose-red-torn{display:none}
.lc-stage[data-lines="crossed"] .lc-hose-x{display:inline}
.lc-stage[data-lines="crossed"] .lc-hose-ok{display:none}
.lc-stage[data-hose="broken"] .lc-hose-red-torn{display:inline}
.lc-stage[data-hose="broken"] .lc-hose-red-whole{display:none}

/* trailer parts */
.lc-relay{fill:url(#lc-g-metal);stroke:#2a3133;stroke-width:1.2;transition:stroke .2s}
.lc-stage[data-mode="blue"] .lc-relay{stroke:var(--lc-warn);stroke-width:2.4}
.lc-tank{stroke:#59636a;stroke-width:1.2}
.lc-tank-air{fill:var(--lc-go);opacity:.38;transition:opacity .3s,fill .3s}
.lc-stage[data-tank="empty"] .lc-tank-air{opacity:0}
.lc-stage[data-tank="cutoff"] .lc-tank-air{fill:var(--lc-warn);opacity:.28}
.lc-chamber{fill:#3a4246;stroke:#8f9a9d;stroke-width:1.2;transition:fill .2s,stroke .2s}
.lc-stage[data-mode="blue"] .lc-ch-service{fill:#a16207;stroke:var(--lc-warn)}
.lc-stage[data-spring="locked"] .lc-ch-spring{fill:#7f1d1d;stroke:var(--lc-red)}
.lc-spring{fill:none;stroke:#e8eef0;stroke-width:1.8;stroke-linejoin:round}
.lc-spring-set{display:none}
.lc-stage[data-spring="locked"] .lc-spring-set{display:inline}
.lc-stage[data-spring="locked"] .lc-spring-held{display:none}
.lc-rod{fill:none;stroke:#c3ccd0;stroke-width:3;stroke-linecap:round;transform-box:view-box;transition:transform .2s}
.lc-stage[data-mode="blue"] .lc-rod,.lc-stage[data-spring="locked"] .lc-rod{transform:translateX(-6px)}
/* the trailer red line loses its air when crossed or torn */
.lc-stage[data-lines="crossed"] .lc-p-supply,.lc-stage[data-hose="broken"] .lc-p-supply{opacity:.3}
.lc-stage[data-tpv="closed"] .lc-p-red-tractor{opacity:.55}

/* state words: one of each set shows */
.lc-st{display:none}
.lc-stage[data-knob="in"] .lc-st-in,.lc-stage[data-knob="out"] .lc-st-out,
.lc-stage[data-tpv="open"] .lc-st-open,.lc-stage[data-tpv="closed"] .lc-st-closed,
.lc-stage[data-tank="charged"] .lc-st-charged,.lc-stage[data-tank="empty"] .lc-st-empty,.lc-stage[data-tank="cutoff"] .lc-st-cutoff,
.lc-stage[data-spring="released"] .lc-st-released,.lc-stage[data-spring="locked"] .lc-st-locked,
.lc-stage[data-hose="ok"] .lc-st-whole,.lc-stage[data-hose="broken"] .lc-st-torn{display:inline}
.lc-st-out,.lc-st-closed,.lc-st-empty,.lc-st-cutoff,.lc-st-locked{fill:var(--lc-red-hi)}
.lc-st-released,.lc-st-open{fill:#86efac}

/* the moving air, one set per trace */
.lc-flow{fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-dasharray:4 8;opacity:0;transition:opacity .2s}
.lc-stage[data-mode="blue"] .lc-fl-service,.lc-stage[data-mode="blue"] .lc-fl-brake,
.lc-stage[data-mode="red"] .lc-fl-supply,.lc-stage[data-mode="cross"] .lc-fl-cross{opacity:.95}
.lc-stage.is-js .lc-flow{animation:lc-flow .7s linear infinite}
.lc-stage.is-js[data-hose="broken"] .lc-puff{animation:lc-flow .5s linear infinite}
@keyframes lc-flow{to{stroke-dashoffset:-12}}

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

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