/* The emulator's page: the FM-1's (index.html) and the SMK-37's (smk37/index.html) */
/* the headline face: Archivo (SIL Open Font License, fonts/OFL.txt), its Latin letters, served from here */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700 900; font-stretch: 100% 125%; font-display: swap;
             src: url("fonts/archivo-latin.woff2") format("woff2"); }
:root { --room: #18191b; --ink: #e9e6de; --dim: #a9a7a1; --faint: #8c8a85; --text: #c9c6be; --amber: #f2a33a;
        --amber-hi: #ffc56e; --green: #7cc48a; --well: #232427; --line: #3a3b3f; --rule: #2a2b2e; --card: #1e1f22;
        --bar: #161719; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--room); color: var(--ink);
             font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
html { scroll-padding-top: 12px; }
a { color: var(--amber); }
a:hover { color: var(--amber-hi); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.dim { color: var(--dim); }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
kbd { display: inline-block; min-width: 1.7em; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px;
      border-radius: 4px; background: var(--well); color: var(--ink); font: 600 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      text-align: center; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
::selection { background: rgba(242, 163, 58, .32); }
/* hover and focus ease in; nothing on the page moves by itself (the emulator has the CPU) */
a, button, select, .file, .cards li { transition: color .15s, background-color .15s, border-color .15s; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------------------------------------------------------------- the site's header and footer */
.wrap { max-width: 1360px; margin: 0 auto; padding-inline: 24px; }
header.site { position: relative; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, #1d1e21, var(--bar)); }
/* an amber hairline along the header's foot, brightest in the middle */
[data-embed] header.site::after { display: none; }
header.site::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(242, 163, 58, .5) 25%, rgba(242, 163, 58, .5) 75%, transparent); }
header.site .wrap { padding-block: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px;
         letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
/* the name: fm1-emu, and what it is under it */
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark b { font: 800 18px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.02em; }
.wordmark small { font-size: 11.5px; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.logo { width: 26px; height: 26px; border-radius: 7px; color: #2a1a03; display: grid; place-items: center;
        background: linear-gradient(140deg, var(--amber-hi), var(--amber) 55%, #d8861d);
        box-shadow: 0 0 0 1px rgba(255, 197, 110, .25), 0 4px 14px -4px rgba(242, 163, 58, .55); }
/* the release this page is: web/release.mjs writes it from Cargo.toml */
.ver { display: inline-flex; align-items: center; height: 22px; margin-left: -8px; padding: 0 9px; border-radius: 999px;
       border: 1px solid rgba(242, 163, 58, .45); background: rgba(242, 163, 58, .08); color: var(--amber); text-decoration: none;
       font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ver:hover { color: var(--amber-hi); border-color: var(--amber); background: rgba(242, 163, 58, .16); }
/* the device switch: one segment per device */
.devices { display: flex; background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.devices a, .devices span { padding: 4px 12px; border-radius: 6px; font-size: 13px; text-decoration: none; color: var(--dim); }
.devices a:hover { color: var(--ink); }
.devices [aria-current] { background: var(--line); color: var(--ink); font-weight: 500; }
.sitenav { display: flex; flex-wrap: wrap; gap: 2px; font-size: 14px; }
.sitenav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.sitenav a:hover { color: var(--ink); background: var(--rule); }
/* the way to the code: always in view, on a phone too */
.gh { margin-left: auto; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 11px;
      border: 1px solid #55565b; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.gh:hover { color: var(--ink); border-color: var(--dim); background: var(--rule); }
.gh .arrow { color: var(--dim); }
@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  header.site .wrap { gap: 8px 12px; }
  /* the site's links get a row of their own below the brand, the version at its end */
  .sitenav { order: 5; flex: 1 1 calc(100% - 100px); margin: -4px -10px 0; }
  .ver { order: 6; margin: -4px 0 0; }
  .gh { padding: 0 11px; }
  .gh span { display: none; }
}

footer.site { margin-top: 48px; border-top: 1px solid var(--rule); background: var(--bar); color: var(--dim); font-size: 13px; }
footer.site .wrap { padding-block: 28px 36px; display: flex; flex-wrap: wrap; gap: 24px 56px; }
footer.site b { color: var(--ink); font-weight: 600; }
footer.site .about-site { flex: 1 1 340px; display: flex; flex-direction: column; gap: 8px; max-width: 70ch; }
footer.site .col { display: flex; flex-direction: column; gap: 6px; }
footer.site .col a { text-decoration: none; }

/* ---------------------------------------------------------------- the player: the synth, and beside it what runs */
main { max-width: 1360px; margin: 0 auto; padding: 20px 24px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (max-width: 760px) { main { padding: 14px 16px 0; gap: 36px; } }
.player { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: flex-start; }
.deck { flex: 999 1 600px; min-width: 0; display: grid; gap: 12px; }
.deck-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; }
#title { font-size: 17px; font-weight: 600; margin: 0; }
#status { color: var(--dim); font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.stage { position: relative; padding: 16px; border: 1px solid var(--rule); border-radius: 18px;
         background: radial-gradient(120% 90% at 30% 0%, #26272b 0%, #1b1c1f 70%);
         box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 28px 60px -40px #000; }
/* the whole synth in view on a laptop: as wide as the room allows below what is over it in the player
   (--above, --aspect: set by main.js; 84px: the stage's padding and the hint line), never narrower than 560px */
canvas { display: block; width: 100%; height: auto; touch-action: none; user-select: none; margin: 0 auto;
         max-width: max(560px, calc((100svh - var(--above, 140px) - 84px) * var(--aspect, 1.56))); }
#start { position: absolute; inset: 0; margin: auto; width: clamp(110px, 30%, 220px); height: clamp(36px, 9vw, 56px);
         border: 0; border-radius: 28px; background: var(--amber); color: #2a1a03; font-size: clamp(14px, 3.5vw, 17px);
         font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#start:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#start[disabled] { opacity: .7; cursor: wait; }
.rotate { display: none; color: var(--dim); font-size: 13px; margin: 0; }
/* a phone upright: the panel is small; say that sideways gives bigger keys */
@media (orientation: portrait) and (max-width: 600px) {
  .rotate { display: block; }
  .stage { padding: 6px; border-radius: 12px; }
}
/* a phone on its side: the panel fits the screen's height, the page around it shrinks */
@media (orientation: landscape) and (max-height: 560px) {
  main { padding-block: 8px 0; }
  .stage { padding: 0; border: 0; background: none; }
  canvas { width: auto; max-width: 100%; height: calc(100svh - 12px); margin: 0 auto; }
}

/* the screen for eyes that need more (main.js): Big screen shows it again, large, above the panel;
   Screen colours recolours both in two colours of strong contrast */
.view { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.view button { min-height: 40px; padding: 0 16px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
               background: var(--well); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.view button:hover { border-color: var(--faint); }
.view button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--room); }
.view label { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 14px; }
.view select { min-height: 40px; }
/* as wide as the deck, and short enough that the top of the panel shows below it */
#big { width: min(100%, max(320px, calc(100svh - var(--above, 140px) - 140px))); max-width: none; height: auto;
       aspect-ratio: 1; margin: 0 auto; image-rendering: pixelated; touch-action: auto; background: #000;
       border-radius: 10px; box-shadow: 0 0 0 1px #000, 0 24px 50px -30px #000; }
#big[hidden] { display: none; }

/* under the synth: one line of the essentials, then the way into the guide */
.hint { margin: 0; color: var(--dim); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hint span { white-space: nowrap; background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; }
.hint .more { margin-left: auto; }
.touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint .keyb { display: none; } .hint .touch { display: inline; } }

/* the device can't keep up: what happens and the fix, above the synth */
#perfwarn { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
            border: 1px solid var(--amber); border-radius: 10px; background: #2a2116; padding: 9px 12px; }
#perfwarn[hidden] { display: none; }
#perfwarn p { margin: 0; flex: 1 1 320px; min-width: 0; }
#perfwarn .acts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; }
#perfwarn button.primary { background: var(--amber); border-color: var(--amber); color: #2a1a03; font-weight: 600; }
#perfwarn button[hidden] { display: none; }

/* beside the synth (below it on a narrow screen): the firmware, the save, MIDI */
.side { flex: 1 1 300px; max-width: 100%; display: grid; gap: 14px;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.box { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px;
       display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.box > label { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--dim); font-size: 14px; }
.box > label select { min-width: 0; max-width: 62%; }
.box .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sel { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 62%; }
.sel select { max-width: 100%; }
#about { margin: 0; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
#about b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; }
#about .links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 2px 0 6px; }
#about .what { display: block; }
select { font: inherit; font-size: 14px; color: var(--ink); background: var(--well); border: 1px solid var(--line); border-radius: 7px;
         padding: 5px 8px; max-width: 100%; }
select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
/* the page's buttons, and file pickers that look like them */
.box button, #perfwarn button, .file { font: inherit; font-size: 14px; color: var(--ink); background: var(--well);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.box button:hover, #perfwarn button:hover, .file:hover { border-color: var(--faint); }
.file { position: relative; }
.file:focus-within { outline: 2px solid var(--amber); outline-offset: 1px; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#midiact { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
#midiact.on { background: var(--amber); }
#save-status { color: var(--text); font-size: 14px; }
#save-status[data-error="true"] { color: var(--amber); }
.save-controls { margin: 0; padding: 0 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--room); }
.save-controls summary { padding: 8px 0; font-size: 13px; font-weight: 500; color: var(--dim); cursor: pointer; }
.save-controls[open] { padding-bottom: 10px; }
.save-controls .save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.save-controls p { color: var(--dim); font-size: 12.5px; margin: 10px 0 0; }

/* ---------------------------------------------------------------- what's new in the release (web/release.mjs writes it) */
.release { display: grid; gap: 22px; padding: 28px 30px 24px; border: 1px solid #3a3226; border-radius: 20px;
           background: radial-gradient(80% 120% at 0% 0%, rgba(242, 163, 58, .09), transparent 60%),
                       linear-gradient(180deg, #202124, var(--card)); }
.release .eyebrow { color: var(--amber); }
.release .eyebrow a { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; text-transform: none;
                      text-decoration: none; }
.release h2 { margin: 6px 0 10px; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.rel-top { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: flex-end; justify-content: space-between; }
.rel-top > div:first-child { flex: 1 1 480px; min-width: 0; max-width: 78ch; }
.release .rel-lead { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--text); }
.rel-acts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 14px; }
.rel-acts a { text-decoration: none; }
.release button.copy { font: inherit; font-size: 14px; font-weight: 600; color: #2a1a03; background: var(--amber);
                       border: 1px solid var(--amber); border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.release button.copy:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
.rel-body { display: grid; gap: 24px 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .rel-body { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); } }
.release .rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.release .rel-list li { position: relative; margin: 0; padding-left: 22px; }
.release .rel-list li::before { content: ""; position: absolute; left: 3px; top: .6em; width: 7px; height: 7px; border-radius: 2px;
                                background: var(--amber); transform: rotate(45deg); }
.release .rel-thanks { margin: 16px 0 0; color: var(--dim); font-size: 14px; }
.rel-side { display: grid; gap: 14px; min-width: 0; }
/* the downloads: one row of buttons per kind */
.dl { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--room); }
.dl h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.release .dl-group p { margin: 0 0 8px; font-size: 14px; color: var(--dim); }
.dl-group p span::before { content: "· "; }
.dl-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-btn { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px;
          background: var(--well); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.dl-btn::before { content: "↓"; color: var(--amber); font-weight: 700; }
.dl-btn small { font-size: 12px; font-weight: 400; color: var(--dim); }
.dl-btn em { align-self: center; padding: 1px 6px; border-radius: 999px; background: var(--amber); color: #2a1a03;
             font: 700 10px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; letter-spacing: .06em;
             text-transform: uppercase; }
.dl-btn:hover { color: var(--ink); border-color: var(--amber); background: #29241d; }
.release .dl-note { margin: 0; font-size: 12.5px; color: var(--dim); }
/* the film: its picture until a click, then YouTube's player (the page's script) */
.film { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 14px;
        overflow: hidden; background: #000; }
iframe.film { border-color: var(--rule); }
a.film img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: rgba(0, 0, 0, .72); }
.film-play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; transform: translateX(2px);
                    border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
a.film:hover .film-play { background: var(--amber); }
.film-cap { position: absolute; left: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .72);
            color: #fff; font-size: 12.5px; }
/* the announcement as text, to select or copy */
.rel-copy { padding: 0 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--room); }
.rel-copy summary { padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.rel-copy textarea { display: block; width: 100%; margin: 0 0 14px; padding: 12px 14px; resize: vertical; field-sizing: content;
                     border: 1px solid var(--line); border-radius: 10px; background: var(--well); color: var(--ink);
                     font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.rel-copy textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
@media (max-width: 760px) {
  .release { padding: 20px 16px 16px; border-radius: 16px; gap: 18px; }
  .release h2 { font-size: 24px; }
  .release .rel-lead { font-size: 15.5px; }
}

/* ---------------------------------------------------------------- the firmware library (built by main.js from firmwares.json) */
.library h2, .article section h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
.library > p { margin: 0; color: var(--dim); max-width: 86ch; }
.cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px;
         grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.cards li { margin: 0; background: linear-gradient(180deg, #212225, var(--card) 70%); border: 1px solid var(--rule); border-radius: 14px;
            padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.cards li:hover { border-color: var(--line); }
.cards li.on { border-color: #6b5226; box-shadow: inset 0 0 0 1px #6b5226, 0 0 0 4px rgba(242, 163, 58, .06); }
.cards .head { display: flex; gap: 8px; align-items: baseline; }
.cards .head b { font-size: 16px; }
.cards .head .dim { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cards .head button { margin-left: auto; font: inherit; font-size: 13px; font-weight: 600; color: var(--amber); background: none;
                      border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.cards .head button:hover { border-color: var(--amber); }
.cards li.on .head button { background: var(--amber); border-color: var(--amber); color: #2a1a03; }
.cards .by { color: var(--dim); font-size: 13px; }
.cards .what { margin: 4px 0; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.cards .midi { font-size: 12.5px; color: var(--amber); }
.cards .untested, #about .untested { font-size: 12.5px; color: var(--dim); font-style: italic; }
.cards .links { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 13px;
                display: flex; flex-wrap: wrap; gap: 2px 14px; }
.cards .links a { color: var(--dim); text-decoration: none; }
.cards .links a:hover { color: var(--amber-hi); }

/* ---------------------------------------------------------------- the guide: one column (text to read and copy), its contents a row of links on top */
.guide { border-top: 1px solid var(--rule); padding-top: 36px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
nav.toc { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; max-width: 780px; font-size: 14px; }
nav.toc .eyebrow { width: 100%; margin-bottom: 4px; }
nav.toc a { color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--rule); border-radius: 999px;
            padding: 4px 12px; }
nav.toc a:hover { color: var(--ink); border-color: var(--amber); }
.article { max-width: 780px; min-width: 0; display: grid; gap: 40px; }
.article section h2 { font-size: 24px; }
section h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; }
section p, section li { color: var(--text); }
section p { margin: 0 0 10px; }
section b, section strong { color: var(--ink); font-weight: 600; }
section ul, section ol { margin: 0 0 10px; padding-left: 22px; }
section li { margin: 4px 0; }
.lead { font-size: 17px; line-height: 1.55; color: var(--ink) !important; }
.steps { list-style: none; padding: 0 !important; margin: 16px 0 0 !important; display: grid; gap: 12px;
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: step; }
.steps li { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px 12px 50px;
            position: relative; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
                    background: var(--amber); color: #2a1a03; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps b { display: block; margin-bottom: 2px; }

/* the computer keyboard as a piano: 11 white keys, the black ones between */
.piano { display: grid; grid-template-columns: repeat(22, 1fr); gap: 3px; max-width: 460px; margin: 4px 0 12px; }
.piano span { display: grid; place-items: center; border-radius: 0 0 5px 5px; padding: 4px 0 3px; line-height: 1.15;
              font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; }
.piano i { display: block; font: 10.5px/1.2 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--dim); }
.piano .w { grid-row: 2; grid-column-end: span 2; background: #2c2d31; border: 1px solid #44454a; color: var(--ink); }
.piano .b { grid-row: 1; grid-column-end: span 2; margin: 0 3px; background: #0f1011; border: 1px solid #36373b; color: var(--ink); }
.map { list-style: none; padding: 0 !important; display: grid; gap: 6px 10px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.map li { margin: 0; white-space: nowrap; color: var(--ink); font-size: 13px; }
.map kbd { margin-right: 4px; }

.note { border-left: 3px solid var(--amber); background: var(--card); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.article details { border: 1px solid var(--rule); border-radius: 10px; background: var(--card); padding: 0 14px; margin: 0 0 10px; }
.article details[open] { padding-bottom: 4px; }
.article summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--ink); }

/* ?embed=1 (main.js): the device and its controls only, for a window on another site */
.embed-only { display: none; }
[data-embed] .embed-only { display: inline; margin-left: auto; font-size: 13px; }
[data-embed] header.site .wrap > :not(.embed-only), [data-embed] #title, [data-embed] #fwlabel, [data-embed] .file,
[data-embed] #bankname, [data-embed] #about, [data-embed] .hint, [data-embed] .release, [data-embed] .library, [data-embed] .guide,
[data-embed] footer.site, [data-embed] .save-box, [data-embed] .side .eyebrow { display: none; }
[data-embed] main { padding: 8px; gap: 8px; }
[data-embed] .side { flex-basis: 100%; }
[data-embed] .box { padding: 10px 12px; flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
[data-embed] .box > label select { max-width: none; }

/* (an element the page hides stays hidden whatever its display rule) */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the opening: the claim, and a wall of real screens */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-text { position: relative; z-index: 1; display: grid; gap: 18px; padding-block: 56px 60px; }
.kicker { margin: 0; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em;
          text-transform: uppercase; color: var(--amber); }
.hero h1 { margin: 0; font-family: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-stretch: 118%;
           font-size: clamp(38px, 5.2vw, 72px); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { margin: 0; font-size: 18px; color: var(--text); max-width: 36em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.cta { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line);
       background: var(--well); color: var(--ink); font-weight: 600; text-decoration: none; }
.cta:hover { color: var(--ink); border-color: #55565b; }
.cta.primary { background: var(--amber); border-color: var(--amber); color: #2a1a03; }
.cta.primary:hover { background: var(--amber-hi); border-color: var(--amber-hi); color: #2a1a03; }
.facts { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--dim);
         font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.facts b { color: var(--ink); font-weight: 600; }
/* the wall: columns of screens drifting up and down, tilted, fading at its edges. Out of the
   layout at every width (its columns are thousands of pixels tall): beside the text from the
   middle of the hero to its right edge, and behind the text on a narrow screen (below) */
.hero-grid { position: relative; }
.wall { position: absolute; top: -80px; bottom: -80px; left: calc(50% + 20px); right: -24px;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 86%, transparent);
        mask-image: linear-gradient(90deg, transparent, #000 16%, #000 86%, transparent); }
.wall { display: flex; gap: 14px; }
.wall .col { flex: 0 0 136px; display: flex; flex-direction: column; gap: 14px; animation: drift 120s linear infinite; }
.wall .col:nth-child(even) { animation-direction: reverse; animation-duration: 150s; }
.wall .col:nth-child(3n) { margin-top: -60px; }
.wall img { width: 136px; height: 136px; border-radius: 6px; image-rendering: pixelated;
            box-shadow: 0 0 0 1px #000, 0 10px 26px rgba(0, 0, 0, .45); }
.wall { transform: rotate(-8deg) scale(1.15); transform-origin: 30% 50%; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .wall .col { animation: none; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .wall { inset: 0; opacity: .18; }
  .hero-text { padding-block: 36px 40px; }
}
/* a phone held sideways, and a window on another site: the synth first */
@media (max-height: 500px) and (orientation: landscape) { .hero:not(.dev-hero) { display: none; } }
[data-embed] .hero { display: none; }

/* ---------------------------------------------------------------- the firmware cards' pictures and the search */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.search { flex: 0 1 420px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
          background: var(--card); border: 1px solid var(--line); color: var(--dim); }
.search:focus-within { border-color: var(--amber); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; }
.cards li.has-pic { padding-top: 0; overflow: hidden; }
.cards .pic { margin: 0 -16px 8px; aspect-ratio: 1; background: #000; cursor: pointer; }
.cards .pic img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.cards li.has-pic:hover { border-color: #4a4b50; }
.cards li[hidden] { display: none; }

/* ---------------------------------------------------------------- the developer page (dev/index.html) */
.term { margin: 0; padding: 18px 20px; overflow-x: auto; background: #0f1011; border: 1px solid var(--rule); border-radius: 14px;
        color: var(--ink); font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 24px 50px -34px #000; }
.term .c { color: var(--faint); }
.term .p { color: var(--amber); user-select: none; }
.dev-hero .term { align-self: center; }
main.dev { display: grid; gap: 0; padding-top: 0; }
.devsec { display: grid; gap: 14px; padding-block: 48px; border-bottom: 1px solid var(--rule); }
.devsec:last-child { border-bottom: 0; }
.devsec .eyebrow { color: var(--amber); }
.devsec h2 { margin: 0; font-family: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif; font-weight: 800;
             font-stretch: 112%; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -.015em; }
.devsec > p { max-width: 78ch; }
.devsec .lead { margin: 0; color: var(--text) !important; }
.devsec .more { color: var(--dim); font-size: 14px; }
.devcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 6px; }
.devcards article { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; }
.devcards h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.devcards p { margin: 0; }
.params { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 8px; }
.params li { margin: 0; }
.params code { display: inline-block; margin-right: 4px; color: var(--amber-hi); }
.crates { list-style: none; padding: 0 !important; margin: 4px 0 0 !important; display: grid; gap: 10px;
          grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.crates li { margin: 0; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.crates li > code { color: var(--amber-hi); font-weight: 600; }
.crates span { font-size: 14px; }
@media (max-width: 900px) { .dev-hero .term { margin: -12px 0 36px; } }
@media (max-width: 760px) { .devsec { padding-block: 36px; } .term { font-size: 12.5px; padding: 14px; } }
