:root {
  --bg: #ffffff;
  --fg: #1f1f1f;
  --muted: #616161;
  --line: #e0e0e0;
  --panel: #f5f5f5;
  --accent: #0e7490; /* QLA Voice teal */
  --accent-fg: #ffffff;
  --danger: #c50f1f;
  --warn: #9d5d00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1f1f;
    --fg: #f0f0f0;
    --muted: #adadad;
    --line: #3d3d3d;
    --panel: #292929;
    --accent: #4fb6cc;
    --accent-fg: #0b0b0b;
    --danger: #ff6b76;
    --warn: #f0b85a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 16px;
  font: 14px/1.4 "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
h1 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
p.sub { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
label { display: block; font-size: 12px; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
button.wide { width: 100%; padding: 10px; font-size: 15px; }
input[type="number"] {
  font: inherit; width: 100%; padding: 7px 8px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.status {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 4px; background: var(--panel); margin-bottom: 12px;
  font-weight: 600;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.status.on .dot { background: var(--accent); animation: pulse 1.2s infinite; }
.status.err { color: var(--danger); }
.status.err .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: 0.3; } }
.meter { height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.meter > div { height: 100%; width: 0; background: var(--accent); transition: width 80ms linear; }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.readout > div { background: var(--panel); border-radius: 4px; padding: 8px 10px; min-width: 0; }
.readout .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.readout .v { font-size: 26px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg { font-size: 12px; min-height: 1.4em; color: var(--muted); }
.msg.warn { color: var(--warn); }
.msg.err { color: var(--danger); }
.help { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.help ul { padding-left: 18px; margin: 6px 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
