.dhs-cpu{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#0b1220;color:#e5edf8;border:1px solid #263248;border-radius:18px;overflow:hidden;min-height:760px;box-shadow:0 18px 50px rgba(7,12,23,.18)}
.dhs-cpu *{box-sizing:border-box}
.dhs-cpu button,.dhs-cpu select,.dhs-cpu input,.dhs-cpu textarea{font:inherit}
.dhs-cpu-head{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;padding:20px 22px;border-bottom:1px solid #263248;background:linear-gradient(135deg,#111c31,#0d1728)}
.dhs-cpu-head h2{margin:4px 0 0;font-size:26px;line-height:1.15;color:#f6f9ff}
.dhs-cpu-head p{margin:7px 0 0;color:#9eabc0;max-width:760px}
.dhs-stm32-kicker{display:inline-block;color:#7dd3fc;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.dhs-cpu-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.dhs-cpu button,.dhs-cpu select{border:1px solid #36455f;background:#172238;color:#eaf2ff;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer}
.dhs-cpu button:hover,.dhs-cpu select:hover{background:#22314d}
.dhs-cpu .is-primary{background:#1473e6;border-color:#2f8cff}
.dhs-cpu .is-primary:hover{background:#1d82f0}
.dhs-cpu-speed{display:flex;align-items:center;gap:7px;color:#a9b6c9;font-size:12px}
.dhs-cpu-speed input{accent-color:#2f8cff}
.dhs-stm32-note{margin:14px 18px 0;padding:13px 15px;border:1px solid #245781;border-radius:12px;background:#10263c;color:#bedbf5}
.dhs-stm32-note strong{display:block;margin-bottom:4px;color:#f0f8ff}
.dhs-stm32-note p{margin:0;font-size:13px;line-height:1.55}
.dhs-cpu-grid{display:grid;grid-template-columns:minmax(330px,.95fr) minmax(620px,1.65fr);min-height:680px}
.dhs-cpu-editor{padding:18px;border-right:1px solid #263248;background:#0d1626}
.dhs-cpu-editor textarea{width:100%;height:470px;resize:vertical;background:#050a13;color:#c9e5ff;border:1px solid #2b3850;border-radius:11px;padding:14px;font:13px/1.58 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2}
.dhs-cpu-editor textarea:focus{outline:2px solid #2f8cff;outline-offset:1px}
.dhs-cpu-message{margin-top:10px;padding:10px 12px;border-radius:9px;background:#123321;color:#8ce7ad;font-size:13px}
.dhs-cpu-message.is-error{background:#3b151a;color:#ff9b9b}
.dhs-stm32-explanation,.dhs-cpu-isa,.dhs-cpu-memory-map{margin-top:14px;padding:13px;border:1px solid #2a3850;border-radius:11px;background:#111b2d}
.dhs-stm32-explanation h3{margin:0 0 8px;font-size:14px;color:#f4f7fb}
.dhs-stm32-explanation ol{margin:0;padding-left:20px;color:#aebbd0;font-size:12px;line-height:1.55}
.dhs-stm32-explanation code,.dhs-cpu-isa code,.dhs-cpu-memory-map code{color:#7dd3fc}
.dhs-cpu-isa{color:#a7b4c8;font-size:12px;line-height:1.55}
.dhs-cpu-isa strong{color:#f4f7fb}
.dhs-cpu-isa p{margin:8px 0 0}
.dhs-cpu-memory-map{display:grid;gap:6px}
.dhs-cpu-memory-map>strong{margin-bottom:3px;color:#f4f7fb}
.dhs-cpu-memory-map>div{display:grid;grid-template-columns:112px 1fr;gap:9px;font-size:12px;color:#a7b4c8}
.dhs-cpu-machine{padding:18px;display:grid;gap:13px;align-content:start;background:#0b1220}
.dhs-stm32-flow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr) auto);align-items:center;gap:7px}
.dhs-stm32-flow>div{min-height:64px;display:grid;align-content:center;padding:9px;border:1px solid #2a3850;border-radius:10px;background:#111b2d;transition:.18s ease}
.dhs-stm32-flow>div.is-active{border-color:#38bdf8;background:#102c42;box-shadow:0 0 0 1px rgba(56,189,248,.25),0 0 18px rgba(56,189,248,.12)}
.dhs-stm32-flow>span{color:#52617a;font-weight:900}
.dhs-stm32-flow small{color:#6f819c;font-size:9px;letter-spacing:.08em}
.dhs-stm32-flow strong{margin-top:3px;font-size:12px;color:#eef5ff}
.dhs-cpu-bus{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.dhs-cpu-chip,.dhs-cpu-panel{background:#111b2d;border:1px solid #2a3850;border-radius:11px;padding:11px}
.dhs-cpu-chip small,.dhs-cpu-panel>small,.dhs-cpu-panel-head small{display:block;color:#8090a8;text-transform:uppercase;font-size:9px;font-weight:800;letter-spacing:.09em}
.dhs-cpu-chip strong{display:block;margin-top:4px;font:750 18px ui-monospace,SFMono-Regular,Consolas,monospace;color:#eff6ff}
.dhs-cpu-chip .dhs-small-value{font-size:12px;line-height:1.3;word-break:break-word}
.dhs-cpu-flags{display:flex;gap:5px;margin-top:7px;flex-wrap:wrap}
.dhs-cpu-flags span{display:inline-grid;place-items:center;width:27px;height:27px;border-radius:7px;background:#202d43;color:#8292aa;font:700 12px ui-monospace,monospace}
.dhs-cpu-flags span.is-on{background:#2563eb;color:white}
.dhs-cpu-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.dhs-cpu-panel-head>div>strong{display:block;margin-top:4px;color:#eaf2ff;font-size:13px}
.dhs-cpu-panel-head button{padding:7px 9px;font-size:11px}
.dhs-cpu-registers{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.dhs-stm32-registers .dhs-cpu-reg{padding:9px;background:#0c1525}
.dhs-stm32-registers .dhs-cpu-reg strong{font-size:11px;color:#8bd1ff;white-space:nowrap}
.dhs-cpu-execution{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dhs-cpu-execution strong{display:block;margin-top:6px;font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#d7c9ff;word-break:break-word}
.dhs-stm32-two-column{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.dhs-vector-panel>div{display:grid;grid-template-columns:105px 1fr auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #223047}
.dhs-vector-panel>div:last-child{border-bottom:0}
.dhs-vector-panel code{color:#7dd3fc;font-size:11px}
.dhs-vector-panel span{color:#9aa9bd;font-size:11px}
.dhs-vector-panel strong{font:700 11px ui-monospace,monospace;color:#f4c66c}
.dhs-board-panel{min-height:160px}
.dhs-bluepill-board{display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:center;padding:10px;border:1px solid #29436a;border-radius:10px;background:linear-gradient(150deg,#174d80,#0e3156)}
.dhs-bluepill-led{display:grid;place-items:center;gap:5px;text-align:center}
.dhs-bluepill-led span{width:44px;height:44px;border-radius:50%;background:#24374e;border:4px solid #7990a9;box-shadow:inset 0 0 0 7px #111c2c;transition:.18s ease}
.dhs-bluepill-led.is-on span{background:#41d16d;border-color:#9af3b4;box-shadow:0 0 20px rgba(65,209,109,.8),inset 0 0 0 7px #1d8c45}
.dhs-bluepill-led strong{font-size:12px}.dhs-bluepill-led small{font-size:10px;color:#b9cde3}
.dhs-bluepill-state{display:grid;gap:6px}
.dhs-bluepill-state>div{display:flex;justify-content:space-between;gap:10px;padding:7px 8px;border-radius:8px;background:rgba(6,19,35,.45)}
.dhs-bluepill-state small{color:#b4c5d8}.dhs-bluepill-state strong{font:700 11px ui-monospace,monospace;color:#ffd37e}
.dhs-bluepill-state strong.is-on{color:#8ff0ad}
.dhs-stm32-peripheral-registers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:9px}
.dhs-stm32-peripheral-registers>div{display:grid;gap:4px;padding:9px;border:1px solid #263750;border-radius:9px;background:#0c1525}
.dhs-stm32-peripheral-registers code{font-size:10px;color:#7dd3fc}.dhs-stm32-peripheral-registers span{font:9px ui-monospace,monospace;color:#71829a}.dhs-stm32-peripheral-registers strong{font:700 10px ui-monospace,monospace;color:#ffd37e;word-break:break-all}
.dhs-cpu-stack{display:grid;gap:5px;max-height:220px;overflow:auto;margin-top:8px}
.dhs-cpu-stack>div{display:grid;grid-template-columns:105px 1fr auto;gap:8px;align-items:center;padding:7px 8px;border:1px solid #28364d;border-radius:8px;background:#0c1525}
.dhs-cpu-stack span,.dhs-cpu-stack strong{font:11px ui-monospace,monospace}.dhs-cpu-stack span{color:#81cfff}.dhs-cpu-stack strong{color:#eaf2ff}.dhs-cpu-stack em{font-size:9px;font-style:normal;color:#8ff0ad}.dhs-cpu-stack p{margin:0;color:#8998ad;font-size:11px}
.dhs-stm32-log{display:grid;gap:5px;max-height:220px;overflow:auto;margin-top:8px}
.dhs-stm32-log>div{padding:7px 8px;border-left:3px solid #2f8cff;background:#0c1525;color:#aebbd0;font:10px/1.4 ui-monospace,monospace}
.dhs-stm32-log p{margin:0;color:#8998ad;font-size:11px}
.dhs-cpu-listing{max-height:260px;overflow:auto;margin-top:8px}
.dhs-stm32-line{display:grid;grid-template-columns:92px 58px 1fr;gap:8px;padding:6px 8px;border-radius:7px;font:11px ui-monospace,SFMono-Regular,Consolas,monospace}
.dhs-stm32-line span{color:#70829b}.dhs-stm32-line code{color:#7dd3fc}.dhs-stm32-line strong{color:#d8e2f0;font-weight:500}
.dhs-stm32-line.is-next{outline:1px solid #f0b44d;background:#2d2515}.dhs-stm32-line.is-active{background:#173864}
.dhs-cpu.is-halted{box-shadow:inset 0 0 0 2px #b64a4a}
.dhs-cpu.is-embedded{border-radius:14px}
.dhs-mcu-screen{padding:18px;background:#f3f6fb;min-height:760px}
.dhs-mcu-screen-head{max-width:1600px;margin:0 auto 14px;display:flex;align-items:center;gap:16px}
.dhs-mcu-screen-head h2{margin:2px 0 0}
.dhs-mcu-screen>.dhs-cpu{max-width:1600px;margin:0 auto}
@media(max-width:1250px){.dhs-cpu-grid{grid-template-columns:1fr}.dhs-cpu-editor{border-right:0;border-bottom:1px solid #263248}.dhs-stm32-peripheral-registers{grid-template-columns:repeat(3,1fr)}}
@media(max-width:980px){.dhs-cpu-head{flex-direction:column}.dhs-cpu-controls{justify-content:flex-start}.dhs-cpu-registers{grid-template-columns:repeat(4,1fr)}.dhs-cpu-bus{grid-template-columns:repeat(3,1fr)}.dhs-stm32-flow{grid-template-columns:1fr}.dhs-stm32-flow>span{transform:rotate(90deg);text-align:center}.dhs-stm32-two-column{grid-template-columns:1fr}.dhs-stm32-peripheral-registers{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.dhs-cpu{border-radius:12px}.dhs-cpu-head,.dhs-cpu-editor,.dhs-cpu-machine{padding:12px}.dhs-stm32-note{margin:10px 10px 0}.dhs-cpu-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.dhs-cpu-controls select,.dhs-cpu-controls label{grid-column:1/-1}.dhs-cpu-registers{grid-template-columns:repeat(2,1fr)}.dhs-cpu-bus{grid-template-columns:repeat(2,1fr)}.dhs-cpu-execution{grid-template-columns:1fr}.dhs-stm32-peripheral-registers{grid-template-columns:1fr}.dhs-bluepill-board{grid-template-columns:1fr}.dhs-cpu-memory-map>div{grid-template-columns:1fr}.dhs-mcu-screen{padding:8px}}
