/* Topic-scoped enhancements. Shared lesson and navigation styles are untouched. */
.bwcr .l4-model,.bwcr .l4-predict{margin:1.5rem 0;padding:1.2rem;border:1px solid #c8bedc;border-radius:1rem;background:#faf7f0;color:#182137;min-width:0}
.bwcr .l4-model h3,.bwcr .l4-predict h3{margin-top:0;color:#182137;font-size:clamp(1.2rem,3vw,1.55rem);line-height:1.4;font-weight:700}
.bwcr .l4-model p,.bwcr .l4-model label,.bwcr .l4-model legend,.bwcr .l4-model output,.bwcr .l4-predict p{font-size:1em;line-height:1.7;color:#182137;overflow-wrap:anywhere}
.bwcr .l4-controls{display:grid;gap:1rem;margin-block:1rem}.bwcr .l4-controls[hidden]{display:none!important}
.bwcr .l4-controls fieldset{min-inline-size:0;border:0;padding:0;margin:0}.bwcr .l4-controls legend{font-weight:700;margin-block-end:.5rem}
.bwcr .l4-buttons{display:flex;gap:.6rem;flex-wrap:wrap}.bwcr .l4-model button,.bwcr .l4-model select{min-height:44px;max-width:100%;padding:.55rem .8rem;font:inherit;line-height:1.45;white-space:normal;border:2px solid #55447b;border-radius:.5rem;background:#fffefa;color:#302047;cursor:pointer}
.bwcr .l4-model button[aria-pressed=true]{background:#342652;color:#fff;border-color:#342652;box-shadow:inset 0 0 0 2px #fff}.bwcr .l4-model .l4-reset{background:transparent;color:#302047}
.bwcr .l4-model input[type=range]{display:block;min-height:44px;width:100%;accent-color:#55447b}.bwcr .l4-model select{display:block;width:100%}
.bwcr .l4-model :is(button,select,input):focus-visible,.bwcr .l4-figure-scroll:focus-visible,.bwcr .l4-figure a:focus-visible,.bwcr .l4-reveal summary:focus-visible{outline:3px solid #8a430c;outline-offset:3px}
.bwcr .l4-model output[role=status]{display:block;border-inline-start:4px solid #55447b;padding:.6rem 1rem;background:#eee8f7;min-height:3rem;white-space:normal}
.bwcr .l4-limit{font-size:1em!important;line-height:1.65;color:#3f4150!important}.bwcr .l4-state-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));gap:.7rem;padding:0;list-style:none}
.bwcr .l4-state-list li{padding:.8rem;border:2px solid #c8bedc;border-radius:.55rem;background:#fffefa;color:#182137}.bwcr .l4-state-list li[data-active=true]{border-color:#55447b;background:#eee8f7}.bwcr .l4-state-list strong{display:block}
.bwcr .l4-model-visual{margin:1rem 0;overflow-x:auto;overscroll-behavior-inline:contain}.bwcr .l4-model-visual svg{display:block;width:100%;max-width:42rem;min-width:290px;height:auto;margin:auto;background:#fffefa;border-radius:.5rem}
.bwcr .l4-live-mark{fill:#55447b;stroke:#fffefa;stroke-width:3}.bwcr .l4-dim{opacity:.38}.bwcr .l4-emphasis{stroke:#8a430c;stroke-width:5}.bwcr .l4-hidden{display:none!important}
.bwcr .l4-figure{margin:1.75rem 0;padding:0;background:none}.bwcr .l4-figure-scroll{overflow-x:auto;overscroll-behavior-inline:contain;border:1px solid #c8bedc;border-radius:.75rem;background:#fffefa}
.bwcr .l4-figure img{display:block;width:100%;max-width:35rem;min-width:320px;height:auto;margin:auto}.bwcr .l4-figure figcaption{font-size:1em;line-height:1.7;margin-top:.65rem;color:#182137;overflow-wrap:anywhere}
.bwcr .l4-figure a{display:inline-flex;align-items:center;min-height:44px;padding:.2rem 0;color:#473273;text-decoration:underline;text-underline-offset:.2rem}
.bwcr .l4-reveal{margin:.65rem 0;padding:.25rem .6rem;border-inline-start:3px solid #c8bedc;background:#fffefa;color:#182137}.bwcr .l4-reveal summary{min-height:44px;padding:.5rem .2rem;cursor:pointer;line-height:1.6;color:#342652;font-weight:600;overflow-wrap:anywhere}
.bwcr .l4-reveal p{margin:.5rem .2rem;font-size:1em;line-height:1.7}.bwcr .l4-reveal[open]{border-inline-start-color:#55447b}.bwcr .l4-full-reasoning summary{min-height:44px;line-height:1.6;padding:.5rem;cursor:pointer}
.bwcr .l4-rule{font-weight:700}.bwcr .l4-retry-notice{margin:.5rem 0}.bwcr .l4-checkpoint{margin-block:1.75rem}.bwcr .l4-model table{width:100%;border-collapse:collapse}.bwcr .l4-model th,.bwcr .l4-model td{padding:.6rem;text-align:start;border-bottom:1px solid #c8bedc;vertical-align:top;overflow-wrap:anywhere}
.bwcr .l4-meter{height:1rem;border:1px solid #55447b;background:#f0eaf8;border-radius:.3rem;overflow:hidden}.bwcr .l4-meter>span{display:block;height:100%;background:#55447b;width:0}.bwcr .l4-progress-label{display:flex;justify-content:space-between;gap:1rem}
.bwcr .l4-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:1rem}.bwcr .l4-two>*{min-width:0}.bwcr .l4-model .l4-plain-list{padding-left:1.25rem}
@media(max-width:400px){.bwcr .l4-model,.bwcr .l4-predict{padding:.8rem}.bwcr .l4-buttons button{flex:1 1 10rem}.bwcr .l4-model-visual svg{min-width:280px}.bwcr .l4-model output[role=status]{padding:.6rem}}
@media(prefers-reduced-motion:reduce){.bwcr .l4-model *,.bwcr .l4-reveal *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.bwcr .l4-controls{display:none!important}.bwcr .l4-reveal>p,.bwcr .l4-full-reasoning>p{display:block}.bwcr .l4-model{break-inside:avoid}.bwcr .l4-figure-scroll{overflow:visible}.bwcr .l4-figure img{min-width:0}}
.bwcr .l4-lightbox{width:min(92vw,52rem);max-height:92vh;padding:1rem;background:#fffefa;color:#182137;border:2px solid #55447b;border-radius:1rem;overflow:auto}.bwcr .l4-lightbox::backdrop{background:rgba(18,24,42,.78)}
.bwcr .l4-lightbox h2{font-size:1.3rem;color:#182137}.bwcr .l4-lightbox img{display:block;width:100%;height:auto;max-width:45rem;margin:auto}.bwcr .l4-lightbox button,.bwcr .l4-retry{min-height:44px;font:inherit;padding:.6rem .9rem;background:#342652;color:#fff;border:2px solid #342652;border-radius:.5rem;cursor:pointer}
.bwcr .l4-lightbox button:focus-visible,.bwcr .l4-retry:focus-visible{outline:3px solid #8a430c;outline-offset:3px}.bwcr [data-l4-selected=true]{border-inline-start:4px solid #55447b;padding-inline-start:.8rem}.bwcr .l4-retry[hidden]{display:none!important}
.bwcr .l4-asd-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:1rem}.bwcr .l4-asd-groups h4{font:inherit;font-weight:700;margin:.7rem 0}.bwcr .l4-asd-groups ul{list-style:none;padding:0;margin:0}.bwcr .l4-asd-groups li{display:flex;align-items:flex-start;gap:.7rem;padding:.65rem 0;border-bottom:1px solid #c8bedc;font-size:1em;line-height:1.65}.bwcr .l4-asd-groups .l4-inventory-dot{display:inline-block;flex:0 0 1rem;width:1rem;height:1rem;border:2px solid #55447b;border-radius:.2rem;background:#fffefa;margin-top:.25rem}.bwcr .l4-asd-groups [data-present=true] .l4-inventory-dot{background:#55447b}.bwcr [data-asd-inventory]>h4{font:inherit;font-weight:700;font-size:1.15em}

main.bwcr[data-l4-teaching]{font-size:1.125rem;line-height:1.7}main.bwcr[data-l4-teaching].bwcr-roomy{font-size:1.375rem}main.bwcr[data-l4-teaching] :is(.bwcr-rationale p,.bwcr-takeaway,.bwcr-sources p,.bwcr-sources li,.bwcr-case-tools button){font-size:1em;line-height:1.7}
.bwcr .l4-lightbox-pan{max-width:100%;max-height:65vh;overflow:auto;overscroll-behavior:contain;outline-offset:-3px}.bwcr .l4-lightbox-pan:focus-visible{outline:3px solid #8a430c}.bwcr .l4-lightbox-pan img{width:auto;max-width:none;display:block;margin:0}.bwcr .l4-lightbox p{font-size:1em;line-height:1.7}

/* Keep ASD inventory text shrinkable beside its status marker at enlarged mobile text. */
.bwcr .l4-asd-groups li>span:not(.l4-inventory-dot){min-width:0;flex:1 1 0;overflow-wrap:anywhere}
