/* The FM-1 flasher's step in the session (static/setup/flasher.js, bead production-draft-yatn0.10): the session's own step
   card (.jcard) under the drawing, joined to it as a walk's step is, and the parts the mock gave the step (version A,
   Kevin's go 2026-11-20): the firmware rows, the bar, the download-mode steps. Tokens and type are
   the session's own (static/setup/index.html :root). */

/* while the step is open it is the card under the drawing: the walk's card and line step aside, and Connect, which the
   step's own buttons stand in for */
html.fl-open #jcard,html.fl-open #narr,html.fl-open #go-connect{display:none!important}
html.fl-open #checkcard{display:none!important}   /* the step is the one thing happening: the check would contradict it (yatn0.10) */
/* while the step is open (and while the flasher holds the FM-1) the jam waits: flasher.js stops its tap too */
html.fl-open #sjfind,html.fl-hold #sjfind{pointer-events:none;opacity:.45}
html.fl-open #sim,html.fl-open #sjqm{display:none!important}   /* the step has its own way out (Back); its two links lead back to it (yatn0.10) */
html.fl-open #simpick{display:none!important}   /* the simulation's firmware: the list is about the build being installed (yatn0.20.6) */
html.fl-open .scard{border-radius:24px;background:var(--panel);box-shadow:0 0 0 1px var(--line);overflow:hidden}
html.fl-open #ideas-fm1{display:none!important}   /* they teach the firmware the step is replacing; Back brings them back (yatn0.10) */
html.fl-open .scard .zoom{border-radius:0;box-shadow:none;background:none}
html.fl-open .scard .grid.solo .dcard{box-shadow:none;background:none;border-radius:0}
html.fl-open .scard .fl-card{margin-top:0;border-radius:0;background:none;box-shadow:none;padding:6px 22px 20px}
.fl-card .jt{margin:6px 0 8px}
.fl-card .fl-gap{height:6px}
/* Kevin's sentence on what the builds are, at the top of the list (flasher.js OURS, 2026-11-22), in the step's line's type
   (.jcard .ji). Its link to Open Panel's source is a thumb high by padding, which doesn't stretch the sentence's lines, and
   positioned, so the line under it doesn't take the lower part of that height from a thumb (measured at 390). */
.fl-card .fl-ours{max-width:46em;font:400 17px/1.5 var(--sans);color:var(--c1);text-wrap:balance}
.fl-card .fl-ours+.ji{margin-top:8px}
.fl-card .fl-opa{position:relative;padding:12px 0;white-space:nowrap;color:var(--ink);text-decoration:underline;text-decoration-color:rgba(205,182,144,.6);text-underline-offset:3px}
.fl-card .fl-opa svg{display:inline-block;width:11px;height:11px;margin-left:4px;color:var(--dim);vertical-align:0}
.fl-card .fl-opa:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
.fl-card .jacts{gap:8px 18px}
.fl-card .jacts .link{font-size:15px}
/* On a computer the stage is one window-high card, and the step is under the drawing in it. A long step (Choose lists
   every firmware the builder's list offers) scrolls inside itself, the drawing keeps a part of the card, and the step's
   buttons stay in view at its foot, as the session's own walk keeps its Next (.cb-walk .wnav). */
@media (min-width:981px){
  html.fl-open .scard .body{min-height:clamp(180px,36%,420px)}
  html.fl-open .scard .fl-card{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:0}
  html.fl-open .fl-card .jacts{position:sticky;bottom:0;z-index:1;margin-top:10px;padding:12px 0 20px;background:linear-gradient(transparent,var(--panel) 22%)}
  html.fl-open .fl-card .jacts.up{position:static;background:none}   /* above the list (Choose, update mode): it moves with the step, never pinned (yatn0.10) */
  html.fl-open .scard .fl-card:has(.jacts.up){padding-bottom:20px}
}

/* Install firmware in the foot (jamsession.js #sjinstall; bead production-draft-yatn0.10.8): on the foot's one line with
   Find Someone to Jam With, so it is on screen wherever the jam button is, with the page's own way to try it without an
   FM-1 after it as small plain text. Only where the flasher is on (html.fl-on, set by flasher.js once the list is in):
   a page with the flasher off keeps the foot it had. A phone has it too (bead production-draft-yatn0.10.10), under the
   jam button; its list installs where its browser has Web MIDI, and is for looking where it has none (an iPhone). It steps aside while the step is open, and while a
   jam is being found or played, as the rest of the foot does. */
html.fl-on body[data-sjfm1="1"] .sj-install{display:inline-flex;box-shadow:inset 0 0 0 1px var(--border)}
html.fl-on body[data-sjfm1="1"][data-sj="wait"] .sj-install,html.fl-on body[data-sjfm1="1"][data-sj="jam"] .sj-install,
html.fl-open body[data-sjfm1="1"] .sj-install{display:none}
html.fl-on body[data-sjfm1="1"] .foot #sim{min-height:44px;padding:0 6px;border-radius:0;background:none;color:var(--c2);font:500 13.5px var(--sans);
  text-decoration:underline;text-decoration-color:rgba(171,168,159,.4);text-underline-offset:3px}
html.fl-on body[data-sjfm1="1"] .foot #sim:hover{color:var(--ink);background:none}
html.fl-on body[data-sjfm1="1"] .foot #sim{box-shadow:none;transition:none}
html.fl-on body[data-sjfm1="1"] .foot #sim[aria-pressed="true"]{color:var(--brass)}
/* "Supported FM-1 firmwares" in the What's this: words, where Install firmware is the control (flasher.js) */
.sj-pop a.sj-plain{text-decoration:none;color:var(--c1);cursor:default}
.sj-pop a.sj-plain svg{display:none}
@media (max-width:980px){
  html.fl-on body[data-sjfm1="1"] .sj-find,html.fl-on body[data-sjfm1="1"] .sj-finding{order:-2}
  html.fl-on body[data-sjfm1="1"] .sj-install{order:-1;flex:0 0 calc(100% - 52px);min-width:0}
}

/* The list a person opened (Install firmware, ?install=1, a firmware page's button: html.fl-list, set by flasher.js; bead
   production-draft-yatn0.10.8). They came for the list, so on a computer it has the card: the drawing steps aside until
   Back, the builds sit in as many columns as the card is wide, and the picked build's Install stays at the top of the
   card however far down the list the pick is. (The step that opens by itself keeps the drawing and its one column.) */
@media (min-width:981px){
  html.fl-list .scard .body{display:none}
  html.fl-list .scard .fl-card{flex:1 1 auto;padding-top:0}   /* its top room is the name's own, so no build shows above the pinned Install */
  html.fl-list .fl-card .jpos{margin:0;padding-top:18px}
  html.fl-list #flcard .fws{max-width:none;grid-template-columns:repeat(auto-fill,minmax(224px,1fr));grid-auto-rows:1fr}
  html.fl-list .fl-card .fl-top{position:sticky;top:0;z-index:2;background:var(--panel)}   /* Install, Back and the picked build's words, pinned together */
  html.fl-list .fl-card .jacts.up{margin:0;padding:12px 0}
  /* Every card one size (owner walk of PR 907, 2026-11-21: an empty band under the picked card's row, and cards of three
     heights). The picked build's words and Source sit once under its Install (flasher.js pickLine), not in its card;
     each card is its name with version and maker under it, and every row is as tall as the tallest card. */
  /* room kept for two lines of words and the 12 px under them (the page sizes boxes border-box), so picking a build with
     longer words doesn't move the list (walks of PR 917). Source runs in the words: inline, its 44 px tap height made
     by padding, which doesn't stretch its line (as .link's inline-flex min-height did, opening a gap between the two
     lines). Measured 56 px and a 44 px Source for all 35 builds at 1280 and 1366, and for five at 1440 and 1920. */
  html.fl-list .fl-card .fl-pick{display:block;margin:-4px 0 0;padding:0 0 12px;max-width:62em;min-height:calc(3em + 12px);text-wrap:pretty;font:400 14.5px/1.5 var(--sans);color:var(--c2)}
  html.fl-list .fl-card .fl-pick .link{display:inline;min-height:0;padding:13px 0;font-size:14px}
  html.fl-list #flcard .fwr.on .what,html.fl-list #flcard .fwr.on .fl-src{display:none}
  html.fl-list #flcard .fwr .h{flex-direction:column;align-items:flex-start;justify-content:flex-start}
  html.fl-list #flcard .fwr.grp{display:flex;flex-direction:column}
  html.fl-list #flcard .fwr.grp>button{flex:1;align-items:flex-start;padding-top:6px}
  html.fl-list #flcard .fwr.look{justify-content:flex-start}
}
.fl-card .fl-pick{display:none}

/* a firmware row (the jam page's .fw, Runs on), here chosen in place */
#flcard .fws{display:grid;gap:8px;margin:8px 0 4px;max-width:560px}
.fwr{display:block;width:100%;text-align:left;border:1px solid var(--border);border-radius:14px;background:var(--panel2);padding:13px 16px;min-height:56px;color:var(--ink);font:inherit;cursor:pointer}
.fwr.grp{padding:5px 16px 8px;cursor:default}
.fwr.grp>button{display:flex;align-items:center;width:100%;min-height:44px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.fwr .h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 12px;width:100%}
.fwr b{font:500 18px var(--serif);color:var(--ink)}
.fwr span.m{font:12px var(--mono);color:var(--dim);min-width:0;overflow-wrap:anywhere}   /* a maker's long name wraps (the Hub's authors) */
.fwr.on{border-color:var(--c2)}
.fwr .what{margin:8px 0 0;font:400 14.5px/1.5 var(--sans);color:var(--c2)}
.fwr.grp .what{margin-top:2px}
.fwr:focus-visible,.fwr.grp>button:focus-visible{outline:2px solid var(--brass);outline-offset:3px}

/* Looking (a browser with no Web MIDI, an iPhone's: flasher.js LOOK, html.fl-look; bead production-draft-yatn0.10.10):
   the same card, a link to the firmware's own page, since nothing can be picked to install there */
.fwr.look{display:flex;flex-direction:column;justify-content:center;padding:8px 16px;text-decoration:none}
.fwr.look .what{display:block;margin:4px 0 2px}
a.fwr.look:active{border-color:var(--c2)}
/* They came for the list, so on a phone it has the card too: the drawing steps aside until Back, as it does on a computer
   (html.fl-list above). The page's own line on opening it on a computer is the list's line here, said once.
   A phone that installs has the same (Kevin, 2026-11-23: "we need to be able to install our own firmwares ... why would
   we refuse that on a phone?"; flasher.js A PHONE THAT CAN, INSTALLS): the list is the card whether its builds are
   links or picks. */
@media (max-width:980px){
  html.fl-list .scard .body{display:none}
  html.fl-list .fl-card .jpos{margin:0;padding-top:14px}
  /* The narrow page pins the stage to the top of the screen and scrolls the chat under it (index.html .stage:
     position:sticky). With the list in it the stage is some 2,500 px tall, and pinned it didn't move for the first
     swipes while the chat's height scrolled away behind it. While the list is open the stage scrolls with the page.
     The same for every step that is a list (.fl-top: the list a person opened, the one that opens by itself on an
     FM-1 with no Open Panel, and update mode's), since each can be that tall. */
  html.fl-look.fl-open .stage,html.fl-open .stage:has(.fl-top){position:relative}
  html.fl-look .fl-card .jacts.end{display:flex;margin-top:14px}   /* Back again at the list's foot (flasher.js render) */
  /* Picking, the list is one column of 36 builds, some 2,500 px of page, and Install sits at its head: a build tapped
     far down it left its Install a thousand px above the screen (measured at 390 by touch, 2026-11-23). Install and
     Back stay at the top of the screen while the list moves under them, as they stay at the top of the card on a
     computer (html.fl-list .fl-top above). The card clips its corners without becoming the thing the list scrolls in
     (overflow:clip, where hidden would hold Install to the card's top, off the screen). */
  html.fl-open:not(.fl-look) .scard:has(.fl-top){overflow:clip}
  /* The list opening by itself puts some 2,500 px into the page above the chat, and the browser, keeping the chat
     where it was on screen, jumped the page to the list's foot before the step's own scroll brought it back to its
     head (measured at 390, 2026-11-23). While a step is open the page stays where it is and the step scrolls to itself. */
  html.fl-open,html.fl-open body{overflow-anchor:none}
  html.fl-open:not(.fl-look) .fl-card .fl-top{position:sticky;top:0;z-index:2;margin:0 -14px;padding:0 14px;background:var(--panel);box-shadow:0 1px 0 var(--line)}
  html.fl-open:not(.fl-look) .fl-card .jacts.up{margin:0;padding:10px 0}
}
.fl-card .jacts.end{display:none}
html.fl-look.fl-open #away{display:none!important}

.fl-src{margin:2px 0 0}
.fl-src .link,.fl-src2{font-size:14px}
.fl-src2{margin-left:14px}

/* the bar, and what is done */
.fl-card .meter{height:6px;border-radius:3px;background:var(--line);overflow:hidden;margin:14px 0 6px;max-width:560px}
.fl-card .meter i{display:block;height:100%;width:0;background:var(--sage);transition:width .25s}
.fl-card .pct{display:flex;align-items:center;gap:10px;font:500 14px/1.4 var(--sans);color:var(--brass);font-variant-numeric:tabular-nums}
.fl-card .okrow{display:flex;align-items:center;gap:10px;margin:10px 0 0;font:500 15px var(--sans);color:var(--ink)}
.fl-card .okrow .ck{color:var(--sage);font-weight:600}
.fl-card .fl-err{margin:10px 0 0;font:400 14.5px/1.45 var(--sans);color:var(--brass)}

/* the download-mode steps, one at a time (the session's walk: "Step 1 of 5", Next, Back) */
.fl-card .stepn{font:400 12px var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--dim);margin:14px 0 4px}
.fl-card .stept{font:400 17px/1.45 var(--sans);color:var(--c1);max-width:46em}
.fl-card .xlink{display:inline-flex;align-items:center;gap:6px;min-height:44px;color:var(--ink);text-decoration:underline;text-decoration-color:rgba(205,182,144,.6);text-underline-offset:3px;font:500 15px var(--sans)}
.fl-card .xlink svg{width:11px;height:11px;color:var(--dim)}

/* "Look for it on USB" in the Connect check */
.fl-usbrow{margin-top:10px}
html.fl-open #lostbar{display:none!important}   /* a pulled cable: the step says it, with what to press (yatn0.10) */

@media (max-width:760px){
  html.fl-open .scard{border-radius:18px}
  html.fl-open .scard .fl-card{padding:4px 14px 16px}
  .fl-card .jt{font-size:24px}
  .fl-card .ji,.fl-card .fl-ours{font-size:16px}
}
