/* WARNIGHT RE&DY TEC LIGHT parameter tool — a bench instrument, not a website. */

:root {
  --bg: #0b0e13;
  --panel: #141922;
  --panel-2: #1b212c;
  --line: #2a3240;
  --line-soft: #222936;
  --text: #e6eaf2;
  --text-dim: #98a2b5;
  --text-faint: #6b768b;
  --accent: #e2001a;          /* Boplan red */
  --accent-soft: #ff3b50;
  --ok: #3fbf75;
  --warn: #e8b93f;
  --err: #ef4f5f;
  --alarm: #ff8c1a;           /* the ring while the alarm is up */
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }

/* Several panels are display:grid/flex, which would otherwise win over [hidden]. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #171c25, #11151d);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 5px;
  background: var(--accent);
  position: relative;
  box-shadow: 0 0 0 1px #ff5c6d33, 0 4px 14px #e2001a55;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px 7px auto auto;
  width: 10px; height: 12px;
  border: 3px solid #fff; border-left: none; border-top: none;
  border-bottom-right-radius: 3px;
}

.topbar h1 { font-size: 15px; }
.topbar p { margin: 1px 0 0; font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.03em; text-transform: uppercase; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line);
  background: var(--panel);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.pill-off .dot { background: #55607a; }
.pill-on { border-color: #2f6b4a; background: #12261c; color: #8fe6b3; }
.pill-on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill-err { border-color: #6b2f38; background: #26141a; color: #ffb3bd; }
.pill-err .dot { background: var(--err); }

/* ---------------------------------------------------------------- layout */

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
  padding-bottom: 64px;
}

.sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 74px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.card-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.hint { font-size: 11.5px; color: var(--text-faint); }
.note { font-size: 12px; color: var(--text-faint); margin: 8px 0 0; line-height: 1.5; }
.note code { color: var(--text-dim); }

/* Where the server will connect — read-only; it comes from its config file. */
.broker-target {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  margin-top: 10px; padding: 8px 10px;
  background: #0e1219;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}
.broker-target .url { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.broker-target .who { font-size: 11.5px; color: var(--text-faint); }
.broker-target.err { color: var(--err); border-color: var(--err); }

/* ---------------------------------------------------------------- forms */

label { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 10px; }
.card > label:first-of-type { margin-top: 0; }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  background: #0e1219;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
}
input:focus, select:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px #e2001a22; }
input:disabled { opacity: 0.5; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-tight { display: flex; gap: 6px; margin-top: 4px; }
.row-tight input { margin-top: 0; }

.actions { display: flex; gap: 8px; margin-top: 14px; }

button {
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.small { padding: 5px 10px; font-size: 12px; }

.primary { background: var(--accent); color: #fff; }
.primary:not(:disabled):hover { background: var(--accent-soft); }

.ghost { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.ghost:not(:disabled):hover { background: #242c3a; border-color: #3a4455; }

.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--text-dim); }
.check input { margin: 0; }

/* ---------------------------------------------------------------- devices */

.sense-status {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #10161f;
  border: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-dim);
}

.device-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.device-list .empty { color: var(--text-faint); font-size: 12.5px; padding: 6px 2px; }

.device-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  text-align: left;
  color: var(--text);
}
.device-item:hover { border-color: #3a4455; }
.device-item.selected { border-color: var(--accent); background: #221419; }
.device-item .id { font-family: var(--mono); font-size: 13px; }
.device-item .sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.device-item .badge {
  margin-left: auto; flex: none;
  font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.device-item .badge.match { border-color: #2f6b4a; background: #12261c; color: #8fe6b3; }
.device-item .badge.gateway { border-color: #4a4030; background: #241e12; color: #e8c98a; }

.manual { margin-top: 14px; }

/* ---------------------------------------------------------------- workspace */

.workspace { min-width: 0; }

.placeholder {
  display: grid; place-items: center;
  min-height: 420px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #0f131a;
}
.placeholder-inner { text-align: center; max-width: 380px; padding: 20px; }
.placeholder-inner h2 { font-size: 16px; text-transform: none; letter-spacing: -0.01em; color: var(--text); }
.placeholder-inner p { color: var(--text-faint); font-size: 13px; }

.device-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.device-head h2 { font-size: 17px; text-transform: none; letter-spacing: -0.01em; color: var(--text); }
.device-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--text-faint); }
.device-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.85fr);
  grid-template-areas: "viz dial" "ambient ambient" "params params";
  gap: 16px;
  align-items: start;
}
.viz-card { grid-area: viz; }
.dial-card { grid-area: dial; }
.ambient-card { grid-area: ambient; }
.params-card { grid-area: params; }

/* ---------------------------------------------------------------- module */

.module-wrap { display: grid; place-items: center; padding: 6px 0 2px; }
#module { width: 100%; max-width: 360px; height: auto; }

.quad { cursor: pointer; transition: opacity 0.12s; }
.quad .quad-fill { transition: fill-opacity 0.15s, stroke 0.12s; }
.quad:hover .quad-fill { fill-opacity: 0.95; }
.quad.selected .quad-fill { fill-opacity: 1; }
.quad .quad-outline { fill: none; stroke: transparent; stroke-width: 4; }
.quad.selected .quad-outline { stroke: #fff; }
.quad .quad-label {
  font: 600 34px/1 system-ui, sans-serif;
  fill: #141922;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.quad .quad-sub {
  font: 500 10px/1 var(--mono, monospace);
  fill: #141922aa;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  letter-spacing: 0.08em;
}
.quad.movement .quad-fill { fill-opacity: 1; }
.quad.movement .quad-outline { stroke: #fff; stroke-dasharray: 6 5; animation: pulse 1s linear infinite; }
@keyframes pulse { to { stroke-dashoffset: -22; } }

.hub { cursor: pointer; }
.hub:hover circle { stroke: #4a5568; }
.hub.selected circle { stroke: var(--accent); stroke-width: 3; }
.hub-line1 { font: 600 13px/1 system-ui, sans-serif; fill: var(--text); text-anchor: middle; }
.hub-line2 { font: 400 10px/1 var(--mono, monospace); fill: #6b768b; text-anchor: middle; }
.hub-alarm { font: 600 10px/1 system-ui, sans-serif; fill: var(--err); text-anchor: middle; letter-spacing: 0.08em; }

/* Held for three seconds after the last alarm context — see ALARM_RING_MS. */
.alarm-ring { fill: none; stroke: var(--alarm); stroke-width: 12; }
.alarm-ring-glow { fill: none; stroke: var(--alarm); stroke-width: 28; opacity: 0.2; }

.zone-arc { fill: none; stroke-width: 9; stroke-linecap: round; }

.viz-legend { margin-top: 10px; }
.zone-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.zone-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  font-size: 12px;
}
.zone-chip .swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.zone-chip.occupied { border-color: #fff6; box-shadow: 0 0 0 1px #ffffff22; }
.zone-chip .members { font-family: var(--mono); color: var(--text-dim); }

/* ---------------------------------------------------------------- dial */

.dial-wrap { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
#dial { width: 140px; height: 140px; flex: none; }

.dial-tick circle { fill: #1f2734; stroke: #303a4a; stroke-width: 1; transition: fill 0.12s, stroke 0.12s; }
.dial-tick.active circle { fill: var(--accent); stroke: var(--accent-soft); }
.dial-tick text { font: 600 8px/1 var(--mono, monospace); fill: var(--text-faint); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.dial-tick.active text { fill: #fff; }
.dial-face { fill: #11151d; stroke: var(--line); stroke-width: 1.5; }
.dial-pointer { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1); transform-origin: 80px 80px; }
.dial-knurl { fill: #1a202b; stroke: #2b3342; stroke-width: 1; }

.dial-readout { min-width: 0; }
.dial-slot {
  display: inline-block; font-family: var(--mono); font-size: 26px; font-weight: 600;
  color: var(--accent-soft); line-height: 1;
}
.dial-readout > div { margin-top: 4px; }
.dial-readout strong { display: block; font-size: 13.5px; }
.dial-readout code { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.05em; }

.dial-summary { margin: 0 0 6px; font-size: 13px; color: var(--text); }
.dial-detail { margin: 0 0 12px; font-size: 12px; color: var(--text-faint); }

.dial-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 5px; }
.dial-entry {
  display: flex; gap: 7px; align-items: baseline;
  padding: 5px 8px; border-radius: 6px;
  background: #10151d; border: 1px solid transparent;
  font-size: 11.5px; color: var(--text-dim);
  text-align: left; width: 100%;
}
.dial-entry.active { border-color: var(--accent); background: #1e1218; color: var(--text); }
.dial-entry .n { font-family: var(--mono); color: var(--text-faint); }
.dial-entry.active .n { color: var(--accent-soft); }
.dial-entry.nosense { opacity: 0.6; }

/* ---------------------------------------------------------------- params */

.params-subtitle { margin: 0 0 12px; font-size: 12.5px; color: var(--text-faint); }

.param-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.param-tab {
  background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text-dim);
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 7px;
}
.param-tab:hover { border-color: #3a4455; }
.param-tab.active { background: #221419; border-color: var(--accent); color: var(--text); }
.param-tab .swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }

.param-form { display: grid; gap: 10px; }

.param-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 150px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px 12px;
  background: #10151d;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.param-row.changed { border-color: var(--warn); background: #191509; }

.param-name { font-size: 13px; font-weight: 500; }
.param-key { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.param-help { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.45; }

.param-input { margin: 0; }
.param-input input, .param-input select { margin-top: 0; }
.param-unit { font-size: 11px; color: var(--text-faint); margin-top: 4px; display: block; }

.param-meta { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.param-meta .live { color: var(--text-dim); font-family: var(--mono); }
.param-meta .raw { font-family: var(--mono); color: #7d8aa3; }
.param-meta .stale { color: var(--warn); }

.param-footer { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.param-status { font-size: 12.5px; color: var(--text-faint); }
.param-status.ok { color: var(--ok); }
.param-status.err { color: var(--err); }

/* ---------------------------------------------------------------- log */

.log-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #0e1219;
  border-top: 1px solid var(--line);
}
.log-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: transparent; border: none; color: var(--text-dim);
  padding: 9px 20px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.log-toggle:hover { color: var(--text); }
.log-count { font-family: var(--mono); font-size: 11px; color: var(--text-faint); background: var(--panel-2); border-radius: 999px; padding: 1px 8px; }

.log-body { display: none; border-top: 1px solid var(--line-soft); }
.log-drawer.open .log-body { display: block; }

.log-controls { display: flex; align-items: center; gap: 14px; padding: 8px 20px; border-bottom: 1px solid var(--line-soft); }

.log-list { list-style: none; margin: 0; padding: 6px 0; max-height: 260px; overflow-y: auto; font-family: var(--mono); font-size: 11.5px; }
.log-list li { display: grid; grid-template-columns: 62px 46px minmax(0, 1fr); gap: 10px; padding: 3px 20px; }
.log-list li:hover { background: #141922; }
.log-list .t { color: #5a6478; }
.log-list .dir { font-weight: 600; }
.log-list .dir.tx { color: var(--accent-soft); }
.log-list .dir.rx { color: #5fa9e8; }
.log-list .topic { color: var(--text-dim); }
.log-list .payload { color: #6b768b; word-break: break-all; }

/* ---------------------------------------------------------------- login */

.login-body {
  display: grid; place-items: center;
  min-height: 100vh; padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  padding: 26px 24px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px #0007;
}
.login-card .brand { margin-bottom: 22px; }
.login-card .brand h1 { font-size: 15px; }
.login-card .brand p { margin: 1px 0 0; font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.03em; text-transform: uppercase; }

.login-form button { width: 100%; margin-top: 18px; justify-content: center; }
.login-error {
  margin: 12px 0 0; padding: 8px 10px;
  font-size: 12px; color: var(--err);
  background: #2a1418; border: 1px solid #5a2028; border-radius: 7px;
}
.login-card .note { margin-top: 18px; }

/* Sits in the topbar next to the connection pill. */
.session { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-faint); }
.session .who { font-family: var(--mono); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1120px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .workspace-grid { grid-template-columns: 1fr; grid-template-areas: "viz" "dial" "ambient" "params"; }
}

@media (max-width: 640px) {
  .layout { padding: 12px; }
  .row { grid-template-columns: 1fr; }
  .param-row { grid-template-columns: 1fr; }
  .log-list li { grid-template-columns: 52px 40px minmax(0, 1fr); padding-inline: 12px; }
}


/* ---------------------------------------------------------------- dial source */

.dial-source { margin: 0 0 6px; font-size: 11.5px; }
.dial-source.unknown { color: var(--text-faint); }
.dial-source.live { color: var(--ok); }

/* ---------------------------------------------------------------- read-only params */

.param-row.readonly { background: #0d1117; border-style: dashed; }
.param-row.readonly .param-name { color: var(--text-dim); }
.param-readonly {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  background: #0b0f15;
}

/* ---------------------------------------------------------------- colour */

/* The colour control, in the parameters card in place of an RGB parameter form. */
.color-block .note { margin-top: 0; }

.color-row { display: flex; gap: 14px; align-items: stretch; margin: 12px 0; }

.color-swatch {
  width: 92px; flex: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 24px #0008;
}

.color-sliders { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: center; }
.color-sliders label { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: baseline; }
.color-sliders output { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.color-sliders input[type="range"] {
  grid-column: 1 / -1;
  width: 100%; height: 6px;
  margin: 2px 0 0;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a3240, #4a5568);
}
.color-sliders .slider-hue {
  background: linear-gradient(90deg, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.color-sliders input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #11151d;
  box-shadow: 0 1px 4px #000a;
  cursor: pointer;
}
.color-sliders input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid #11151d; cursor: pointer;
}

.color-presets { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.color-preset {
  width: 30px; height: 30px; padding: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.color-preset:hover { border-color: #fff8; transform: translateY(-1px); }

.color-raw { font-size: 11px; color: var(--text-faint); }

/* ---------------------------------------------------------------- ambient */

.ambient-now { font-family: var(--mono); font-size: 15px; color: var(--text); }

.ambient-chart-wrap { position: relative; margin: 10px 0 6px; }
.ambient-chart {
  display: block;
  width: 100%; height: 120px;
  background: #0d1117;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  touch-action: none;
}
.ambient-area { fill: #5b9ff022; stroke: none; }
.ambient-line { fill: none; stroke: #5b9ff0; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ambient-guide { stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.ambient-guide.min { stroke: #5b9ff066; }
.ambient-guide.max { stroke: #edd45f88; }
.ambient-dot { fill: #fff; stroke: #5b9ff0; stroke-width: 2; }
.ambient-hover-line { stroke: #5b9ff0aa; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ambient-hover-dot { fill: #5b9ff0; stroke: #fff; stroke-width: 1.5; }

/* Follows the cursor over the chart; pointer-events off so it never steals the move. */
.ambient-tip {
  position: absolute; z-index: 3; pointer-events: none;
  transform: translate(-50%, -100%);
  padding: 5px 8px;
  background: #0d1117ee;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px #0009;
}
.ambient-tip .v { display: block; font-family: var(--mono); font-size: 12px; color: var(--text); }
.ambient-tip .mv { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.ambient-tip .ts { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }

.ambient-empty { margin: 10px 0 0; font-size: 12px; color: var(--text-faint); }

.ambient-stats { display: grid; gap: 4px; margin-top: 8px; }
.ambient-stat {
  display: grid; grid-template-columns: 54px 58px 78px 1fr; gap: 8px; align-items: baseline;
  padding: 5px 9px; border-radius: 6px; background: #10151d;
  font-size: 12px;
}
.ambient-stat .k { color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10.5px; }
.ambient-stat .v { font-family: var(--mono); color: var(--text); }
.ambient-stat .ts { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.ambient-stat .mv { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.ambient-stat.max .v { color: var(--warn); }
.ambient-stat.min .v { color: #5b9ff0; }


/* ---------------------------------------------------------------- unread rows */

/* A row showing a schema default rather than anything the device said. It must not
   be mistakable for a reading — see the Hold Time case in the README. */
.param-row.unread { border-style: dashed; border-color: #3a4455; }
.param-row.unread .param-name,
.param-row.unread .param-readonly,
.param-row.unread input,
.param-row.unread select { color: var(--text-faint); font-style: italic; }

.param-unread-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #241e12;
  border: 1px solid #4a4030;
  color: #e8c98a;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  font-style: normal;
}
