/* Dual-air-brake-system explainer: the press-the-pedal circuit model with two working wheel-end cutaways. Hero, film,
   course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .da-*. Amber is the primary
   system (rear brakes) and mint the secondary system (front brakes), everywhere they appear (lines, tanks, valve
   halves, needles, cutaway rings, pedal lights, trace switch). Supply lines are always charged; delivery lines carry
   air only while the pedal is down. Neither color stands for a trailer line. Transforms on SVG parts use the part's
   own drawing units; --da-t stretches every apply timing for the slow replay. */
.da-page{--da-pri:#ffc277;--da-sec:#71decc;--da-empty:#34424a;--da-t:1}
.da-pri{--c:var(--da-pri)}
.da-sec{--c:var(--da-sec)}
.da-demo{padding-block:64px 72px;background:var(--paper)}
.da-demo-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);grid-template-areas:"head head" "stage panel";gap:24px 40px;align-items:start}
.da-head{grid-area:head}
.da-stage{grid-area:stage;margin:0;padding:10px 10px 6px;border-radius:16px;background:radial-gradient(120% 80% at 50% 18%,#26363e 0%,#141c21 58%,#0c1215 100%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 0 0 1px rgb(255 255 255/.06)}
.da-stage.is-slow{--da-t:3}
.da-svg{display:block;width:100%;max-width:600px;height:auto;margin-inline:auto}
.da-panel{grid-area:panel;display:grid;gap:14px}

/* ---------------------------------------------------------------- the truck */
.da-front text,.da-gauge-name,.da-label{fill:#c9d2d2;font:700 12.5px/1 var(--font-sans,DM,system-ui,sans-serif);letter-spacing:.06em;text-transform:uppercase}
.da-front path{fill:none;stroke:#c9d2d2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.da-label{text-anchor:middle;fill:#e9e7e1}
.da-leader{fill:none;stroke:rgb(233 231 225/.45);stroke-width:1;stroke-dasharray:2 2}
.da-cone{fill:rgb(220 236 236/.05);stroke:rgb(220 236 236/.16);stroke-width:1}
.da-shadow{fill:rgb(0 0 0/.4)}
.da-body{fill:url(#da-g-box);stroke:#f6f7f4;stroke-width:1}
.da-ribs{fill:none;stroke:rgb(20 30 35/.13);stroke-width:1.2}
.da-rail{fill:#182126;stroke:#36444a;stroke-width:1}
.da-cab{fill:url(#da-g-cab);stroke:#83cdbb;stroke-width:1}
.da-glass{fill:#163038;stroke:#5fae9c;stroke-width:.7}
.da-well{fill:#0c1418;stroke:rgb(131 205 187/.55);stroke-width:1;stroke-dasharray:3 2}
.da-bumper{fill:#c4cdcf}
.da-lamp-head{fill:#f5f0d8}
.da-tire{fill:#2a3439;stroke:#56646a;stroke-width:1.5}
.da-rim{fill:url(#da-g-steel)}
.da-hub{fill:#56636a}

/* ---------------------------------------------------------------- the air system */
.da-supply{fill:none;stroke:var(--c);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.da-app-base{fill:none;stroke:var(--da-empty);stroke-width:3.6;stroke-linejoin:round;stroke-dasharray:2 3;transition:stroke .25s}
.da-app{fill:none;stroke:var(--c);stroke-width:3.6;stroke-linejoin:round;stroke-dasharray:1 1;stroke-dashoffset:1}
.da-tank{stroke:rgb(0 0 0/.35);stroke-width:1}
.da-pri .da-tank{fill:url(#da-g-pri)}
.da-sec .da-tank{fill:url(#da-g-sec)}
.da-tank-bands{fill:none;stroke:rgb(0 0 0/.22);stroke-width:1.6}
.da-tank-name{fill:#12181d;font:800 12.5px/1 var(--font-sans,DM,system-ui,sans-serif);text-anchor:middle}
.da-valve-body{fill:url(#da-g-steel);stroke:#3c484d;stroke-width:1}
.da-valve-pri{fill:var(--da-pri)}
.da-valve-sec{fill:var(--da-sec)}
.da-valve-pri,.da-valve-sec{opacity:.6}
.da-plunger{fill:#cfd7d8}
.da-exhaust{fill:#7d898d}
.da-vent circle{fill:rgb(225 238 238/.75);opacity:0}
.da-pedal{transform-origin:46px 103px}
.da-pedal-pad{fill:#e3e8e8;stroke:#11181c;stroke-width:.8}
.da-pedal-ribs{fill:none;stroke:#11181c;stroke-width:1.3}
.da-bead{fill:#fff;stroke:var(--c);stroke-width:2;filter:drop-shadow(0 0 2.5px var(--c))}

/* ---------------------------------------------------------------- the gauge */
.da-gauge-name{text-anchor:middle}
.da-gauge-bezel{fill:url(#da-g-steel)}
.da-dial{fill:#0e1418}
.da-ticks{fill:none;stroke:#8d999e;stroke-width:1.2;stroke-linecap:round}
.da-needle{stroke:var(--c);stroke-width:2.6;stroke-linecap:round;transform-origin:180px 270px;transform:rotate(94.5deg)}   /* full tanks, as the script starts */
.da-gauge-pin{fill:#d7dedd}

/* ---------------------------------------------------------------- the wheel-end cutaways */
.da-lens-bg{fill:url(#da-g-lens)}
.da-tread{fill:none;stroke:#192125;stroke-width:12.5}
.da-tirewall{fill:none;stroke:#2c373c;stroke-width:1.5}
.da-drum{fill:none;stroke:url(#da-g-steel);stroke-width:7}
.da-plate{fill:#131c21;stroke:#26333a;stroke-width:1}
.da-contact{fill:none;stroke:var(--c);stroke-width:3.4;stroke-linecap:round;opacity:0;filter:drop-shadow(0 0 3px var(--c))}
.da-anchor{fill:#c8d0d2}
.da-table{fill:#76838a}
.da-lining{fill:#9a7d5e;stroke:#3b2f24;stroke-width:.6}
.da-roller{fill:#dfe5e6;stroke:#5d696d;stroke-width:.8}
.da-spring{fill:none;stroke:#cfd7d8;stroke-width:1.3;stroke-linejoin:round;transform-origin:0 -19px}
.da-hubcap{fill:url(#da-g-steel)}
.da-hubnut{fill:#5e6a6e}
.da-lugs{stroke:#36424a;stroke-width:2.6;stroke-linecap:round}
.da-cam{transform-origin:0 -30px}
.da-arm{stroke:#c8d0d2;stroke-width:4;stroke-linecap:round}
.da-scam{fill:none;stroke:#f1f4f4;stroke-width:3.2;stroke-linecap:round}
.da-camshaft{fill:#5e6a6e}
.da-clevis{fill:#f1f4f4}
.da-chamber{fill:#27333a;stroke:#9aa6aa;stroke-width:1.4}
.da-chamber-air{fill:var(--c);opacity:.25;transform-origin:-38px -44px}
.da-diaphragm{stroke:#e9eeee;stroke-width:2;stroke-linecap:round}
.da-pushrod{stroke:#e9eeee;stroke-width:2.4;stroke-linecap:round}
.da-bezel{fill:none;stroke:var(--c);stroke-width:2;opacity:.5}
.da-cap{fill:var(--c);font:800 12.5px/1 var(--font-sans,DM,system-ui,sans-serif);text-anchor:middle;letter-spacing:.02em}
.da-cap-sub{fill:#c9d2d2;font:600 12.5px/1 var(--font-sans,DM,system-ui,sans-serif);text-anchor:middle}
.da-cap-sub tspan{fill:#fff;font-weight:800}

/* pedal down: the valve opens both halves, both delivery lines fill, both chambers push their rods, both s-cams turn
   and both pairs of shoes press against their drums */
.da-stage.is-applied .da-pedal{transform:rotate(13deg)}
.da-stage.is-applied .da-plunger{transform:translateY(3px)}
.da-stage.is-applied :is(.da-valve-pri,.da-valve-sec){opacity:1}
.da-stage.is-applied .da-app{stroke-dashoffset:0}
.da-stage.is-applied .da-chamber-air{opacity:1;transform:scaleX(1.93)}
.da-stage.is-applied .da-rod{transform:translate(6.5px,-1.4px)}
.da-stage.is-applied .da-cam{transform:rotate(25deg)}
.da-stage.is-applied .da-shoe-l{transform:translateX(-5.5px)}
.da-stage.is-applied .da-shoe-r{transform:translateX(5.5px)}
.da-stage.is-applied .da-spring{transform:scaleX(1.29)}
.da-stage.is-applied .da-contact{opacity:1}
.da-stage.is-applied .da-bezel{opacity:1;stroke-width:2.8}

/* motion: on the way down the air leaves both tanks at once, crosses the valve, fills each delivery line and reaches
   both chambers together; on the way up the shoes pull back, the lines drain to the valve and it vents */
.da-stage.is-moving .da-app{transition:stroke-dashoffset .42s ease-in}
.da-stage.is-moving :is(.da-shoe,.da-cam,.da-rod,.da-spring,.da-chamber-air){transition:transform .3s cubic-bezier(.4,0,.6,1),opacity .3s}
.da-stage.is-moving :is(.da-contact,.da-bezel){transition:opacity .15s,stroke-width .15s}
.da-stage.is-moving :is(.da-pedal,.da-plunger){transition:transform .18s ease-out}
.da-stage.is-moving :is(.da-valve-pri,.da-valve-sec){transition:opacity .2s}
.da-stage.is-moving .da-needle{transition:transform .7s cubic-bezier(.3,.7,.3,1) .2s,opacity .25s}
.da-stage.is-moving.is-applied .da-app{transition:stroke-dashoffset calc(.52s * var(--da-t)) linear calc(.36s * var(--da-t))}
.da-stage.is-moving.is-applied :is(.da-shoe,.da-cam,.da-rod,.da-spring,.da-chamber-air){transition:transform calc(.18s * var(--da-t)) ease-out calc(.92s * var(--da-t)),opacity calc(.18s * var(--da-t)) calc(.92s * var(--da-t))}
.da-stage.is-moving.is-applied :is(.da-contact,.da-bezel){transition:opacity calc(.12s * var(--da-t)) linear calc(1.1s * var(--da-t)),stroke-width calc(.12s * var(--da-t)) calc(1.1s * var(--da-t))}
.da-stage.is-moving.is-venting .da-vent circle{animation:da-puff .75s ease-out}
.da-stage.is-moving.is-venting .da-vent circle:nth-child(2){animation-delay:.08s}
.da-stage.is-moving.is-venting .da-vent circle:nth-child(3){animation-delay:.14s}
@keyframes da-puff{0%{opacity:.9;transform:translateY(0) scale(.6)}100%{opacity:0;transform:translateY(9px) scale(2.2)}}
.da-vent circle{transform-box:fill-box;transform-origin:center}

/* trace one system: the other one stays in the picture, faded, and still applies; its brakes stay in full view */
.da-sys,.da-needle,.da-valve-pri,.da-valve-sec,.da-bead{transition:opacity .25s}
.da-stage[data-trace="primary"] :is(.da-sys.da-sec,.da-needle-sec,.da-bead.da-sec),
.da-stage[data-trace="secondary"] :is(.da-sys.da-pri,.da-needle-pri,.da-bead.da-pri){opacity:.32}
.da-stage[data-trace="primary"] .da-tank-name.da-sec,.da-stage[data-trace="secondary"] .da-tank-name.da-pri{fill:#e9e7e1}
.da-stage[data-trace="primary"] .da-valve-sec,.da-stage[data-trace="secondary"] .da-valve-pri{opacity:.3}
.da-stage[data-trace="primary"] .da-sys.da-pri .da-app-base,.da-stage[data-trace="secondary"] .da-sys.da-sec .da-app-base{stroke:color-mix(in srgb,var(--c) 55%,var(--da-empty))}
.da-stage[data-trace="primary"] .da-sys.da-pri .da-tank,.da-stage[data-trace="secondary"] .da-sys.da-sec .da-tank{stroke:#fff;stroke-width:1.6}
.da-stage[data-trace="primary"] .da-sys.da-pri :is(.da-supply,.da-app),.da-stage[data-trace="secondary"] .da-sys.da-sec :is(.da-supply,.da-app){filter:drop-shadow(0 0 2.5px var(--c))}

/* ---------------------------------------------------------------- controls */
.da-ask{color:var(--ink);font-size:20px;line-height:1.25}
.da-ask[hidden],.da-controls[hidden],.da-tools [hidden]{display:none}
.da-ask b{font-weight:800}
.da-controls{display:grid;gap:12px}
/* the pedal: a heavy key that latches down until it is pressed again */
.da-press{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;min-height:80px;padding:10px 16px 10px 12px;border:0;border-radius:14px;background:linear-gradient(180deg,#222d33,#11181c);color:#fff;font-size:17px;font-weight:800;line-height:1.2;text-align:left;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;box-shadow:0 6px 0 #05080a,0 16px 26px -14px rgb(0 0 0/.7),inset 0 1px 0 rgb(255 255 255/.08);transition:transform .12s ease-out,box-shadow .12s ease-out}
.da-press:hover{background:linear-gradient(180deg,#27333a,#141c20)}
.da-press:active,.da-press[aria-pressed="true"]{transform:translateY(5px);box-shadow:0 1px 0 #05080a,0 8px 18px -12px rgb(0 0 0/.7),inset 0 1px 0 rgb(255 255 255/.05)}
.da-press-name{display:grid;gap:4px}
.da-press-name small{color:var(--sbp-dim);font-size:13.5px;font-weight:600}
.da-press[aria-pressed="true"] .da-press-name small{color:#fff}
.da-treadle{position:relative;flex:none;width:46px;height:56px;perspective:140px}
.da-treadle::after{content:"";position:absolute;left:9px;right:9px;bottom:0;height:12px;border-radius:3px;background:linear-gradient(90deg,var(--da-pri) 0 50%,var(--da-sec) 50% 100%);opacity:.45;box-shadow:inset 0 0 0 1.5px #0b1013;transition:opacity .2s}
.da-treadle-pad{position:absolute;left:4px;right:4px;top:2px;bottom:12px;border-radius:7px;background:repeating-linear-gradient(180deg,#eef2f2 0 3px,#8f9b9f 3px 5.5px);box-shadow:inset 0 0 0 1.5px #0b1013,0 5px 0 -1px #4e5a5f;transform-origin:50% 100%;transform:rotateX(26deg);transition:transform .16s ease-out}
.da-press:active .da-treadle-pad,.da-press[aria-pressed="true"] .da-treadle-pad{transform:rotateX(56deg) translateY(2px)}
.da-press[aria-pressed="true"] .da-treadle::after{opacity:1}
.da-press-feed{display:grid;gap:5px}
.da-press-feed i{display:block;width:8px;height:22px;border-radius:4px;background:#2a353b;box-shadow:inset 0 0 0 1px rgb(255 255 255/.08);transition:background .2s,box-shadow .2s}
.da-press[aria-pressed="true"] .da-feed-pri{background:var(--da-pri);box-shadow:0 0 10px var(--da-pri)}
.da-press[aria-pressed="true"] .da-feed-sec{background:var(--da-sec);box-shadow:0 0 10px var(--da-sec)}
/* trace: one dark switch, three positions */
.da-trace{min-width:0;margin:0;padding:0;border:0}
.da-trace legend{margin-bottom:6px;padding:0;color:var(--muted);font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.da-seg{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.1fr) minmax(0,1.22fr);gap:4px;padding:4px;border-radius:13px;background:#11181c;box-shadow:inset 0 1px 3px rgb(0 0 0/.6)}
.da-trace label{position:relative;display:block;min-width:0;cursor:pointer}
.da-trace input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.da-trace label>span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:50px;padding:5px 4px;border-radius:9px;color:#d9dfdf;font-size:15px;font-weight:800;line-height:1.1;white-space:nowrap;transition:background .15s,box-shadow .15s,color .15s}
.da-trace small{color:var(--sbp-dim);font-size:12px;font-weight:600}
.da-trace i{display:block;width:22px;height:4px;margin-bottom:3px;border-radius:2px;background:var(--c)}
.da-trace-pri{--c:var(--da-pri)}
.da-trace-sec{--c:var(--da-sec)}
.da-trace input:checked+span{background:linear-gradient(180deg,#2c3a41,#1e282d);color:#fff;box-shadow:inset 0 0 0 1.5px var(--c,#e9e7e1),0 2px 6px rgb(0 0 0/.4)}
.da-trace input:checked+span small{color:#e9e7e1}
.da-trace input:focus-visible+span,.da-press:focus-visible,.da-toggle:focus-visible{outline:3px solid var(--sbp-amber);outline-offset:3px}
.da-status{display:block;min-height:6.6em;padding:12px 14px;border-left:5px solid #9aa7ac;border-radius:0 8px 8px 0;background:var(--white,#fffffc);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45}
.da-status.is-pri{border-left-color:var(--da-pri)}
.da-status.is-sec{border-left-color:var(--da-sec)}
.da-status.is-both{border-image:linear-gradient(var(--da-pri) 0 50%,var(--da-sec) 50% 100%) 1}
.da-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.da-toggle{min-height:44px;cursor:pointer}
.da-replay{border-color:var(--ink);font-weight:700}
.da-text{max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}

.da .sbp-course-grid{grid-template-areas:"intro offer";grid-template-rows:auto}
.da .sbp-features{margin-top:24px}
.da .sbp-price{margin-top:0}
@media (max-width:900px){
  .da .sbp-course-grid{grid-template-areas:"intro" "offer"}
  .da-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:14px}
  .da-svg{max-width:520px}
}
@media (max-width:760px){
  .da-demo{padding-block:34px 44px}
  .da-stage{margin-inline:-12px;padding:6px 4px 2px;border-radius:14px}
  .da-panel{gap:12px}
  .da-ask{font-size:18px}
  .da-press{min-height:76px;gap:12px;padding:8px 14px 8px 10px;font-size:16px}
  .da-press-name small{font-size:13px}
  .da-trace label>span{font-size:14px;min-height:48px}
  .da-trace small{font-size:11.5px}
  .da-status{min-height:8.2em;padding:10px 12px;font-size:15px}
  .da-text{font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  .da-page *{transition:none!important;animation:none!important}
}
