:root{font-family:Tahoma,Arial,sans-serif;color:#182e43;background:#f4f7fb;font-size:16px;font-synthesis:none;--navy:#102c61;--blue:#173b78;--mint:#efe1c5;--muted:#637487;--line:#e1e8f0;--white:#fff;--radius:16px}*{box-sizing:border-box}body{margin:0;line-height:1.75}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}a{color:inherit}button,a,input{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #ad792e;outline-offset:4px}button{color:inherit}svg{display:block}.skip-link{position:fixed;top:-100px;right:20px;z-index:1000;padding:10px 20px;background:white}.skip-link:focus{top:10px}[hidden]{display:none!important}.topbar{height:92px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;gap:24px;position:relative;z-index:10}.brand{display:flex;align-items:center;gap:13px;text-decoration:none}.brand-mark{width:48px;height:48px;background:var(--navy);color:#efe1c5;display:grid;place-items:center;font-family:Georgia,serif;font-size:34px;border-radius:13px;line-height:1}.brand strong{display:block;font-size:21px;line-height:1.6;letter-spacing:-.4px}.brand small{display:block;font-size:12px;color:var(--muted);letter-spacing:.2px}.header-middle{display:flex;align-items:center;gap:15px;color:var(--muted);font-size:14px}.divider{height:15px;width:1px;background:#cbd5df}.header-actions{display:flex;gap:16px;align-items:center}.language-picker{display:flex;direction:rtl;border:1px solid var(--line);padding:4px;background:#f7f9fc;border-radius:10px;gap:3px}.language-picker button{border:0;border-radius:6px;background:transparent;padding:5px 16px;font-size:14px;min-height:36px}.language-picker button[aria-pressed=true]{background:var(--navy);color:white;box-shadow:0 2px 4px #102c6116}.index-toggle{display:none;border:0;background:none;align-items:center;gap:6px;padding:8px}.index-toggle svg{width:22px;fill:none;stroke:currentColor;stroke-width:1.7}.app-layout{display:grid;grid-template-columns:280px minmax(0,1fr);max-width:1700px;margin:auto;min-height:calc(100vh - 92px)}.sidebar{background:white;border-inline-end:1px solid var(--line);padding:30px 20px 24px;position:relative}.sidebar-title{padding:0 13px 25px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--muted)}h1,h2,h3,p{margin-top:0}h2{font-size:21px;line-height:1.6;margin-bottom:10px}h3{font-size:17px;line-height:1.65;margin-bottom:4px}.sidebar-title h2{font-size:26px;margin:3px 0 6px}.sidebar-title p{font-size:13px;color:var(--muted);margin:0;line-height:1.9}details.chapter-group{border-top:1px solid var(--line);padding:16px 0 10px}.chapter-group summary{list-style:none;display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;cursor:pointer;padding:4px 10px 12px}.chapter-group summary::-webkit-details-marker{display:none}.group-icon{width:28px;height:28px;border-radius:7px;background:#eef3fb;display:grid;place-items:center;font-size:15px;color:#4474b8;font-family:Arial}.group-count{margin-inline-start:auto;font:12px Arial;color:var(--muted);background:#f2f5f9;border-radius:5px;padding:1px 5px}.chevron{font-size:14px;color:var(--muted);transform:rotate(0);transition:transform .2s}.chapter-group[open] .chevron{transform:rotate(180deg)}.chapter-link{display:flex;gap:11px;align-items:flex-start;width:100%;text-align:start;border:0;background:transparent;border-radius:9px;padding:10px 10px;margin:2px 0;color:#526477;line-height:1.8;font-size:14px}.chapter-link:hover{background:#f4f7fc}.chapter-link[aria-current=true]{background:#eaf1fe;color:#102c61;box-shadow:inset -3px 0 #173b78}.chapter-number{font:12px/1.9 Arial,sans-serif;min-width:20px;padding-top:2px;opacity:.75}.chapter-title{flex:1}.ready-icon{color:#2768cc;font-size:15px;font-family:Arial;margin-top:2px}.curriculum-note{display:flex;align-items:flex-start;gap:9px;padding:17px 10px;background:#f7f9fc;border-radius:10px;margin-top:18px}.curriculum-note svg{width:17px;min-width:17px;margin-top:5px;fill:none;stroke:#68829e;stroke-width:1.5}.curriculum-note p{font-size:12px;color:var(--muted);margin:0;line-height:1.9}.author{border-top:1px solid var(--line);margin-top:25px;padding:23px 10px 0;display:flex;gap:12px;align-items:center}.author-monogram{width:43px;height:43px;border:1px solid #cbd9e8;border-radius:50%;display:grid;place-items:center;font:14px Georgia;color:#526c86}.author strong{display:block;font-size:14px}.author small{display:block;font-size:12px;color:var(--muted);line-height:1.6}main{padding:27px 38px 18px;min-width:0}.breadcrumbs{display:flex;gap:10px;align-items:center;color:#7a899a;font-size:12px;margin-bottom:24px}.breadcrumbs span:last-child{color:#3a5674}.lesson-heading{display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:26px}.lesson-kicker{display:flex;gap:13px;align-items:center;font-size:12px}.chapter-pill{background:#e6eefb;color:#2862b8;padding:3px 11px;border-radius:5px;font-weight:700}.available-label{color:#597287}h1{font-size:44px;line-height:1.45;letter-spacing:-1px;margin:8px 0}.lesson-intro{color:var(--muted);font-size:16px;max-width:580px;margin-bottom:0}.equation-badge{flex-shrink:0;width:202px;text-align:center;direction:ltr;color:#31546f;font-family:Georgia,serif;line-height:1.5;font-size:36px;transform:rotate(-3deg)}.equation-badge span:first-child{color:#c98b19}.equation-badge span:nth-of-type(2){color:#127f79}.equation-badge i{font-size:26px;font-style:normal;margin:0 6px;color:#96a6b6}.equation-badge small{display:block;direction:rtl;font-family:Tahoma,Arial,sans-serif;font-size:12px;color:var(--muted);margin-top:5px;letter-spacing:0}.lesson-tabs{display:flex;gap:27px;border-bottom:1px solid #d7e2ef;margin-bottom:24px}.lesson-tabs button{border:0;background:none;padding:12px 3px 14px;font-size:14px;color:#6d7e90;display:flex;align-items:center;gap:8px;position:relative;min-height:52px}.lesson-tabs button[aria-selected=true]{color:#215dbc;font-weight:700}.lesson-tabs button[aria-selected=true]:after{content:"";position:absolute;height:3px;background:#173b78;bottom:-1px;inset-inline:0;border-radius:4px 4px 0 0}.lesson-tabs svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}.lab-grid{display:grid;grid-template-columns:minmax(0,1fr) 276px;gap:19px}.circuit-card{background:var(--navy);color:white;border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;min-width:0;box-shadow:0 8px 24px #0c29410a}.circuit-header{display:flex;justify-content:space-between;align-items:center;padding:23px 25px 7px}.circuit-header .eyebrow{color:#90abc3;font-size:12px}.circuit-header h2{font-size:19px;font-weight:500;margin:3px 0}.dc-chip{font:12px Arial;color:#95b8cd;border:1px solid #385267;padding:5px 8px;border-radius:5px}.circuit{width:100%;height:auto;flex:1;min-height:250px;max-height:365px}.wire,.resistor,.source-symbol{fill:none;stroke:#a8c3d7;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.resistor{stroke:#e7b957;stroke-width:3.5}.source-symbol{stroke:#e7b957;stroke-width:3.5}.current-flow{fill:none;stroke:#68ead2;stroke-width:3;stroke-dasharray:3 23;stroke-linecap:round;animation:flow 2.5s linear infinite}.current-flow.stopped{opacity:0;animation-play-state:paused}@keyframes flow{to{stroke-dashoffset:-104}}.meter{fill:#17374e;stroke:#a8c3d7;stroke-width:2}.meter-letter{fill:#d2e6f5;font:20px Arial}.circuit-value{fill:#ebf4fb;font:20px Arial}.circuit-var{fill:#94b0c7;font:italic 15px Georgia}.circuit-plus,.circuit-minus{fill:#e7b957;font:19px Arial}.current-text{fill:#70e6cc}.connection{fill:#a8c3d7}.direction-arrow{fill:none;stroke:#66e4cc;stroke-width:2}.circuit-footnote{display:flex;align-items:center;justify-content:center;gap:9px;font-size:12px;color:#a7bece;padding:14px 20px 19px}.flow-key{height:3px;width:16px;background:#66e4cc;border-radius:4px}.controls-card{border:1px solid var(--line);background:white;border-radius:var(--radius);padding:21px}.control-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.control-heading h2{font-size:17px;margin:0}.icon-button{width:32px;height:32px;display:grid;place-items:center;background:#f5f7fa;border:0;border-radius:7px;color:#76889a}.icon-button svg{width:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.control-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#4f6478}.variable-tag{font:italic 13px Georgia;background:#eff4f9;border-radius:4px;width:22px;height:22px;display:grid;place-items:center;color:#57718a}.control-reading{display:flex;align-items:baseline;gap:5px;direction:ltr;justify-content:flex-start;margin-top:2px}.control-reading output{font:600 29px/1.5 Arial;color:#29455e}.control-reading span{font:14px Arial;color:#7a90a5}.slider-control{margin-bottom:13px}.slider-control input{width:100%;margin:5px 0 0;accent-color:#3772d8;direction:ltr;cursor:pointer;min-height:24px}.resistance-control input{accent-color:#10998b}.range-labels{display:flex;justify-content:space-between;color:#6e8295;font:12px/1.5 Arial}.result-box{padding:13px 12px;background:#eaf6f4;border:1px solid #d4ede7;border-radius:10px;display:flex;flex-direction:column;align-items:center;line-height:1.5;margin-top:17px}.result-box>span:first-child{font-size:12px;color:#47736d}.result-box strong{font:600 32px/1.45 Arial;color:#14776c}.result-box strong small{font-size:17px;font-weight:400}.live-formula{font:12px/1.8 Arial;color:#44756e;white-space:nowrap}.discovery-row{display:flex;gap:14px;align-items:center;background:#edf2fc;border:1px solid #dce6f7;padding:19px 21px;margin-top:19px;border-radius:12px}.discovery-icon{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;border-radius:50%;background:#dce8fc;color:#386bbe;font:20px Georgia}.discovery-row h3{font-size:15px;color:#2a507e}.discovery-row p{font-size:14px;color:#667b91;margin:0;line-height:1.85}.text-button{border:0;background:none;color:#2865bd;font-size:13px;white-space:nowrap;padding:7px 0;min-height:36px}.discovery-row .text-button{margin-inline-start:auto;padding-inline-start:8px}.concept-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:23px}.concept-cards article{display:flex;gap:13px;align-items:flex-start;background:white;border:1px solid var(--line);padding:20px 17px;border-radius:12px}.concept-cards h3{font-size:14px;margin-bottom:5px}.concept-cards p{font-size:13px;color:var(--muted);line-height:1.9;margin-bottom:8px}.concept-cards small{font-size:12px;color:#7b8da0}.concept-symbol{font:italic 23px Georgia;width:33px;height:33px;display:grid;place-items:center;border-radius:8px;flex-shrink:0}.concept-symbol.voltage{color:#ac7a22;background:#fff4df}.concept-symbol.current{color:#147e72;background:#e5f5f0}.concept-symbol.resistance{color:#3868b5;background:#eaf1fc}.model-note{display:inline;color:#687d91;font-size:12px;line-height:2.1}.power-readout{display:inline-block;color:#586f86;font:12px Arial;margin-top:15px;margin-inline-start:5px}.next-action{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:24px 0 5px;margin-top:8px}.next-action>span{font-size:14px;color:var(--muted)}.primary-button,.secondary-button{border:0;border-radius:8px;padding:11px 19px;font-size:14px;line-height:1.8}.primary-button{color:white;background:#173b78;box-shadow:0 3px 6px #173b7816}.primary-button:hover{background:#102c61}.secondary-button{border:1px solid #d4dfeb;background:white;color:#4a6279}.page-footer{border-top:1px solid var(--line);margin-top:27px;padding-top:17px;display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:12px;color:#7c8b99}.page-footer .text-button{font-size:12px}.reading-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:22px}.reading-card{background:white;border:1px solid var(--line);border-radius:14px;padding:28px 30px}.reading-card p,.reading-card li{font-size:16px;line-height:2;color:#506478}.reading-card h2{margin:5px 0 13px;font-size:23px}.reading-card h3{margin:24px 0 8px;font-size:18px}.reading-card p:last-child{margin-bottom:0}.formula-block{border-radius:10px;background:#eff4fb;padding:16px 20px;text-align:center;font:24px/1.6 Georgia;color:#245baa;direction:ltr;margin:20px 0}.formula-variants{display:flex;justify-content:space-around;gap:16px;flex-wrap:wrap;font:20px/1.8 Georgia;direction:ltr;color:#52759c}.example-box{background:#f6faf9;border-inline-start:3px solid #24a48e;padding:18px 22px;margin:16px 0;border-radius:7px}.example-box p{font-size:15px;margin:5px 0}.math{direction:ltr;unicode-bidi:isolate;font-family:Arial,sans-serif;display:inline-block}.math-line{direction:ltr;text-align:left;font-family:Arial;font-size:18px!important;color:#236e65!important}.reading-aside{display:flex;flex-direction:column;gap:16px}.side-note{border:1px solid var(--line);background:white;padding:22px;border-radius:12px}.side-note h3{font-size:16px;margin-bottom:12px}.side-note p{font-size:14px;color:#5b7287;line-height:1.95;margin-bottom:0}.term-list{margin:0}.term-list dt{font-size:14px;font-weight:700;margin-top:14px}.term-list dt:first-child{margin-top:0}.term-list dd{margin:2px 0 0;font-size:13px;color:#75879a}.quiz-intro{margin:25px 0}.quiz-intro h2{font-size:27px;margin:5px 0}.quiz-intro p{color:var(--muted);font-size:15px}.question{background:white;border:1px solid var(--line);border-radius:12px;margin:0 0 16px;padding:22px 25px;min-width:0}.question legend{font-size:16px;font-weight:700;padding:0 8px;max-width:100%;line-height:1.9}.question-number{font:12px Arial;color:#6586b3;margin-inline-end:8px}.answers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:5px}.answer-label{display:flex;align-items:center;gap:10px;border:1px solid #dce5ef;border-radius:8px;padding:11px 14px;font-size:15px;cursor:pointer}.answer-label:has(input:checked){border-color:#4c84d8;background:#eff5ff}.answer-label input{accent-color:#173b78;width:17px;height:17px;margin:0;flex-shrink:0}.question-feedback{margin:15px 0 0;padding:12px 15px;border-radius:7px;font-size:14px;line-height:1.9}.question-feedback.correct{color:#166b51;background:#ebf8f1}.question-feedback.incorrect{color:#8d522a;background:#fff5e9}.question-feedback.missing{color:#765d29;background:#fff9e9}.quiz-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}#quiz-score{margin:0;font-size:15px;font-weight:700;color:#356a60}dialog{border:0;border-radius:20px;padding:36px;width:min(590px,calc(100% - 32px));max-height:85vh;color:var(--navy);box-shadow:0 24px 100px #081d4350;line-height:1.9}dialog::backdrop{background:#071b35a6;backdrop-filter:blur(4px)}.dialog-close{position:absolute;inset-inline-end:15px;top:10px;background:#f1f5f9;border:0;border-radius:50%;width:34px;height:34px;line-height:1;font:25px Arial;color:#647b8f}.dialog-eyebrow{color:#55789a;font-size:13px}.dialog-title{font-size:27px;margin:15px 0 8px;line-height:1.7}.dialog-subtitle{color:#8090a0;font-size:15px;margin:0 0 15px}.dialog-body{font-size:16px;color:#526a7e}.outline-label{display:inline-block;background:#fff4de;color:#856125;border-radius:5px;padding:2px 9px;font-size:12px;margin:4px 0 12px}.dialog-objectives{padding-inline-start:24px;color:#486379;font-size:15px}.dialog-note{font-size:13px;color:#73869a;margin-top:22px}.source-links{display:flex;flex-direction:column;gap:12px}.source-links a{color:#2362b8;font-size:15px}.mobile-overlay{display:none}button{transition:background .15s,color .15s,box-shadow .15s}
@media(min-width:1450px){main{padding:35px 55px 24px}.lab-grid{grid-template-columns:minmax(0,1fr) 300px}.controls-card{padding:24px}.circuit{min-height:300px}.slider-control{margin-bottom:18px}}
@media(max-width:1190px){.app-layout{grid-template-columns:238px minmax(0,1fr)}.sidebar{padding-inline:13px}main{padding:25px}.lab-grid{grid-template-columns:minmax(0,1fr) 235px;gap:14px}.controls-card{padding:17px}.equation-badge{width:165px;font-size:31px}.lesson-intro{font-size:15px}.concept-cards{gap:10px}.concept-cards article{padding:17px 12px;gap:9px}.concept-symbol{width:26px;height:28px;font-size:20px}.circuit-header{padding:20px 20px 7px}.circuit-header h2{font-size:17px}.discovery-row{flex-wrap:wrap;gap:10px}.discovery-row>div:nth-child(2){flex:1}.discovery-row .text-button{margin-inline-start:44px;padding:0}.reading-grid{grid-template-columns:minmax(0,1fr)}.reading-aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.topbar{padding:0 23px;height:84px}.header-middle{display:none}.app-layout{display:block}.sidebar{display:none;border:0}.index-toggle{display:flex}.sidebar.open{display:block;position:fixed;inset-inline-start:0;top:84px;bottom:0;overflow:auto;width:min(330px,90vw);z-index:40;box-shadow:-12px 0 40px #142c4340}.mobile-overlay{display:block;position:fixed;inset:84px 0 0;background:#0a1e4560;z-index:30}.lesson-heading{margin-bottom:25px}.lesson-intro{max-width:600px}.lab-grid{grid-template-columns:minmax(0,1fr) 270px}.circuit{min-height:285px;max-height:335px}.concept-cards article{padding:20px}.concept-cards p{font-size:14px}.controls-card{padding:21px}.chapter-link{font-size:15px;padding-block:12px}main{max-width:980px;margin:auto;padding:25px 28px}.discovery-row .text-button{margin-inline-start:auto}.reading-card{padding:25px}}
@media(max-width:640px){.topbar{height:78px;padding:0 16px;gap:9px}.brand{gap:8px}.brand-mark{width:36px;height:39px;font-size:28px;border-radius:10px}.brand strong{font-size:16px;letter-spacing:-.5px}.brand small{font-size:11px}.header-actions{gap:8px}.language-picker button{padding:4px 9px;font-size:12px;min-height:32px}.language-picker{padding:3px}.index-toggle{padding:7px}.index-toggle span{display:none}.index-toggle svg{width:22px}.sidebar.open{top:78px}.mobile-overlay{top:78px}main{padding:19px 16px}.breadcrumbs{font-size:12px;margin-bottom:20px;gap:7px;flex-wrap:wrap}.lesson-heading{display:block;margin-bottom:22px}.lesson-kicker{font-size:12px}.equation-badge{display:none}h1{font-size:37px;margin:9px 0}.lesson-intro{font-size:16px;line-height:1.9}.lesson-tabs{gap:0;justify-content:space-between;margin-bottom:19px}.lesson-tabs button{font-size:13px;gap:6px;padding-inline:1px}.lesson-tabs svg{width:16px;height:16px}.lab-grid{display:flex;flex-direction:column;gap:14px}.circuit-header{padding:19px 20px 5px}.circuit-header h2{font-size:18px}.circuit{min-height:200px;max-height:250px}.circuit-footnote{font-size:12px;padding:7px 15px 17px}.controls-card{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;padding:18px}.control-heading{grid-column:1/-1;margin-bottom:13px}.control-heading h2{font-size:16px}.control-label{font-size:13px}.control-reading output{font-size:28px}.control-reading{margin-top:5px}.result-box{grid-column:1/-1;margin-top:2px;display:grid;grid-template-columns:1fr 1fr;justify-items:start;align-items:center;padding:12px 16px;gap:0 8px}.result-box strong{grid-column:2;grid-row:1/3;justify-self:end;font-size:29px}.result-box>span:first-child{font-size:13px}.live-formula{font-size:12px}.slider-control{margin-bottom:17px}.discovery-row{padding:17px;gap:10px;align-items:flex-start}.discovery-icon{width:28px;height:28px;margin-top:3px}.discovery-row h3{font-size:15px}.discovery-row p{font-size:14px}.discovery-row .text-button{margin-inline-start:38px;font-size:14px}.concept-cards{grid-template-columns:1fr;gap:10px;margin-top:18px}.concept-cards article{padding:17px;gap:14px}.concept-symbol{width:35px;height:35px;font-size:23px}.concept-cards h3{font-size:16px}.concept-cards p{font-size:14px;margin-bottom:3px}.concept-cards small{font-size:12px}.model-note{display:block;margin-top:15px;font-size:12px}.power-readout{margin-top:2px}.next-action{flex-direction:column;align-items:stretch;gap:12px;text-align:center}.next-action .primary-button{width:100%}.page-footer{flex-direction:column;gap:1px;margin-top:22px;text-align:center}.reading-card{padding:21px}.reading-card h2{font-size:22px}.reading-card p,.reading-card li{font-size:16px;line-height:2}.reading-aside{display:flex}.formula-block{font-size:24px;padding:14px}.formula-variants{font-size:18px}.example-box{padding:14px}.quiz-intro h2{font-size:25px}.question{padding:16px}.question legend{font-size:15px}.answers{grid-template-columns:1fr;gap:9px}.answer-label{font-size:16px;padding:12px}.quiz-actions{gap:10px}.quiz-actions button{flex:1}#quiz-score{width:100%;margin-top:6px}.dialog-title{font-size:24px}dialog{padding:28px 23px}.dialog-body{font-size:15px}}
.concept-cards p{font-size:14px}.sidebar-title p{font-size:14px}.model-note{font-size:13px}
@media(max-width:640px){.control-label{font-size:14px}.lesson-tabs button{font-size:14px}.circuit-value{font-size:25px}.circuit-var{font-size:20px}.brand small{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.current-flow{stroke-dasharray:none;opacity:.7}}

/* Keep the semantic question legend inside the padded card. */
.question-group{border:0;padding:0;margin:0;min-width:0;width:100%}
.question legend{padding:0;margin-block-end:16px;width:100%;max-width:100%;text-align:start}
.question-heading{display:flex;align-items:baseline;gap:10px;min-width:0}
.question-number{flex:none;margin:0;direction:ltr}
.question-text{flex:1;min-width:0;overflow-wrap:anywhere}
.question .answers{margin-top:0}
.answer-label>span{min-width:0;overflow-wrap:anywhere}
.logic-expression{display:inline-block;max-width:100%;direction:ltr;unicode-bidi:isolate;vertical-align:baseline;font-family:Arial,sans-serif;line-height:1.65;overflow-x:auto}
.logic-not{display:inline-block;border-top:.075em solid currentColor;padding:.07em .035em 0;line-height:1.25;white-space:nowrap;vertical-align:baseline}
.logic-not .logic-not{margin-top:.12em}
.formula-block,.math-line,.boolean-static-pair>span{overflow-x:auto;max-width:100%}
@media(max-width:640px){.question legend{margin-block-end:14px}.question-heading{gap:8px}}

.logic-expression[role="math"]{font-size:inherit;color:inherit}
.logic-expression .logic-not{font:inherit;line-height:1.25;color:inherit;border-radius:0}

/* Question diagrams retain readable labels on narrow screens. */
.quiz-diagram{margin:2px 0 20px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--blue-soft,#edf3fb)}
.quiz-diagram-scroll{overflow-x:auto;direction:ltr}
.quiz-diagram svg{display:block;width:100%;max-width:650px;min-width:480px;height:auto;margin:auto;direction:ltr;color:var(--navy,#102c61)}
.quiz-diagram svg text{font:18px Arial,sans-serif;fill:currentColor;direction:ltr;unicode-bidi:isolate}
.quiz-diagram .qd-wire{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.quiz-diagram .qd-component,.quiz-diagram .gates-shape,.quiz-diagram .gates-bubble{fill:white;stroke:currentColor;stroke-width:2.5}
.quiz-diagram .gates-extra-curve{fill:none;stroke:currentColor;stroke-width:2.5}
.quiz-diagram .qd-node{fill:currentColor}
.quiz-diagram figcaption{font-size:.85rem;color:var(--muted);text-align:start;padding:4px 6px}
