/* Following-distance explainer: a side view of a highway. Your rig follows a car past a milepost, its trailer sized for
   the length you pick, above a gauge of seconds that shades the minimum in amber and hatches the extra space a
   slippery road needs. Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles
   only .fd-*. The script sets the stage's data-length, data-speed, data-road, data-need and data-count states and
   slides the milepost. Without script the picture shows a 40-foot rig at 35 mph on a dry road with a 4-second
   minimum. Every SVG label is at least 11px in the 360-wide picture. */
.fd-page{--fd-amber:#ffb400;--fd-go:#31d67b;--fd-ice:#7cc8f5;--fd-red:#ef4444;--fd-console:#151b20}
.fd-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.sbp-page.fd-page .sbp-answer-text{font-size:clamp(22px,2.2vw,30px);line-height:1.2}
.fd-demo{padding-block:64px 72px;background:var(--paper)}
.fd-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}
.fd-head{grid-area:head}
.fd-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)}
.fd-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.fd-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: length, speed tier and minimum gap; script on */
.fd-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.fd-stage.is-js .fd-hud{display:flex}
.fd-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}
.fd-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#e8eef0;transition:background .2s,box-shadow .2s}
.fd-chip span{color:#a9b3b8;font-weight:600}
.fd-chip b{color:#e8eef0;font-weight:800}
.fd-stage[data-speed="55"] .fd-chip-speed i{background:var(--fd-amber);box-shadow:0 0 0 2px rgb(255 180 0/.2)}
.fd-chip-gap i{background:var(--fd-amber);box-shadow:0 0 0 2px rgb(255 180 0/.2),0 0 10px rgb(255 180 0/.7)}
.fd-chip-gap b{color:#ffd166}
.fd-stage[data-road="slippery"] .fd-chip-gap i{background:var(--fd-ice);box-shadow:0 0 0 2px rgb(124 200 245/.2),0 0 10px rgb(124 200 245/.8)}
.fd-stage[data-road="slippery"] .fd-chip-gap b{color:#bfe6ff}

/* scenery and road */
.fd-hills{fill:#1d2a31}
.fd-road-edge{fill:none;stroke:#e8eef0;stroke-width:1.4}
.fd-dash{fill:none;stroke:#ffd166;stroke-width:2;stroke-dasharray:14 12}
.fd-wet{opacity:0;transition:opacity .25s}
.fd-stage[data-road="slippery"] .fd-wet{opacity:1}
.fd-rain path,.fd-rain{fill:none;stroke:#9fd5f7;stroke-width:1.4;stroke-linecap:round}
.fd-glare{fill:none;stroke:#d7f0ff;stroke-width:1.6;stroke-linecap:round;opacity:.75}
.fd-label{fill:#e8eef0;font-size:11px;font-weight:700;letter-spacing:.01em}
.fd-label-mid{text-anchor:middle}
.fd-label-on{fill:#1c2428}
.fd-road-slip{display:none;fill:#bfe6ff}
.fd-stage[data-road="slippery"] .fd-road-dry{display:none}
.fd-stage[data-road="slippery"] .fd-road-slip{display:inline}

/* the milepost */
.fd-post-pole{fill:#9aa4a8}
.fd-post-sign{fill:#17734a;stroke:#ffffff;stroke-width:1.4}
.fd-post-txt,.fd-post-num{fill:#ffffff;font-weight:800;text-anchor:middle}
.fd-post-txt{font-size:11px;letter-spacing:0}
.fd-post-num{font-size:11px}
.fd-stage.is-js .fd-post{transition:transform .65s linear}

/* the vehicles */
.fd-wheel{fill:#0b0d0f;stroke:#7d888c;stroke-width:1.6}
.fd-car-glass,.fd-cab-glass{fill:#bfe6ff;opacity:.8}
.fd-car-lamp{fill:#ff5a4f}
.fd-trailer{stroke:#5e696c;stroke-width:1}
.fd-frame{fill:#2c3438}
.fd-bumper,.fd-stack{fill:#c9d0d2}
.fd-rig{display:none}
.fd-stage[data-length="40"] .fd-rig-40,.fd-stage[data-length="50"] .fd-rig-50,.fd-stage[data-length="60"] .fd-rig-60{display:inline}
.fd-dim{fill:none;stroke:#ffd166;stroke-width:1.4}
.fd-dim-txt{fill:#ffd166;font-size:11.5px;font-weight:800;text-anchor:middle}
.fd-gap-line{fill:none;stroke:#e8eef0;stroke-width:1.4}
.fd-gap-txt{fill:#ffffff;font-size:11px;font-weight:800;text-anchor:middle}

/* the card */
.fd-card-box{fill:#080b0d;fill-opacity:.9;stroke:#586166;stroke-width:1.4}
.fd-card-cap,.fd-card-big,.fd-card-sub{text-anchor:middle}
.fd-card-cap{fill:#c3ccd0;font-size:11px;font-weight:700}
.fd-card-big{fill:#ffffff;font-size:17px;font-weight:800;letter-spacing:.02em}
.fd-card-sub{fill:#d3dade;font-size:11px;font-weight:600}
.fd-stage[data-count="running"] .fd-card-box{stroke:var(--fd-amber)}
.fd-stage[data-count="ok"] .fd-card-box{stroke:var(--fd-go);stroke-width:2}
.fd-stage[data-count="ok"] .fd-card-big{fill:var(--fd-go)}
.fd-stage[data-count="short"] .fd-card-box,.fd-stage[data-count="slip"] .fd-card-box{stroke:var(--fd-red);stroke-width:2}
.fd-stage[data-count="short"] .fd-card-big,.fd-stage[data-count="slip"] .fd-card-big{fill:#fca5a5}

/* the gauge: plain segments, hatched extra space on a slippery road, amber minimum on top */
.fd-seg{fill:#1f272c;stroke:#3a4246;stroke-width:1}
.fd-seg-txt{fill:#e8eef0;font-size:11px;font-weight:800;text-anchor:middle}
.fd-stage[data-road="slippery"] .fd-seg{fill:url(#fd-p-more);stroke:var(--fd-ice)}
.fd-stage[data-need="4"] .fd-seg:nth-child(-n+4),.fd-stage[data-need="5"] .fd-seg:nth-child(-n+5),
.fd-stage[data-need="6"] .fd-seg:nth-child(-n+6),.fd-stage[data-need="7"] .fd-seg:nth-child(-n+7){fill:var(--fd-amber);stroke:#ffd166}
.fd-stage[data-need="4"] .fd-seg-txt:nth-child(-n+4),.fd-stage[data-need="5"] .fd-seg-txt:nth-child(-n+5),
.fd-stage[data-need="6"] .fd-seg-txt:nth-child(-n+6),.fd-stage[data-need="7"] .fd-seg-txt:nth-child(-n+7){fill:#1a1200}
.fd-you-mark{fill:#ffffff}
.fd-you-txt{fill:#ffffff;font-size:11px;font-weight:800}
.fd-key{fill:#c3ccd0;font-size:11px;font-weight:600}
.fd-key-min{fill:var(--fd-amber)}
.fd-key-more{stroke:var(--fd-ice);stroke-width:1}
.fd-over-band{fill:#1f272c;stroke:#3a4246;stroke-width:1;stroke-dasharray:3 2}
.fd-over-txt{fill:#e8eef0;font-size:11px;font-weight:800;text-anchor:middle}
.fd-stage[data-road="slippery"] .fd-over-band{fill:url(#fd-p-more);stroke:var(--fd-ice);stroke-width:1.6;stroke-dasharray:none}
.fd-stage[data-road="slippery"] .fd-over-txt{fill:#ffffff;paint-order:stroke;stroke:#0d2a3d;stroke-width:3px;stroke-linejoin:round}

/* motion, script on: the lane dashes run, faster at highway speed */
.fd-stage.is-js .fd-dash{animation:fd-run .9s linear infinite}
.fd-stage.is-js[data-speed="55"] .fd-dash{animation-duration:.5s}
@keyframes fd-run{to{stroke-dashoffset:26}}

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

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