/* SPL Meter — every colour comes from the shell's variables so themes and per-tile tints reach in. Nothing here is hardcoded except the canvas heat ramp, which client.js owns because it has to interpolate. */ [data-module="spl-meter"] .spl { height: 100%; display: flex; flex-direction: column; min-height: 0; } /* ── readout ──────────────────────────────────────────────────────── */ [data-module="spl-meter"] .spl-readout { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25em; min-height: 0; padding: 0.25rem; } [data-module="spl-meter"] .spl-value { display: flex; align-items: baseline; gap: 0.2em; line-height: 1; color: var(--text); } /* Sized off the tile, so one cell and six cells both read well. Height has to be in the min() as well as width: a 2x1 tile is wide and short, and sizing on width alone pushes the digits straight out through the top. */ [data-module="spl-meter"] .spl-num { font-size: clamp(1.25rem, min(20cqw, 42cqh), 6rem); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.02em; } [data-module="spl-meter"] .spl-unit { font-size: clamp(0.65rem, min(6cqw, 13cqh), 1.5rem); color: var(--muted); } [data-module="spl-meter"] .spl-sub { font-size: 0.7rem; color: var(--muted); text-align: center; line-height: 1.3; } [data-module="spl-meter"] .spl-readout[data-level="warn"] .spl-num { color: var(--warn); } [data-module="spl-meter"] .spl-readout[data-level="alarm"] .spl-num { color: var(--danger); } [data-module="spl-meter"] .spl-readout[data-level="idle"] .spl-num { color: var(--muted); } /* ── level bars ───────────────────────────────────────────────────── */ [data-module="spl-meter"] .spl-bars { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 0.4rem; min-height: 0; overflow-y: auto; } [data-module="spl-meter"] .spl-bar { display: grid; grid-template-columns: 1.4em 1fr 3.4em; align-items: center; gap: 0.5rem; font-size: 0.75rem; } [data-module="spl-meter"] .spl-bar-label { color: var(--muted); text-align: right; } [data-module="spl-meter"] .spl-bar-track { position: relative; height: 0.65rem; border-radius: 0.35rem; background: color-mix(in srgb, var(--border) 60%, transparent); overflow: hidden; } [data-module="spl-meter"] .spl-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--accent); transition: width 60ms linear; } [data-module="spl-meter"] .spl-bar[data-level="warn"] .spl-bar-fill { background: var(--warn); } [data-module="spl-meter"] .spl-bar[data-level="alarm"] .spl-bar-fill { background: var(--danger); } [data-module="spl-meter"] .spl-bar[data-level="idle"] .spl-bar-fill { background: var(--muted); } /* Peak hold sits on the track rather than inside the fill, so it stays visible when the bar falls away underneath it. */ [data-module="spl-meter"] .spl-bar-peak { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); opacity: 0.75; } [data-module="spl-meter"] .spl-bar-value { font-variant-numeric: tabular-nums; text-align: right; color: var(--text); } [data-module="spl-meter"] .spl-bar.clip .spl-bar-value { color: var(--danger); } /* ── canvas tiles ─────────────────────────────────────────────────── */ [data-module="spl-meter"] .spl-canvas { flex: 1; display: block; width: 100%; min-height: 0; border-radius: 0.25rem; } /* The readout scales off both of the tile's dimensions, so the container has to be sized on both axes — inline-size alone leaves cqh undefined. */ [data-module="spl-meter"] .spl { container-type: size; } /* The sub-line is the first thing to go when the tile gets short: the number is the point, and a clipped caption under it is worse than none. */ [data-module="spl-meter"] .spl-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } @container (max-height: 90px) { [data-module="spl-meter"] .spl-sub { display: none; } }