/* The devices' parts (kit.js) and the chain they stand in (dock.js): the look the owner said yes to, "Mix"
   (design ideas/devices/devices.html, 2026-11-21: "a mixture between our knobs and ableton buttons sliders etc"). Live's
   grid and sizes at 100 %, a pixel a point: a device 188 tall, its title bar 17, keys, choosers and boxes 13 tall; the
   editor's own knob on it (a dark cap, a white pointer, a thick arc from the start of its travel in the channel's
   colour, no default mark). --c is the channel's colour, set on the drawer. Nothing here changes with the window. */
.dchain, .dmenu { --dev: #1b1b1d; --bar: #232327; --disp: #0a0a0b; --dline: rgba(255,255,255,.06); --ghost: rgba(236,236,244,.16);
  --key: #2a2a30; --key-hi: #34343a; --track: #2c2c32; --warn: #f0a23a; --bad: #ff6a5c; --good: #9ccc4f; }
.dchain { display: flex; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #2e2e34 transparent; padding-bottom: 6px; font: 400 13px/1.45 var(--sans); }

/* a device: its controls placed in its own pixels (Live's points) */
.dv { flex: none; position: relative; height: 188px; background: var(--dev); border-radius: 3px; user-select: none; -webkit-user-select: none; }
.dv .dtb { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 17px; background: var(--bar); border-radius: 3px 3px 0 0; display: flex; align-items: center; gap: 3px; padding: 0 3px; box-sizing: border-box; cursor: default; }
.dv .dtb .dact { width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; background: var(--key); box-shadow: inset 0 0 0 1px #0b0b0d; cursor: pointer; flex: none; }
.dv.on .dtb .dact { background: var(--c); }
.dv .dtb .fold { width: 13px; height: 13px; border: 0; padding: 0; background: none; color: var(--faint); cursor: pointer; flex: none; display: grid; place-items: center; }
.dv .dtb .fold svg { width: 7px; height: 7px; fill: currentColor; }
.dv .dtb b { font: 650 10px/17px var(--sans); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; letter-spacing: .005em; }
.dv .dtb .mn { width: 13px; height: 13px; border: 0; padding: 0; background: none; color: var(--faint); cursor: pointer; flex: none; font: 700 10px/13px var(--sans); }
.dv .dtb .mn:hover, .dv .dtb .fold:hover { color: var(--fg); }
.dv .dtb button:focus { outline: none; } .dv .dtb button:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: -1px; }
.dv.off .dbody { filter: saturate(0) brightness(.62); }
.dv .dbody { position: absolute; inset: 0; }
.dv.soon .dbody, .dv.wait .dbody { display: grid; place-items: center; padding-top: 17px; color: var(--ghost); font: 500 10px var(--sans); }
.dv.fail .dtb b { color: var(--bad); }
.dv .dsec { position: absolute; background: rgba(0,0,0,.16); border-radius: 2px; }
.dv .dsec.on { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.dv .vline { position: absolute; width: 1px; background: var(--dline); }
/* folded: a 19 px strip, the activator on top, the name read upwards */
.dv.folded { width: 19px !important; }
.dv.folded .dbody, .dv.folded .dtb b, .dv.folded .dtb .mn { display: none; }
.dv.folded .dtb { flex-direction: column; height: 100%; padding: 3px 0; border-radius: 3px; }
.dv.folded .dtb .fold svg { transform: rotate(-90deg); }
.dv.folded .vname { display: block; }
.dv .vname { display: none; position: absolute; z-index: 3; left: 3px; top: 40px; writing-mode: vertical-rl; transform: rotate(180deg); font: 650 10px var(--sans); color: var(--dim); white-space: nowrap; pointer-events: none; }

/* the gap between devices holds the level meter; the last tile adds a device */
.dchain .dgap { flex: none; width: 11px; display: flex; align-items: center; justify-content: center; }
.dchain .dgap canvas { width: 5px; height: 46px; }
.dchain .dgap.dto { box-shadow: inset 2px 0 0 0 var(--acc), inset -2px 0 0 0 var(--acc); }        /* where a dragged device lands */
.dv.lift { opacity: .4; }
.dv .dtb[draggable="true"] { cursor: grab; }
.dchain .dadd { flex: none; width: 120px; height: 188px; margin-left: 11px; margin-right: 10px; border-radius: 3px; border: 1px dashed #2e2e34; display: grid; place-items: center; color: var(--faint); font: 500 10px var(--sans); text-align: center; cursor: pointer; background: none; position: relative; }
.dchain .dadd:hover { color: var(--fg); border-color: #45454c; } .dchain .dadd:focus { outline: none; } .dchain .dadd:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: -2px; }
.dmenu { position: fixed; z-index: 40; min-width: 160px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 4px; border-radius: 6px; background: #1f1f23; box-shadow: 0 8px 28px rgba(0,0,0,.55), inset 0 0 0 1px #2c2c32; font: 500 11px var(--sans); }
.dmenu button { display: flex; justify-content: space-between; gap: 16px; width: 100%; height: 22px; align-items: center; padding: 0 8px; border: 0; border-radius: 4px; background: none; color: var(--dim); font: inherit; text-align: left; cursor: pointer; }
.dmenu button:hover:not(:disabled), .dmenu button:focus-visible { background: #2a2a30; color: var(--fg); outline: none; } .dmenu button:disabled { cursor: default; }
.dmenu small { color: var(--faint); font-variant-numeric: tabular-nums; } .dmenu svg { width: 20px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.dmenu hr { border: 0; border-top: 1px solid #2c2c32; margin: 3px 0; }

/* the parts: one size, 13 tall, 1 px frame; off grey, on the channel's colour with dark text */
.dv .ky { position: absolute; box-sizing: border-box; height: 13px; border: 0; padding: 0 2px; border-radius: 2px; background: var(--key); box-shadow: inset 0 0 0 1px #0b0b0d; color: rgba(236,236,244,.82); font: 500 10px/13px var(--sans); text-align: center; white-space: nowrap; overflow: hidden; cursor: pointer; }
.dv .ky:hover { background: var(--key-hi); }
.dv .ky.on { background: var(--c); color: #111113; font-weight: 600; }
.dv .ky.dis { color: var(--ghost); cursor: default; } .dv .ky.dis:hover { background: var(--key); }
.dv .seg { position: absolute; display: flex; height: 13px; box-shadow: inset 0 0 0 1px #0b0b0d; border-radius: 2px; overflow: hidden; }
.dv .seg .ky { position: static; border-radius: 0; box-shadow: inset -1px 0 0 #0b0b0d; flex: 1; }
.dv .seg .ky:last-child { box-shadow: none; }
.dv .ch { position: absolute; box-sizing: border-box; height: 13px; border: 0; padding: 0 12px 0 4px; border-radius: 2px; background: var(--key); box-shadow: inset 0 0 0 1px #0b0b0d; color: rgba(236,236,244,.82); font: 500 10px/13px var(--sans); text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; }
.dv .ch::after { content: ""; position: absolute; right: 4px; top: 5px; border: 3px solid transparent; border-top: 3.5px solid var(--faint); }
.dv .ch:hover { background: var(--key-hi); } .dv .ch.dis { color: var(--ghost); cursor: default; }
.dv .bx { position: absolute; box-sizing: border-box; height: 13px; border-radius: 2px; background: #121214; box-shadow: inset 0 0 0 1px #0b0b0d; color: rgba(236,236,244,.88); font: 500 10px/13px var(--sans); text-align: center; font-variant-numeric: tabular-nums; cursor: ns-resize; overflow: hidden; white-space: nowrap; touch-action: none; }
.dv .bx i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--c) 34%, transparent); }
.dv .bx span { position: relative; } .dv .bx.dis { color: var(--ghost); cursor: default; }
.dv .lb { position: absolute; font: 500 10px/11px var(--sans); color: rgba(236,236,244,.62); white-space: nowrap; pointer-events: none; }
.dv .lb.c { transform: translateX(-50%); text-align: center; } .dv .lb.b { font-weight: 650; color: var(--fg); }
.dv .kn { position: absolute; cursor: ns-resize; touch-action: none; }
.dv .kn svg { position: absolute; top: 12px; overflow: visible; }
.dv .kn .l, .dv .kn .v { position: absolute; left: -8px; right: -8px; text-align: center; font: 500 10px/11px var(--sans); white-space: nowrap; pointer-events: none; }
.dv .kn .l { top: var(--tl); color: rgba(236,236,244,.62); } .dv .kn .v { color: rgba(236,236,244,.88); font-variant-numeric: tabular-nums; }
.dv .kn .v.nv { display: none; }
.dv .kn .tr { fill: none; stroke: var(--track); stroke-width: 3; stroke-linecap: round; }
.dv .kn .va { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; }
.dv .kn .cap { fill: #232327; stroke: #0b0b0d; stroke-width: 1; transform: scale(1.22); }
.dv .kn .pt { stroke: #e4e4e7; stroke-width: 1.6; stroke-linecap: round; transform: scale(1.22); }
.dv .kn .tk { stroke: #55555c; stroke-width: 1.2; stroke-linecap: round; }
.dv .kn .stx { font: 500 6.5px var(--sans); fill: rgba(236,236,244,.5); text-anchor: middle; dominant-baseline: middle; }
.dv .kn.dis { cursor: default; } .dv .kn.dis .pt { stroke: #55555c; } .dv .kn.dis .va { stroke: #3a3a40; } .dv .kn.dis .v, .dv .kn.dis .l { color: var(--ghost); }
/* (a ring on what the keyboard is on only: the owner, 2026-11-19, "clicking a knob shows blue border, remove pls") */
.dv .kn:focus, .dv .bx:focus, .dv .sl:focus, .dv .dv-v:focus, .dv .ky:focus, .dv .ch:focus { outline: none; }
.dv .kn:focus-visible svg { filter: drop-shadow(0 0 2px #fff); }
.dv .ky:focus-visible, .dv .ch:focus-visible, .dv .bx:focus-visible, .dv .sl:focus-visible, .dv .dv-v:focus-visible { outline: 1.5px solid rgba(255,255,255,.75); outline-offset: 1px; }
.dv .sl { position: absolute; height: 13px; cursor: ew-resize; touch-action: none; --tw: 2px; }
.dv .sl i { position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--track); }
.dv .sl b { position: absolute; left: 0; top: 6px; height: 1px; background: var(--c); }
.dv .sl u { position: absolute; top: 2px; width: 2px; height: 9px; background: #e4e4e7; border-radius: 1px; }
.dv .dp { position: absolute; background: var(--disp); border-radius: 2px; box-shadow: inset 0 0 0 1px #000; }
.dv .dp canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dv .led { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #2a2a30; box-shadow: inset 0 0 0 1px #0b0b0d; }
.dv .led.hot { background: var(--bad); } .dv .led.soft { background: var(--acc); }
.dv .ky svg, .dv .ch svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.dv .ch.ic { padding: 2px 12px 2px 4px; } .dv .ky.ic { padding: 1px 3px; }
.dv .dv-v { position: absolute; display: flex; gap: 4px; align-items: baseline; font: 500 10px/13px var(--sans); white-space: nowrap; cursor: ns-resize; touch-action: none; }
.dv .dv-v.stk { flex-direction: column; gap: 1px; align-items: center; transform: translateX(-50%); }
.dv .dv-v span { color: rgba(236,236,244,.42); } .dv .dv-v b { font-weight: 600; color: var(--c); font-variant-numeric: tabular-nums; } .dv .dv-v.warm b { color: var(--warn); }
.dv .dp .ky { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); color: var(--c); } .dv .dp .ky.on { background: var(--c); color: #111113; }
.dv .dp .hdr { position: absolute; font: 650 10px/11px var(--sans); color: rgba(236,236,244,.8); }
.dv .tri-r { position: absolute; width: 0; height: 0; border: 3.5px solid transparent; border-left: 4px solid var(--faint); }
@media (prefers-reduced-motion: reduce) { .dchain * { transition: none !important; } }

/* the console strip as one device (desk.js): its own drawing, its On and Reset the title bar's */
.dv .dk.wide { position: absolute; left: 0; top: 22px; } .dv .dk.wide .dk-head { display: none; } .dv .dk.wide .dk-chain { overflow: visible; } .dv .dk-say { top: -22px; right: 22px; height: 17px; max-width: 40%; z-index: 3; font-size: 10px; }        /* (what the hand is on, in the device's title bar) */

/* how much a chain costs, six steps (Live's Performance Impact), beside its name on the drawer's handle; and the
   whole of it in the footer, a number and a thin bar */
.dock-load { display: inline-flex; gap: 1px; align-items: center; margin-left: 2px; } .dock-load i { width: 4px; height: 8px; background: #2a2a30; } .dock-load i.on { background: var(--dim); }
/* (small and plain, a word and a number: the owner, 2026-11-21, "simplify the cpu make it smaller") */
.ecpu { display: flex; flex: none; align-items: baseline; gap: 4px; color: var(--faint); font: 500 10px/1 var(--sans); letter-spacing: .03em; font-variant-numeric: tabular-nums; } .ecpu::before { content: "CPU"; } .ecpu b { font-weight: 500; color: var(--dim); }
.ecpu.warm b { color: var(--warn, #f0a23a); } .ecpu.hot b { color: #ff6a5c; }
