/* Minimum-tread-depth explainer: a tire cross-section on an inspection bay with a brass and steel tread depth gauge,
   above a top view of the rig. Hero, film, course offer and return banner reuse spring-brakes.css (.sbp-*); this file
   styles only .td-*. The stage's data attributes drive the picture: data-groove moves the gauge over Groove 1, 2 or 3,
   data-depth (1 to 8, in 32nds of an inch, 7 user units each) sets how far the gauge body sits above the groove floor,
   data-pos lights the tire position and moves the limit line, data-defect shows a defect, data-verdict colors the
   verdict. The script rewrites the tread profile path. Without script the picture shows Groove 3 at 3/32 inch on a front
   steer tire: out of service. */
.td-page{--td-amber:var(--sbp-amber,#ffb400);--td-red:#ef4444;--td-ok:#31d67b;--td-console:#151b20}
.td-page .sbp-hero-grid.is-no-film{grid-template-columns:minmax(0,1fr)}
.td-demo{padding-block:64px 72px;background:var(--paper)}
.td-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}
.td-head{grid-area:head}
.td-stage{grid-area:stage;margin:0;padding:10px;border-radius:16px;background:linear-gradient(170deg,#2a2119,#0d0b09 80%);box-shadow:0 30px 60px -34px rgb(0 0 0/.75),inset 0 1px 0 rgb(255 255 255/.06)}
.td-svg{display:block;width:100%;height:auto;border-radius:10px;background:#0d0a08}
.td-panel{grid-area:panel;display:grid;gap:14px;min-width:0}

/* the bay and the tire section */
.td-wall{fill:none;stroke:#ffdcaa;stroke-opacity:.05;stroke-width:1}
.td-tread-back{stroke:none}
.td-tread-back-1{fill:#0b0908}
.td-tread-back-2{fill:#14110f}
.td-tread-back-3{fill:#1d1916}
.td-tread-face{stroke:none}
.td-tread-edge{fill:none;stroke:#f0b46a;stroke-opacity:.5;stroke-width:1.1;stroke-linejoin:round}
.td-sipes{fill:none;stroke:#0c0a09;stroke-width:1.4;stroke-linecap:round}
.td-belts{fill:none;stroke:#9aa4a8;stroke-width:1.5;stroke-dasharray:3 1.6;opacity:.55}
.td-ply{fill:none;stroke:#b89462;stroke-width:1.2;stroke-dasharray:2 2;opacity:.55}
.td-liner{fill:#0f0d0c}
.td-rim-light{fill:none;stroke:#ffcf8a;stroke-width:3;opacity:.25}
.td-gnum circle{fill:#0f0d0c;stroke:#6f645b;stroke-width:1}
.td-gnum text{fill:#d9cfc4;font-size:7px;font-weight:900;text-anchor:middle}
.td-gnum.is-pass circle{fill:#0f3a24;stroke:var(--td-ok)}
.td-gnum.is-low circle{fill:#4a1111;stroke:var(--td-red)}
.td-stage[data-groove="1"] [data-td-gnum="1"] circle,.td-stage[data-groove="2"] [data-td-gnum="2"] circle,.td-stage[data-groove="3"] [data-td-gnum="3"] circle{stroke:var(--td-amber);stroke-width:1.8}

/* the limit line: rib tops must stay above it (4/32 inch front and bus, 2/32 inch drive and trailer) */
.td-limit-line{fill:none;stroke:var(--td-amber);stroke-width:1.4;stroke-dasharray:5 3}
.td-limit-lbl{fill:#ffd27a;font-size:7px;font-weight:900;letter-spacing:.06em;text-anchor:end;paint-order:stroke;stroke:#140f0b;stroke-width:2.6px;stroke-linejoin:round}
.td-limit-2,.td-min-2,.td-name-rear,.td-name-bus{display:none}
.td-stage[data-pos="rear"] .td-limit{transform:translateY(14px)}
.td-stage[data-pos="rear"] .td-limit-4,.td-stage[data-pos="rear"] .td-min-4,.td-stage[data-pos="rear"] .td-name-front,.td-stage[data-pos="bus"] .td-name-front{display:none}
.td-stage[data-pos="rear"] .td-limit-2,.td-stage[data-pos="rear"] .td-min-2,.td-stage[data-pos="rear"] .td-name-rear,.td-stage[data-pos="bus"] .td-name-bus{display:inline}

/* the gauge: X picks the groove, the body rides on the ribs, the plunger always reaches the groove floor */
.td-stage[data-groove="1"] .td-gauge{transform:translateX(-75px)}
.td-stage[data-groove="3"] .td-gauge{transform:translateX(75px)}
.td-stage[data-depth="1"] .td-body{transform:translateY(-7px)}
.td-stage[data-depth="2"] .td-body{transform:translateY(-14px)}
.td-stage[data-depth="3"] .td-body{transform:translateY(-21px)}
.td-stage[data-depth="4"] .td-body{transform:translateY(-28px)}
.td-stage[data-depth="5"] .td-body{transform:translateY(-35px)}
.td-stage[data-depth="6"] .td-body{transform:translateY(-42px)}
.td-stage[data-depth="7"] .td-body{transform:translateY(-49px)}
.td-stage[data-depth="8"] .td-body{transform:translateY(-56px)}
.td-stage.is-js .td-gauge{transition:transform .38s cubic-bezier(.45,0,.3,1) .08s}
.td-stage.is-js .td-body{transition:transform .26s cubic-bezier(.3,1.3,.55,1)}
.td-stage.is-hop-a .td-hop{animation:td-hop-a .62s ease-out}
.td-stage.is-hop-b .td-hop{animation:td-hop-b .62s ease-out}
@keyframes td-hop-a{0%{transform:none}22%{transform:translateY(-26px)}68%{transform:translateY(-26px)}86%{transform:translateY(1.5px)}100%{transform:none}}
@keyframes td-hop-b{0%{transform:none}22%{transform:translateY(-26px)}68%{transform:translateY(-26px)}86%{transform:translateY(1.5px)}100%{transform:none}}
.td-bore{fill:#0c0a08}
.td-knob{fill:url(#td-g-steel);stroke:#2b3134;stroke-width:.8}
.td-rod{fill:url(#td-g-steel)}
.td-index{fill:#e11d48}
.td-pin{fill:url(#td-g-steel);stroke:#2b3134;stroke-width:.4}
.td-barrel{fill:url(#td-g-brass);stroke:#5a3d0c;stroke-width:.8}
.td-collar,.td-shoe{fill:url(#td-g-steel);stroke:#2b3134;stroke-width:.7}
.td-ticks{fill:none;stroke:#2a1c05;stroke-width:1.2}
.td-ticks-minor{fill:none;stroke:#2a1c05;stroke-width:.8}
.td-tick-num{fill:#2a1c05;font-size:6px;font-weight:900}
.td-gauge-unit{fill:#3b2806;font-size:5px;font-weight:900;letter-spacing:.04em;text-anchor:middle}

/* plates and stamp */
.td-plate rect,.td-stamp rect{fill:#120f0c;stroke:#6d5c48;stroke-width:.8}
.td-plate-lbl{fill:#bfae98;font-size:6.4px;font-weight:800;letter-spacing:.1em}
.td-plate-val{fill:#fff;font-size:18px;font-weight:900}
.td-plate-sub{fill:#ffd27a;font-size:6.6px;font-weight:800;letter-spacing:.06em}
.td-stamp-txt{font-size:6.8px;font-weight:900;letter-spacing:.05em;text-anchor:middle;display:none}
.td-stamp-oos{fill:#fca5a5}
.td-stamp-pass{fill:#86efac}
.td-stamp-wait{fill:#ffd27a}
.td-stage[data-verdict="oos"] .td-stamp rect{stroke:var(--td-red);fill:#2a0b0b}
.td-stage[data-verdict="pass"] .td-stamp rect{stroke:var(--td-ok);fill:#0b2416}
.td-stage[data-verdict="wait"] .td-stamp rect{stroke:var(--td-amber)}
.td-stage[data-verdict="oos"] .td-stamp-oos,.td-stage[data-verdict="pass"] .td-stamp-pass,.td-stage[data-verdict="wait"] .td-stamp-wait{display:inline}

/* defect overlays on the section */
.td-recap,.td-mix,.td-recap-mark,.td-touch,.td-call{display:none}
.td-seam{fill:none;stroke:#e8d3ae;stroke-width:1.3;stroke-dasharray:4 2}
.td-seam-lbl,.td-fabric-lbl{fill:#f2dcb5;font-size:6.4px;font-weight:900;letter-spacing:.06em;paint-order:stroke;stroke:#140f0b;stroke-width:2.4px;stroke-linejoin:round}
.td-seam-lbl{text-anchor:end}
.td-fabric{stroke:#f2dcb5;stroke-width:.8}
.td-stage[data-defect="retread"] .td-recap{display:inline}

/* the rig from above */
.td-yard{stroke:#ffffff;stroke-opacity:.1;stroke-width:1}
.td-rig-bus{display:none}
.td-stage[data-pos="bus"] .td-rig-bus{display:inline}
.td-stage[data-pos="bus"] .td-rig-truck{display:none}
.td-cab,.td-busbody{fill:#3d4a52;stroke:#0b0e10;stroke-width:1}
.td-trailer{fill:#2a3136;stroke:#0b0e10;stroke-width:1}
.td-frame{fill:#20272b}
.td-fifth{fill:#4b555b;stroke:#11161a;stroke-width:1}
.td-glass{fill:#7fb8d6;opacity:.75}
.td-bus-win{fill:none;stroke:#7fb8d6;stroke-width:2;stroke-dasharray:14 3;opacity:.6}
.td-axle{fill:none;stroke:#59646a;stroke-width:2}
.td-tire{fill:#0a0c0d;stroke:#4c565b;stroke-width:.8}
.td-ax-lbl{fill:#a9b3b8;font-size:6.8px;font-weight:800;letter-spacing:.06em;text-anchor:middle}
.td-lbl-bus{text-anchor:start}
.td-ring{fill:none;stroke:var(--td-amber);stroke-width:1.4;stroke-dasharray:3 2;opacity:0}
.td-stage[data-pos="front"] .td-ring-front,.td-stage[data-pos="rear"] .td-ring-rear,.td-stage[data-pos="bus"] .td-ring-bus{opacity:1}
.td-stage[data-pos="front"] .td-ax-front .td-tire,.td-stage[data-pos="rear"] .td-ax-drive .td-tire,.td-stage[data-pos="rear"] .td-ax-trailer .td-tire,.td-stage[data-pos="bus"] .td-ax-busfront .td-tire{fill:#3a2a06;stroke:var(--td-amber);stroke-width:1.2}
.td-stage[data-pos="front"] .td-lbl-front,.td-stage[data-pos="rear"] .td-lbl-rear,.td-stage[data-pos="bus"] .td-lbl-bus{fill:#ffd27a}
.td-mix-lbl{fill:#fff;font-size:5.4px;font-weight:900;text-anchor:middle;paint-order:stroke;stroke:#000;stroke-width:1.4px}
.td-recap-mark rect{fill:none;stroke:#f2dcb5;stroke-width:1.2;stroke-dasharray:2 1.4}
.td-touch ellipse{fill:var(--td-red);opacity:.9}
.td-stage[data-defect="duals"] .td-ax-d1 .td-tire,.td-stage[data-defect="duals"] .td-ax-busrear .td-tire{stroke:var(--td-red);stroke-width:1.5}
.td-touch path{fill:none;stroke:#fff1f1;stroke-width:1.6}
.td-stage.is-js[data-defect="duals"] .td-touch{animation:td-pulse 1s ease-in-out infinite}
@keyframes td-pulse{50%{opacity:.45}}
.td-call{font-size:7px;font-weight:900;letter-spacing:.08em;text-anchor:middle}
.td-call-none{fill:#8f9ba1}
.td-call-duals,.td-call-mixed,.td-call-retread{fill:#fca5a5}
.td-stage[data-defect="none"] .td-call-none,.td-stage[data-defect="duals"] .td-call-duals,.td-stage[data-defect="mixed"] .td-call-mixed,.td-stage[data-defect="retread"] .td-call-retread,.td-stage[data-defect="duals"] .td-touch{display:inline}
.td-stage[data-defect="mixed"][data-pos="front"] .td-ax-front .td-mix,.td-stage[data-defect="mixed"][data-pos="rear"] .td-ax-d1 .td-mix,.td-stage[data-defect="mixed"][data-pos="bus"] .td-ax-busfront .td-mix{display:inline}
.td-stage[data-defect="retread"][data-pos="front"] .td-ax-front .td-recap-mark,.td-stage[data-defect="retread"][data-pos="rear"] .td-ax-d1 .td-recap-mark,.td-stage[data-defect="retread"][data-pos="bus"] .td-ax-busfront .td-recap-mark{display:inline}

/* the verdict badge: always shown, colored by the stage's verdict */
.td-verdict{display:flex;align-items:center;gap:12px;margin:0;padding:12px 14px;border-radius:12px;background:#2a0b0b;box-shadow:inset 0 0 0 2px var(--td-red);color:#fff}
.td-verdict-dot{flex:none;width:14px;height:14px;border-radius:50%;background:var(--td-red);box-shadow:0 0 0 4px rgb(239 68 68/.22)}
.td-verdict-words{display:grid;gap:2px;min-width:0}
.td-verdict-tag{font-family:var(--cdl-display);font-size:24px;font-weight:700;letter-spacing:.02em;line-height:1;text-transform:uppercase}
.td-verdict-sub{color:#f3e4e4;font-size:15px;font-weight:600;line-height:1.35}
.td-stage[data-verdict="pass"]~.td-panel .td-verdict{background:#0b2416;box-shadow:inset 0 0 0 2px var(--td-ok)}
.td-stage[data-verdict="pass"]~.td-panel .td-verdict-dot{background:var(--td-ok);box-shadow:0 0 0 4px rgb(49 214 123/.22)}
.td-stage[data-verdict="pass"]~.td-panel .td-verdict-sub{color:#dcf5e6}
.td-stage[data-verdict="wait"]~.td-panel .td-verdict{background:#241c08;box-shadow:inset 0 0 0 2px var(--td-amber)}
.td-stage[data-verdict="wait"]~.td-panel .td-verdict-dot{background:var(--td-amber);box-shadow:0 0 0 4px rgb(255 180 0/.22)}
.td-stage[data-verdict="wait"]~.td-panel .td-verdict-sub{color:#f6ecd2}

/* controls: one dark console; every action button is the same dark key with white text and an amber ring when on */
.td-ask{margin:0;color:var(--ink);font-size:20px;line-height:1.25}
.td-ask[hidden],.td-controls[hidden]{display:none}
.td-ask b{font-weight:800}
.td-controls{display:grid;gap:14px;padding:14px;border-radius:16px;background:linear-gradient(180deg,#232b31,var(--td-console));box-shadow:0 18px 40px -28px rgb(0 0 0/.8),inset 0 1px 0 rgb(255 255 255/.07);color:#e8eef0}
.td-group{display:grid;gap:8px;min-width:0}
.td-label{margin:0;color:#a9b3b8;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.td-row{display:grid;gap:8px}
.td-row-pos{grid-template-columns:minmax(0,1fr)}
.td-row-groove{grid-template-columns:repeat(3,minmax(0,1fr))}
.td-row-pos .td-btn{min-height:50px;padding-right:26px}
.td-row-pos .td-name{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 12px;flex:1}
.td-row-defect{grid-template-columns:repeat(2,minmax(0,1fr))}
.td-btn{position:relative;display:flex;align-items:center;gap:10px;min-width:0;min-height:58px;padding:9px 11px;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:15px;font-weight:700;line-height:1.2;text-align:left;cursor:pointer;transition:transform .08s,box-shadow .12s}
.td-btn:hover{box-shadow:inset 0 0 0 1px rgb(255 255 255/.28),inset 0 1px 0 rgb(255 255 255/.1),0 3px 0 #06090b}
.td-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 1px 0 #06090b}
.td-btn[aria-pressed="true"]{transform:translateY(2px);box-shadow:inset 0 0 0 2px var(--td-amber),0 1px 0 #06090b}
.td-btn[aria-pressed="true"]::after{content:"";position:absolute;top:8px;right:8px;width:7px;height:7px;border-radius:50%;background:var(--td-amber);box-shadow:0 0 8px rgb(255 180 0/.8)}
.td-btn:focus-visible{outline:3px solid var(--td-amber);outline-offset:3px}
.td-btn-groove{flex-direction:column;align-items:flex-start;gap:6px}
.td-btn-reset{justify-self:start;min-height:48px;padding-inline:12px 16px}
.td-name{display:grid;gap:3px;min-width:0;overflow-wrap:break-word}
.td-name small{color:#a9b3b8;font-size:13px;font-weight:600}
.td-nw{white-space:nowrap}
.td-icon{flex:none;width:40px;height:28px}
.td-icon-reset{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.td-ic-body{fill:#4a555b}
.td-ic-win{fill:none;stroke:#7fb8d6;stroke-width:1.6;stroke-dasharray:4 1.5}
.td-ic-tire{fill:#0b0e10;stroke:#8d999e;stroke-width:1}
.td-ic-hot{fill:var(--td-amber);stroke:#ffe2a0}
.td-ic-tread{fill:#3a3532;stroke:#8d817a;stroke-width:1}
.td-ic-pin{fill:none;stroke:#e2b95a;stroke-width:2.4;stroke-linecap:round}
.td-btn[aria-pressed="true"] .td-ic-pin{stroke:var(--td-amber)}
.td-ic-ok{fill:none;stroke:var(--td-ok);stroke-width:2}
.td-ic-check{fill:none;stroke:var(--td-ok);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.td-ic-spark{fill:none;stroke:var(--td-red);stroke-width:2.4;stroke-linecap:round}
.td-ic-radial{fill:#2f6fd6}
.td-ic-bias{fill:#c2410c}
.td-ic-cord{fill:none;stroke:#fff;stroke-width:.9;opacity:.8}
.td-ic-seam{fill:none;stroke:#f2dcb5;stroke-width:1.4;stroke-dasharray:3 1.5}
.td-ic-fab{fill:#c9a66b}

/* the depth slider: wears the groove the gauge sits in */
.td-slide-label{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.td-depth-out{color:#fff;font-size:20px;font-weight:900;letter-spacing:0;text-transform:none}
.td-range{width:100%;height:36px;margin:0;background:transparent;cursor:pointer;-webkit-appearance:none;appearance:none}
.td-range:focus-visible{outline:3px solid var(--td-amber);outline-offset:3px;border-radius:8px}
.td-range::-webkit-slider-runnable-track{height:10px;border-radius:999px;background:linear-gradient(90deg,#7f1d1d 0 42.9%,#14532d 42.9%);box-shadow:inset 0 0 0 1px rgb(255 255 255/.12)}
.td-range::-moz-range-track{height:10px;border-radius:999px;background:linear-gradient(90deg,#7f1d1d 0 42.9%,#14532d 42.9%);box-shadow:inset 0 0 0 1px rgb(255 255 255/.12)}
.td-stage[data-pos="rear"]~.td-panel .td-range::-webkit-slider-runnable-track{background:linear-gradient(90deg,#7f1d1d 0 14.3%,#14532d 14.3%)}
.td-stage[data-pos="rear"]~.td-panel .td-range::-moz-range-track{background:linear-gradient(90deg,#7f1d1d 0 14.3%,#14532d 14.3%)}
.td-range::-webkit-slider-thumb{-webkit-appearance:none;width:28px;height:28px;margin-top:-9px;border:2px solid #5a3d0c;border-radius:50%;background:radial-gradient(circle at 35% 32%,#fff0b8,#e2b95a 55%,#8a6216);box-shadow:0 3px 8px rgb(0 0 0/.6)}
.td-range::-moz-range-thumb{width:24px;height:24px;border:2px solid #5a3d0c;border-radius:50%;background:radial-gradient(circle at 35% 32%,#fff0b8,#e2b95a 55%,#8a6216);box-shadow:0 3px 8px rgb(0 0 0/.6)}
.td-scale{display:flex;justify-content:space-between;padding-inline:9px;color:#8f9ba1;font-size:13px;font-weight:700}
.td-scale span{width:12px;text-align:center}
.td-scale .is-limit{color:#8f9ba1}
.td-stage[data-pos="front"]~.td-panel .td-lim-4,.td-stage[data-pos="bus"]~.td-panel .td-lim-4,.td-stage[data-pos="rear"]~.td-panel .td-lim-2{color:#ffd27a}

.td-status{display:block;min-height:7.3em;padding:12px 14px 12px 16px;border-left:5px solid #8f9ba1;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}
.td-stage[data-verdict="oos"]~.td-panel .td-status{border-left-color:var(--td-red)}
.td-stage[data-verdict="pass"]~.td-panel .td-status{border-left-color:var(--td-ok)}
.td-stage[data-verdict="wait"]~.td-panel .td-status{border-left-color:var(--td-amber)}
.td-text{margin:0;max-width:40em;color:var(--ink);font-size:17px;line-height:1.6}

@media (min-width:761px){
  .td-page .sbp-film-frame.is-wide{aspect-ratio:auto;padding-bottom:58px;background:#0b0d0f}
  .td-page .sbp-film-frame.is-wide video{aspect-ratio:16/9;width:100%;height:auto}
  .td-page .sbp-film-frame.is-wide .sbp-play{bottom:58px}
  .td-page .sbp-film-frame.is-wide .sbp-sound-on{left:12px;right:auto;top:auto;bottom:10px}
  .td-page .sbp-film-frame.is-wide .sbp-pause{right:12px;top:auto;bottom:10px}
}
@media (min-width:901px){
  .td-stage{position:sticky;top:18px}
}
@media (max-width:900px){
  .td-demo-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "panel";gap:16px}
}
@media (max-width:760px){
  .td-demo{padding-block:36px 44px}
  .td-stage{margin-inline:-8px;padding:8px 6px 6px;border-radius:14px}
  .td-svg{border-radius:8px}
  .td-panel{gap:10px}
  .td-ask{font-size:18px}
  .td-verdict{padding:10px 12px}
  .td-verdict-tag{font-size:21px}
  .td-verdict-sub{font-size:14px}
  .td-controls{gap:12px;margin-inline:-8px;padding:12px 10px}
  .td-row{gap:6px}
  .td-row-pos .td-btn{min-height:48px}
  .td-btn{min-height:54px;padding:8px 9px;gap:8px;font-size:14.5px}
  .td-btn-groove{padding-inline:8px}
  .td-icon{width:34px;height:24px}
  .td-icon-reset{width:18px;height:18px}
  .td-name small{font-size:12px}
  .td-status{min-height:8.5em;padding:10px 12px;font-size:15px}
  .td-text{font-size:16px}
  .td-limit-lbl,.td-call{font-size:8.6px;letter-spacing:.03em}
  .td-plate-lbl,.td-plate-sub{font-size:7.6px;letter-spacing:.04em}
  .td-stamp-txt{font-size:7.8px;letter-spacing:.03em}
  .td-ax-lbl{font-size:8.4px;letter-spacing:.03em}
  .td-gnum text{font-size:8.5px}
}
@media (prefers-reduced-motion:reduce){
  .td-page .td-demo *{transition:none!important;animation:none!important}
}
