/* Aggressive-driving-vs-road-rage explainer: an overhead three-lane highway with your rig in the middle lane and another
   driver's car placed by the scene. Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this
   file styles only .ag-*. The script sets the stage's data-scene (cut, force, tail), data-call (none, aggressive, rage),
   data-judged (none, right, wrong), data-choice (none, yield, hold) and data-report (off, on). Without script the
   picture shows the lane cut-off, called aggressive driving, before any response. Every SVG text label is at least
   11.5px in the 360-wide viewBox. */
.ag-page{--ag-go:#31d67b;--ag-warn:#fbbf24;--ag-red:#ef4444;--ag-console:#151b20}
.ag-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.ag-demo{padding-block:64px 72px;background:var(--paper)}
.ag-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}
.ag-head{grid-area:head}
.ag-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)}
.ag-svg{display:block;width:100%;height:auto;border-radius:10px;background:#10161a}
.ag-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the HUD: scene, your call and the cushion; script on */
.ag-hud{display:none;align-items:center;gap:6px;flex-wrap:wrap;padding:0 2px 10px}
.ag-stage.is-js .ag-hud{display:flex}
.ag-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}
.ag-chip i{flex:none;width:9px;height:9px;border-radius:50%;background:#3a4246;box-shadow:inset 0 0 0 1.5px #586166;transition:background .2s,box-shadow .2s}
.ag-chip span{color:#a9b3b8;font-weight:600}
.ag-chip b{color:#e8eef0;font-weight:800}
.ag-chip-scene i{background:#f87171}
.ag-stage[data-judged="right"] .ag-chip-call i{background:var(--ag-go);box-shadow:0 0 0 2px rgb(49 214 123/.18),0 0 10px rgb(49 214 123/.8)}
.ag-stage[data-judged="right"] .ag-chip-call b{color:var(--ag-go)}
.ag-stage[data-judged="wrong"] .ag-chip-call i{background:var(--ag-red);box-shadow:0 0 0 2px rgb(239 68 68/.2),0 0 10px rgb(239 68 68/.85)}
.ag-stage[data-judged="wrong"] .ag-chip-call b{color:#fca5a5}
.ag-chip-cushion i{background:var(--ag-warn)}
.ag-stage[data-choice="yield"] .ag-chip-cushion i{background:var(--ag-go);box-shadow:0 0 0 2px rgb(49 214 123/.18)}
.ag-stage[data-choice="yield"] .ag-chip-cushion b{color:var(--ag-go)}
.ag-stage[data-choice="hold"] .ag-chip-cushion i{background:var(--ag-red)}
.ag-stage[data-choice="hold"] .ag-chip-cushion b{color:#fca5a5}

/* the road */
.ag-shoulder{fill:#4a4f47}
.ag-edge{fill:none;stroke:#f5f5f4;stroke-width:2}
.ag-lane{fill:none;stroke:#f5f5f4;stroke-opacity:.8;stroke-width:2;stroke-dasharray:14 12}
.ag-travel{fill:none;stroke:#e8eef0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* labels: every label 11.5px or larger */
.ag-part{fill:#e8eef0;font-size:11.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;paint-order:stroke;stroke:#10161a;stroke-width:2.6px;stroke-linejoin:round}
.ag-part-mid{text-anchor:middle}
.ag-part-end{text-anchor:end}

/* your rig: drops back, moves over or gets pushed by the response */
.ag-rig{transform-box:view-box;transition:transform .5s cubic-bezier(.3,1,.4,1)}
.ag-trailer{stroke:#6b767b;stroke-width:1}
.ag-hitch{fill:#2a3133}
.ag-cab{stroke:#0f2f4f;stroke-width:1}
.ag-glass{fill:#0b1a24;fill-opacity:.85}
.ag-rig-txt{fill:#0f172a;font-size:11.5px;font-weight:900;letter-spacing:.08em;text-anchor:middle}
.ag-stage[data-scene="cut"][data-choice="yield"] .ag-rig{transform:translateX(-46px)}
.ag-stage[data-scene="cut"][data-choice="hold"] .ag-rig{transform:translateX(5px)}
.ag-stage[data-scene="force"][data-choice="yield"] .ag-rig{transform:translateX(-58px)}
.ag-stage[data-scene="force"][data-choice="hold"] .ag-rig{transform:translateY(-80px)}
.ag-stage[data-scene="tail"][data-choice="yield"] .ag-rig{transform:translateY(-48px)}

/* the other driver's car: one per scene */
.ag-car{display:none;transform-box:view-box;transition:transform .5s cubic-bezier(.3,1,.4,1)}
.ag-stage[data-scene="cut"] .ag-car-cut,.ag-stage[data-scene="force"] .ag-car-force,.ag-stage[data-scene="tail"] .ag-car-tail{display:inline}
.ag-car-body rect:first-child{stroke:#7f1d1d;stroke-width:1}
.ag-car-force .ag-car-body{transform-box:fill-box;transform-origin:center;transform:rotate(-14deg)}
.ag-stage[data-scene="force"][data-choice="hold"] .ag-car-force{transform:translateY(-64px)}
.ag-stage[data-scene="tail"][data-choice="hold"] .ag-car-tail{transform:translateX(6px)}
.ag-path{fill:none;stroke:#fca5a5;stroke-width:2;stroke-dasharray:4 4;stroke-linecap:round}
.ag-brake-lamp{fill:none;stroke:#fecaca;stroke-width:2;stroke-linecap:round;opacity:0}
.ag-stage[data-choice="hold"] .ag-brake-lamp{opacity:1}
.ag-gesture{fill:none;stroke:#fde68a;stroke-width:2;stroke-linecap:round}

/* eye contact: shown only when you make it a contest */
.ag-stare{display:none;fill:none;stroke:var(--ag-red);stroke-width:2;stroke-dasharray:2 3;stroke-linecap:round}
.ag-stage[data-choice="hold"][data-scene="cut"] .ag-stare-cut,.ag-stage[data-choice="hold"][data-scene="force"] .ag-stare-force,
.ag-stage[data-choice="hold"][data-scene="tail"] .ag-stare-tail{display:inline}

/* the space cushion markers */
.ag-gap{display:none}
.ag-gap-line{fill:none;stroke-width:2.4;stroke-linecap:round}
.ag-ok{stroke:var(--ag-go)}
.ag-bad{stroke:var(--ag-red)}
.ag-gap-txt{font-size:11.5px;font-weight:900;letter-spacing:.05em;text-anchor:middle;paint-order:stroke;stroke:#10161a;stroke-width:3px;stroke-linejoin:round}
.ag-ok-txt{fill:var(--ag-go)}
.ag-bad-txt{fill:#fca5a5}
.ag-stage[data-scene="cut"][data-choice="none"] .ag-gap-cut-none,.ag-stage[data-scene="cut"][data-choice="yield"] .ag-gap-cut-yield,
.ag-stage[data-scene="cut"][data-choice="hold"] .ag-gap-cut-hold,.ag-stage[data-scene="force"][data-choice="none"] .ag-gap-force-none,
.ag-stage[data-scene="force"][data-choice="yield"] .ag-gap-force-yield,.ag-stage[data-scene="force"][data-choice="hold"] .ag-gap-force-hold,
.ag-stage[data-scene="tail"][data-choice="none"] .ag-gap-tail-none,.ag-stage[data-scene="tail"][data-choice="yield"] .ag-gap-tail-yield,
.ag-stage[data-scene="tail"][data-choice="hold"] .ag-gap-tail-hold{display:inline}

/* the two cards */
.ag-card-box{fill:#080b0d;fill-opacity:.92;stroke:#59636a;stroke-width:1;transition:stroke .2s}
.ag-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.ag-fact{display:none;fill:#e8eef0;font-size:12px;font-weight:700}
.ag-stage[data-scene="cut"] .ag-fact-cut,.ag-stage[data-scene="force"] .ag-fact-force,.ag-stage[data-scene="tail"] .ag-fact-tail{display:inline}
.ag-intent-yes{fill:#fca5a5}
.ag-intent-no{fill:#fde68a}
.ag-term{display:none;font-size:12px;font-weight:900;letter-spacing:.02em}
.ag-term-wait{fill:#b6c0c5}
.ag-term-aggr{fill:#fde68a}
.ag-term-rage{fill:#fca5a5}
.ag-stage[data-call="none"] .ag-term-wait,.ag-stage:not([data-call="none"])[data-scene="cut"] .ag-term-aggr,
.ag-stage:not([data-call="none"])[data-scene="tail"] .ag-term-aggr,.ag-stage:not([data-call="none"])[data-scene="force"] .ag-term-rage{display:inline}
.ag-stage[data-judged="right"] .ag-card-left{stroke:var(--ag-go)}
.ag-stage[data-judged="wrong"] .ag-card-left{stroke:var(--ag-red)}
.ag-big{fill:#e8eef0;font-size:15px;font-weight:900;letter-spacing:.04em}
.ag-sub{fill:#d3dade;font-size:12px;font-weight:700}
.ag-out{display:none}
.ag-stage[data-report="off"][data-choice="none"] .ag-out-none,.ag-stage[data-report="off"][data-choice="yield"] .ag-out-yield,
.ag-stage[data-report="off"][data-choice="hold"] .ag-out-hold,.ag-stage[data-report="on"] .ag-out-report{display:inline}
.ag-stage[data-choice="yield"] .ag-card-right{stroke:var(--ag-go)}
.ag-stage[data-choice="hold"] .ag-card-right{stroke:var(--ag-red)}

/* motion, script on: the lane lines stream past */
.ag-stage.is-js .ag-lane{animation:ag-flow .9s linear infinite}
.ag-stage.is-js .ag-path{animation:ag-dash .6s linear infinite}
.ag-stage.is-js .ag-gesture{animation:ag-wave .5s ease-in-out infinite alternate}
@keyframes ag-flow{to{stroke-dashoffset:26}}
@keyframes ag-dash{to{stroke-dashoffset:-8}}
@keyframes ag-wave{to{opacity:.35}}

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

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