/* Bridge-formula explainer: "Slide the axles on the bridge span", a 5-axle rig on a girder span over a river valley.
   Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles only .bf-*.
   The stage's data-stress (ok, bad) colors the load glow; each heatmap cell's data-level (0 to 4) runs teal, emerald,
   amber, red; data-balance picks the cargo layout in the cutaway; data-weather (dry, wet) swaps the sky for the storm,
   rain, mist, wet deck sheen and headlights. The script moves the tractor, trailer, tandem, strain marks and axle tags
   by their transform attribute, so no rule here may transform .bf-tractor, .bf-trailer, .bf-tandem, .bf-strain or .bf-chip. */
.bf-page{--bf-ok:#31d67b;--bf-teal:#2fd0c0;--bf-warn:#ffb400;--bf-bad:#ff5a3c;--bf-console:#14171f}
.bf-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.bf-demo{padding-block:64px 72px;background:var(--paper)}
.bf-demo-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);grid-template-areas:"head head" "stage panel";gap:24px 40px;align-items:start}
.bf-head{grid-area:head}
.bf-stage{grid-area:stage;margin:0;padding:10px;border-radius:16px;background:linear-gradient(170deg,#1f2233,#0c0e16 80%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 1px 0 rgb(255 255 255/.06)}
.bf-svg{display:block;width:100%;height:auto;border-radius:10px;background:#26406f}
.bf-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* instrument strip over the scene: legal limit, gross weight, bridge stress; script on */
.bf-hud{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 0 10px}
.bf-stage.is-js .bf-hud{display:grid}
.bf-gauge{display:grid;align-items:baseline;gap:2px;margin:0;padding:7px 9px 8px;border-radius:9px;background:linear-gradient(180deg,#0b0d14,#121522);box-shadow:inset 0 0 0 1px rgb(255 255 255/.08),inset 0 1px 0 rgb(255 255 255/.05);line-height:1;min-width:0;transition:box-shadow .2s}
.bf-gauge-name{color:#9ea6b8;font-size:10.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bf-gauge b{color:#eef0f6;font-size:19px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;transition:color .2s}
.bf-gauge small{color:#7f879a;font-size:10.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bf-meter{display:block;width:100%;height:4px;margin:3px 0 1px;overflow:visible}
.bf-meter-track{fill:#262a39}
.bf-meter-fill{fill:var(--bf-ok);transition:fill .2s,width .25s}
.bf-meter-tick{fill:none;stroke:#eef0f6;stroke-width:1.2;opacity:.7;vector-effect:non-scaling-stroke}
.bf-gauge.is-ok b{color:var(--bf-ok)}
.bf-gauge.is-warn b{color:var(--bf-warn)}
.bf-gauge.is-warn .bf-meter-fill{fill:var(--bf-warn)}
.bf-gauge.is-bad b{color:#ff8a70}
.bf-gauge.is-bad .bf-meter-fill{fill:var(--bf-bad)}
.bf-gauge.is-bad{box-shadow:inset 0 0 0 1px rgb(255 90 60/.55),0 0 18px -6px rgb(255 90 60/.7)}

/* sky and weather */
.bf-sky{fill:url(#bf-g-sky)}
.bf-sky-wet{fill:url(#bf-g-sky-wet);opacity:0;transition:opacity .6s}
.bf-sun{transition:opacity .6s}
.bf-sun-disc{fill:#fff3cf}
.bf-birds{fill:none;stroke:#3a2f3f;stroke-width:.9;stroke-linecap:round;opacity:.7;transition:opacity .4s}
.bf-clouds{fill:#262e38;opacity:0;transition:opacity .6s}
.bf-far{fill:url(#bf-g-far);transition:fill .6s}
.bf-snow{fill:#fbeee8;opacity:.85}
.bf-ridge{fill:url(#bf-g-ridge)}
.bf-pines-far{fill:#1d2b33;opacity:.85}
.bf-mist{fill:url(#bf-g-mist);opacity:0;transition:opacity .6s}
.bf-hill{fill:url(#bf-g-hill)}
.bf-pines{fill:#173022}
.bf-river{fill:url(#bf-g-river)}
.bf-ripples{fill:none;stroke:#bfe3ea;stroke-width:.8;stroke-linecap:round;opacity:.45}
.bf-glint{fill:none;stroke:#ffe2a8;stroke-width:1.4;stroke-linecap:round;opacity:.7;transition:opacity .5s}
.bf-rain{fill:none;stroke:#cfe0ee;stroke-width:.7;stroke-linecap:round;opacity:0;pointer-events:none;transition:opacity .5s}
.bf-stage[data-weather="wet"] .bf-sky-wet,.bf-stage[data-weather="wet"] .bf-clouds{opacity:1}
.bf-stage[data-weather="wet"] .bf-sun,.bf-stage[data-weather="wet"] .bf-birds,.bf-stage[data-weather="wet"] .bf-glint{opacity:0}
.bf-stage[data-weather="wet"] .bf-far{fill:#4a5563}
.bf-stage[data-weather="wet"] .bf-mist{opacity:.8}
.bf-stage[data-weather="wet"] .bf-rain{opacity:.55;animation:bf-rain .5s linear infinite}
.bf-stage[data-weather="wet"] .bf-rain-b{opacity:.35;animation-duration:.7s}
@keyframes bf-rain{from{transform:translate(0,-9px)}to{transform:translate(-3px,0)}}

/* the span */
.bf-abut{fill:url(#bf-g-concrete)}
.bf-abut-lines{fill:none;stroke:#7d786d;stroke-width:.6;opacity:.8}
.bf-bearing{fill:#3b3d44}
.bf-rail{fill:none;stroke:#8f99a6;stroke-width:1;opacity:.75}
.bf-girder{fill:url(#bf-g-girder);stroke:#4e4a43;stroke-width:.5}
.bf-slab{fill:url(#bf-g-concrete);stroke:#6f6a60;stroke-width:.4}
.bf-deck-line{fill:none;stroke:#f2eee5;stroke-width:1.1;opacity:.85}
.bf-sheen{fill:none;stroke:#bfe8ff;stroke-width:1.6;opacity:0;transition:opacity .5s}
.bf-stage[data-weather="wet"] .bf-sheen{opacity:.8}
.bf-cell{fill:#1f6f72;opacity:.55;transition:fill .3s,opacity .3s}
.bf-cell[data-level="1"]{fill:var(--bf-teal);opacity:.7}
.bf-cell[data-level="2"]{fill:var(--bf-ok);opacity:.85}
.bf-cell[data-level="3"]{fill:var(--bf-warn);opacity:.95}
.bf-cell[data-level="4"]{fill:var(--bf-bad);opacity:1}
.bf-glow{fill:url(#bf-g-cool);pointer-events:none;transition:opacity .3s}
.bf-stage[data-stress="bad"] .bf-glow{fill:url(#bf-g-hot)}
.bf-strain{fill:none;stroke:#ffe1d6;stroke-width:.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.bf-stage[data-stress="bad"] .bf-cell[data-level="4"]{animation:bf-throb .7s ease-in-out infinite alternate}
@keyframes bf-throb{to{opacity:.6}}

/* the tractor */
.bf-beam{fill:url(#bf-g-beam);opacity:0;transition:opacity .5s}
.bf-stage[data-weather="wet"] .bf-beam{opacity:1}
.bf-frame{fill:#23252e}
.bf-tank,.bf-stack,.bf-grille,.bf-bumper{fill:url(#bf-g-chrome)}
.bf-cab{fill:url(#bf-g-cab);stroke:#5e1a0b;stroke-width:.6}
.bf-cab-shine{fill:none;stroke:#ffc2a0;stroke-width:.8;stroke-linecap:round;opacity:.8}
.bf-seam{fill:none;stroke:#6f220e;stroke-width:.5}
.bf-glass{fill:url(#bf-g-glass)}
.bf-glare{fill:#fff;opacity:.5}
.bf-handle{fill:#e9e2db}
.bf-mirror{fill:none;stroke:#1b1d24;stroke-width:1.2}
.bf-headlamp{fill:#fffbe8}
.bf-step{fill:#a5acb8}
.bf-clear{fill:none;stroke:#ffb53a;stroke-width:1.3;stroke-linecap:round}
.bf-stage[data-weather="wet"] .bf-clear{stroke:#ffd36b}
.bf-fifth{fill:#191a20}
.bf-fender{fill:none;stroke:#1c1d24;stroke-width:2.2;stroke-linecap:round}
.bf-flap{fill:#111}
.bf-tire{fill:url(#bf-g-tire)}
.bf-rim{fill:#c8ceda;stroke:#717887;stroke-width:.4}
.bf-lugs{fill:none;stroke:#5a6070;stroke-width:.6;stroke-linecap:round}
.bf-hub{fill:#3a3f4c}

/* the trailer and its cutaway bay */
.bf-rails{fill:#2c2f37}
.bf-holes{fill:none;stroke:#8a909c;stroke-width:1.5;stroke-linecap:round}
.bf-landing{fill:none;stroke:#585e6b;stroke-width:1.2}
.bf-box{fill:url(#bf-g-trailer);stroke:#8d8471;stroke-width:.7}
.bf-ribs{fill:none;stroke:#cdc4b0;stroke-width:.6}
.bf-stripe{fill:#1f6f8b}
.bf-bay{fill:url(#bf-g-bay)}
.bf-bay-floor{fill:none;stroke:#7d6b4e;stroke-width:1.4}
.bf-bay-edge{fill:none;stroke:#ffb400;stroke-width:.8;stroke-dasharray:3 2;opacity:.75}
.bf-shine{fill:none;stroke:#fff;stroke-width:.8;opacity:.7}
.bf-kingplate,.bf-sub{fill:#23252e}
.bf-tail{fill:#c4271b}
.bf-icc{fill:none;stroke:#3b3e47;stroke-width:1.3}
.bf-pin{fill:none;stroke:#ffb400;stroke-width:1.3;stroke-linecap:round}
.bf-cargo{display:none}
.bf-stage[data-balance="balanced"] .bf-cargo-balanced,.bf-stage[data-balance="front"] .bf-cargo-front,
.bf-stage[data-balance="rear"] .bf-cargo-rear,.bf-stage[data-balance="high"] .bf-cargo-high{display:inline}
.bf-crate-heavy{fill:#8a5a2b;stroke:#4a2d12;stroke-width:.6}
.bf-box-light{fill:#e8cf9a;stroke:#9c814b;stroke-width:.5}
.bf-straps{fill:none;stroke:#ffcf5a;stroke-width:.9;opacity:.85}
.bf-cg circle{fill:#14171f;stroke:#fff;stroke-width:.9}
.bf-cg path{fill:none;stroke:#fff;stroke-width:.8}
.bf-stage[data-balance="high"] .bf-cg circle,.bf-stage[data-balance="front"] .bf-cg circle,.bf-stage[data-balance="rear"] .bf-cg circle{fill:#b8321d}

/* axle group tags under the span */
.bf-chip-pin{fill:none;stroke:#eef0f6;stroke-width:.8;stroke-dasharray:1.5 1.5;opacity:.7}
.bf-chip-box{fill:rgb(12 14 22/.86);stroke:rgb(49 214 123/.75);stroke-width:1;transition:stroke .2s}
.bf-chip-name{fill:#a7afbe;font-size:8px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;text-anchor:middle}
.bf-chip-value{fill:#eef0f6;font-size:10px;font-weight:800;text-anchor:middle;font-variant-numeric:tabular-nums}
.bf-chip[data-tone="warn"] .bf-chip-box{stroke:var(--bf-warn)}
.bf-chip[data-tone="warn"] .bf-chip-value{fill:#ffd36b}
.bf-chip[data-tone="bad"] .bf-chip-box{stroke:var(--bf-bad);fill:rgb(60 14 8/.9)}
.bf-chip[data-tone="bad"] .bf-chip-value{fill:#ff9a82}

/* tags in the scene */
.bf-tag,.bf-cargo-label,.bf-ghost-tag{font-size:10.5px;font-weight:800;text-anchor:middle;paint-order:stroke;stroke:#0b0d16;stroke-width:3.2px;stroke-linejoin:round}
.bf-tag{fill:var(--bf-ok)}
.bf-stage.is-js .bf-tag{font-size:13px;text-anchor:end;stroke-width:4px}
.bf-tag[data-tone="warn"]{fill:var(--bf-warn)}
.bf-tag[data-tone="bad"]{fill:#ff8a70}
.bf-cargo-label{fill:#eef0f6;font-size:9.5px}
.bf-cargo-label[data-tone="good"]{fill:#9ff0c4}
.bf-cargo-label[data-tone="warn"]{fill:#ffd36b}
.bf-cargo-label[data-tone="bad"]{fill:#ff9a82}

/* without script: an outline of the tandem slid forward to 36 ft */
.bf-ghost,.bf-ghost-tag{display:none}
.bf-stage.is-static .bf-ghost,.bf-stage.is-static .bf-ghost-tag{display:inline}
.bf-ghost{fill:rgb(255 90 60/.12);stroke:#ff8a70;stroke-width:1.1;stroke-dasharray:3 2}
.bf-ghost-tag{fill:#ff9a82}

/* controls: one dark console; every button is the same dark key with white text and an amber ring when chosen */
.bf-ask{margin:0;color:var(--ink);font-size:19px;line-height:1.25}
.bf-ask b{font-weight:800}
.bf-ask[hidden],.bf-controls[hidden]{display:none}
.bf-controls{display:grid;gap:12px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#1e2130,var(--bf-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#eceef4}
.bf-row{display:grid;gap:7px;min-width:0}
.bf-row-name{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:0;color:#9ea6b8;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.bf-row-value{color:#ffd36b;font-size:15px;letter-spacing:0;font-variant-numeric:tabular-nums}
.bf-range{display:block;width:100%;height:30px;margin:0;background:transparent;cursor:pointer;-webkit-appearance:none;appearance:none}
.bf-range::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--bf-bad),var(--bf-warn) 45%,var(--bf-ok));box-shadow:inset 0 1px 2px rgb(0 0 0/.6)}
.bf-range::-moz-range-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--bf-bad),var(--bf-warn) 45%,var(--bf-ok));box-shadow:inset 0 1px 2px rgb(0 0 0/.6)}
.bf-range::-webkit-slider-thumb{width:28px;height:28px;margin-top:-10px;border:3px solid #ffb400;border-radius:50%;background:radial-gradient(circle at 35% 30%,#5c6378,#1b1e29 70%);box-shadow:0 3px 8px rgb(0 0 0/.6);-webkit-appearance:none;appearance:none}
.bf-range::-moz-range-thumb{width:22px;height:22px;border:3px solid #ffb400;border-radius:50%;background:radial-gradient(circle at 35% 30%,#5c6378,#1b1e29 70%);box-shadow:0 3px 8px rgb(0 0 0/.6)}
.bf-range:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px;border-radius:6px}
.bf-range-ends{display:flex;justify-content:space-between;margin:-4px 0 0;color:#7f879a;font-size:11px;font-weight:700}
.bf-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.bf-seg-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.bf-btn{position:relative;display:flex;align-items:center;gap:8px;min-width:0;min-height:48px;padding:8px 10px;border:0;border-radius:10px;background:linear-gradient(180deg,#2a2e3e,#1a1d28);box-shadow:inset 0 1px 0 rgb(255 255 255/.09),0 3px 0 #07080c,0 4px 10px -4px rgb(0 0 0/.6);color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.2;text-align:left;cursor:pointer;transition:transform .12s,box-shadow .12s,background .15s}
.bf-btn:hover{background:linear-gradient(180deg,#323748,#1e2230)}
.bf-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #07080c}
.bf-btn[aria-pressed="true"]{transform:translateY(2px);background:linear-gradient(180deg,#3a3420,#252113);box-shadow:inset 0 0 0 2px var(--bf-warn),0 1px 0 #07080c}
.bf-btn:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.bf-btn-num{justify-content:center;text-align:center;font-variant-numeric:tabular-nums}
.bf-btn-wide{justify-content:center;width:100%;text-align:center}
.bf-btn-wide::before{content:"";flex:none;width:9px;height:9px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%}
.bf-btn-art{flex:none;width:40px;height:16px}
.bf-btn-art circle{fill:#0b0c11;stroke:#cfd4e0;stroke-width:1}
.bf-art-deck{fill:none;stroke:#7f879a;stroke-width:1.4;stroke-linecap:round}
.bf-art-arrow{fill:none;stroke:#ffd36b;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.bf-art-box{fill:#e9e1cf;stroke:#9ea6b8;stroke-width:.6}
.bf-art-load{fill:#8a5a2b}
.bf-art-light{fill:#e8cf9a}
.bf-btn-art .bf-art-sun{fill:#ffcf5a;stroke:none}
.bf-art-ray{fill:none;stroke:#ffcf5a;stroke-width:1.2;stroke-linecap:round}
.bf-art-peak{fill:#5a6577}
.bf-art-drops{fill:none;stroke:#9fd2ff;stroke-width:1.2;stroke-linecap:round}
.bf-drive{padding-top:4px;border-top:1px solid rgb(255 255 255/.08)}

/* the formula, live */
.bf-formula{display:grid;gap:5px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--white,#fffffc);color:var(--ink)}
.bf-formula p{margin:0}
.bf-formula-name{color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.bf-formula-eq{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.bf-formula-live{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.bf-formula-live b{color:#a85d00;font-weight:800}
.bf-formula-note{color:var(--muted);font-size:13px;line-height:1.4}
.bf-status{display:block;min-height:5.9em;padding:12px 14px 12px 16px;border-left:5px solid #9aa3b5;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}
.bf-status[data-tone="good"]{border-left-color:#1f9e63}
.bf-status[data-tone="warn"]{border-left-color:#e0a000}
.bf-status[data-tone="bad"]{border-left-color:#e2503a}

/* phone axle-weight readout strip below the SVG */
.bf-axles{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding-top:7px}
.bf-axle{display:grid;gap:2px;margin:0;padding:6px 7px;border-radius:8px;background:linear-gradient(180deg,#0b0d14,#121522);box-shadow:inset 0 0 0 1px rgb(49 214 123/.45);line-height:1.1;text-align:center}
.bf-axle-name{color:#a7afbe;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.bf-axle b{color:#eef0f6;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.bf-axle[data-tone="warn"]{box-shadow:inset 0 0 0 1px var(--bf-warn)}
.bf-axle[data-tone="warn"] b{color:#ffd36b}
.bf-axle[data-tone="bad"]{box-shadow:inset 0 0 0 1px var(--bf-bad);background:rgb(60 14 8/.9)}
.bf-axle[data-tone="bad"] b{color:#ff9a82}

@media (min-width:761px){
  .bf-page .sbp-film-frame.is-wide{aspect-ratio:auto;padding-bottom:58px;background:#0b0d0f}
  .bf-page .sbp-film-frame.is-wide video{aspect-ratio:16/9;width:100%;height:auto}
  .bf-page .sbp-film-frame.is-wide .sbp-play{bottom:58px}
  .bf-page .sbp-film-frame.is-wide .sbp-sound-on{left:12px;right:auto;top:auto;bottom:10px}
  .bf-page .sbp-film-frame.is-wide .sbp-pause{right:12px;top:auto;bottom:10px}
}
@media (max-width:900px){
  .bf-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:16px}
}
@media (max-width:760px){
  .bf-demo{padding-block:36px 44px}
  .bf-stage{margin-inline:-8px;padding:7px 6px 6px;border-radius:14px}
  .bf-svg{border-radius:8px}
  .bf-hud{gap:5px;padding-bottom:7px}
  .bf-axles{display:grid}
  .bf-chip-name{font-size:8.6px}
  .bf-chip-value{font-size:10.5px}
  .bf-gauge{padding:6px 7px}
  .bf-gauge-name,.bf-gauge small{font-size:9px;letter-spacing:.06em}
  .bf-gauge small{letter-spacing:0}
  .bf-gauge b{font-size:15px}
  .bf-panel{gap:10px}
  .bf-ask{font-size:17px}
  .bf-controls{gap:10px;margin-inline:-8px;padding:10px}
  .bf-row{gap:6px}
  .bf-row-name{font-size:10px;letter-spacing:.1em}
  .bf-row-value{font-size:14px}
  .bf-seg{gap:6px}
  .bf-btn{min-height:46px;padding:7px 8px;font-size:13px;gap:6px}
  .bf-btn-art{width:30px;height:12px}
  .bf-formula{padding:10px 12px}
  .bf-formula-eq{font-size:15px}
  .bf-formula-live{font-size:14px}
  .bf-status{font-size:15px;min-height:4.4em}
}
@media (prefers-reduced-motion:reduce){
  .bf-stage[data-weather="wet"] .bf-rain,.bf-stage[data-stress="bad"] .bf-cell[data-level="4"]{animation:none}
  .bf-btn,.bf-cell,.bf-meter-fill{transition:none}
}
