/* SPDX-FileCopyrightText: 2026 FM-1 ZX contributors */
/* SPDX-License-Identifier: GPL-3.0-or-later */

/* What the demo hides of upstream's page: it runs one firmware at one clock. */
.devices,
.sitenav,
#fwlabel,
label:has(#mhz),
.file,
#perfwarn-fix,
section:has(#h-save),
section:has(#h-play-from),
#firmwares,
#guide > .toc,
#start-here,
#playing,
#midi-in,
#plugin,
#stock,
footer a[href="smk37/"],
footer a[href="fm1-sid/"],
.hint {
  display: none !important;
}

/* Our panel, under the synth at the deck's width: the computer keys (narrower) and the key map
   (wider), side by side; one column on a phone */
.fmzx { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) {
  .fmzx { grid-template-columns: minmax(250px, 1fr) minmax(0, 2.2fr); align-items: start; }
}
.fmzx h3 { margin: 0 0 10px; font-size: 15px; }
.fmzx dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 14px; }
.fmzx dt { color: var(--ink); font-weight: 600; }
.fmzx dd { margin: 0; color: var(--dim); }
.fmzx p { color: var(--dim); font-size: 13.5px; margin: 0; }
.fmzx-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
             margin-bottom: 10px; }
.fmzx-head h3 { margin: 0; }
.fmzx-head select { flex: 0 1 260px; min-width: 0; }
/* the rows flow into columns of at least 15rem; a group's heading stays with its first rows */
.fmzx-rows { columns: 15rem auto; column-gap: 28px; font-size: 13px; }
.fmzx-group { display: contents; }
.fmzx h4 { margin: 10px 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
           color: var(--faint); break-after: avoid; }
.fmzx-rows > .fmzx-group:first-child h4 { margin-top: 0; }
.fmzx-row { display: grid; grid-template-columns: minmax(5.5em, 1fr) 4em minmax(0, 1.6fr); gap: 8px;
            padding: 3px 0; border-bottom: 1px solid var(--rule); break-inside: avoid; color: var(--ink); }
.fmzx-row span { overflow-wrap: anywhere; }
.fmzx-row span:nth-child(2) { color: var(--dim); }
.fmzx-th { color: var(--dim); font-weight: 500; break-after: avoid; }

/* The guide without its contents column: one column, its sections as cards (two side by side
   where two of at least 420 px fit), each line about 72 characters at most */
.guide { grid-template-columns: minmax(0, 1fr) !important; }
.guide > .article {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(420px, calc((100% - 20px) / 2))), 1fr));
  gap: 20px;
  align-items: start;
}
.guide > .article > section {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 20px 24px;
  min-width: 0;
}
.guide > .article > section > * { max-width: 72ch; }
.guide > .article > section h2 { margin-top: 0; }
@media (max-width: 760px) {
  .guide > .article > section { padding: 16px; }
}
