/* Scoped teaching controls. No ambient animation or forced progression. */
body[data-nmj-learning] .bwcr{max-width:56rem;margin-inline:auto;font-size:1.125rem;line-height:1.75}
body[data-nmj-learning] .bwcr p{max-width:72ch}
body[data-nmj-learning] .bwcr section[data-lesson-section]{margin-block:2.5rem}
body[data-nmj-learning] .bwcr .bwcr-figure{max-width:32rem;margin:1.5rem auto;background:#fffaf0;border:1px solid #cdc9db;border-radius:1rem;padding:1rem}
body[data-nmj-learning] .bwcr .bwcr-figure svg{display:block;width:100%;height:auto;max-height:none}
.nmj-predict,.nmj-model{margin:1.5rem 0;padding:1.25rem;border:1px solid #c6c0d6;border-radius:1rem;background:#f5f1fa;color:#17253d}
.nmj-predict h3,.nmj-model h3{margin-top:0;color:#17253d}
.nmj-predict details,.nmj-option details{border:0;border-bottom:1px solid #d7d1e2;border-radius:0;padding:.5rem 0;background:transparent}
.nmj-predict summary,.nmj-option summary{cursor:pointer;min-height:2.75rem;padding:.45rem .15rem;color:#332346;font-weight:650}
.nmj-predict details[open] p,.nmj-option details[open] p{margin:.4rem 0 .8rem;padding:.4rem .75rem;border-left:3px solid #5b417e;color:#17253d}
.nmj-model-controls{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center;margin-block:1rem}
.nmj-model-controls label{flex-basis:100%;font-weight:650}
.nmj-model button,.nmj-model select{font:inherit;min-height:2.75rem;padding:.6rem .9rem;border:1px solid #655277;border-radius:.55rem;background:#fffaf0;color:#17253d;max-width:100%;white-space:normal;cursor:pointer}
.nmj-model button:focus-visible,.nmj-model select:focus-visible,.nmj-predict summary:focus-visible,.nmj-option summary:focus-visible{outline:3px solid #12605f;outline-offset:4px}
.nmj-model figure{margin:1rem 0;background:#fffaf0;border-radius:.7rem;padding:1rem}
.nmj-model svg{display:block;width:100%;height:auto;max-width:32rem;margin:auto}
.nmj-model output{display:block;font-weight:650;margin-block:1rem;color:#17253d}
.nmj-model [data-model-part]{opacity:1;transition:opacity .18s ease}
.nmj-model [data-inactive]{opacity:.22}
.nmj-model [data-highlight]{stroke:#5b417e;stroke-width:5}
.nmj-model .nmj-model-note,.nmj-credit{font-size:1rem;line-height:1.65}
.nmj-clinical{margin:1.5rem 0;padding:1rem;background:#fffaf0;border:1px solid #cdc9db;border-radius:1rem}
.nmj-clinical img{display:block;max-width:100%;width:auto;height:auto;max-height:34rem;margin:0 auto 1rem;object-fit:contain}
.nmj-clinical figcaption{color:#17253d}
.nmj-clinical a{color:#483267;text-decoration:underline;overflow-wrap:anywhere}
.nmj-option{margin:.8rem 0}
body[data-nmj-learning] [hidden]{display:none!important}
@media(max-width:420px){.nmj-predict,.nmj-model{padding:.9rem}.nmj-model-controls button{flex:1 1 8rem}.nmj-model-controls select{width:100%}body[data-nmj-learning] .bwcr .bwcr-figure{padding:.55rem}}
@media(prefers-reduced-motion:reduce){.nmj-model [data-model-part]{transition:none}}

.nmj-model-scroll{overflow-x:auto;max-width:100%;border-radius:.5rem}
.nmj-model-scroll svg{min-width:26.25rem;max-width:none}
.nmj-model-scroll:focus-visible{outline:3px solid #12605f;outline-offset:3px}

body[data-nmj-learning] .bwcr p,body[data-nmj-learning] .bwcr figcaption{font-size:1.125rem}

/* Reserve clinical-photo space before lazy decoding. */
body[data-nmj-learning] .nmj-clinical img{width:100%;max-width:34rem;height:auto}

/* Keep room for enlarged labels without shrinking their type. */
@media(max-width:420px){
body[data-nmj-learning] .bwcr{padding-inline:12px!important}
body[data-nmj-learning] .nmj-model,body[data-nmj-learning] .nmj-predict{padding:12px}
body[data-nmj-learning] .nmj-model select{padding-inline:4px}
body[data-nmj-learning] .nmj-model button{padding-inline:12px}
body[data-nmj-learning] .nmj-model figure{padding:10px}
}
