/* The Workbench style's live screen, after the app's workbench_cards.dart and workbench_parts.dart. */
.wb { font-family: 'RobotoCondensed', var(--font-sys); }
.wb-label { font-family: 'RobotoCondensed', var(--font-sys); font-weight: 700; font-size: 11px; letter-spacing: 1.5px; line-height: 1.1;
  text-transform: uppercase; color: #a89e8f; }
.wb-lcdfont { font-family: 'ShareTechMono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.wb-panel { padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.wb-front { background: #2e3134; }

/* The tubes (NixieTubes): an unlit 8 behind each digit, the mesh in front, a 160 ms fade. */
.wb-hero { text-align: center; }
:root[data-mode="light"] .wb-hero, :root[data-mode="light"] .wb-cells { background: #2a2520; }
.nixie-row { display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.wb-tubes { display: flex; align-items: flex-end; gap: calc(var(--h) * .06); }
.wb-tubes .tube { position: relative; width: calc(var(--h) * .58); height: var(--h); overflow: hidden; display: grid; place-items: center;
  border: 1px solid #4a423a; border-radius: calc(var(--h) * .29) calc(var(--h) * .29) calc(var(--h) * .06) calc(var(--h) * .06);
  background: radial-gradient(90% 90% at 50% 30%, #ffffff22, #ffffff05 50%, transparent), #120f0c; }
.wb-tubes b { grid-area: 1 / 1; font: 300 calc(var(--h) * .82) / 1 'BarlowCondensed', sans-serif; color: #ffb15e;
  text-shadow: 0 0 calc(var(--h) * .05) #ff8a1f, 0 0 calc(var(--h) * .14) #ff8a1fcc; }
.wb-tubes b.off { color: #ffb15e12; text-shadow: none; }
.wb-tubes b.in { animation: wbIn .16s both; }
.wb-tubes b.out { animation: wbOut .16s both; }
@keyframes wbIn { from { opacity: 0; } }
@keyframes wbOut { to { opacity: 0; } }
.wb-tubes .mesh { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 6px, #00000059 6px 7px), repeating-linear-gradient(0deg, transparent 0 6px, #00000059 6px 7px); }
.wb-hero .pct { margin-bottom: 10px; font: 300 40px/1 'BarlowCondensed', sans-serif; color: #ffb15e; text-shadow: 0 0 10px #ff8a1f; }
.wb-hero .charge { display: block; margin-top: 8px; font-size: 12px; letter-spacing: 3px; }
.wb-hero .bottom { display: flex; align-items: center; gap: 10px; margin-top: 12px; text-align: left; }
.wb-hero .leds { flex: 1; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.wb-ledrow { display: inline-flex; align-items: center; gap: 6px; }
.wb-ledrow .wb-label { letter-spacing: 1px; }
.wb-ledrow.on .wb-label { color: #e9e2d6; }
.wb-hero .posts { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wb-hero .posts > div { display: flex; gap: 12px; }
.wb-hero .posts .wb-label { font-size: 10px; }
.post { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 2px 3px #0008; }
.post.red { background: radial-gradient(circle at 35% 30%, #ff8a80, #c62828 50%, #6d1010); }
.post.black { background: radial-gradient(circle at 35% 30%, #777, #1a1a1a 50%, #000); }

/* LEDs. */
.wb-led { --s: 12px; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; border: 1px solid #0009;
  background: radial-gradient(circle at 35% 32%, #4a4540, #26221e); transition: box-shadow .15s; }
.wb-led.on { background: radial-gradient(circle at 35% 32%, color-mix(in srgb, var(--c) 40%, #fff), var(--c));
  box-shadow: 0 0 calc(var(--s) * .8) color-mix(in srgb, var(--c) 75%, transparent); }

/* The bench supply's LCD. */
.wb-front .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wb-lcd { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wb-lcd > .wb-label { color: #c9cdd1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-lcd .screen { display: flex; justify-content: flex-end; align-items: baseline; gap: 4px; padding: 5px 8px; border-radius: 4px; background: #a7b88a;
  border: 1px solid #55604a; box-shadow: inset 0 1px 4px #00000073; overflow: hidden; white-space: nowrap; }
.wb-lcd .digits { display: inline-grid; justify-items: end; font: var(--size) / 1.05 'ShareTechMono', monospace; color: #1e2814; }
.wb-lcd .digits > * { grid-area: 1 / 1; }
.wb-lcd .ghost { color: #1e28141a; }
.wb-lcd .unit { font: calc(var(--size) * .45) / 1 'ShareTechMono', monospace; color: #33402a; }

/* The scope. */
.wb-scope .screen { margin-top: 6px; height: 110px; border-radius: 8px; border: 2px solid #3a332b; overflow: hidden; }
.wb-scope canvas { display: block; width: 100%; height: 100%; }
.wb-scope > .wb-label { color: var(--muted); letter-spacing: 1px; }

/* Cells: an LED bargraph per cell. */
.wb-cells { background: #221e1a; }
.wb-cells .head { display: flex; align-items: center; gap: 10px; }
.wb-cells .head .title { flex: 1; font-size: 14px; color: #e9e2d6; }
.wb-cells .muted { color: #a89e8f; font-size: 14px; }
.wb-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 60px; min-height: 36px; padding: 0 8px; border-radius: 5px; cursor: pointer;
  background: #3a3530; border: 1px solid #000; }
.wb-btn .wb-label { color: #e9e2d6; }
.wb-cells .stopline { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 1px; color: #ffb15e; text-transform: none; }
.wb-cells .stopline.near { color: #ffc530; }
.wb-cells .note { font-size: 11px; color: #a89e8f; }
.wb-cells .fine-note { margin-top: 6px; font-size: 12px; }
.wb-cols { display: grid; gap: 10px 4px; margin-top: 10px; }
.wb-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wb-col .stack10 { display: flex; flex-direction: column; gap: 2px; width: 100%; height: 74px; padding: 2px; border-radius: 3px;
  border: 1.5px solid transparent; transition: border-color .3s; }
.wb-col.framed .stack10 { border-color: #ffc530; }
.wb-col .stack10 i { flex: 1; border-radius: 1px; background: #ffffff14; --c: #4be36a; }
.wb-col .stack10 i.yellow { --c: #ffc530; } .wb-col .stack10 i.red { --c: #ff4436; }
.wb-col .stack10 i.on { background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, transparent); }
.wb-col .v { margin-top: 3px; font-size: 11px; color: #e9e2d6; white-space: nowrap; }
.wb-col .v.odd { color: #ffc530; }
.wb-col .n { font-size: 9.5px; letter-spacing: 0; }
.wb-col > .wb-led { margin-top: 2px; }

.wb-temps { display: grid; gap: 10px; }
.wb-temps .temp { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.wb-temps .temp .wb-lcd { flex: 1; }
.wb-temps .temp .wb-led { margin-top: 18px; }

/* The alarm: the LCD reads "Err" and blinks (1.2 Hz). */
.wb-alert { display: flex; align-items: center; gap: 14px; }
.wb-alert .err { padding: 6px 10px; border-radius: 4px; background: #a7b88a; border: 1px solid #55604a; font: 26px/1 'ShareTechMono', monospace;
  color: #1e2814; animation: wbErr .833s step-end infinite; }
@keyframes wbErr { 0% { color: #1e2814; } 55% { color: #1e28141f; } }
.wb-alert .row { display: flex; align-items: center; gap: 8px; }
.wb-alert .title { font: 700 15px/1.1 'RobotoCondensed', sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--danger); }
.wb-alert .detail { margin-top: 4px; font-size: 13px; color: var(--fg); }
