/* Before-driving-in-the-mountains explainer: plan the grade, then snub-brake down a 6-mile 7% downgrade. */
.mt-page{--mt-ok:#31d67b;--mt-warn:#ffb400;--mt-hot:#ff5a3c;--mt-air:#6ed2ff;--mt-console:#12181c}
.mt-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.mt-demo{padding-block:64px 72px;background:var(--paper)}
.mt-demo-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-areas:"head head" "stage panel";gap:24px 40px;align-items:start}
.mt-head{grid-area:head}
.mt-stage{grid-area:stage;margin:0;padding:10px;border-radius:16px;background:linear-gradient(170deg,#1d2930,#101519 80%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 1px 0 rgb(255 255 255/.06)}
.mt-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0b1013}
.mt-panel{grid-area:panel;display:grid;gap:14px}

/* lamps above the scene: script on */
.mt-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.mt-stage.is-js .mt-hud{display:flex}
.mt-lamp{display:inline-flex;align-items:center;gap:7px;padding:6px 10px 6px 8px;border-radius:8px;background:#0b0f12;box-shadow:inset 0 0 0 1px rgb(255 255 255/.09);font-size:13px;line-height:1;white-space:nowrap}
.mt-lamp i{flex:none;width:9px;height:9px;border-radius:50%;background:#4a555c;transition:background .2s,box-shadow .2s}
.mt-lamp span{color:#aeb8bf;font-weight:600}
.mt-lamp b{color:#edf1f3;font-weight:800}
.mt-lamp.is-ok i{background:var(--mt-ok);box-shadow:0 0 10px rgb(49 214 123/.75)}
.mt-lamp.is-ok b{color:var(--mt-ok)}
.mt-lamp.is-warn i{background:var(--mt-warn);box-shadow:0 0 10px rgb(255 180 0/.75)}
.mt-lamp.is-warn b{color:var(--mt-warn)}
.mt-lamp.is-bad i{background:var(--mt-hot);box-shadow:0 0 12px rgb(255 90 60/.9);animation:mt-blink .5s steps(2,jump-none) infinite}
.mt-lamp.is-bad b{color:var(--mt-hot)}

/* the scene */
.mt-storm{opacity:0;transition:opacity .6s}
.mt-sun,.mt-cloud{transition:opacity .6s}
.mt-cloud{fill:#fff;opacity:.75}
.mt-snow{fill:#f5f8fa}
.mt-valley{fill:#58806a;opacity:.8}
.mt-stage[data-weather="wet"] .mt-storm{opacity:.82}
.mt-stage[data-weather="wet"] .mt-sun,.mt-stage[data-weather="wet"] .mt-cloud{opacity:0}
.mt-stage[data-weather="wet"] .mt-snow{fill:#cfd8de}
.mt-road-edge,.mt-road,.mt-road-sheen,.mt-center{fill:none;stroke-linejoin:round}
.mt-road-edge{stroke:#141a1e;stroke-width:11.5}
.mt-road{stroke:#3c454b;stroke-width:9}
.mt-road-sheen{stroke:#a9c3d1;stroke-width:3;opacity:0;transform:translateY(1.6px);transition:opacity .6s}
.mt-stage[data-weather="wet"] .mt-road-sheen{opacity:.28}
.mt-center{stroke:#ffd23f;stroke-width:1.1;stroke-dasharray:6 5}
.mt-post{stroke:#8e9aa2;stroke-width:1.6}
.mt-sign-face{fill:#ffc61a;stroke:#1a1c1e;stroke-width:1}
.mt-sign-icon{fill:#1a1c1e;stroke:#1a1c1e;stroke-width:1;stroke-linejoin:round}
.mt-sign-txt{fill:#1a1c1e;font-size:6.8px;font-weight:900;text-anchor:middle;letter-spacing:.02em}

/* escape ramp and grade markers: dim until the route is scouted */
.mt-ramp{opacity:.38;transition:opacity .4s}
.mt-ramp-halo{fill:none;stroke:var(--mt-warn);stroke-width:16;stroke-linecap:round;opacity:0;transition:opacity .4s}
.mt-ramp-road{fill:none;stroke:#59626a;stroke-width:8;stroke-linecap:round}
.mt-ramp-bed{fill:none;stroke:url(#mt-p-gravel);stroke-width:8;stroke-linecap:round}
.mt-ramp-berm{fill:#8c7653}
.mt-ramp-sign{fill:#ffc61a;stroke:#1a1c1e;stroke-width:1}
.mt-ramp-txt{fill:#1a1c1e;font-size:6.6px;font-weight:900;text-anchor:middle;letter-spacing:.03em}
.mt-scout-marks{opacity:0;transition:opacity .4s}
.mt-mark rect{fill:#0d1317;stroke:var(--mt-warn);stroke-width:1}
.mt-mark text{fill:#ffd166;font-size:7px;font-weight:900;text-anchor:middle}
.mt-grade-lbl{fill:#fff4d0;font-size:7.6px;font-weight:900;letter-spacing:.08em;text-anchor:middle;paint-order:stroke;stroke:#1d2a33;stroke-width:2.6px;stroke-linejoin:round}
.mt-end-lbl{fill:#fff4d0;font-size:7px;font-weight:900;letter-spacing:.1em;text-anchor:middle;paint-order:stroke;stroke:#14201a;stroke-width:2.4px;stroke-linejoin:round}
.mt-stage.is-scouted .mt-ramp,.mt-stage.is-static .mt-ramp{opacity:1}
.mt-stage.is-scouted .mt-ramp-halo{opacity:.32}
.mt-stage.is-scouted .mt-scout-marks,.mt-stage.is-static .mt-scout-marks{opacity:1}
.mt-stage.is-scouted .mt-mark rect{filter:drop-shadow(0 0 2.5px rgb(255 180 0/.9))}
.mt-stage[data-weather="wet"]:not(.is-scouted).is-js .mt-ramp{opacity:.14}

/* the tractor-trailer */
.mt-trailer{fill:#eae5d8;stroke:#7b766b;stroke-width:.6}
.mt-ribs{fill:none;stroke:#c4beb0;stroke-width:.5}
.mt-cargo{fill:#8a6a3f;opacity:0;transition:opacity .3s}
.mt-stage[data-load="heavy"] .mt-cargo{opacity:.9}
.mt-stage[data-load="heavy"] .mt-trailer{fill:#d8d1c0}
.mt-rail,.mt-frame{fill:#2a2f33}
.mt-cab{fill:#c8442f;stroke:#7e2618;stroke-width:.6}
.mt-glass{fill:#9fc4d6}
.mt-stack{fill:none;stroke:#b6bec3;stroke-width:1.1;stroke-linecap:round}
.mt-headlamp{fill:#fff2c4}
.mt-taillamp{fill:#7a2a20;transition:fill .15s}
.mt-stage[data-brake="snub"] .mt-taillamp,.mt-stage[data-brake="ride"] .mt-taillamp{fill:#ff3b24}
.mt-wheels circle{fill:#15191c;stroke:#454d52;stroke-width:.7}
.mt-drums circle{fill:#6e7a80;transition:fill .3s}
.mt-stage[data-heat="warm"] .mt-drums circle{fill:#ffb400}
.mt-stage[data-heat="fade"] .mt-drums circle{fill:#ff4a2a}
.mt-glow circle{fill:url(#mt-g-heat)}

/* weather */
.mt-rain,.mt-fog{opacity:0;transition:opacity .6s}
.mt-stage[data-weather="wet"] .mt-rain{opacity:.7;animation:mt-rain .45s linear infinite}
.mt-stage[data-weather="wet"] .mt-fog{opacity:1}

/* scene readouts */
.mt-chip rect{fill:#0d1317;fill-opacity:.86;stroke:rgb(255 255 255/.16);stroke-width:1}
.mt-chip text{fill:#edf2f5;font-size:8.6px;font-weight:800;letter-spacing:.06em;text-anchor:middle}
.mt-banner{opacity:0;transition:opacity .25s}
.mt-banner rect{fill:#0d1317;stroke:var(--mt-ok);stroke-width:1.6}
.mt-banner text{fill:var(--mt-ok);font-size:11px;font-weight:900;letter-spacing:.1em;text-anchor:middle}
.mt-stage[data-banner] .mt-banner{opacity:1}
.mt-stage[data-banner="bad"] .mt-banner rect{fill:#3a0f0a;stroke:var(--mt-hot)}
.mt-stage[data-banner="bad"] .mt-banner text{fill:#ffd2c8}
.mt-stage[data-banner="warn"] .mt-banner rect{stroke:var(--mt-warn)}
.mt-stage[data-banner="warn"] .mt-banner text{fill:var(--mt-warn)}

/* dashboard */
.mt-dash{fill:#0b1013}
.mt-dash-rule{fill:none;stroke:#26323a;stroke-width:1}
.mt-dash-lbl{fill:#93a3ad;font-size:8.4px;font-weight:800;letter-spacing:.09em;text-anchor:middle}
.mt-dash-val{fill:#edf2f5;font-size:19px;font-weight:900;text-anchor:middle;font-variant-numeric:tabular-nums}
.mt-dash-sub{fill:#9fb0ba;font-size:8.4px;font-weight:700;text-anchor:middle}
.mt-target{fill:var(--mt-ok);transition:fill .3s}
.mt-stage[data-load="heavy"] .mt-target,.mt-stage[data-weather="wet"] .mt-target{fill:var(--mt-warn)}
.mt-speed{transition:fill .2s}
.mt-stage[data-speed="ok"] .mt-speed{fill:var(--mt-ok)}
.mt-stage[data-speed="over"] .mt-speed{fill:var(--mt-warn)}
.mt-stage[data-speed="fast"] .mt-speed{fill:var(--mt-hot)}
.mt-scale{fill:#1f292f}
.mt-band{fill:var(--mt-ok);opacity:.75}
.mt-needle path{stroke:#fff;stroke-width:2;stroke-linecap:round}
.mt-heat-txt{font-size:15px;fill:var(--mt-ok);letter-spacing:.06em;transition:fill .3s}
.mt-stage[data-heat="warm"] .mt-heat-txt{fill:var(--mt-warn)}
.mt-stage[data-heat="fade"] .mt-heat-txt{fill:var(--mt-hot)}
.mt-fade-tick{stroke:#ff8a75;stroke-width:1.4;stroke-dasharray:2 1.5}
.mt-fade-lbl{fill:#ff8a75}
.mt-cool-lbl{text-anchor:start;fill:#6fdca0}

/* controls: one dark console, two numbered stages */
.mt-ask{margin:0;color:var(--ink);font-size:20px;line-height:1.25}
.mt-ask b{font-weight:800}
.mt-ask[hidden],.mt-controls[hidden],.mt-tools [hidden]{display:none}
.mt-controls{display:grid;gap:14px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#1f272c,var(--mt-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e9e7e1}
.mt-group{display:grid;gap:8px;margin:0;padding:0;border:0}
.mt-group-name{display:flex;align-items:center;gap:8px;margin:0;color:#a7afb6;font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.mt-num{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--sbp-amber,#ffb400);color:#141b20;font-size:12px;letter-spacing:0}
.mt-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.mt-opt,.mt-scout,.mt-go,.mt-snub,.mt-ride{position:relative;display:grid;align-content:center;gap:3px;min-width:0;min-height:56px;padding:9px 11px;border:0;border-radius:10px;background:linear-gradient(180deg,#2b3439,#1b2125);box-shadow:inset 0 1px 0 rgb(255 255 255/.1),0 3px 0 #090c0e,0 8px 16px -10px rgb(0 0 0/.7);color:#fff;font:inherit;font-size:15px;font-weight:800;line-height:1.15;text-align:left;cursor:pointer;transition:transform .08s,box-shadow .12s,background .12s,opacity .2s}
.mt-opt small,.mt-scout small,.mt-go small,.mt-snub small,.mt-ride small{display:block;color:#a7afb6;font-size:12px;font-weight:600;line-height:1.2}
.mt-opt:hover,.mt-scout:hover,.mt-go:hover,.mt-snub:hover,.mt-ride:hover{background:linear-gradient(180deg,#323c42,#1f262a)}
.mt-opt:active,.mt-scout:active,.mt-go:active,.mt-snub:active,.mt-ride:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #090c0e}
.mt-opt[aria-pressed="true"],.mt-scout[aria-pressed="true"]{transform:translateY(2px);background:linear-gradient(180deg,#3b464c,#262e33);box-shadow:inset 0 0 0 2px var(--sbp-amber,#ffb400),0 1px 0 #090c0e}
.mt-opt[aria-pressed="true"] small,.mt-scout[aria-pressed="true"] small{color:#e9e7e1}
.mt-scout{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
.mt-scout-icon{width:30px;height:30px;fill:none;stroke:#c9d2d8;stroke-width:2;stroke-linejoin:round}
.mt-scout-route{stroke-dasharray:3 2.5;stroke:#7f8b92}
.mt-scout-pin{fill:#7f8b92;stroke:none}
.mt-scout[aria-pressed="true"] .mt-scout-route{stroke:var(--sbp-amber,#ffb400)}
.mt-scout[aria-pressed="true"] .mt-scout-pin{fill:var(--sbp-amber,#ffb400)}
.mt-go{background:linear-gradient(180deg,#2f7d58,#1d5a3e);box-shadow:inset 0 1px 0 rgb(255 255 255/.18),0 3px 0 #0b2619,0 8px 16px -10px rgb(0 0 0/.7)}
.mt-go:hover{background:linear-gradient(180deg,#358a62,#206345)}
.mt-go small{color:#cfe9da}
.mt-brakes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.mt-snub{overflow:hidden}
.mt-snub::before,.mt-ride::before{content:"";position:absolute;left:11px;right:11px;top:5px;height:3px;border-radius:2px}
.mt-snub::before{background:var(--mt-ok)}
.mt-ride::before{background:var(--mt-hot)}
.mt-snub-bar{position:absolute;left:0;bottom:0;width:100%;height:4px;background:var(--mt-ok);transform:scaleX(0);transform-origin:left}
.mt-snub[data-active] .mt-snub-bar{animation:mt-snub 3s linear forwards}
.mt-snub[data-active]{box-shadow:inset 0 0 0 2px var(--mt-ok),0 1px 0 #090c0e;transform:translateY(2px)}
.mt-ride[aria-pressed="true"]{transform:translateY(2px);background:linear-gradient(180deg,#45231d,#2a1714);box-shadow:inset 0 0 0 2px var(--mt-hot),0 1px 0 #090c0e}
.mt-ride[aria-pressed="true"] small{color:#ffd2c8}
.mt-opt:disabled,.mt-scout:disabled,.mt-go:disabled,.mt-snub:disabled,.mt-ride:disabled{opacity:.42;cursor:default;transform:none}
.mt-go:disabled{display:none}
.mt-opt:focus-visible,.mt-scout:focus-visible,.mt-go:focus-visible,.mt-snub:focus-visible,.mt-ride:focus-visible,.mt-reset:focus-visible{outline:3px solid var(--sbp-amber,#ffb400);outline-offset:3px}
.mt-status{display:block;min-height:5.9em;padding:12px 14px 12px 16px;border-left:5px solid #9aa7ac;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}
.mt-status[data-tone="good"]{border-left-color:#1f9e83}
.mt-status[data-tone="warn"]{border-left-color:#d99a00}
.mt-status[data-tone="bad"]{border-left-color:#e2603f}
.mt-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.mt-reset{min-height:44px;border:1px solid var(--line);background:transparent;border-radius:999px;padding:10px 16px;font:inherit;font-size:15px;font-weight:700;color:var(--ink);cursor:pointer}

@keyframes mt-rain{to{transform:translate(-8px,24px)}}
@keyframes mt-snub{to{transform:scaleX(1)}}
@keyframes mt-blink{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){
  .mt-stage[data-weather="wet"] .mt-rain,.mt-lamp.is-bad i{animation:none}
}

@media (min-width:761px){
  .mt-page .sbp-film-frame.is-wide{aspect-ratio:auto;padding-bottom:58px;background:#0b0d0f}
  .mt-page .sbp-film-frame.is-wide video{aspect-ratio:16/9;width:100%;height:auto}
  .mt-page .sbp-film-frame.is-wide .sbp-play{bottom:58px}
  .mt-page .sbp-film-frame.is-wide .sbp-sound-on{left:12px;right:auto;top:auto;bottom:10px}
  .mt-page .sbp-film-frame.is-wide .sbp-pause{right:12px;top:auto;bottom:10px}
}
@media (max-width:900px){
  .mt-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:16px}
}
@media (max-width:760px){
  .mt-demo{padding-block:36px 44px}
  .mt-stage{margin-inline:-8px;padding:8px 6px 6px;border-radius:14px}
  .mt-svg{border-radius:8px}
  .mt-hud{gap:5px;padding:0 0 8px;flex-wrap:nowrap}
  .mt-lamp{padding:5px 7px 5px 6px;font-size:11.5px;gap:5px}
  .mt-lamp i{width:8px;height:8px}
  .mt-panel{gap:10px}
  .mt-ask{font-size:18px}
  .mt-controls{gap:12px;margin-inline:-8px;padding:12px 10px}
  .mt-opt,.mt-scout,.mt-go,.mt-snub,.mt-ride{min-height:52px;padding:8px 9px;font-size:14.5px}
  .mt-opt small,.mt-scout small,.mt-go small,.mt-snub small,.mt-ride small{font-size:11.5px}
  .mt-status{min-height:7.4em;padding:10px 12px;font-size:15px}
}
