/* Clamshell v2 guide centrepieces (guide-figs-v1.js). Loaded after guide.css.
   Text-width figures on an s1 plate: a cell-resolution canvas (3px Bayer
   cells, one blue family) and HTML text beside or below it, never on it.
   Mono labels for figure furniture. Sizes are fixed by aspect-ratio so
   nothing shifts when the script starts. */

.gf{margin:32px 0 12px;border-radius:22px;background:var(--s1);padding:26px 26px 0;overflow:hidden}
.gf canvas{display:block;width:100%;image-rendering:pixelated;image-rendering:crisp-edges;background:#000;border-radius:12px}
.gf:not(.gf-js) canvas,.gf:not(.gf-js) .gf-ctl{display:none}
.gf figcaption{margin:0;padding:22px 0 24px;color:var(--tx-dim);font-size:15px;line-height:1.55}
.gf figcaption strong{color:var(--tx);font-weight:650;letter-spacing:-.02em}

/* controls: solid plates, no grain behind labels */
.gf-ctl{display:flex;flex-wrap:wrap;gap:10px 22px;margin:16px 0 0}
.gf > .gf-ctl:first-child{margin:0 0 16px}
.gf-seg{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.gf-seg > span{font-size:15px;color:var(--tx);margin-right:8px}
.gf-seg button,.gf-check{
  font:500 14px/20px "Geist",system-ui,sans-serif;letter-spacing:-.01em;color:var(--tx-dim);
  background:var(--s2);border:0;border-radius:9px;padding:7px 12px;cursor:pointer;min-height:34px;
}
.gf-seg button:hover{color:var(--tx);background:var(--s3)}
.gf-seg button[aria-pressed="true"]{background:var(--blue);color:#fff}
.gf-check{display:inline-flex;align-items:center;gap:8px}
.gf-check input{accent-color:var(--blue);width:16px;height:16px;margin:0}
.gf-check[hidden]{display:none}

/* readouts */
.gf-read{margin:16px 0 0;font-size:16px;line-height:24px;color:var(--tx)}
.gf-on{color:var(--light)}
.gf-bad{color:var(--bad)}

/* music */
.gf-music canvas{aspect-ratio:2.6 / 1}
.gf-music .gf-read{min-height:24px}

/* states: Mac on the left, the test file on the right */
.gf-states .gf-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,15rem);gap:22px;align-items:stretch}
.gf-states canvas{aspect-ratio:1.5 / 1;height:auto}
.gf-file{background:#000;border-radius:12px;padding:14px 16px;font-family:var(--mono);font-size:14px;line-height:22px;color:var(--tx-dim)}
.gf-file ol{list-style:none;margin:0;padding:0;min-height:132px}
main .gf-file ol > li{margin:0;padding:0}
.gf-file li.gf-gap{color:var(--bad)}
.gf-file li.gf-late{color:var(--tx)}
.gf-pre{visibility:hidden}
.gf-verdict{margin:16px 0 0;font-size:16px;line-height:24px}

/* terminal */
.gf-term ol{list-style:none;margin:0;padding:16px 18px;background:#000;border-radius:12px;font-family:var(--mono);font-size:14px;line-height:22px;color:var(--tx-dim);min-height:236px;white-space:pre-wrap;overflow-wrap:anywhere}
main .gf-term ol > li{margin:0;padding:0}
.gf-term li i{font-style:normal;color:var(--tx-mute)}
.gf-term li.gf-cmd{color:var(--tx)}
.gf-term li.gf-evt{color:var(--light)}
.gf-term li.gf-ok{color:var(--light)}
.gf-term li.gf-bad{color:var(--bad)}
.gf-term li.gf-mute{color:var(--tx-mute)}
.gf-term canvas{height:42px;margin-top:12px;border-radius:8px}
.gf-axis{display:flex;justify-content:space-between;margin-top:8px;font-size:14px;color:var(--tx)}
.gf-term [data-gf-sum]{display:block;margin-top:12px;font-size:16px;line-height:24px}

@media (max-width:640px){
  .gf{padding:18px 16px 0;border-radius:18px}
  .gf-music canvas{aspect-ratio:1.7 / 1}
  .gf-states .gf-body{grid-template-columns:1fr}
  .gf-states canvas{aspect-ratio:1.8 / 1}
  .gf-ctl{gap:10px}
  .gf-file ol{columns:2;min-height:66px}
  .gf-term ol{font-size:12px;line-height:20px;padding:12px;min-height:216px}
}
@media (forced-colors:active){
  .gf canvas{display:none}
}
