/* © 2026 Cromulent, Inc. All Rights Reserved.
   devices.css - the device setup page. Reads only the tokens and bench.css; the card is automate's hardware
   drawer in bench's skin: a header per device, sections inside, switches, one save per card. */


.page-devices { --page-accent: var(--orchid); }   /* the page's frame is shell.css's; its one colour (Maestro, 2026-11-06: "take out the tricolor fonts") */
.dev-state { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.dev-state:empty { display: none; }
.dev-state a { color: var(--orchid); }

.dev-list { display: flex; flex-direction: column; gap: 12px; }
.dev-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.dev-card[open] { border-color: color-mix(in srgb, var(--orchid) 35%, var(--line)); }
.dev-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.dev-card > summary::-webkit-details-marker { display: none; }
.dev-card > summary:focus-visible { outline: 2px solid var(--orchid); outline-offset: -2px; }
.dev-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.dev-kind { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.dev-chip { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-faint); }
.dev-chip.live { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.dev-chip.recent { color: var(--caution); border-color: color-mix(in srgb, var(--caution) 50%, var(--line)); }
.dev-chip.down { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.dev-reach { margin-left: 0; }
.dev-own .dev-mode { margin-left: 0; }

.dev-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.dev-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dev-sec:first-child { border-top: 0; padding-top: 0; }
.dev-sec-title { font-family: var(--pixel); font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-faint); }
.dev-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.dev-row > .dev-what { flex: 0 0 150px; color: var(--ink-dim); }
.dev-row input[type="number"], .dev-row select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; min-width: 0; }
.dev-row input[type="number"] { width: 96px; }
.dev-row select { flex: 0 1 220px; }
.dev-row input[type="range"] { flex: 0 1 180px; accent-color: var(--orchid); }
.dev-row output { font-family: var(--mono); font-size: 12px; color: var(--ink); min-width: 2ch; }
.dev-row input:focus-visible, .dev-row select:focus-visible { outline: 2px solid var(--orchid); outline-offset: 1px; }
.dev-unit { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.dev-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); cursor: pointer; }
.dev-check input { accent-color: var(--orchid); margin: 0; }
.dev-check:has(input:checked) { color: var(--ink); border-color: color-mix(in srgb, var(--orchid) 55%, var(--line)); }
.dev-check:has(input:disabled) { opacity: .55; cursor: default; }
.dev-check .dev-gone { color: var(--caution); }
.dev-note { margin: 0; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }
.dev-err { margin: 0; font-size: 13px; color: var(--bad); }
.dev-err:empty, .dev-ok:empty { display: none; }
.dev-ok { margin: 0; font-size: 13px; color: var(--good); }
.dev-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn[disabled] { opacity: .5; cursor: progress; }

@media (max-width: 560px) { .dev-row > .dev-what { flex-basis: 100%; } }

/* the head: the title and the one add button beside it */

/* bench's own devices: one row each, remove asks inline */
.dev-own-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.dev-own .dev-chip { margin-left: auto; }
.dev-own .btn { padding: 5px 12px; font-size: 12.5px; }
.dev-ask { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--caution); }
.dev-list:empty { display: none; }

/* the add-device dialog and the one-time credential screen (standpoints.net's mint modal, in bench's skin) */
.dev-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); padding: 20px;
  width: min(560px, calc(100vw - 32px)); box-sizing: border-box; }
.dev-dialog::backdrop { background: rgba(5, 8, 14, .72); }
.dev-dialog form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dev-dialog-title { margin: 0; font-size: 19px; color: var(--orchid); }
.dev-pick { border: 0; margin: 0; padding: 0; }
.dev-pick legend, .dev-field > span:first-child { font-family: var(--pixel); font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-faint); padding: 0; margin-bottom: 8px; }
.dev-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dev-kindcard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.dev-kindcard:hover { border-color: color-mix(in srgb, var(--orchid) 45%, var(--line)); }
.dev-kindcard.on { border-color: var(--orchid); color: var(--ink); box-shadow: 0 0 0 1px var(--orchid) inset; }
.dev-kindcard:focus-visible { outline: 2px solid var(--orchid); outline-offset: 1px; }
.dev-kindname { font-weight: 600; font-size: 14px; }
.dev-kindhow { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.dev-field { display: flex; flex-direction: column; gap: 6px; }
.dev-field input { font: inherit; font-family: var(--mono); font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 10px; }
.dev-field input:focus-visible { outline: 2px solid var(--orchid); outline-offset: 1px; }
.dev-preview { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); }
.dev-preview.bad { color: var(--caution); }
.dev-actions-end { justify-content: flex-end; }

.dev-reveal { display: none; }
.dev-reveal[open] { display: flex; flex-direction: column; gap: 12px; }
.dev-reveal-name { margin: 0; font-size: 24px; font-weight: 700; color: var(--orchid); overflow-wrap: anywhere; }
.dev-warn { margin: 0; font-size: 13.5px; color: var(--caution); }
.dev-warn-soft { color: var(--ink-dim); }
.dev-cred { margin: 0; display: grid; gap: 6px; }
.dev-cred div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.dev-cred dt { font-family: var(--pixel); font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-faint); }
.dev-cred dd { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.dev-secret { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dev-secret .btn { padding: 4px 10px; font-size: 12px; }
.dev-settings { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* the whole-fleet roster (tv2's devices screen): find, owner, when, and the small in-row forms for rename and give */
.dev-filter { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.dev-filter input { flex: 1; min-width: 0; font: inherit; font-family: var(--mono); font-size: 13.5px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.dev-filter input:focus-visible, .dev-inline-input:focus-visible, .dev-whose select:focus-visible, .dev-whose input:focus-visible { outline: 2px solid var(--orchid); outline-offset: 1px; }
.dev-count { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
.dev-owner { font-size: 12.5px; color: var(--ink); padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--orchid) 12%, transparent); }
.dev-when { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.dev-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dev-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-basis: 100%; }
.dev-inline .dev-note { flex-basis: 100%; }
.dev-inline-input, .dev-whose select, .dev-whose input { font: inherit; font-family: var(--mono); font-size: 13.5px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.dev-whose { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-whose input { flex: 1; min-width: 10ch; }
.dev-said { padding: 0 16px 12px; margin: 0; color: var(--good); }
.dev-usb { padding: 0 16px 12px; margin: 0; }
@media (max-width: 560px) { .dev-when { display: none; } .dev-acts { flex-basis: 100%; } }

/* teenysignal's deck editor (deck.js): deck tabs, the page strip, the 4 x 3 pad as the board lays it out, a key's panel */
.deck-tabs, .deck-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-tab, .deck-page { font: inherit; font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.deck-tab { border-left: 4px solid var(--key, var(--line)); border-radius: var(--radius-sm); }
.deck-tab.on, .deck-page.on { color: var(--ink); border-color: var(--orchid); box-shadow: 0 0 0 1px var(--orchid) inset; }
.deck-tab.on { border-left-color: var(--key, var(--orchid)); }
.deck-add { border-style: dashed; color: var(--ink-faint); }
.deck-tab:focus-visible, .deck-page:focus-visible, .deck-key:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }
.deck .dev-row input[type="text"] { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 6px 10px; min-width: 0; flex: 0 1 220px; }
.deck .dev-row input[type="color"] { width: 40px; height: 32px; padding: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.deck-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.deck-key { position: relative; aspect-ratio: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--key, transparent) 28%, var(--panel-2)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--key, var(--line)) 70%, transparent); }
.deck-key.dark { background: var(--panel-2); box-shadow: none; color: var(--ink-faint); }
.deck-key.on { border-color: var(--orchid); box-shadow: 0 0 0 2px var(--orchid); }
.deck-key.lost { border-color: var(--bad); }
.deck-key-n { position: absolute; top: 4px; left: 6px; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.deck-key-label { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.deck-key-hold { font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); }
.deck-keypanel, .deck-signal { display: flex; flex-direction: column; gap: 8px; }
.deck-keypanel { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.deck-keypanel .dev-check { align-self: flex-start; }
.deck .dev-row select { flex: 0 1 300px; }

/* the teenysense's timeline (sense.js): one change a line, newest first */
.sense-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.sense-list li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid var(--line); }
.sense-what { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.sense-when { margin-left: auto; }
