/* Gekko IoT dashboard. Editorial dark theme shared with gekko.claudeclaw.com: solid surfaces,
   hairlines, 4px corners, one accent (#00ff66), Newsreader + Geist + Geist Mono. */

@font-face { font-family: Geist; src: url(assets/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(assets/geist-mono.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Newsreader; src: url(assets/newsreader.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0d0b;
  --surface: #0f1311;
  --raised: #141916;
  --hover: #171d1a;
  --line: rgb(255 255 255 / 0.1);
  --line-soft: rgb(255 255 255 / 0.06);
  --fg: #e9ede9;
  --muted: #9aa39d;
  --faint: #7d8680;
  --accent: #00ff66;
  --accent-hover: #0bff75;
  --accent-ink: #04120a;
  --warn: #ffb84d;
  --err: #ff6b6b;
  --r: 4px;
  --sans: Geist, ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
  --serif: Newsreader, Georgia, serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--sans); overflow-x: hidden; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono, code, kbd, input, select, output { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: 12px; color: var(--muted); }
kbd { font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
h1, h2, h3, p { margin: 0; }

button { font: inherit; color: inherit; cursor: pointer; }
.primary {
  font: 600 14px/1 var(--sans); color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: var(--r); padding: 10px 16px; transition: background-color 160ms var(--ease);
}
.primary:hover { background: var(--accent-hover); }
.ghost {
  font: 500 13px/1 var(--sans); background: transparent; border: 1px solid var(--line);
  border-radius: var(--r); padding: 8px 12px; transition: background-color 160ms var(--ease);
}
.ghost:hover { background: var(--hover); }
.ghost.danger:hover { color: var(--err); }
.ghost.small { padding: 6px 10px; font-size: 12px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--fg); }

input[type=text], input[type=number], input[type=password], select {
  font-size: 13px; color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 8px 10px; min-width: 0;
}
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--faint); }

/* ------------------------------------------------------------------ top bar */
.top { display: flex; align-items: center; gap: 24px; padding: 16px 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.brand img { display: block; height: 22px; width: auto; }
.brand span { font: 500 13px/22px var(--mono); color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); }
.hub { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hub.warn { color: var(--warn); }
.who { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }

main { max-width: 1320px; padding: 48px 32px 96px; }

/* ------------------------------------------------------------------ sign-in */
.signin { max-width: 560px; margin-top: 8vh; }
.signin h1 { font: 400 48px/1.05 var(--serif); letter-spacing: -0.01em; }
.signin > p { margin-top: 16px; color: var(--muted); max-width: 52ch; }
.signin form { margin-top: 40px; }
.signin label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.signin .row { display: flex; gap: 8px; }
.signin input { flex: 1; font-size: 14px; padding: 10px 12px; }
.err { color: var(--err); font-size: 13px; min-height: 20px; margin-top: 8px; }

/* ------------------------------------------------------------------ lede + stats */
.lede h1 { font: 400 52px/1.02 var(--serif); letter-spacing: -0.015em; max-width: 18ch; }
.lede .sub { margin-top: 12px; font-size: 13px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; margin: 40px 0 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 16px 40px 16px 0; margin-right: 40px; border-right: 1px solid var(--line-soft); }
.stats div:last-child { border-right: 0; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 400 26px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.stats dd small { font-size: 13px; color: var(--muted); margin-left: 4px; }

/* ------------------------------------------------------------------ layout */
.split { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 56px; align-items: start; }
.boards h2, .block-head h3 { font: 600 13px/1 var(--sans); color: var(--muted); }
.boards ul { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.boards li { border-bottom: 1px solid var(--line-soft); }
.boards li.empty { padding: 16px 0; color: var(--muted); font-size: 13px; }
.boards li.child .dev { padding-left: 32px; } /* a child device sits under the gateway it syncs through */
.dev {
  --cell: var(--bg);
  display: grid; grid-template-columns: 10px 1fr; column-gap: 12px; row-gap: 2px; align-items: center;
  width: 100%; text-align: left; background: var(--cell); border: 0; padding: 14px 12px; border-radius: var(--r);
  transition: background-color 160ms var(--ease);
}
.dev:hover { --cell: var(--hover); }
.dev[aria-current=true] { --cell: var(--raised); }
.dev .dev-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev .dev-meta { grid-column: 2; font-size: 12px; color: var(--muted); }
.dev .spark-box { grid-column: 2; display: block; margin-top: 6px; }
.dev > *, .reading > * { pointer-events: none; } /* clicks land on the button even while its contents redraw */
.mark { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--faint); }
.mark.on { background: var(--accent); border-color: var(--accent); }
.mark.warn { background: var(--warn); border-color: var(--warn); }

.empty-state {
  border: 1px dashed rgb(0 255 102 / 0.35); background: rgb(0 255 102 / 0.03); border-radius: var(--r);
  padding: 40px; max-width: 640px;
}
.empty-state h2 { font: 400 32px/1.1 var(--serif); }
.empty-state p { margin-top: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ device detail */
.d-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.d-head h2 { font: 400 40px/1.05 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.d-head .d-meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.d-meta > span + span::before { content: '·'; margin: 0 8px; color: var(--faint); }
.d-meta .on { color: var(--fg); }
.d-actions { display: flex; gap: 8px; }
.rename { display: flex; gap: 8px; align-items: center; }
.rename input { font: 400 24px/1.1 var(--serif); padding: 6px 10px; width: min(420px, 60vw); }

.block { margin-top: 48px; }
.block-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.block-head .note { font-size: 12px; color: var(--faint); }
.block-head .ghost { margin-left: auto; }

/* View 1 / View 2: two quiet text tabs, the chosen one underlined */
.views { display: flex; gap: 14px; margin-left: auto; }
.views + .ghost { margin-left: 4px; }
.views button {
  background: none; border: 0; padding: 4px 0; font: 500 12px/1 var(--mono); color: var(--faint); white-space: nowrap;
  box-shadow: inset 0 -1px 0 transparent; transition: color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.views button:hover { color: var(--fg); }
.views button[aria-pressed=true] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }

/* readings: a hairline grid, one cell per field */
.readings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reading {
  --cell: var(--bg);
  display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--cell);
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px; min-height: 132px;
  transition: background-color 160ms var(--ease);
}
button.reading:hover { --cell: var(--hover); }
.reading[aria-pressed=true] { --cell: var(--raised); }
.reading .r-top { display: flex; justify-content: space-between; gap: 8px; font: 12px/1.2 var(--mono); color: var(--muted); }
.reading .r-age { color: var(--faint); }
.reading .r-val { font: 400 28px/1.15 var(--mono); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading .r-val.text { font-size: 18px; }
.reading .spark { margin-top: auto; }
.swatch { width: 22px; height: 22px; border-radius: var(--r); border: 1px solid var(--line); flex: none; }
.r-val.tick { animation: tick 700ms var(--ease); }
@keyframes tick { from { color: var(--accent); } to { color: var(--fg); } }

.spark { display: block; width: 100%; height: auto; }
.spark path, .chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .end, .chart .end { fill: var(--accent); stroke: var(--cell, var(--bg)); stroke-width: 2; }

/* the big chart */
.chart { position: relative; margin: 24px 0 0; }
.chart figcaption { display: flex; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.chart figcaption b { font: 500 13px var(--mono); color: var(--fg); }
.chart svg { display: block; width: 100%; height: 240px; touch-action: none; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--mono); }
.chart .cross { stroke: var(--line); stroke-width: 1; }
.chart .hit { fill: transparent; }
.tip {
  position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--r); padding: 6px 8px; font: 12px/1.4 var(--mono); white-space: nowrap; transform: translate(-50%, -100%);
}
.tip span { color: var(--muted); }
.chart details { margin-top: 8px; font-size: 13px; color: var(--muted); }
.chart summary { cursor: pointer; width: max-content; }
.chart details table { margin-top: 8px; }

/* controls */
.controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ctl { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 112px; }
.ctl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ctl-name { font-weight: 600; font-size: 14px; }
.ctl .row { display: flex; align-items: center; gap: 10px; }
.ctl .row input[type=text], .ctl .row input[type=number] { flex: 1; }
.ctl output { font-size: 13px; min-width: 4ch; text-align: right; }
.ctl .hexval { font-size: 13px; color: var(--muted); }
.ctl .remove { align-self: flex-start; margin-top: auto; }
.controls .none { padding: 16px; color: var(--muted); font-size: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); grid-column: 1 / -1; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 56px; height: 40px; padding: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 2px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 2px; }

.switch {
  position: relative; width: 44px; height: 24px; flex: none; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 0; transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 2px; background: var(--muted);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.switch[aria-checked=true] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked=true] .knob { transform: translateX(20px); background: var(--accent-ink); }

.seg { display: flex; flex-wrap: wrap; }
.seg button {
  font: 500 13px/1 var(--mono); background: var(--surface); border: 1px solid var(--line); padding: 8px 12px;
  margin: 0 -1px -1px 0; transition: background-color 160ms var(--ease);
}
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg button:hover { background: var(--hover); }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* View 1: the board's controls as Gekko Live panel widgets on a dotted grid (24 columns, 32 px rows).
   Positions and the --cw cell width come from app.js through element.style. */
.canvas {
  --cw: 40px; position: relative; border: 1px dashed var(--line); border-radius: var(--r); background-color: #0b0f0c;
  background-image: radial-gradient(circle at 1px 1px, #2c3631 1px, transparent 1.5px); background-size: var(--cw) 32px;
}
.canvas.empty, .canvas.stack { height: auto !important; }
.canvas.stack { display: flex; flex-direction: column; gap: 8px; padding: 8px; background-size: 16px 16px; }
.canvas .none { padding: 16px; color: var(--muted); font-size: 13px; }
.wghost { position: absolute; border: 1px dashed rgb(0 255 102 / 0.4); background: rgb(0 255 102 / 0.05); border-radius: var(--r); pointer-events: none; }

.wg {
  position: absolute; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; transition: border-color 120ms var(--ease);
}
/* keyboard focus lights a widget up; a mouse click on its control leaves the canvas clean.
   :has() stays in rules of its own, so a browser without it still keeps the hover rule. */
.wg:hover { border-color: rgb(255 255 255 / 0.18); }
.wg:has(:focus-visible) { border-color: rgb(255 255 255 / 0.18); }
.wg.drag { border-color: rgb(0 255 102 / 0.4); z-index: 3; opacity: 0.94; transition: none; }
.canvas.stack .wg { position: static; flex: none; }
.wh {
  display: flex; align-items: center; gap: 8px; height: 26px; flex: none; padding: 0 10px; border-bottom: 1px solid var(--line-soft);
  cursor: grab; user-select: none; touch-action: none;
}
.wh:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.wg.drag .wh { cursor: grabbing; }
.canvas.stack .wh { cursor: default; touch-action: auto; }
.wh .lb { font: 500 12px/1 var(--sans); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wh .meta { margin-left: auto; display: grid; justify-items: end; font: 11px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.wh .meta > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 4px; transition: opacity 160ms var(--ease); }
.wh .rv.off, .wh .st { opacity: 0; }
.wh .st.on { opacity: 1; }
.wh .st.ok { color: var(--accent); }
.wh .st.err { color: var(--err); }
.wh .st svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wg.editing .wh { padding-right: 30px; }
.wg .x {
  position: absolute; top: 3px; right: 4px; height: 20px; min-width: 20px; padding: 0 4px; border: 0; border-radius: 2px;
  background: none; color: var(--faint); font: 14px/20px var(--sans);
}
.wg .x:hover { color: var(--fg); background: var(--raised); }
.wg .x.sure { font: 11px/20px var(--mono); color: var(--err); background: var(--surface); }
.wg .x:focus-visible { outline-offset: -2px; } /* the widget clips anything drawn outside it */
.wb { flex: 1; min-height: 0; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 8px; container-type: size; }
.grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; opacity: 0; transition: opacity 120ms var(--ease); }
.grip::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 6px; height: 6px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); }
.wg:hover .grip, .wg.drag .grip { opacity: 1; }
.wg:has(:focus-visible) .grip { opacity: 1; }
.canvas.stack .grip { display: none; }

.wg .big { font: 400 22px/1.1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-slider .big { font-size: clamp(18px, 26cqh, 30px); }
.wg .scale { display: flex; justify-content: space-between; font: 11px/1 var(--mono); color: var(--faint); }
@container (max-height: 52px) { .wg .scale { display: none; } }
input[type=range].rng { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; background: transparent; cursor: pointer; flex: none; }
.rng::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), rgb(255 255 255 / 0.14) var(--p, 0%) 100%); }
.rng::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 20px; margin-top: -8px; border-radius: 2px; background: var(--fg); border: 0; }
.rng:active::-webkit-slider-thumb, .rng:focus-visible::-webkit-slider-thumb { background: var(--accent); }
.rng:focus-visible { outline: none; }
.rng::-moz-range-track { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.14); }
.rng::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.rng::-moz-range-thumb { width: 12px; height: 20px; border-radius: 2px; background: var(--fg); border: 0; }
/* Firefox's focus cue, kept apart from the -webkit- rule above */
.rng:active::-moz-range-thumb, .rng:focus-visible::-moz-range-thumb { background: var(--accent); }
.rng.hue::-webkit-slider-runnable-track { height: 8px; background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.rng.hue::-webkit-slider-thumb { margin-top: -6px; }
.rng.hue::-moz-range-track { height: 8px; background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.rng.hue::-moz-range-progress { background: transparent; }

.wg-color .wb { justify-content: flex-start; }
.sv { position: relative; flex: 1; min-height: 56px; border-radius: 2px; cursor: crosshair; touch-action: none; }
.kn { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.6); pointer-events: none; }
.crow { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.sw { width: 22px; height: 22px; flex: none; border-radius: 2px; border: 1px solid var(--line); }
.wg input[type=text].hex { width: 84px; flex: none; padding: 4px 6px; font-size: 12px; background: var(--bg); text-transform: lowercase; }
.pre { display: flex; align-items: flex-start; gap: 4px; flex: none; }
/* 18 px squares that shrink, still square, in a widget resized narrower than the row */
.pre button { flex: 0 1 18px; min-width: 0; aspect-ratio: 1; padding: 0; border-radius: 2px; border: 1px solid var(--line); }
.pre button:hover { border-color: var(--fg); }

.wseg { display: flex; height: 30px; flex: none; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wseg button {
  flex: 1; min-width: 0; padding: 0 4px; background: none; border: 0; border-left: 1px solid var(--line);
  font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: clip;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.wseg button:first-child { border-left: 0; }
.wseg button:hover { color: var(--fg); }
.wseg button[aria-pressed=true] { color: var(--fg); background: var(--hover); }
.wseg button.on[aria-pressed=true], .wseg.pick button[aria-pressed=true] { color: var(--accent-ink); background: var(--accent); }
/* .wseg and .wnum clip their corners, so their focus ring is drawn inside the part */
.wseg button:focus-visible, .wnum .st:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.wseg button.on[aria-pressed=true]:focus-visible, .wseg.pick button[aria-pressed=true]:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ink); }
.act {
  width: 100%; flex: 1; max-height: 52px; min-height: 30px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--raised); font: 500 13px/1 var(--mono); color: var(--fg);
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
.act:hover { border-color: var(--muted); }
.act:active, .act.fired { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wnum { display: flex; align-items: stretch; height: 30px; flex: none; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wnum input[type=text] { flex: 1; min-width: 0; border: 0; border-radius: 0; background: var(--bg); padding: 0 8px; font-size: 14px; }
.wg-number .wnum input { text-align: center; }
.wnum input[type=text]:focus-visible { background: #070908; }
.wnum:has(input:focus-visible) { border-color: var(--accent); }
.wnum .st { width: 32px; flex: none; border: 0; background: var(--raised); color: var(--muted); font: 16px/1 var(--mono); }
.wnum .st.go { width: auto; padding: 0 10px; font-size: 12px; border-left: 1px solid var(--line); }
.wnum .st:hover { color: var(--fg); }
.wnum .st:active { color: var(--accent); }
.wg select.wsel { height: 30px; padding: 0 8px; background: var(--bg); flex: none; }

.addctl, .sendcmd { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 16px; }
.addctl label, .sendcmd label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.addctl input, .sendcmd input { width: 140px; }
.addctl input.num { width: 72px; }
.sendcmd .title { width: 100%; font-size: 13px; color: var(--muted); }
.msg { margin-top: 12px; font-size: 13px; min-height: 20px; color: var(--muted); }
.msg.gone { opacity: 0; transition: opacity 200ms var(--ease); }
.msg.err { color: var(--err); }

/* activity */
.log { width: 100%; border-collapse: collapse; font-size: 13px; }
.log th { text-align: left; font: 500 12px var(--sans); color: var(--muted); padding: 8px 16px 8px 0; border-bottom: 1px solid var(--line); }
.log td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.log td.mono { white-space: nowrap; }
.log td .swatch { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }
.log .by { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.status.ok svg { color: var(--accent); }
.status.wait { color: var(--muted); }
.status.warn { color: var(--warn); }
.log .none td { color: var(--muted); }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .lede h1 { font-size: 40px; }
}
@media (max-width: 640px) {
  .top { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .hub { order: 3; width: 100%; margin-left: 0; }
  .who { margin-left: auto; }
  main { padding: 32px 16px 64px; }
  .signin h1 { font-size: 36px; }
  .stats div { padding-right: 20px; margin-right: 20px; }
  .d-head h2 { font-size: 32px; }
  .log th:nth-child(4), .log td:nth-child(4) { display: none; }
  .addctl input, .sendcmd input { width: 100%; }
  .addctl label, .sendcmd label { flex: 1 1 140px; }
  /* the Controls head keeps its title, view switch and Edit on one line; the note goes under them */
  .controls-head { flex-wrap: wrap; row-gap: 8px; }
  .controls-head .note { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
