/* Alcohol-and-BAC-rules explainer: an example BAC gauge with the three CDL alcohol zones, and three standard drinks that
   hold the same alcohol. Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file styles
   only .al-*. The script sets the stage's data-zone (legal, oos, illegal), data-weight and data-flash, moves the needle
   and writes the readout. Without script the picture shows 0.000% and the legal zone. Every SVG text label is at least
   11.5px in the 360-wide viewBox. */
.al-page{--al-go:#31d67b;--al-warn:#fbbf24;--al-red:#ef4444;--al-cool:#7dd3fc;--al-console:#151b20}
.al-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.al-demo{padding-block:64px 72px;background:var(--paper)}
.al-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}
.al-head{grid-area:head}
.al-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)}
.al-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0f1316}
.al-note{margin:8px 4px 2px;color:#c3ccd0;font-size:13px;font-weight:600;line-height:1.4}
.al-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the cards: example BAC and what it means */
.al-card-box{fill:#080b0d;fill-opacity:.9;stroke:#59636a;stroke-width:1;transition:stroke .2s,fill .2s}
.al-cap{fill:#b6c0c5;font-size:11.5px;font-weight:800;letter-spacing:.1em;text-anchor:middle;text-transform:uppercase}
.al-bac{fill:#fff;font-size:24px;font-weight:900;text-anchor:middle;font-variant-numeric:tabular-nums}
.al-sum{fill:#d3dade;font-size:11.5px;font-weight:700;text-anchor:middle}
.al-big{font-size:15px;font-weight:900;letter-spacing:.04em;text-anchor:middle}
.al-sub{fill:#d3dade;font-size:11.5px;font-weight:700;text-anchor:middle}
.al-mode{display:none}
.al-stage[data-zone="legal"] .al-mode-legal,.al-stage[data-zone="oos"] .al-mode-oos,.al-stage[data-zone="illegal"] .al-mode-illegal{display:inline}
.al-mode-legal .al-big{fill:var(--al-go)}
.al-mode-oos .al-big{fill:var(--al-warn)}
.al-mode-illegal .al-big{fill:#fca5a5}
.al-stage[data-zone="legal"] .al-zone-box{stroke:var(--al-go)}
.al-stage[data-zone="oos"] .al-zone-box{stroke:var(--al-warn)}
.al-stage[data-zone="illegal"] .al-zone-box{stroke:var(--al-red)}
.al-stage[data-zone="oos"] .al-bac{fill:#fde68a}
.al-stage[data-zone="illegal"] .al-bac{fill:#fca5a5}

/* the BAC bar: the zone the needle sits in lights up */
.al-seg{opacity:.38;transition:opacity .25s}
.al-seg-legal{fill:var(--al-go)}
.al-seg-oos{fill:var(--al-warn)}
.al-seg-illegal{fill:var(--al-red)}
.al-stage[data-zone="legal"] .al-seg-legal,.al-stage[data-zone="oos"] .al-seg-oos,.al-stage[data-zone="illegal"] .al-seg-illegal{opacity:1}
.al-limit{fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round}
.al-tick{fill:#d3dade;font-size:11.5px;font-weight:800;text-anchor:middle}
.al-tick-end{text-anchor:end}
.al-needle{transform-box:view-box;transition:transform .45s cubic-bezier(.3,1.2,.55,1)}
.al-needle-tip{fill:#fff;stroke:#0b0e10;stroke-width:1}
.al-needle-line{fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;paint-order:stroke}

/* the legend */
.al-dot-legal{fill:var(--al-go)}
.al-dot-oos{fill:var(--al-warn)}
.al-dot-illegal{fill:var(--al-red)}
.al-key{fill:#e8eef0;font-size:11.5px;font-weight:700}
.al-key-red{fill:#fecaca}

/* the drinks */
.al-head-txt{fill:#e8eef0;font-size:12px;font-weight:800;text-anchor:middle}
.al-myth-tag{display:none;fill:var(--al-cool);font-size:12px;font-weight:900;text-anchor:middle}
.al-stage[data-flash="on"] .al-myth-tag{display:inline}
.al-stage[data-flash="on"] .al-head-txt{display:none}
.al-glass{stroke:#e8eef0;stroke-width:1.4;stroke-linejoin:round}
.al-foam{fill:#fffbeb;stroke:#e8eef0;stroke-width:1}
.al-stem{fill:none;stroke:#e8eef0;stroke-width:2;stroke-linecap:round}
.al-badge{fill:#080b0d;stroke:#8f9a9d;stroke-width:1.2;transition:stroke .2s}
.al-count{fill:#fff;font-size:11.5px;font-weight:900;text-anchor:middle}
.al-name{fill:#e8eef0;font-size:12px;font-weight:800;text-anchor:middle}
.al-strength{fill:#b6c0c5;font-size:11.5px;font-weight:700;text-anchor:middle}
.al-eq{fill:#fde68a;font-size:22px;font-weight:900;text-anchor:middle}

/* the myth flash: the readout lights cool blue, and nothing moves */
.al-stage[data-flash="on"] .al-read-box{stroke:var(--al-cool);fill:#0c2230}
.al-stage.is-js[data-flash="on"] .al-read-box{animation:al-flash .3s ease-in-out 3}
@keyframes al-flash{50%{fill:#164e63}}

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

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