#devices{--dv-bg:#121829;--dv-l:max(var(--gut),calc((100vw - var(--max))/2 + var(--gut)));--dv-r:max(calc(var(--gut) + 30px),calc((100vw - var(--max))/2 + var(--gut)));--dv-nat:#dfe5f2;--dv-est:#3fb8a6;--dv-ver:#ff7a4d;
  background:var(--ink)}
#devices .dv-pin{position:relative;height:280vh}
#devices .dv-stage{isolation:isolate;min-height:560px}
#devices .dv-glow{position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(60% 55% at 70% 62%,rgba(37,46,72,.55) 0%,rgba(18,24,41,0) 70%)}
#devices .dv-gl{z-index:1}
#devices .dv-marks{position:absolute;inset:0;z-index:3;pointer-events:none}

/* device + stream labels placed by JS */
#devices .dv-dn,#devices .dv-tag{position:absolute;left:0;top:0;font-family:var(--mono);text-transform:uppercase;white-space:nowrap;will-change:transform,opacity}
#devices .dv-dn{font-size:10px;letter-spacing:.2em;color:var(--mute-d)}
#devices .dv-dn b{color:#fff;font-weight:700}
#devices .dv-tag{font-size:10px;letter-spacing:.14em;display:flex;align-items:center;gap:7px}
#devices .dv-tag i{width:5px;height:5px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor;flex:none}

/* ---------- header ---------- */
#devices .dv-head{position:absolute;z-index:5;left:var(--dv-l);top:clamp(92px,13vh,132px);width:min(34vw,500px)}
#devices .dv-lede{margin-top:22px;font-size:clamp(15px,1.15vw,18px);line-height:1.55;color:var(--mute-d);max-width:38ch}
#devices .dv-title{margin-top:20px;font-family:var(--display);font-weight:800;letter-spacing:-.04em;line-height:.94;font-size:clamp(40px,4.5vw,72px);color:#fff;text-wrap:balance}

/* ---------- steps ---------- */
#devices .dv-steps{position:absolute;z-index:5;left:var(--dv-l);bottom:8%;width:min(31vw,440px);display:grid}
#devices .dv-step{grid-area:1/1;align-self:end;opacity:0;will-change:opacity,transform}
#devices .dv-step:first-child{opacity:1}
#devices .dv-k{font-family:var(--mono);font-size:11px;letter-spacing:.24em;color:var(--mute-d);margin-bottom:16px}
#devices .dv-k span{color:var(--orange)}
#devices .dv-step h3{font-family:var(--display);font-weight:800;font-size:clamp(28px,2.5vw,40px);line-height:1.02;letter-spacing:-.035em;color:#fff;text-wrap:balance}
#devices .dv-step h3+p{margin-top:16px;font-size:clamp(15px,1.12vw,17px);line-height:1.6;color:var(--mute-d);max-width:40ch}

/* ---------- episode block ---------- */
#devices .dv-block{position:absolute;z-index:4;margin:0;left:43%;right:var(--dv-r);top:45%;bottom:8%;
  display:flex;flex-direction:column;background:linear-gradient(180deg,#151c30 0%,#10162a 100%);
  border:1px solid rgba(255,255,255,.14);box-shadow:0 40px 80px -30px rgba(0,0,0,.7),10px 10px 0 -1px #0d1222,10px 10px 0 0 rgba(255,255,255,.06);
  opacity:0;will-change:opacity,transform}
#devices .dv-block:before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:1px;background:linear-gradient(90deg,transparent,rgba(255,122,77,.9) 30%,rgba(223,229,242,.9) 70%,transparent);opacity:var(--intake,0)}
#devices .dv-bhead,#devices .dv-bfoot{display:flex;justify-content:space-between;align-items:center;gap:10px 18px;flex-wrap:wrap;
  font-family:var(--mono);font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--mute-d);padding:11px 16px}
#devices .dv-bhead{border-bottom:1px solid var(--line-d)}
#devices .dv-bfoot{border-top:1px solid var(--line-d);padding-top:9px;padding-bottom:9px}
#devices .dv-id{display:flex;align-items:center;gap:9px;color:#fff}
#devices .dv-id i{width:6px;height:6px;border-radius:50%;background:var(--orange);box-shadow:0 0 10px var(--orange-hi)}
#devices .dv-sync{display:flex;align-items:baseline;gap:8px;font-variant-numeric:tabular-nums}
#devices .dv-sync b{font-weight:700;color:#fff;letter-spacing:.06em}
#devices .dv-from{opacity:.55}
#devices .dv-to{min-width:8.2ch;text-align:right;transition:color .3s}
#devices .dv-ok{color:var(--orange-hi);margin-left:4px;opacity:0;transition:opacity .3s}
#devices .dv-block.synced .dv-to{color:var(--orange-hi)}
#devices .dv-block.synced .dv-ok{opacity:1}
#devices .dv-ex{opacity:.6}

#devices .dv-lanes{position:relative;flex:1;display:flex;flex-direction:column;padding:6px 0}
#devices .dv-tracks{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
#devices .dv-lane{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:clamp(96px,10vw,138px) minmax(0,1fr) var(--chipw,auto);align-items:center;gap:12px;padding:0 16px;border-top:1px solid rgba(255,255,255,.05)}
#devices .dv-lane:first-of-type{border-top:0}
#devices .dv-ln{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--lc,#fff);white-space:nowrap;opacity:var(--lo,.25)}
#devices .dv-tr{height:100%}
#devices .dv-chips{display:flex;gap:5px;justify-content:flex-end}
#devices .dv-chip{display:inline-flex;align-items:center;gap:6px;height:19px;padding:0 7px;font-family:var(--mono);font-size:9px;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;
  border:1px solid currentColor;opacity:0;transform:translateX(6px);transition:opacity .35s var(--ease),transform .35s var(--ease),color .35s,background .35s}
#devices .dv-chip i{width:5px;height:5px;background:currentColor;flex:none}
#devices .dv-chip em{font-style:normal}
#devices .dv-chip s{display:none;text-decoration:none}
#devices .dv-chip.on{opacity:1;transform:none}
#devices .dv-block.compact .dv-chip em{display:none}
#devices .dv-block.compact .dv-chip s{display:inline}
#devices .c-nat{color:var(--dv-nat);border-color:rgba(223,229,242,.35)}
#devices .c-est{color:var(--dv-est);border-color:rgba(63,184,166,.5);background:rgba(63,184,166,.06)}
#devices .c-ver{color:var(--dv-ver);border-color:rgba(255,122,77,.6);background:rgba(227,91,50,.1)}
#devices .c-ver i{transform:rotate(45deg) scale(.9)}

/* ---------- tail: facts + manifest ---------- */
#devices .dv-tail{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(32px,5vw,80px);align-items:start;
  padding-top:clamp(40px,7vh,80px);padding-bottom:clamp(96px,16vh,180px)}
#devices .dv-facts{list-style:none;display:grid;gap:0}
#devices .dv-facts li{display:grid;gap:6px;padding:18px 0;border-top:1px solid var(--line-d)}
#devices .dv-facts li:last-child{border-bottom:1px solid var(--line-d)}
#devices .dv-facts b{font-family:var(--mono);font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:#fff;display:flex;align-items:center;gap:12px}
#devices .dv-facts b:before{content:"";width:5px;height:5px;background:var(--orange);transform:rotate(45deg);flex:none}
#devices .dv-facts span{color:var(--mute-d);font-size:15px;line-height:1.55;padding-left:17px}
#devices .dv-code{container-type:inline-size;margin:0;border:1px solid rgba(255,255,255,.14);background:#0d1222;min-width:0}
#devices .dv-code figcaption{display:flex;justify-content:space-between;gap:12px;padding:11px 16px;border-bottom:1px solid var(--line-d);
  font-family:var(--mono);font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--mute-d)}
#devices .dv-code pre{margin:0;padding:16px;overflow-x:auto;font-family:var(--mono);font-size:12px;line-height:1.75;color:#c9d0de;tab-size:2;scrollbar-width:thin;scrollbar-color:#ffffff22 transparent}
#devices .jk{color:#8f98ad}
#devices .jv{color:#eef1f7}
#devices .jn{color:#e6c27a}
#devices .jc.s-nat{color:var(--dv-nat);text-decoration:underline;text-decoration-color:rgba(223,229,242,.35);text-underline-offset:4px}
#devices .jc.s-est{color:var(--dv-est)}
#devices .jc.s-ver{color:var(--dv-ver)}

/* ---------- stacked layout: phones, tablets and portrait screens ---------- */
@media (max-width:759px),(max-aspect-ratio:23/20){
  #devices .dv-head{top:clamp(72px,9vh,104px);width:auto;right:var(--gut);left:var(--gut)}
  #devices .dv-lede{display:none}
  #devices .dv-title{margin-top:14px;font-size:clamp(36px,7vw,64px)}
  #devices .dv-block{left:var(--gut);right:var(--gut);top:37%;bottom:auto;height:34%}
  #devices .dv-block{box-shadow:0 30px 60px -30px rgba(0,0,0,.7)}
  #devices .dv-steps{top:auto;bottom:clamp(20px,4vh,48px);left:var(--gut);right:var(--gut);width:auto;min-height:24%}
  #devices .dv-step{align-self:end}
  #devices .dv-step h3{font-size:clamp(24px,4.4vw,34px)}
  #devices .dv-step h3+p{margin-top:10px;max-width:56ch}
  #devices .dv-k{margin-bottom:10px}
  #devices .dv-tail{grid-template-columns:1fr}
}
@media (max-width:600px){
  #devices .dv-head{top:94px}
  #devices .dv-head .eyebrow{font-size:11px}
  #devices .dv-dn{font-size:8.5px;letter-spacing:.1em}
  #devices .dv-block{top:36%;height:35%}
  #devices .dv-bhead,#devices .dv-bfoot{padding:8px 10px;font-size:9px;letter-spacing:.12em}
  #devices .dv-bhead{row-gap:4px}
  #devices .dv-lane{grid-template-columns:70px minmax(0,1fr) var(--chipw,auto);gap:8px;padding:0 10px}
  #devices .dv-ln{font-size:8px;letter-spacing:.08em;white-space:normal;line-height:1.15}
  #devices .dv-chip{height:16px;padding:0 5px;font-size:8px;letter-spacing:.06em;gap:4px}
  #devices .dv-chip em{display:none}
  #devices .dv-chip s{display:inline}
  #devices .dv-lane[data-k="3"] .c-nat{display:none}
  #devices .dv-step h3{font-size:25px}
  #devices .dv-step h3+p{font-size:14px;line-height:1.5}
  #devices .dv-code pre{font-size:10.5px;padding:12px}
  #devices .dv-facts span{font-size:14px}
}
@media (max-height:820px) and (min-aspect-ratio:23/20){
  #devices .dv-head{top:88px}
  #devices .dv-title{font-size:clamp(34px,4vw,58px)}
  #devices .dv-lede{margin-top:16px;font-size:15px}
}

/* ---------- reduced motion / no scene: show the final state ---------- */
#devices.rm .dv-pin{height:auto}
#devices.rm .dv-stage{position:relative;height:100vh;height:100svh}
#devices.no-js-scene .dv-block{opacity:1}
#devices.no-js-scene .dv-chip{opacity:1;transform:none}
#devices.no-js-scene .dv-ln{opacity:1}

/* manifest lines are ~78 mono chars: scale the type to the card so streams[] never clips */
#devices .dv-code pre{font-size:clamp(9px,calc((100cqw - 32px) / 47.5),12px)}
