/* One frame for every experiment: header, location, navigation, controls, drawing. */
dialog.ws-lab[open]{position:fixed!important;inset:12px!important;margin:0!important;width:calc(100vw - 24px)!important;max-width:none!important;height:calc(100dvh - 24px)!important;max-height:none!important;min-width:0!important;box-sizing:border-box;zoom:1!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding-top:12px!important;padding-inline:14px!important;overflow:hidden!important}
.ws-lab>.ws-header{height:42px!important;min-height:42px!important;max-height:42px!important;flex:0 0 42px!important;display:flex!important;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding:0 0 8px;margin:0}
.ws-header>.ws-title{font:650 23px/30px 'Segoe UI',sans-serif!important;margin:0!important;min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-header-actions{display:flex;align-items:center;gap:8px;flex:none}
.ws-header-actions button{height:34px!important;min-height:34px!important;padding:5px 11px!important;border:1px solid var(--control-border)!important;border-radius:6px;background:var(--control)!important;color:var(--text)!important;font:600 14px/20px 'Segoe UI',sans-serif!important;cursor:pointer;white-space:nowrap}
.ws-header-actions [data-ws-close]{width:36px;font-size:23px!important;padding:3px!important}
.ws-lab .ws-native-title,.ws-lab .ws-native-heading,.ws-lab .ws-retired-heading,.ws-lab .ws-prose-hidden{display:none!important}
.ws-location{height:32px!important;min-height:32px!important;flex:0 0 32px!important;display:flex!important;align-items:center!important;border:1px solid var(--line)!important;border-radius:6px!important;padding:2px 10px!important;background:var(--bg)!important;color:var(--text)!important;cursor:pointer;text-align:left;font:14px/24px 'Segoe UI',sans-serif!important;margin:0!important}
.ws-chain{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font:600 14px/22px 'Segoe UI',sans-serif;color:var(--muted)}
.ws-chain>span{padding:1px 8px;border:1px solid transparent;border-radius:4px;white-space:nowrap}.ws-chain>.is-here{background:var(--mini-bg);border-color:var(--mini-border);color:var(--mini-ink)}.ws-chain>i{font-style:normal;color:var(--muted)}
.ws-lab>.ws-tabs{height:38px!important;min-height:38px!important;flex:0 0 38px!important;display:flex!important;align-items:stretch;gap:7px!important;margin:0!important;padding:0!important;overflow:visible}
.ws-tabs>button{font:600 14px/20px 'Segoe UI',sans-serif!important;padding:6px 12px!important;min-height:36px!important;white-space:nowrap}
.ws-lab .ws-layout{grid-template-columns:280px minmax(0,1fr)!important;gap:18px!important;flex:1!important;min-height:0!important;min-width:0}
.ws-lab .ws-inspector{box-sizing:border-box;min-width:0;min-height:0;padding:12px!important;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:16px}
.ws-lab .ws-inspector label{font-size:15px;line-height:1.3}.ws-lab .ws-inspector select{font-size:15px;min-height:32px}
.ws-lab .uc-audio-toolbar{height:58px!important;min-height:58px!important;max-height:58px!important;flex-basis:58px!important}
.ws-lab>.learning-guide{left:14px;right:14px}.ws-lab>.uc-transport-toolbar{left:14px;right:14px}
.ws-lab .ws-inspector h3{font-size:18px;margin:0 0 10px}
/* Technical terms are links, without changing paragraph or heading metrics. */
button.ws-term{display:inline!important;position:static!important;min-width:0!important;width:auto!important;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;border:0!important;border-bottom:1px dotted currentColor!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:inherit!important;font:inherit!important;line-height:inherit!important;vertical-align:baseline!important;cursor:help!important;white-space:normal!important}
button.ws-term:hover,button.ws-term:focus-visible{color:var(--purple)!important;outline:2px solid var(--focus);outline-offset:2px}
.ws-collected-notes{padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:14px}.ws-collected-notes p{font-size:18px;line-height:1.5}
#wsHardware{width:min(1280px,calc(100vw - 32px));height:min(790px,calc(100dvh - 32px));max-width:none;max-height:none;padding:18px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;box-sizing:border-box;overflow:hidden}
#wsHardware[open]{display:flex;flex-direction:column;gap:14px}#wsHardware>header{height:40px;min-height:40px;display:flex;align-items:center;gap:12px}#wsHardware h2{font-size:24px;margin:0;flex:1}#wsHardware header button{font-size:24px;width:36px}#wsHardware nav{display:flex;gap:8px;flex:none}#wsHardware button{background:var(--control);color:var(--text);border:1px solid var(--control-border);padding:7px 12px;border-radius:6px;font-size:15px;cursor:pointer}#wsHardware button.selected{background:var(--mini-bg);border-color:var(--mini-border);color:var(--mini-ink)}
.ws-hardware-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;flex:1;min-height:0}.ws-hardware-layout>section{min-width:0;min-height:0;display:flex;flex-direction:column;gap:10px}.ws-hardware-layout .ws-photo{position:relative;flex:1;min-height:0;padding:0!important;background:white!important;overflow:hidden}.ws-photo img{width:100%;height:100%;object-fit:contain;display:block}.ws-photo>span{position:absolute;bottom:8px;right:8px;padding:5px 9px;background:#101b2de8;color:white;font-size:14px;border-radius:5px}.ws-hardware-layout small,.ws-hardware-layout a{font-size:14px;color:var(--muted)}.ws-hardware-notes{overflow:auto;padding:6px 4px}.ws-hardware-notes h3{font-size:21px;line-height:1.4;margin:0}.ws-hardware-notes p{font-size:18px;line-height:1.5;margin:5px 0}.ws-hardware-notes dl{display:grid;grid-template-columns:115px 1fr;gap:12px;margin:10px 0;font-size:17px;line-height:1.4}.ws-hardware-notes dt{font-weight:700;color:var(--purple)}.ws-hardware-notes dd{margin:0}.ws-hardware-chain{padding:12px 0;border-block:1px solid var(--line)}
#wsHardware.ws-photo-large .ws-hardware-layout{grid-template-columns:1fr}#wsHardware.ws-photo-large .ws-hardware-notes{display:none}
@media(max-height:800px){dialog.ws-lab[open]{gap:7px!important}.ws-header>.ws-title{font-size:21px!important}.ws-location{height:28px!important;min-height:28px!important;flex-basis:28px!important}.ws-lab .ws-inspector{padding:9px!important}.ws-lab .ws-layout{gap:12px!important}.ws-hardware-notes p{font-size:16px}.ws-hardware-notes dl{font-size:16px;gap:8px}}
@media(max-width:1150px){.ws-lab .ws-layout{grid-template-columns:245px minmax(0,1fr)!important}.ws-header>.ws-title{font-size:20px!important}.ws-header-actions button{padding-inline:7px!important;font-size:13px!important}.ws-chain{gap:3px}.ws-chain>span{padding-inline:4px}}

.ws-prose-hidden{display:none!important}
#wsMainActions{display:flex;gap:7px}#wsMainActions[hidden]{display:none}
#wsMainActions button{height:30px;font-size:13px!important;white-space:nowrap}
.ws-lab .ws-header-actions #openClassD{order:-1}

.ws-photo-modes{display:flex;gap:8px}.ws-photo-modes button{flex:1;font-size:14px!important}
.ws-board-schematic{display:block;width:100%;height:100%;background:#f4f6f6}.ws-board-schematic text{font:17px 'Segoe UI';fill:#132b23;stroke:none}.ws-board-schematic circle{fill:#d8d5ac;stroke:#354f3f;stroke-width:2}
.ws-pcb{fill:#7da88c;stroke:#264b38;stroke-width:3}.ws-pin-header{fill:#182121;stroke:#43564c;stroke-width:2}.ws-pin{fill:#d0c283;stroke:#333}
.ws-chip rect{fill:#1b2425;stroke:#aebbb6;stroke-width:2}.ws-chip path{stroke:#6c7774;stroke-width:7;fill:none}.ws-chip text{fill:white;font-weight:700}
.ws-pcb-trace{fill:none;stroke-width:5;stroke-linejoin:round}.ws-trace-0{stroke:#12637d}.ws-trace-1{stroke:#72510b}.ws-trace-2{stroke:#66358a}.ws-output-trace{stroke:#365d40}
.ws-board-port{fill:#a9b4b1;stroke:#354e42;stroke-width:3}

.ws-has-hardware{position:relative}
button.ws-inline-hardware{position:absolute;bottom:10px;left:10px;right:10px;height:125px;display:grid;grid-template-columns:100px 1fr;align-items:center;gap:10px;padding:7px;border:1px solid var(--control-border);border-radius:7px;background:var(--control);color:var(--text);cursor:zoom-in;font-size:14px;line-height:1.4;text-align:left}
button.ws-inline-hardware[hidden]{display:none!important}.ws-inline-hardware img{width:100%;height:105px;object-fit:contain;background:white;border-radius:4px}

.ws-lab>.learning-guide{bottom:12px!important}

.ws-header>.ws-topic-menu{width:125px!important;min-width:125px!important;max-width:125px!important;height:34px!important;padding:4px 20px 4px 8px!important;background:var(--control);color:var(--text);border:1px solid var(--control-border);border-radius:6px;font:600 14px 'Segoe UI';cursor:pointer}

#hexLab.ws-lab #hexContent{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0}
#hexLab.ws-lab #hexContent>.eyebrow,#hexLab.ws-lab .hex-side-notes{display:none!important}
#hexLab.ws-lab .hex-wide-body{grid-template-columns:minmax(0,1fr);min-height:0!important;flex:1;align-content:center}
#hexLab.ws-lab .hex-equivalence{margin:0;padding:8px}
#hexLab.ws-lab .hex-base-length{padding:6px 10px;margin:0}
#hexLab.ws-lab .hex-base-length>div{font-size:20px}
#hexLab.ws-lab .hex-base-length>div>span{font-size:14px}
#hexLab.ws-lab .hex-footer{flex:none;margin:0;padding-top:5px}
#hexLab.ws-lab .hex-calculation{padding:5px 0}
#endianLab.ws-lab #endianContent{min-height:0;flex:1}
#endianLab.ws-lab #endianContent>.eyebrow{display:none!important}

/* Selected actions use the same readable foreground in both themes. */
dialog.ws-lab button.selected,dialog.ws-lab button[aria-pressed=true],#linkCodingLab button.selected,#mediumLab button.selected,#audioLinksLab button.selected{background:var(--selected-bg)!important;color:var(--selected-ink)!important;border-color:var(--selected-bg)!important}
#miniNote,#serialInfo,#fifoInfo{width:min(1150px,calc(100vw - 32px))!important;max-width:none!important;max-height:calc(100dvh - 32px)!important;box-sizing:border-box;padding:22px 26px}
#miniNoteBody,#serialInfoBody,#fifoInfoBody{font-size:18px;line-height:1.5}
#miniNoteBody>p,#serialInfoBody>p,#fifoInfoBody>p{font-size:18px;line-height:1.5}
