/* Lesson-scoped only. House typography, navigation and account assets are retained. */
body[data-bw-content-remake] main.bwcr {font-size:1.125rem;line-height:1.7;overflow-wrap:anywhere;}
.bwcr .st-model,.bwcr .st-ingredient,.bwcr .st-prediction {margin:2rem 0;padding:1.25rem;border:1px solid #c8bfd9;border-radius:1rem;background:#f5f1fb;color:#19233c;}
.bwcr .st-model h3,.bwcr .st-ingredient h3,.bwcr .st-prediction h3 {margin-top:0;color:#19233c;}
.bwcr .st-limit {color:#4e4460;font-size:1rem;}
.bwcr .st-model-layout {display:grid;grid-template-columns:minmax(0,0.85fr) minmax(0,1.15fr);gap:1.5rem;align-items:start;}
.bwcr .st-model figure {margin:0;min-width:0;}
.bwcr .st-model svg {display:block;width:100%;height:auto;max-width:26rem;margin:auto;}
.bwcr .st-model figcaption {font-size:1rem;color:#4e4460;}
.bwcr .st-model label,.bwcr .st-ingredient label {display:block;font-weight:650;margin:.75rem 0 .35rem;}
.bwcr .st-model select,.bwcr .st-ingredient select {width:100%;max-width:100%;min-width:0;min-height:48px;padding:.6rem;border:1px solid #68577d;border-radius:.4rem;background:#fff;color:#19233c;font:inherit;}
.bwcr .st-actions {display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1rem;}
.bwcr button,.bwcr summary,.bwcr .bwcr-options label {min-height:44px;}
.bwcr .st-model button,.bwcr .st-ingredient button,.bwcr [data-sugar-retry] {font:inherit;white-space:normal;max-width:100%;padding:.6rem 1rem;min-height:48px;border:1px solid #51407e;border-radius:.4rem;background:#51407e;color:white;cursor:pointer;margin:.5rem .5rem .5rem 0;}
.bwcr .st-model button:disabled {background:#66577d;cursor:default;}
.bwcr :is(button,select,summary,input):focus-visible {outline:3px solid #176887;outline-offset:3px;}
.bwcr .st-model [data-model-history] {padding-left:1.4rem;}
.bwcr .st-model [data-model-history] li {margin:1rem 0;}
.bwcr .st-model [data-model-fallback] {border-top:1px solid #c8bfd9;padding-top:1rem;}
.bwcr .st-atomic details,.bwcr .st-prediction details {border-left:3px solid #a18bc3;padding:.35rem .8rem;margin:.65rem 0;background:#fff;color:#19233c;}
.bwcr .st-atomic summary,.bwcr .st-prediction summary {cursor:pointer;padding:.4rem 0;}
.bwcr .st-atomic p {margin:.5rem 0;}
.bwcr.st-enhanced [data-option-rationale] {display:none;}
.bwcr [data-sugar-retry] {background:#fff;color:#51407e;}
.bwcr .st-route {display:flex;flex-direction:column;align-items:center;gap:.5rem;margin:1.5rem 0;}
.bwcr .st-route span:not([aria-hidden]) {padding:.5rem 1rem;border-radius:2rem;border:2px solid #51407e;background:white;}
.bwcr article[data-inline-case] {margin-top:2rem;border-top:3px solid #a18bc3;padding-top:1.5rem;}
.bwcr .st-clinical {margin:1.5rem 0;}.bwcr .st-clinical img {display:block;width:100%;height:auto;border-radius:.5rem;}.bwcr .st-clinical figcaption {font-size:1rem;line-height:1.7;margin-top:.8rem;}
.bwcr [hidden] {display:none!important;}
@media(max-width:750px) {.bwcr .st-model-layout {grid-template-columns:minmax(0,1fr)} .bwcr .st-model,.bwcr .st-ingredient,.bwcr .st-prediction {padding:.8rem} .bwcr .st-model svg {max-width:23rem}}
@media(prefers-reduced-motion:reduce) {.bwcr .st-model * {transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.bwcr dialog {max-width:min(94vw,60rem);max-height:90vh;overflow:auto;border:2px solid #51407e;border-radius:.7rem;padding:1rem;color:#19233c;background:#fff;}
.bwcr dialog::backdrop {background:rgb(15 20 35 / .8)}
.bwcr dialog img {display:block;width:100%;height:auto;margin-top:1rem}

/* Keep native pickers usable and leave room for enlarged text on phones. */
.bwcr .st-model select,.bwcr .st-ingredient select {height:max(48px,2.75em);}
@media(max-width:400px){
 body[data-sugar-finished] main.bwcr {width:calc(100% - 24px);margin-inline:auto;padding-inline:0;}
 body[data-sugar-finished] .bwcr :is(.st-model,.st-ingredient,.st-prediction,.st-atomic details,.st-prediction details,[data-model-fallback]) {padding-inline:12px;}
 body[data-sugar-finished] .bwcr :is(.st-model,.st-ingredient) button {padding-inline:12px;}
}
