/* CMOS control room: the model remains wide, with its controls in reach. */
.cmos-page{max-width:1440px;padding:0 28px 64px;font-size:16px;--cmos-line:#dce4ef;--cmos-navy:#11233e;--cmos-blue:#4b63de}
.cmos-header{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding:42px 0 25px}
.cmos-header .eyebrow{font-size:12px;letter-spacing:1.5px;margin:0 0 12px}
.cmos-header h1{font-size:clamp(29px,3.2vw,43px);letter-spacing:-1.4px;line-height:1.28;margin:0 0 14px;color:#20344e}
.cmos-header p{max-width:750px;font-size:16px;line-height:1.8;color:#64758e;margin:0}
.cmos-mode-switch{display:flex;flex-wrap:wrap;gap:5px;background:#e9edf5;border:1px solid #dce3ef;border-radius:10px;padding:5px;flex-shrink:0;align-self:flex-start}
.cmos-mode-switch a{min-height:42px;display:inline-flex;justify-content:center;align-items:center;padding:9px 14px;border-radius:7px;font-size:14px;line-height:1.5;color:#66758c;font-weight:600;white-space:nowrap}
.cmos-mode-switch a:hover{color:#3c52be;background:#f7f9fd}
.cmos-mode-switch a[aria-current="page"],.cmos-mode-switch a.active{background:#fff;color:#3b52be;box-shadow:0 2px 7px #1f355312}
.cmos-progress{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:17px 20px;background:white;border:1px solid var(--cmos-line);border-radius:12px;margin:0 0 16px;color:#5b6d86;font-size:14px}
.cmos-progress strong{font-size:16px;color:#2c4263}
.cmos-progress p{margin:3px 0 0;font-size:14px}
.cmos-progress progress{width:180px;max-width:100%;height:7px;accent-color:var(--cmos-blue);border:0;border-radius:8px;overflow:hidden}
.cmos-progress progress::-webkit-progress-bar{background:#e7ecf6;border-radius:8px}
.cmos-progress progress::-webkit-progress-value{background:var(--cmos-blue);border-radius:8px}
.cmos-progress-track{height:6px;background:#e6ebf5;overflow:hidden;border-radius:6px;width:180px;max-width:100%}
.cmos-progress-track>span,.cmos-progress-track>i,.cmos-progress-track>div{display:block;height:100%;background:var(--cmos-blue);border-radius:inherit;transition:width .2s}
.cmos-stepper{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:2px;padding:3px 2px 12px;margin:0 0 8px;scrollbar-width:thin;scrollbar-color:#b9c5db transparent}
.cmos-stepper>.cmos-step,.cmos-stepper>button{position:relative;flex:0 0 150px;min-width:0;min-height:77px;scroll-snap-align:start;border:1px solid #dce4ef;border-radius:10px;background:#fff;padding:12px 13px;text-align:left;color:#73829a;line-height:1.5;box-shadow:0 1px 2px #20344e03}
.cmos-stepper button:hover:not(:disabled){border-color:#9baaea;background:#f7f9ff}
.cmos-stepper button>span,.cmos-stepper button>small{display:block;font-size:12px;letter-spacing:.04em;color:inherit;margin-bottom:3px}
.cmos-stepper button>strong{display:block;font-size:14px;font-weight:650;color:inherit;line-height:1.5;word-break:keep-all}
.cmos-stepper button.active,.cmos-stepper button[aria-current="step"]{border-color:#5069de;background:#4b63de;color:white;box-shadow:0 4px 13px #4b63de21}
.cmos-stepper button.done,.cmos-stepper button.finished{border-color:#b9ddcf;background:#f2faf6;color:#357f68}
.cmos-stepper button.active.done,.cmos-stepper button.active.finished{border-color:#5069de;background:#4b63de;color:white}
.cmos-stepper button:disabled{opacity:.6;background:#f1f4f9;color:#8591a3}
.cmos-workbench{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(310px,1fr);border:1px solid #d7e1ef;border-radius:17px;overflow:hidden;background:#fff;box-shadow:0 8px 30px #23416a07;align-items:stretch}
.cmos-viewer{min-width:0;background:var(--cmos-navy);color:#d9e7fa;display:flex;flex-direction:column;position:relative}
.cmos-viewer-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 21px;border-bottom:1px solid #ffffff10;font-size:12px;letter-spacing:1px;color:#9eb3d1}
.cmos-viewer-top strong{font-size:14px;letter-spacing:0;color:#d2dff3;font-weight:550}
.cmos-viewer-top>span:last-child{font-size:12px;letter-spacing:.03em}
.cmos-canvas{position:relative;isolation:isolate;min-width:0;width:100%;height:clamp(370px,35vw,550px);min-height:370px;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#1e3757 0,#11233e 70%)}
.cmos-canvas>canvas,.cmos-canvas>svg{display:block;width:100%;height:100%;max-width:100%;touch-action:none;outline-offset:-4px}
.cmos-canvas>canvas:focus-visible{outline:3px solid #97acff}
.cmos-canvas .cmos-loading,.cmos-canvas .cmos-fallback{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:25px;color:#b8cbe7;font-size:15px;line-height:1.8}
.cmos-canvas .cmos-label{position:absolute;pointer-events:none;padding:5px 8px;border-radius:5px;background:#10243de8;color:#dfeaff;border:1px solid #7993bd45;font-size:12px;line-height:1.5}
.cmos-view-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:15px 19px;border-top:1px solid #ffffff0d;border-bottom:1px solid #ffffff0d;background:#142a47}
.cmos-view-controls button,.cmos-viewer-top button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;background:#223b5d;border:1px solid #496080;border-radius:7px;color:#c9d9ef;font-size:14px;font-weight:500;line-height:1.5}
.cmos-view-controls button:hover,.cmos-viewer-top button:hover{background:#2e4a70;border-color:#6d88b5}
.cmos-view-controls button[aria-pressed="true"],.cmos-view-controls button.active{background:#546de1;border-color:#8297ef;color:white}
.cmos-view-controls label{display:flex;align-items:center;gap:8px;color:#b6c9e4;font-size:14px;min-height:42px}
.cmos-view-controls input[type="range"]{width:100px;max-width:100%;margin:0;accent-color:#9cafff;cursor:pointer}
.cmos-view-controls input[type="checkbox"]{width:17px;height:17px;accent-color:#9cafff;cursor:pointer}
.cmos-view-controls select{appearance:none;color:#dbe8f8;background:#223b5d;border:1px solid #496080;border-radius:7px;font-size:14px;min-height:42px;padding:8px 30px 8px 10px;background-image:linear-gradient(45deg,transparent 50%,#c7d8ef 50%),linear-gradient(135deg,#c7d8ef 50%,transparent 50%);background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px;background-size:5px 5px;background-repeat:no-repeat}
.cmos-legend{display:flex;flex-wrap:wrap;gap:9px 17px;padding:14px 20px;color:#b4c6e0;font-size:13px;line-height:1.5}
.cmos-legend>span,.cmos-legend>button{display:inline-flex;align-items:center;gap:7px}
.cmos-legend>button{font:inherit;color:inherit;border:0;background:transparent;padding:3px 0;text-align:left;min-height:28px}
.cmos-legend i,.cmos-legend .cmos-swatch{display:inline-block;width:10px;height:10px;border-radius:2px;background:var(--swatch,#849be0);flex-shrink:0;box-shadow:inset 0 0 0 1px #ffffff18}
.cmos-viewer>.cmos-note{font-size:13px;color:#95abc9;padding:0 20px 15px;margin:0;line-height:1.7}
.cmos-panel{padding:25px 25px 22px;border-left:1px solid #dce4ef;min-width:0;display:flex;flex-direction:column;background:#fff}
.cmos-stage-label{font-size:12px;font-weight:650;letter-spacing:.08em;color:#5269c9;text-transform:uppercase;margin:0 0 10px}
.cmos-panel h2{font-size:25px;line-height:1.45;letter-spacing:-.7px;margin:0 0 12px;color:#263d60}
.cmos-panel h3{font-size:16px;color:#344b6d;margin:20px 0 10px}
.cmos-panel>p,.cmos-task>p{font-size:15px;color:#657891;line-height:1.85;margin:0 0 18px;word-break:keep-all}
.cmos-task{padding:15px 16px;background:#f0f3fe;border:1px solid #dce4fb;border-radius:10px;margin:4px 0 22px;color:#4d6490}
.cmos-task strong{display:block;font-size:15px;font-weight:650;margin:0 0 6px;color:#38559a}
.cmos-task p{font-size:14px;margin:0;color:#61779a;line-height:1.8}
.cmos-field{display:block;margin:0 0 19px;font-size:14px;color:#4f6381}
.cmos-field>span{display:flex;gap:8px;justify-content:space-between;align-items:center;font-weight:550;margin-bottom:7px}
.cmos-field output{color:#3c58c7;font-variant-numeric:tabular-nums;font-size:14px;font-weight:650;white-space:nowrap}
.cmos-field input[type="range"],.cmos-playback input[type="range"]{width:100%;max-width:100%;height:30px;accent-color:#536cde;margin:8px 0 0;cursor:pointer}
.cmos-field input[type="number"],.cmos-field select{display:block;width:100%;min-height:44px;padding:10px 12px;background:#f8faff;border:1px solid #ccd7e8;border-radius:7px;color:#405675;font-size:15px}
.cmos-field select{appearance:none;padding-right:33px;background-image:linear-gradient(45deg,transparent 50%,#6f82a0 50%),linear-gradient(135deg,#6f82a0 50%,transparent 50%);background-position:calc(100% - 17px) 19px,calc(100% - 12px) 19px;background-size:5px 5px;background-repeat:no-repeat}
.cmos-field small{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:1.6;color:#8897ad;margin-top:5px}
.cmos-field input:disabled,.cmos-field select:disabled{opacity:.6;cursor:default}
.cmos-playback{border-top:1px solid #e0e7f2;padding-top:18px;margin-top:auto}
.cmos-playback>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#526782;font-size:14px}
.cmos-playback output{font-weight:650;color:#354f8f;font-variant-numeric:tabular-nums}
.cmos-playback button{min-height:43px;display:inline-flex;align-items:center;justify-content:center;padding:10px 13px;border-radius:7px;background:#edf1ff;color:#455dbe;border:1px solid #d3ddfa;font-size:14px;font-weight:600}
.cmos-playback button:hover{background:#e1e8ff}
.cmos-playback select{border:1px solid #d5dfee;border-radius:6px;min-height:40px;background:white;color:#536782;padding:6px;font-size:14px}
.cmos-play-row{display:flex;align-items:center;gap:9px;margin-top:10px}
.cmos-play-row>button{flex:1}
.cmos-play-row>label{display:flex;align-items:center;gap:6px;color:#7a8da6;font-size:14px}
.cmos-actions{display:flex;align-items:stretch;gap:9px;margin-top:18px}
.cmos-actions button,.cmos-actions a{display:flex;align-items:center;justify-content:center;min-height:46px;padding:10px 14px;border-radius:8px;font-size:15px;font-weight:600;line-height:1.5}
.cmos-actions .primary,.cmos-actions button:last-child{flex:1;background:var(--cmos-blue);color:white;border:1px solid var(--cmos-blue)}
.cmos-actions button:not(.primary):not(:last-child),.cmos-secondary{border:1px solid #d3ddec;background:#f7f9fd;color:#5f7493}
.cmos-actions button:hover:not(:disabled){filter:brightness(.97)}
.cmos-page button:disabled{cursor:not-allowed;opacity:.45;box-shadow:none}
.cmos-page button:focus-visible,.cmos-page a:focus-visible,.cmos-page input:focus-visible,.cmos-page select:focus-visible,.cmos-page summary:focus-visible{outline:3px solid #92a5fa;outline-offset:3px}
.cmos-note{font-size:14px;line-height:1.8;color:#7d8da4;margin:12px 0}
.cmos-details{margin-top:16px;border:1px solid #dce4f0;border-radius:11px;background:white;padding:17px 20px;font-size:14px;line-height:1.8;color:#657a95}
.cmos-details summary{font-size:15px;font-weight:650;color:#46618a;cursor:pointer}
.cmos-details p{margin:10px 0 0}
.cmos-details a,.cmos-note a{color:#4862bc;text-decoration:underline;text-underline-offset:3px}
.cmos-status{font-size:14px;line-height:1.8;color:#557091;min-height:25px;margin:11px 0 0}
.cmos-status.error,.cmos-status.wrong{color:#a25943}
.cmos-status.success{color:#2f846c}
.cmos-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:16px 0 25px;font-size:14px;color:#7d8fa8}
.cmos-footer button{background:transparent;color:#60799a;font-size:14px;padding:8px 0;text-decoration:underline;text-underline-offset:4px}
.cmos-completion{padding:20px 23px;background:#eef9f4;border:1px solid #c3e3d5;border-radius:12px;color:#377b64;margin-top:18px;line-height:1.8}
.cmos-completion strong{font-size:18px;display:block;margin-bottom:5px}
.cmos-completion p{font-size:15px;margin:0}
.cmos-completion a{display:inline-flex;align-items:center;margin-top:12px;font-size:14px;min-height:42px;padding:8px 14px;border-radius:7px;color:#28725d;background:#def1e8;font-weight:600}
.cmos-dialog{max-width:520px;width:calc(100% - 32px);max-height:85vh;overflow:auto;padding:27px;border:1px solid #d7e1ee;border-radius:15px;background:white;color:#334d70;box-shadow:0 20px 70px #10223840}
.cmos-dialog::backdrop{background:#12233f85;backdrop-filter:blur(2px)}
.cmos-dialog h2{font-size:22px;margin:0 0 12px}
.cmos-dialog p{font-size:16px;line-height:1.8;color:#627792}
.cmos-dialog>div{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:20px}
.cmos-dialog button{min-height:44px;font-size:14px;padding:10px 15px;border-radius:8px;background:#eef2f8;color:#526986}
.cmos-dialog button.primary{background:#4b63de;color:white}
/* Controls and output elements used by the interactive page. */
.cmos-viewer-top h2{font-size:15px;line-height:1.5;font-weight:600;letter-spacing:0;color:#dce7f8;margin:0}
.cmos-canvas-wrap{position:relative;min-width:0;overflow:hidden;background:#11233e}
canvas.cmos-canvas{display:block;touch-action:none;outline-offset:-4px;max-width:100%;cursor:grab}
canvas.cmos-canvas:active{cursor:grabbing}
.cmos-view-caption{min-height:41px;margin:0;padding:0 20px 13px;font-size:14px;line-height:1.8;color:#c4d5ed;background:#11233e}
.cmos-presets{display:flex;gap:5px;flex:1;align-items:center}
.cmos-zoom{display:flex;align-items:center;gap:8px;margin-left:auto}
.cmos-zoom button{min-width:42px;padding:8px;font-size:20px;line-height:1}
.cmos-zoom output{min-width:44px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums;color:#c5d6ef}
.cmos-viewer>#cut-controls{margin:0;padding:14px 20px 4px;color:#c0d1e9}
#cut-controls>label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
#cut-controls output{color:#c0ceff}
#cut-controls input[type="range"]{height:32px;accent-color:#9eb1ff;margin-top:4px}
.cmos-cut-presets{display:flex;gap:7px;flex-wrap:wrap;margin-top:5px}
.cmos-cut-presets button{min-height:39px;padding:7px 10px;border:1px solid #4c6386;border-radius:6px;background:#213a5c;color:#c5d5ec;font-size:14px}
.cmos-cut-presets button:hover{background:#2b496d}
.cmos-cut-presets button[aria-pressed="true"]{background:#4e66ce;border-color:#869be6;color:white}
.cmos-ild{display:flex;align-items:center;gap:9px;padding:11px 20px;margin:0;color:#bfcee5;font-size:14px;cursor:pointer;min-height:44px}
.cmos-ild input{width:17px;height:17px;accent-color:#9db0ff;flex-shrink:0;margin:0}
.cmos-hint{font-size:13px;line-height:1.8;color:#91a8c8;padding:9px 20px 0;margin:0}
.cmos-legend .cmos-key{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px}
.cmos-key i{display:block;width:10px;height:10px;border-radius:2px;background:var(--swatch,#8198d8);flex-shrink:0}
fieldset.cmos-task{min-inline-size:0;width:100%;margin:8px 0 21px}
.cmos-task>legend{padding:0 6px;font-size:14px;font-weight:650;color:#405d9b;line-height:1.8}
#choice-options{display:grid;gap:8px}
#choice-options button,#wire-nets button,.cmos-bias button{min-height:43px;padding:10px 12px;border:1px solid #cfd9ed;border-radius:7px;background:#fff;color:#52698e;font-size:14px;line-height:1.65;text-align:left}
#choice-options button:hover:not(:disabled),#wire-nets button:hover:not(:disabled),.cmos-bias button:hover:not(:disabled){border-color:#8c9de2;background:#f7f9ff}
#choice-options button[aria-pressed="true"],#wire-nets button[aria-pressed="true"],.cmos-bias button[aria-pressed="true"]{background:#4d65d7;border-color:#4d65d7;color:white;box-shadow:0 2px 8px #4d65d71a}
#choice-options button.correct{background:#e6f5ee;border-color:#8ac8b3;color:#26785f}
#choice-options button.wrong{background:#fff0e8;border-color:#d5a18a;color:#a15a40}
#choice-feedback:not(:empty){margin-top:10px;font-size:14px;line-height:1.8}
#process-controls>label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;color:#536b8a}
#process-controls>#play{width:100%;margin-top:10px;min-height:44px}
#wiring-task>h3,#operation-task>h3{font-size:15px;margin:0 0 11px;line-height:1.6;color:#38558d}
#wire-nets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#wire-nets button{text-align:center;min-width:0;padding:8px 10px;font-variant-numeric:tabular-nums}
#net-target{font-size:14px;line-height:1.8;margin:12px 0;color:#647b9c}
#terminal-field{min-inline-size:0;border:0;padding:0;margin:13px 0}
#terminal-field>legend{font-size:14px;line-height:1.8;color:#5b7194;margin-bottom:10px;padding:0}
#terminals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#terminals label{display:flex;align-items:center;gap:8px;min-height:42px;min-width:0;border:1px solid #d2dcf0;border-radius:6px;background:#fff;padding:8px 9px;cursor:pointer;color:#4e678c;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#terminals label:has(input:checked){background:#e4ebff;border-color:#98a9e9;color:#354f9c}
#terminals label:has(input:disabled){opacity:.55;cursor:default}
#terminals input{margin:0;accent-color:#4e66d3;width:16px;height:16px;flex-shrink:0}
#attach-wire{width:100%;min-height:44px;font-size:14px;border-radius:7px;background:#445ecb;border:1px solid #445ecb;color:white;padding:10px 13px;font-weight:600;line-height:1.7}
#attach-wire:hover:not(:disabled){background:#3651be}
#wire-feedback{font-size:14px;line-height:1.8;margin:11px 0 0;color:#526e96}
.cmos-bias{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.cmos-bias button{text-align:center;padding:9px 8px}
#electrical-status{margin:17px 0 13px;border-top:1px solid #d7e0f4}
#electrical-status>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #d7e0f4;font-size:14px;line-height:1.6}
#electrical-status dt{color:#60789b}
#electrical-status dd{margin:0;font-weight:650;color:#3d5684;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#electrical-explanation{font-size:14px;line-height:1.85;color:#5b7399;margin:0}
.cmos-panel>aside.cmos-note{margin:19px 0 0;padding:0 0 0 13px;border-left:2px solid #d8e1f5}
.cmos-panel>aside.cmos-note h3{font-size:14px;font-weight:650;margin:0 0 7px;color:#526d96}
.cmos-panel>aside.cmos-note p{font-size:14px;line-height:1.9;color:#7186a5;margin:0}
.cmos-panel>.cmos-details{font-size:14px;margin-top:16px;padding:12px 0 0;border:0;border-top:1px solid #e0e7f2;border-radius:0}
.cmos-panel>.cmos-details summary{font-size:14px;font-weight:600;color:#4c6592}
.cmos-panel>.cmos-details p{font-size:14px;line-height:1.9;margin-top:9px;color:#7184a0}
.cmos-footer p{margin:0}
.cmos-page>dialog{max-width:520px;width:calc(100% - 32px);max-height:85vh;overflow:auto;padding:27px;border:1px solid #d7e1ee;border-radius:15px;background:white;color:#334d70;box-shadow:0 20px 70px #10223840}
.cmos-page>dialog::backdrop{background:#12233f85;backdrop-filter:blur(2px)}
.cmos-page>dialog h2{font-size:22px;margin:0 0 12px;line-height:1.5}
.cmos-page>dialog p{font-size:16px;line-height:1.8;color:#627792}
@media(min-width:1450px){.cmos-canvas{height:550px}}
@media(max-width:1100px){.cmos-page{padding-right:22px;padding-left:22px}.cmos-header{align-items:flex-start;gap:20px}.cmos-header h1{font-size:35px}.cmos-workbench{grid-template-columns:minmax(0,1.65fr) minmax(295px,1fr)}.cmos-panel{padding:22px 20px}.cmos-panel h2{font-size:23px}.cmos-view-controls{padding:13px 15px;gap:7px}.cmos-view-controls button{font-size:14px;padding:8px 9px}.cmos-canvas{height:440px}.cmos-stepper>.cmos-step,.cmos-stepper>button{flex-basis:140px}.cmos-mode-switch a{padding:8px 11px}}
@media(max-width:850px){.cmos-header{display:block;padding-top:31px}.cmos-header h1{font-size:34px}.cmos-mode-switch{margin-top:21px;width:max-content;max-width:100%}.cmos-progress{padding:15px 17px}.cmos-workbench{grid-template-columns:1fr}.cmos-panel{border-left:0;border-top:1px solid #dce4ef;padding:24px}.cmos-canvas{height:440px;min-height:340px}.cmos-playback{margin-top:7px}.cmos-view-controls{padding:13px 18px;gap:8px}.cmos-view-controls button{font-size:14px;min-height:44px}.cmos-viewer-top{padding:15px 19px}.cmos-legend{padding:13px 19px;font-size:13px}.cmos-panel h2{font-size:25px}.cmos-stepper>.cmos-step,.cmos-stepper>button{flex-basis:145px;min-height:72px;padding:10px 12px}.cmos-task{margin-bottom:19px}.cmos-footer{align-items:flex-start}}
@media(max-width:520px){.cmos-page{padding-right:15px;padding-left:15px;padding-bottom:42px}.cmos-header{padding:27px 0 20px}.cmos-header h1{font-size:30px;letter-spacing:-1px}.cmos-header p{font-size:15px;line-height:1.85}.cmos-header .eyebrow{font-size:11px}.cmos-mode-switch{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:4px}.cmos-mode-switch a{white-space:normal;text-align:center;font-size:14px;padding:8px 7px;min-height:44px}.cmos-progress{align-items:flex-start;gap:12px;flex-wrap:wrap;padding:14px 15px;margin-bottom:12px}.cmos-progress strong{font-size:15px}.cmos-progress progress,.cmos-progress-track{width:100%}.cmos-stepper{gap:6px;padding-bottom:11px;margin-bottom:4px}.cmos-stepper>.cmos-step,.cmos-stepper>button{flex-basis:130px;min-height:70px;border-radius:9px}.cmos-stepper button>strong{font-size:14px}.cmos-workbench{border-radius:12px}.cmos-viewer-top{padding:13px 14px;gap:8px;flex-wrap:wrap}.cmos-viewer-top>span:last-child{font-size:11px}.cmos-canvas{height:340px;min-height:300px}.cmos-view-controls{gap:7px;padding:11px 12px}.cmos-view-controls button{font-size:14px;min-height:44px;padding:8px 9px;flex:1 1 auto}.cmos-view-controls label{font-size:13px;min-height:40px}.cmos-view-controls input[type="range"]{width:90px}.cmos-legend{gap:7px 12px;padding:12px 14px;font-size:12px}.cmos-viewer>.cmos-note{padding:0 14px 13px;font-size:12px}.cmos-panel{padding:21px 17px}.cmos-panel h2{font-size:23px}.cmos-panel>p,.cmos-task>p{font-size:15px}.cmos-task{padding:13px 14px;margin-bottom:18px}.cmos-task strong{font-size:14px}.cmos-task p{font-size:14px}.cmos-field{font-size:14px;margin-bottom:16px}.cmos-field>span{flex-wrap:wrap;gap:5px}.cmos-field small{font-size:12px}.cmos-actions button,.cmos-actions a{font-size:14px;min-height:46px;padding:10px 11px}.cmos-footer{flex-direction:column;align-items:flex-start;gap:4px;font-size:13px}.cmos-details{padding:15px 17px}.cmos-details summary{font-size:14px}.cmos-completion{padding:17px}.cmos-dialog{padding:22px}}
@media(max-width:360px){.cmos-canvas{height:310px;min-height:280px}.cmos-view-controls button{font-size:14px;padding:8px}.cmos-viewer-top strong{font-size:13px}.cmos-panel{padding:19px 15px}.cmos-play-row{flex-wrap:wrap}.cmos-play-row>button{min-width:150px}.cmos-progress{font-size:13px}}
@media(prefers-reduced-motion:reduce){.cmos-page *{scroll-behavior:auto!important;transition:none!important}}

.cmos-page [hidden]{display:none!important}
#logic-diagram svg{display:block;width:100%;height:auto;max-height:255px;margin:12px auto}

.cmos-viewer .cmos-playback{margin:0;padding:14px clamp(14px,2vw,22px);background:#1c3454;border-top:1px solid #405571}
.cmos-viewer .cmos-timebar{display:flex;gap:12px;align-items:center;color:#edf4ff}
.cmos-timebar label,.cmos-timebar output{flex:none}
.cmos-viewer .cmos-playback .cmos-timebar input{margin:0;min-width:42px;width:auto;flex:1;accent-color:#9ac4ff}
.cmos-viewer .cmos-timebar output{min-width:4ch;color:#fff;text-align:right}
.cmos-viewer .cmos-play-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 11px;margin-top:7px}
.cmos-play-row label,.cmos-play-row a{color:#e2edfc;font-size:14px}
.cmos-play-row a,.back-to-chip{border-bottom:1px solid currentColor}
.cmos-play-row select{font:inherit;min-width:64px}
.cmos-play-row button:disabled{opacity:.65}
.cmos-play-row #play{background:#d6e8ff;color:#182c4a;min-width:100px}
.cmos-timebar label,.cmos-timebar output{font-size:14px}
.part-panel{background:#152943;color:#f1f6ff;border-top:1px solid #43546d;padding:15px clamp(14px,2vw,22px)}
.part-panel-head{display:flex;align-items:baseline;gap:8px 14px;flex-wrap:wrap;margin-bottom:10px}
.part-panel-head h3{color:#f2f6ff;margin:0;font-size:16px}
.part-panel-head>span{color:#c1d0e4;font-size:12px}
.part-chips{display:flex;align-items:stretch;flex-wrap:wrap;gap:6px}
.part-chips button{display:inline-flex;align-items:center;gap:6px;min-height:38px;text-align:left;border:1px solid #627694;border-radius:6px;background:#1b3555;color:#eef4ff;font:inherit;font-size:13px;padding:4px 9px}
.part-chips button[aria-pressed=true]{border-color:#ffd46b;background:#29394a;box-shadow:inset 0 0 0 1px #ffd46b}
.part-chips button:focus-visible,.part-panel summary:focus-visible,.part-summary button:focus-visible{outline:3px solid #9adaff;outline-offset:2px}
.part-number{font:700 12px/1 system-ui,sans-serif;background:#e4eefb;color:#142238;border-radius:50%;min-width:22px;height:22px;display:inline-grid;place-items:center}
#part-targets .part-number{background:#ffd46b;color:#1c293b}
.part-summary{margin-top:10px}
#part-detail{margin:0;color:#e1ebf7;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.part-summary button{margin-top:5px;background:none;border:0;border-bottom:1px solid currentColor;color:#acd7ff;font-size:13px;padding:4px 0}
.part-panel details{margin:10px 0 0}.part-panel summary,.cmos-materials summary{color:#c8d8ec;cursor:pointer;font-size:13px;list-style:revert}
#part-others{margin-top:8px}
.cmos-materials{margin:1px 18px 15px}.cmos-materials .cmos-legend{padding:10px 0}
.back-to-chip{display:none}
#viewer-title,#choices{scroll-margin-top:78px}
@media(max-width:850px){.back-to-chip{display:inline-block;margin-top:8px;font-size:14px}.part-chips button,.part-summary button{min-height:42px}}

.part-group{display:flex;align-items:center;gap:5px;flex-wrap:wrap;width:100%;margin:2px 0}
.part-group>strong{flex:0 0 92px;font-size:12px;color:#dae6f8}
#part-targets button[data-role=protected] .part-number{background:#d3e6fa}
#part-targets button[data-role=protected]{border-style:dashed}
.cmos-material-list{margin:9px 0 0;color:#deebfa;font-size:13px;line-height:1.7}

/* Optional checks and recoverable wiring controls. */
.cmos-self-check{margin:17px 0;border:1px solid #d5dfef;border-radius:8px;padding:12px 14px;background:#f8faff}
.cmos-self-check>summary{cursor:pointer;font-size:14px;font-weight:650;color:#46618d;min-height:24px}
.cmos-self-check>p{font-size:13px;line-height:1.8;color:#667d9d;margin:10px 0}
.cmos-self-check #choices{margin:10px 0 0;padding:0;border:0;background:transparent}
.cmos-self-check:focus-within{border-color:#91a9df}
#self-check{scroll-margin-top:80px}
#wiring-task .wire-intro{font-size:14px;line-height:1.8;margin:0 0 10px;color:#526d92}
#wire-example,.wire-local-actions button,.wire-history button,#edit-wiring{min-height:44px;padding:9px 12px;border:1px solid #bfcde2;border-radius:7px;background:#fff;color:#365784;font:inherit;font-size:13px;line-height:1.5;cursor:pointer}
#wire-example{width:100%;margin:0 0 15px;border-color:#9bb5db;background:#eaf2ff;font-weight:650}
.wire-local-actions,.wire-history{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.wire-local-actions button,.wire-history button{flex:1 1 auto}
.wire-history{border-top:1px solid #d4deee;padding-top:12px;margin-top:15px}
#wiring-task .wire-hint{font-size:12px;line-height:1.8;color:#677d9d;margin:9px 0 0}
#edit-wiring{margin-top:15px;width:100%}
#wire-example:disabled,.wire-local-actions button:disabled,.wire-history button:disabled{opacity:.5;cursor:default}
#wire-example:hover:not(:disabled),.wire-local-actions button:hover:not(:disabled),.wire-history button:hover:not(:disabled),#edit-wiring:hover{background:#e9f0fe;border-color:#849ed0}
.cmos-self-check summary:focus-visible,#wire-example:focus-visible,.wire-local-actions button:focus-visible,.wire-history button:focus-visible,#edit-wiring:focus-visible{outline:3px solid #728ee8;outline-offset:3px}
