/* Machine pages (#2723), on top of site.css: the sound line, the MIDI keyboard status, the
   multi-bar pattern grid and the signal graph written by scripts/gen-machine-pages.mjs. */

.machine-preset { color: var(--text); margin: 0 0 6px; }
.machine-preset strong { font-weight: 650; }
.machine-midi { color: var(--cyan); font-size: 0.9rem; margin: 6px 0 0; }
.machine-midi[hidden], [data-action="midi"][hidden] { display: none; }

/* A phrase of up to eight bars: the grid scrolls sideways inside its own box, not the page. */
.pattern-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pattern-scroll .pattern { max-width: none; }
.pattern td.hold { background: rgba(255, 74, 28, 0.3); }

/* The signal graph: as wide as the column, never smaller than half its layout size (text then
   reads at about 10 px) nor larger than it; a wider graph scrolls sideways inside the figure.
   The SVG is drawn at a tenth of the layout size (scripts/gen-machine-pages.mjs, signalGraphSvg),
   so --graph-w is a tenth of the layout width and sizes below are in those units. */
.signal-graph { margin: 12px 0 18px; }
.graph-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 8px;
}
.graph-scroll svg.graph { display: block; width: 100%; height: auto; min-width: calc(var(--graph-w) * 5px); max-width: calc(var(--graph-w) * 10px); }
.graph .node rect { fill: var(--panel-strong); stroke: var(--ink); stroke-width: 0.2; }
.graph .node text { fill: var(--text); font: 600 2px/1 system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; }
.graph .node.io rect { fill: rgba(255, 74, 28, 0.22); stroke: var(--ink); }
.graph path.audio { fill: none; stroke: var(--ink); stroke-width: 0.25; }
.graph path.mod { fill: none; stroke: var(--amber); stroke-width: 0.2; stroke-dasharray: 0.7 0.6; opacity: 0.75; }
.graph marker.audio path { fill: var(--ink); }
.graph marker.mod path { fill: var(--amber); }
