/* Notebook presentation only. The native editor owns its canvas and all editing. */
body.advanced-open .masthead{height:68px;max-width:none;background:#fff}
body.advanced-open .main-nav{max-width:none;overflow:auto;gap:24px;background:#fff}
body.advanced-open main{max-width:none;padding:22px 22px 30px;background:#f3f6fa}
body.advanced-open .site-footer{max-width:none;background:#f3f6fa}
.adv-workspace{--adv-green:#147d68;--adv-ink:#22324a;--adv-muted:#607086;--adv-edge:#d9e2e9;color:var(--adv-ink);font-feature-settings:"tnum";min-width:0}
.adv-heading{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
.adv-heading h1{font-family:inherit;font-size:29px;font-weight:700;letter-spacing:-.9px;line-height:1.2}
.adv-heading h1 span{font-weight:500;color:#60758a}
.adv-heading p{font-size:13px;color:var(--adv-muted);max-width:760px;margin-top:6px;line-height:1.6}
.adv-heading .eyebrow{margin:0 0 5px;font-size:10px;letter-spacing:1.2px;color:#61748a}
.adv-workspace a{color:var(--adv-green)}
.adv-heading a,.adv-toolbar button,#adv-confirm-example button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 13px;border-radius:7px;border:1px solid var(--adv-edge);background:#fff;font-size:13px;font-weight:600;line-height:1.3;color:var(--adv-ink);text-decoration:none;transition:background .12s,border-color .12s,box-shadow .12s}
.adv-heading a{color:#36546b}
.adv-toolbar button:hover:not(:disabled),.adv-heading a:hover,#adv-confirm-example button:hover:not(:disabled){background:#eef4f7;border-color:#9baebb;box-shadow:0 1px 3px #22324a0a}
.adv-workspace button:focus-visible,.adv-workspace a:focus-visible,.adv-workspace summary:focus-visible{outline:3px solid #327bc5;outline-offset:3px}
.adv-project-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:12px 15px;border:1px solid var(--adv-edge);border-top:0;background:#fff;font-size:12px}
.adv-project-row label{font-weight:650;color:#456078}
.adv-project-row input{min-height:44px;min-width:190px;max-width:450px;flex:1;border:1px solid #c7d5df;border-radius:6px;padding:9px 12px;font:inherit;font-size:14px;color:var(--adv-ink);background:#fbfdff}
.adv-project-row input:focus-visible{outline:3px solid #327bc5;outline-offset:2px}
.adv-file-note{margin:0;padding:0 15px 14px;border:1px solid var(--adv-edge);border-top:0;background:#fff;font-size:12px;line-height:1.7;color:#526b7c}
.adv-file-note b{font-weight:650;color:#36546a}
#adv-file-status{color:#537069;font-size:12px;line-height:1.6}
#adv-file-message[data-kind=error]{background:#fff1ed;color:#8f3f32;border-color:#e6c2b8}
#adv-cancel-open{min-height:44px;margin:6px 0 0 12px;padding:9px 13px;border:1px solid var(--adv-edge);border-radius:7px;background:#fff;color:var(--adv-ink);font:inherit;font-weight:600}
/* A real, isolated CircuitJS candidate. Keep nonzero dimensions for native
   initialization; it becomes the visible editor only after validation and approval. */
.adv-file-staging{position:fixed;left:-20000px;top:0;width:1000px;height:700px;border:0;visibility:hidden;pointer-events:none}
.adv-toolbar button:disabled{opacity:.42;cursor:default}
.adv-toolbar button[hidden],.adv-workspace [hidden]{display:none!important}
.adv-icon{display:inline-block;width:16px;height:16px;flex:0 0 16px;vertical-align:-3px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.adv-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;padding:12px 14px;background:#fff;border:1px solid var(--adv-edge);border-radius:10px 10px 0 0;box-shadow:0 2px 5px #22324a03}
.adv-project-files{gap:8px}
.adv-simulation-toolbar{border-top:0;border-radius:0;box-shadow:none;background:#f8fafc}
.adv-tool-group{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}
.adv-tool-label{font-size:10px;letter-spacing:.6px;text-transform:uppercase;font-weight:700;color:#667b8e;margin-right:3px}
.adv-example-tools{padding-left:18px;border-left:1px solid var(--adv-edge)}
.adv-toolbar .adv-primary{background:var(--adv-green);border-color:var(--adv-green);color:#fff}
.adv-toolbar .adv-primary:hover:not(:disabled){background:#106c59;border-color:#106c59}
.adv-status{font-size:12px;font-weight:650;line-height:1.5;margin-left:auto;min-width:74px;text-align:center;border:1px solid #d7e3ea;background:#f3f7fa;color:#455f73;border-radius:7px;padding:7px 10px}
.adv-message{padding:12px 15px;background:#eef5f5;border:1px solid var(--adv-edge);border-top:0;font-size:12px;line-height:1.7;overflow-wrap:anywhere;color:#526b7c}
.adv-copy-message{display:flex;align-items:flex-start;gap:9px}
.adv-copy-message>.adv-icon{color:#598981;margin-top:2px}
.adv-copy-name{font-weight:650;color:#345568}
#adv-confirm-example{background:#fff5e5;border-color:#e8d4b3;color:#71501c}
#adv-confirm-example p{margin:0 0 10px}
#adv-confirm-example button{margin:2px 3px 2px 0}
.adv-sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px;border:1px solid var(--adv-edge);border-top:0;border-bottom:0;background:#fff;color:#304660;font-size:13px;font-weight:700}
.adv-sheet-heading>span:first-child{display:inline-flex;align-items:center;gap:8px}
.adv-sheet-heading>span:last-child{color:#708194;font-size:11px;font-weight:500}
.adv-mobile-hint{display:none}
.adv-stage{position:relative;min-width:0;background:#fff;border:1px solid #cbd8e2}
.adv-stage iframe{border:0;width:100%;height:min(78vh,900px);min-height:590px;display:block}
.adv-stage[data-ready=false] iframe{pointer-events:none}
.adv-stage[data-ready=false]::before{content:attr(data-loading-message);position:absolute;inset:0;z-index:1;padding:60px 24px;text-align:center;color:var(--adv-muted);background:#f8fafc;font-size:15px;line-height:1.7}
.adv-help{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding:21px;border:1px solid var(--adv-edge);border-top:0;border-radius:0 0 10px 10px;background:#fff}
.adv-help h2{font-family:inherit;font-size:14px;font-weight:700;letter-spacing:0;margin:0 0 9px;color:#304660}
.adv-help p,.adv-help li{font-size:13px;line-height:1.75;color:#596f82;margin:0 0 12px}
.adv-help p:last-child{margin-bottom:0}
.adv-help b{color:#36546a}
.adv-help details{align-self:start;border:1px solid #e2e9ef;border-radius:8px;padding:0 13px;background:#fafcfd;min-width:0}
.adv-help details p{font-size:12px}
.adv-help details[open]{padding-bottom:13px}
.adv-help summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:650;color:#3e5a70;list-style:none;line-height:1.5;padding:10px 0}
.adv-help summary::-webkit-details-marker{display:none}
.adv-help summary::after{content:'+';font-size:20px;line-height:1;font-weight:400;color:#607c8b}
.adv-help details[open]>summary::after{content:'−'}
.adv-help ul{padding-left:22px;margin:8px 0}
.adv-attribution{font-size:11px;color:#6a7e91;margin-top:16px;line-height:1.9}
.adv-attribution a{margin-right:14px;text-underline-offset:3px}
.adv-attribution code{font-size:11px;background:#e8eef3;border-radius:4px;padding:2px 4px}
@media(max-width:1100px){.adv-example-tools{padding-left:0;border-left:0}.adv-tool-label{width:100%;margin-bottom:1px}.adv-simulation-toolbar{align-items:flex-end;gap:12px 18px}.adv-status{margin-bottom:5px}}
@media(max-width:700px){
 body.advanced-open main{padding:18px 12px 24px}
 .adv-heading{gap:12px;margin-bottom:15px}.adv-heading h1{font-size:27px}.adv-heading a{font-size:12px}
 .adv-toolbar{padding:12px;gap:12px}.adv-tool-group{flex:1 1 100%;gap:8px}.adv-tool-group button{flex:1 1 auto}
 .adv-project-files{gap:8px}.adv-project-files button{flex:1 1 140px}.adv-file-note{padding:0 12px 12px}
 .adv-example-tools{padding-top:12px;border-top:1px solid #e5ebf0}.adv-example-tools button{flex:1 1 140px}
 .adv-status{margin-left:0;margin-bottom:0}.adv-toolbar>#adv-retry{flex:1}
 .adv-message{padding:11px 12px}.adv-sheet-heading{padding:12px}.adv-sheet-heading>span:last-child{font-size:10px}
 .adv-mobile-hint{display:block;font-size:11px;line-height:1.6;margin:0;padding:0 12px 11px;color:#60778b;background:#fff;border-left:1px solid var(--adv-edge);border-right:1px solid var(--adv-edge)}
 .adv-stage{overflow-x:auto;overscroll-behavior-x:contain}.adv-stage iframe{min-width:760px;min-height:620px}
 .adv-help{grid-template-columns:1fr;gap:16px;padding:16px}.adv-attribution{font-size:11px}
}
#adv-download-link{display:flex;align-items:center;width:fit-content;min-height:44px;margin-top:8px;padding:8px 12px;border:1px solid var(--adv-edge);border-radius:9px;font-weight:700;text-decoration:none;background:#fff;color:#225c76}
#adv-download-link:focus-visible{outline:3px solid #147d91;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.adv-toolbar button,.adv-heading a,#adv-confirm-example button{transition:none}}
