/* Baton remains a complete, in-flow story when a scene cannot mount.
   These rules apply only to the explicit fallback state, so a working scene
   keeps its original layout. SVGs are local, decorative and dependency-free. */

section.scene-fallback .reveal{opacity:1!important;visibility:visible!important;transform:none!important;transition:none!important}
section.scene-fallback .bh-copy,
section.scene-fallback .bh-stats,
section.scene-fallback .dv-head,
section.scene-fallback .dv-block,
section.scene-fallback .dv-step,
section.scene-fallback .tr-cap,
section.scene-fallback .lx-slot,
section.scene-fallback .rc-copy,
section.scene-fallback .rc-step,
section.scene-fallback .rc-card,
section.scene-fallback .rc-fine,
section.scene-fallback .lg-intro,
section.scene-fallback .lg-step{visibility:visible!important}
section.scene-fallback .pin-stage{position:relative!important;top:auto!important;height:auto!important;min-height:0!important;overflow:visible!important}
section.scene-fallback canvas.gl,
section.scene-fallback .dv-tracks,
section.scene-fallback .lb-trail{display:none!important}

/* The baton, and the people and files on either side of it. */
#bhero.scene-fallback{height:auto!important}
#bhero.scene-fallback .bh-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:48px 32px;padding:clamp(120px,15vh,180px) var(--gut) 0}
#bhero.scene-fallback .bh-stage:after{content:"";grid-column:2;grid-row:1;align-self:stretch;min-height:clamp(360px,43vw,640px);background:url("../assets/fallbacks/relay.svg") center/contain no-repeat;pointer-events:none}
#bhero.scene-fallback .bh-scrim,
#bhero.scene-fallback .bh-flows,
#bhero.scene-fallback .bh-bleed,
#bhero.scene-fallback .bh-tl{display:none!important}
#bhero.scene-fallback .bh-copy{position:relative!important;inset:auto!important;grid-column:1;grid-row:1;width:100%;max-width:none;margin:0;padding:0;opacity:1!important;transform:none!important}
#bhero.scene-fallback .bh-title{font-size:clamp(48px,6.7vw,108px);max-width:10ch}
#bhero.scene-fallback .bh-lede{max-width:42ch}
#bhero.scene-fallback .bh-stats{position:relative!important;inset:auto!important;grid-column:1/-1;height:auto!important;min-height:80px;margin-top:12px;opacity:1!important;transform:none!important;background:transparent}
#bhero.scene-fallback .bh-stats ul{max-width:none;padding:22px 0;flex-wrap:wrap;height:auto;row-gap:18px}

/* A legible episode, followed by every device explanation. */
#devices.scene-fallback .dv-pin{height:auto!important}
#devices.scene-fallback .dv-stage{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:center;gap:48px clamp(32px,5vw,80px);padding:clamp(80px,12vh,140px) var(--gut) 0}
#devices.scene-fallback .dv-glow{opacity:1!important}
#devices.scene-fallback .dv-marks{display:none!important}
#devices.scene-fallback .dv-head{position:relative!important;inset:auto!important;grid-column:1;width:auto!important;opacity:1!important;transform:none!important}
#devices.scene-fallback .dv-lede{display:block;max-width:42ch}
#devices.scene-fallback .dv-block{position:relative!important;inset:auto!important;grid-column:2;grid-row:1;width:100%!important;height:auto!important;min-height:0;opacity:1!important;transform:none!important;--intake:1}
#devices.scene-fallback .dv-sync{display:none}
#devices.scene-fallback .dv-lanes{padding:8px 0}
#devices.scene-fallback .dv-lane{min-height:42px;grid-template-columns:minmax(88px,120px) minmax(0,1fr) auto;gap:12px}
#devices.scene-fallback .dv-ln{opacity:1!important}
#devices.scene-fallback .dv-chip{opacity:1!important;transform:none!important}
#devices.scene-fallback .dv-tr{height:24px;position:relative;overflow:hidden;opacity:.75;background:repeating-linear-gradient(90deg,transparent 0 22px,#ffffff12 22px 23px),linear-gradient(transparent 47%,#a5b2ce44 47% 53%,transparent 53%)}
#devices.scene-fallback .dv-tr:after{content:"";position:absolute;inset:3px 0;background:repeating-linear-gradient(90deg,transparent 0 4px,#c9d2e6 4px 6px,transparent 6px 12px,#c9d2e6 12px 13px,transparent 13px 19px);clip-path:polygon(0 40%,8% 20%,16% 34%,23% 2%,31% 39%,40% 28%,46% 10%,53% 38%,62% 16%,70% 30%,79% 4%,87% 28%,100% 18%,100% 82%,87% 72%,79% 96%,70% 70%,62% 84%,53% 62%,46% 90%,40% 72%,31% 61%,23% 98%,16% 66%,8% 80%,0 60%)}
#devices.scene-fallback .dv-lane[data-k="7"] .dv-tr:after{background:repeating-linear-gradient(90deg,var(--orange) 0 18%,transparent 18% 22%);clip-path:none;inset:8px 0}
#devices.scene-fallback .dv-steps{position:relative!important;inset:auto!important;grid-column:1/-1;width:100%!important;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 40px;margin-top:16px}
#devices.scene-fallback .dv-step{grid-area:auto!important;align-self:start;opacity:1!important;transform:none!important;border-top:1px solid var(--line-d);padding-top:22px}
#devices.scene-fallback .dv-step h3{font-size:clamp(26px,2.5vw,36px)}
#devices.scene-fallback .dv-step h3+p{font-size:16px;line-height:1.6}
#devices.scene-fallback .dv-tail{padding-top:64px;padding-bottom:clamp(80px,10vh,120px)}

/* The five tour captions stay readable even if its DOM animation fails. */
#tour.scene-fallback .tr-pin{height:auto!important}
#tour.scene-fallback .tr-stage{display:block;background:radial-gradient(ellipse at 65% 20%,#172039,var(--void) 65%)}
#tour.scene-fallback .tr-layout{height:auto;display:flex;flex-direction:column;align-items:stretch;gap:40px;padding-top:32px;padding-bottom:64px}
#tour.scene-fallback .tr-fit{order:0;width:100%;height:clamp(220px,34vw,460px);flex:none;background:url("../assets/fallbacks/product.svg") center/contain no-repeat}
#tour.scene-fallback .tr-box{display:none!important}
#tour.scene-fallback .tr-glow{display:none}
#tour.scene-fallback .tr-caps{order:1;display:flex;flex-direction:column;align-items:stretch;gap:20px;width:100%}
#tour.scene-fallback .tr-count,
#tour.scene-fallback .tr-steps{display:none}
#tour.scene-fallback .tr-capstack{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 40px;height:auto;width:100%}
#tour.scene-fallback .tr-cap{position:relative!important;inset:auto!important;grid-area:auto;display:block;opacity:1!important;transform:none!important;border-top:1px solid var(--line-d);padding-top:22px}
#tour.scene-fallback .tr-cap .tr-k{margin-bottom:14px}
#tour.scene-fallback .tr-cap h3{font-size:clamp(26px,2.5vw,36px);margin-bottom:14px}
#tour.scene-fallback .tr-cap p:last-child{font-size:16px;line-height:1.6;max-width:42ch}
#tour.scene-fallback .tr-fine{max-width:none;text-align:left;grid-area:auto;font-size:11px}
#tour.scene-fallback .tr-tail{height:clamp(72px,12vh,140px)}

/* The relay track and all three running laps, plus the two proposed laps. */
#laps.scene-fallback .lx-pin{height:auto!important}
#laps.scene-fallback .lx-tags{display:none!important}
#laps.scene-fallback .lx-ui{position:relative!important;inset:auto!important;display:block;padding-top:clamp(64px,9vh,100px);padding-bottom:48px;pointer-events:auto}
#laps.scene-fallback .lx-head:after{content:"";display:block;width:100%;height:clamp(240px,42vw,540px);margin:30px 0 16px;background:url("../assets/fallbacks/track.svg") center/contain no-repeat}
#laps.scene-fallback .lx-slots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;width:100%!important;margin:0!important}
#laps.scene-fallback .lx-slot{grid-area:auto!important;align-self:stretch;opacity:1!important;transform:none!important}
#laps.scene-fallback .lx-intro{grid-column:1/-1!important;padding-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:24px}
#laps.scene-fallback .lx-intro .lede{max-width:54ch}
#laps.scene-fallback .lx-pips{flex:none;margin-top:0}
#laps.scene-fallback .lx-card{background:#fbfaf7;backdrop-filter:none;-webkit-backdrop-filter:none;padding:26px;box-shadow:0 18px 40px -34px #12182940}
#laps.scene-fallback .lx-nextcard{grid-column:1/-1!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:18px 36px;background:transparent;box-shadow:none;border-style:dashed}
#laps.scene-fallback .lx-nextcard .lx-k{grid-column:1/-1}
#laps.scene-fallback .lx-nextcard .lx-close{align-self:center;margin:0}
#laps.scene-fallback .lx-spark{height:64px;background:center/100% 100% no-repeat;pointer-events:none}
#laps.scene-fallback .lx-spark>*{display:none}
#laps.scene-fallback .lx-card[data-slot="1"] .lx-spark{background-image:url("../assets/fallbacks/spark-capture.svg")}
#laps.scene-fallback .lx-card[data-slot="2"] .lx-spark{background-image:url("../assets/fallbacks/spark-labelling.svg")}
#laps.scene-fallback .lx-card[data-slot="3"] .lx-spark{background-image:url("../assets/fallbacks/spark-recapture.svg")}
#laps.scene-fallback .lx-out{height:64px}

/* A coverage map becomes a useful four-step explanation, not an empty pin. */
#recapture.scene-fallback{height:auto!important}
#recapture.scene-fallback .rc-stage{padding:clamp(88px,12vh,140px) var(--gut) clamp(64px,9vh,100px);background:radial-gradient(ellipse at 72% 30%,#1b2642,var(--ink) 65%)}
#recapture.scene-fallback .rc-shade,
#recapture.scene-fallback .rc-flash,
#recapture.scene-fallback .rc-anchors,
#recapture.scene-fallback .rc-bleed{display:none!important}
#recapture.scene-fallback .rc-copy{position:relative!important;inset:auto!important;width:100%!important;max-width:var(--max);margin:0 auto;padding:0;opacity:1!important;transform:none!important}
#recapture.scene-fallback .rc-h{font-size:clamp(36px,4.3vw,68px);max-width:22ch}
#recapture.scene-fallback .rc-copy:after{content:"";display:block;width:100%;height:clamp(200px,35vw,440px);margin:32px 0;background:url("../assets/fallbacks/coverage.svg") center/contain no-repeat}
#recapture.scene-fallback .rc-index{display:none}
#recapture.scene-fallback .rc-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;margin-top:44px}
#recapture.scene-fallback .rc-step{grid-area:auto!important;opacity:1!important;transform:none!important;border-top:1px solid var(--line-d);padding-top:22px}
#recapture.scene-fallback .rc-t{font-size:22px;line-height:1.2;max-width:none}
#recapture.scene-fallback .rc-t em{font-size:16px;line-height:1.6;max-width:none;margin-top:14px}
#recapture.scene-fallback .rc-cards{position:relative!important;inset:auto!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:var(--max);margin:24px auto 0;pointer-events:auto}
#recapture.scene-fallback .rc-card{position:relative!important;inset:auto!important;width:100%!important;display:block!important;opacity:1!important;transform:none!important;min-width:0;padding:22px;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;background:#0e1425}
#recapture.scene-fallback .rc-state,
#recapture.scene-fallback .rc-row-fail,
#recapture.scene-fallback .rc-cred{opacity:1!important;visibility:visible!important;transform:none!important}
#recapture.scene-fallback .rc-row-fail{display:grid!important}
#recapture.scene-fallback .rc-pips{min-height:9px;background:linear-gradient(90deg,#dfe5f2 0 35%,#ffffff14 35% 100%)}
#recapture.scene-fallback .rc-pips[data-kind="ctl"]{background:linear-gradient(90deg,var(--teal) 0 45%,#ffffff14 45% 100%)}
#recapture.scene-fallback .rc-pips[data-kind="re"]{background:linear-gradient(90deg,var(--orange) 0 80%,#ffffff14 80% 100%)}
#recapture.scene-fallback .rc-pips i{display:none}
#recapture.scene-fallback .rc-brief .rc-track{opacity:.7}
#recapture.scene-fallback .rc-fine{position:relative!important;inset:auto!important;max-width:var(--max);margin:24px auto 0;opacity:.8!important;transform:none!important;font-size:11px;line-height:1.6}

/* The ledger already has a thoughtful static layout. Recover it if a pinned
   animation was interrupted partway through setup. */
#ledger.scene-fallback .lg-pin{height:auto!important}
#ledger.scene-fallback .lg-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-areas:"intro fan" "steps fan";grid-template-rows:auto auto;row-gap:48px;align-items:start;padding-top:48px;padding-bottom:64px}
#ledger.scene-fallback .lg-intro{grid-area:intro;opacity:1!important;transform:none!important;align-self:start}
#ledger.scene-fallback .lg-steps{grid-area:steps;display:grid;gap:34px;align-self:start}
#ledger.scene-fallback .lg-step{grid-area:auto!important;opacity:1!important;transform:none!important;pointer-events:auto}
#ledger.scene-fallback .lg-fan{grid-area:fan;align-self:start;align-items:flex-start;perspective:none}
#ledger.scene-fallback .lg-deck{width:100%;max-width:520px;transform:none!important}
#ledger.scene-fallback .pp-front{transform:none!important}
#ledger.scene-fallback .pp-back{transform:none!important}
#ledger.scene-fallback .pp-front.has-hl .pp-row{opacity:1!important;background:none;box-shadow:none}
#ledger.scene-fallback .lg-tl-track i{transform:scaleX(1)}
#ledger.scene-fallback .lg-tl-node{background:var(--orange);border-color:var(--orange)}
#labs.scene-fallback .lb-glyph path{stroke-dashoffset:0;transition:none}
#labs.scene-fallback .lb-cta{background:radial-gradient(ellipse at 82% 48%,#e35b321c,transparent 55%)}

@media(max-width:1000px){
  #devices.scene-fallback .dv-stage{grid-template-columns:1fr}
  #devices.scene-fallback .dv-head{grid-column:1}
  #devices.scene-fallback .dv-block{grid-column:1;grid-row:auto;max-width:760px}
  #devices.scene-fallback .dv-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  #tour.scene-fallback .tr-capstack{grid-template-columns:repeat(2,minmax(0,1fr))}
  #laps.scene-fallback .lx-slots{grid-template-columns:1fr}
  #laps.scene-fallback .lx-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 32px}
  #laps.scene-fallback .lx-card .lx-k,#laps.scene-fallback .lx-card .lx-name,#laps.scene-fallback .lx-card .lx-line{grid-column:1}
  #laps.scene-fallback .lx-time{grid-column:2;grid-row:1/span 3;margin-top:0;border-top:0;border-left:1px solid var(--line);padding:0 0 0 26px}
  #laps.scene-fallback .lx-nextcard .lx-k{grid-column:1/-1}
  #recapture.scene-fallback .rc-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  #bhero.scene-fallback .bh-stage{grid-template-columns:1fr;gap:24px;padding-top:100px}
  #bhero.scene-fallback .bh-copy{grid-column:1;grid-row:1}
  #bhero.scene-fallback .bh-stage:after{grid-column:1;grid-row:2;min-height:0;height:clamp(230px,66vw,400px);margin-top:-8px}
  #bhero.scene-fallback .bh-title{font-size:clamp(44px,12vw,76px);max-width:none}
  #bhero.scene-fallback .bh-stats{margin-top:0;min-height:0}
  #bhero.scene-fallback .bh-stats ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:22px 0}
  #bhero.scene-fallback .bh-stats li{white-space:normal}
  #devices.scene-fallback .dv-stage{gap:32px;padding-top:72px}
  #devices.scene-fallback .dv-title{font-size:clamp(38px,10vw,58px)}
  #devices.scene-fallback .dv-block{box-shadow:0 24px 48px -32px #000}
  #devices.scene-fallback .dv-lane{min-height:40px;grid-template-columns:76px minmax(0,1fr) auto;gap:8px;padding:0 10px}
  #devices.scene-fallback .dv-ln{font-size:9px;letter-spacing:.06em}
  #devices.scene-fallback .dv-steps{grid-template-columns:1fr;gap:28px;margin-top:8px}
  #devices.scene-fallback .dv-step h3+p{font-size:15px;max-width:52ch}
  #devices.scene-fallback .dv-tail{padding-top:44px;padding-bottom:64px}
  #tour.scene-fallback .tr-layout{gap:28px;padding-top:24px;padding-bottom:48px}
  #tour.scene-fallback .tr-fit{height:clamp(170px,44vw,290px)}
  #tour.scene-fallback .tr-capstack{grid-template-columns:1fr;gap:28px}
  #tour.scene-fallback .tr-cap h3{font-size:28px}
  #tour.scene-fallback .tr-cap p:last-child{font-size:15px}
  #laps.scene-fallback .lx-ui{padding-top:48px;padding-bottom:24px}
  #laps.scene-fallback .lx-head:after{height:clamp(180px,52vw,320px);margin:24px 0}
  #laps.scene-fallback .lx-intro{display:block;padding-bottom:4px}
  #laps.scene-fallback .lx-pips{margin-top:18px}
  #laps.scene-fallback .lx-card{display:block;padding:22px}
  #laps.scene-fallback .lx-time{border-left:0;border-top:1px solid var(--line);margin-top:18px;padding:16px 0 0}
  #laps.scene-fallback .lx-nextcard .lx-close{margin-top:22px}
  #laps.scene-fallback .lx-out{height:40px}
  #recapture.scene-fallback .rc-stage{padding-top:72px;padding-bottom:64px}
  #recapture.scene-fallback .rc-h{font-size:clamp(34px,9.4vw,54px);max-width:20ch}
  #recapture.scene-fallback .rc-copy:after{height:clamp(170px,47vw,300px);margin:24px 0}
  #recapture.scene-fallback .rc-steps{grid-template-columns:1fr;gap:28px;margin-top:28px}
  #recapture.scene-fallback .rc-t{font-size:23px}
  #recapture.scene-fallback .rc-t em{font-size:15px;margin-top:10px}
  #recapture.scene-fallback .rc-cards{grid-template-columns:1fr;gap:16px;margin-top:24px}
  #recapture.scene-fallback .rc-card{padding:18px}
  #ledger.scene-fallback .lg-stage{display:flex;flex-direction:column;gap:32px;padding-top:24px;padding-bottom:32px}
  #ledger.scene-fallback .lg-steps{gap:24px}
  #ledger.scene-fallback .lg-tl-track i{transform:scaleY(1)}
}
