/* Extend the native lab shell, not a parallel design. Explicitly override the older forced visibility rule. */
.cr-integrated [data-cr-view][hidden]{display:none!important;visibility:hidden!important}
.cr-integrated #cr-stage-tabs{scroll-margin-top:12px}
.cr-integrated .cr-stage-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:16px 0;padding:12px;border:1px solid var(--c51-line);border-radius:12px;background:var(--c51-paper);color:var(--c51-ink)}
.cr-stage-footer button{border:1px solid var(--c51-line);background:var(--c51-soft);color:var(--c51-ink);border-radius:8px;padding:9px 12px;font:inherit;cursor:pointer}.cr-stage-footer button:disabled{opacity:.45;cursor:default}
.cr-integrated #concept-workbench{padding:clamp(10px,2vw,18px);border-radius:12px;margin:16px 0;min-width:0;overflow:hidden}.cr-integrated #cr-concept-svg{min-width:0}.cr-integrated #cr-concept-svg svg{display:block;width:100%;height:auto;max-width:800px;margin:8px auto}.cr-integrated #cr-concept-values{white-space:pre-wrap;overflow-wrap:anywhere;max-height:200px;overflow:auto}.cr-integrated #cr-concept-range{width:100%;accent-color:#85bdf0}.cr-integrated .cr-concept-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.cr-concept-controls button,.cr-concept-controls select{padding:7px 10px;font:inherit}
.cr-integrated .cr-code-block{min-width:0;max-width:100%;margin:14px 0;border-radius:10px;overflow:hidden;background:#102841;border:1px solid #365d82}.cr-code-head{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;gap:8px;color:#e5edf6;background:#193b58;font:600 12px system-ui}.cr-code-head button{border:1px solid #6588ad;background:#24568e;color:#fff;padding:6px 10px;border-radius:6px;cursor:pointer}.cr-integrated .cr-code-block pre.v76-code{margin:0!important;border:0!important;border-radius:0!important;white-space:pre!important;overflow-wrap:normal!important;word-break:normal!important;max-width:100%;box-sizing:border-box;max-height:550px;overflow:auto}.cr-integrated .cr-code-block pre code{white-space:pre!important;word-break:normal!important;overflow-wrap:normal!important}.cr-integrated .cr-overview-path{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.cr-integrated .cr-overview-path a{padding:8px 12px;border-radius:8px;background:var(--c51-soft);border:1px solid var(--c51-line);color:var(--c51-ink)}
@media(max-width:600px){.cr-stage-footer{padding:8px}.cr-stage-footer button{flex:1 1 35%}.cr-stage-footer output{order:-1;width:100%;text-align:center}.cr-integrated #cr-stage-tabs>button{flex:1 1 28%!important}.cr-code-head{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){#concept-workbench *{animation:none!important;transition:none!important}}
.cr-integrated #simulation[hidden],.cr-integrated #experiment[hidden],.cr-integrated #theory[hidden],.cr-integrated #code[hidden],.cr-integrated #flashcards[hidden],.cr-integrated #assessment[hidden],.cr-integrated #engineering-record[hidden],.cr-integrated #overview[hidden]{display:none!important;visibility:hidden!important}

/* Original Essential Cryptography workbench palette (essential.css). Scoped to instruments only. */
.cr-integrated #concept-workbench{--c51-paper:#122b43;--c51-soft:#193b58;--c51-ink:#e1edf7;--c51-muted:#bcd3e7;--c51-line:#476681;--c51-link:#a8d6ff;--cr-panel:#17334d;--cr-soft:#122b43;--cr-ink:#e1edf7;--cr-muted:#bcd3e7;--cr-border:#52738e;--cr-accent:#85c9fc;--d292-ink:#e1edf7;--ink:#e1edf7;--text:#e1edf7;--muted:#bcd3e7;--panel:#122b43;--line:#476681;--surface:#122b43;--navy-paper:#122b43;--navy-soft:#193b58;--navy-ink:#e1edf7;--navy-muted:#bcd3e7;--navy-border:#476681;background:#0d2237!important;color:#e1edf7!important;border:1px solid #476681!important;box-shadow:0 6px 24px #10263f20;accent-color:#85c9fc}
.cr-integrated #concept-workbench :is(h2,h3,h4,p,label,summary,figcaption,small,th,td,span,code){color:inherit}.cr-integrated #concept-workbench :is(input:not([type=range]),select,textarea,button){background:#1b3b58!important;color:#e5f0fb!important;border:1px solid #52738e!important;border-radius:7px}.cr-integrated #concept-workbench :is(button.primary,#cr-run,#cr28-run){background:#24568e!important;color:#fff!important}.cr-integrated #concept-workbench button:hover{background:#326d99!important}.cr-integrated #concept-workbench :is(button,input,select):focus-visible{outline:2px solid #85d7f0!important;outline-offset:2px}.cr-integrated #concept-workbench :is(.cr-stage,.cr-value,.cr28-kv>div,.cr-matrix span,.cr-flow span,.d292-ready,.d292-static,.m291-formula){background:#17334d!important;color:#e1edf7!important;border-color:#476681!important}.cr-integrated #concept-workbench .cr-matrix span.hot{background:#24568e!important;color:white!important}.cr-integrated #concept-workbench :is(#cr-result,#cr28-result,#cr28-trace,pre){background:#10263f!important;color:#e3edf8!important;border-color:#476681!important}.cr-integrated #concept-workbench :is(.d292-svg,.m291-svg,.cr28-plot){background:#122b43!important;color:#e1edf7!important;border-color:#355570!important}.cr-integrated #concept-workbench :is(.d292-svg .d292-box,.m291-svg .m291-node){fill:#203f5e;stroke:#557591}.cr-integrated #concept-workbench :is(.d292-svg .d292-hot,.m291-svg .m291-hot){fill:#85bdf0;stroke:#b4ddff}.cr-integrated #concept-workbench :is(.d292-svg .d292-hot+text,.d292-svg .d292-hot+text+text,.m291-svg .m291-hot+text){fill:#102840}.cr-integrated #concept-workbench :is(.d292-svg .d292-flow,.m291-svg .m291-active){stroke:#85c9fc}.cr-integrated #concept-workbench :is(.d292-svg .d292-series0,.d292-svg .d292-marker0){stroke:#85c9fc}.cr-integrated #concept-workbench .cr-error{color:#ffd3cc!important}.cr-integrated #concept-workbench .cr-good{color:#a8d6ff!important}.cr-integrated #concept-workbench .cr-progress{background:#355570}.cr-integrated #concept-workbench .cr-progress span{background:#85c9fc}.cr-integrated #concept-workbench .cr28-plot .nodeText{fill:#19334d}.cr-integrated #concept-workbench a{color:#a8d6ff!important}.cr-integrated #concept-workbench :is(.cr-value code,.cr28-kv strong){color:#e3edf8!important}.cr-integrated #concept-workbench .cr28-scroll tr.active,.cr-integrated #concept-workbench .cr-scroll tr.active{background:#24568e!important;color:white!important}.cr-integrated #concept-workbench .b294-svg{display:block;width:100%;height:auto;min-width:620px;max-width:900px;margin:.5rem auto}.cr-integrated #concept-workbench :is(.d292-live,#d292-static-svg){max-width:100%;overflow-x:auto}.cr-integrated #concept-workbench .b294-tiny{font-size:9px;fill:currentColor;font-family:ui-monospace,monospace}.cr-integrated #concept-workbench .b294-active{fill:#85bdf0;stroke:#b4ddff}.cr-integrated #concept-workbench .b294-active+text{fill:#102840}.cr-integrated #concept-workbench .b294-panel{fill:#17334d;stroke:#476681}.cr-integrated #concept-workbench .b294-bar{fill:#85bdf0}.cr-integrated #concept-workbench .b294-bar2{fill:#4c82b3}.cr-integrated #concept-workbench .b294-rc{fill:#203f5e;stroke:#52738e}.cr-integrated #concept-workbench .b294-subtle{fill:#bcd3e7}.cr-integrated #concept-workbench .b294-bartext{fill:#e1edf7;font-size:11px}
.cr-integrated #concept-workbench .b294-svg .b294-active{fill:#326d99;stroke:#85c9fc}.cr-integrated #concept-workbench .b294-svg .b294-active+text{fill:#fff}.cr-integrated #concept-workbench .d292-svg .d292-hot+text+text+text,.cr-integrated #concept-workbench .d292-svg .d292-hot+text+text+text+text{fill:#102840}.cr-integrated #concept-workbench .b294-svg .d292-hot+text+text+text{fill:#102840}
