/* «Чертёж и рой» on phones and tablets (MOBILE 12.11): plain native scrolling, every drawing a static
   illustration IN the flow of its slide (still.js draws it into .still), nothing fixed behind the text.
   Same query as env.js STILL_Q. html:not(.gl-mode): before any script runs (first paint, no JS) the phone
   layout is already right; a desktop window that booted the swarm (html.gl-mode) keeps its layout when narrowed.
   Loaded last on the three slide pages (home, Protocore, Daedalus). */
.still{display:none}

@media (max-width:900px), (hover:none) and (pointer:coarse){
  /* no swarm canvas, no hotspot layer over the page, no slide rail, no floating agents chip
     (the agents switch stays in the footer) */
  html:not(.gl-mode) #swarm,html:not(.gl-mode) body > .hots,html:not(.gl-mode) .srail,html:not(.gl-mode) #b-hud{display:none!important}
  html:not(.gl-mode){scroll-padding-top:72px}

  /* slides: content height, drawing box on top, text under it; nothing reserved for a fixed canvas */
  html:not(.gl-mode) .scene{min-height:0!important;display:flex!important;flex-direction:column;align-items:stretch!important;
    justify-content:flex-start!important;padding-top:32px!important;padding-bottom:40px!important}
  html:not(.gl-mode) .scene > .txt{margin-top:0!important;padding-top:0!important;max-width:100%!important;margin-left:0!important}
  html:not(.gl-mode) .scene > .txt::before{display:none!important}
  html:not(.gl-mode) main > .scene:first-child{padding-top:84px!important}
  html:not(.gl-mode) .still{display:block;position:relative;flex:none;width:100%;max-width:560px;margin:0 auto 24px;
    aspect-ratio:4/3;max-height:46svh;overflow:visible;contain:layout}
  html:not(.gl-mode) .still[data-ar="1"]{aspect-ratio:1/1;max-height:44svh}
  html:not(.gl-mode) .still[data-ar="wide"]{aspect-ratio:16/9}
  html:not(.gl-mode) .still > canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
  html:not(.js) .still{display:none}

  /* captions and buttons on a drawing sit inside its box */
  html:not(.gl-mode) .still .hot{z-index:2}
  html:not(.gl-mode) .still .hot span{white-space:nowrap}
  html:not(.gl-mode) .still .hot.nolabel:not([aria-pressed="true"]) span{display:none}
  html:not(.gl-mode) .still .hot.tag-only{margin-left:0}
  html:not(.gl-mode) .still .hot.tag-only i{display:none}

  /* the dark vitrine: a plain night panel (the swarm used to burn it open) */
  html:not(.gl-mode) [data-night]{background-color:var(--night);
    background-image:linear-gradient(rgba(157,179,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(157,179,255,.06) 1px,transparent 1px);
    background-size:60px 60px}
  html:not(.gl-mode) [data-night] > *{opacity:1!important}
  html:not(.gl-mode) [data-night] .vit-head{opacity:1}

  /* header: always readable over paper and over the night panel (text passes under it while scrolling) */
  html:not(.gl-mode) .nav.scrolled{background:var(--paper)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-bottom:1px solid var(--line)!important}
  html.hdr-night:not(.gl-mode) .nav.scrolled{background:#07070A!important;border-bottom-color:var(--n-line)!important}
  html:not(.gl-mode) .nav.hdr-away{transform:none}

  /* hints under a demo: only as tall as their text */
  html:not(.gl-mode) .out,html:not(.gl-mode) .events{min-height:0!important}

  /* home hero: role drawing on top, the agents' DOM layer inside the same box; CTA above the fold */
  html:not(.gl-mode) .hero > .still{aspect-ratio:6/5;max-height:38svh;margin-bottom:14px}
  html:not(.gl-mode) .hero .crewart{position:absolute;inset:0;z-index:1}
  html:not(.gl-mode) .hero .capt{display:block!important;position:static!important;transform:none!important;left:auto!important;right:auto!important;
    margin:14px 0 0;white-space:normal!important;align-self:flex-start;font-size:12.5px!important;order:3}
  html:not(.js) .hero .still-wrap{display:block!important;position:static!important;transform:none!important;margin:0 auto 18px!important;
    width:72vw!important;max-width:320px!important;order:-1}
}
@media (max-width:900px) and (min-width:761px){
  html:not(.gl-mode) .scene > .txt{max-width:640px!important}
}
@media (max-width:900px), (hover:none) and (pointer:coarse){
  /* calmer rhythm between blocks on a phone (the desktop zones breathe for a whole screen) */
  html:not(.gl-mode) .zone{padding-top:52px;padding-bottom:52px}
  /* «симуляция» badges: wrapped lines get leading, and they sit in the flow (no overlap with the line below) */
  html:not(.gl-mode) .sim{line-height:1.35;flex-wrap:wrap}
  html:not(.gl-mode) .shelf .sim{position:static;margin-top:14px;align-self:flex-start}
}
