.bw-interactive{margin:1.5rem 0;padding:clamp(1rem,4vw,1.5rem);border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:1rem;background:var(--bw-surface,#fff);box-shadow:0 .35rem 1.4rem color-mix(in srgb,#25164f 9%,transparent)}
.bw-interactive h3{margin:0 0 .35rem;font-size:1.25rem}.bw-interactive p{margin:.5rem 0}.bw-interactive label{display:block;font-weight:700;margin:.85rem 0 .25rem}.bw-interactive input[type=range]{width:100%;min-height:44px;accent-color:var(--bw-accent,#6243a5)}
.bw-interactive-controls{display:flex;flex-wrap:wrap;gap:.6rem;margin:.85rem 0}.bw-interactive button{min-height:44px;padding:.65rem .9rem;border:2px solid var(--bw-accent,#6243a5);border-radius:.7rem;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer}.bw-interactive button:is([aria-pressed=true],[aria-selected=true],[aria-expanded=true]),.bw-interactive button:hover{background:var(--bw-accent,#6243a5);color:#fff}.bw-interactive button:focus-visible,.bw-interactive input:focus-visible{outline:3px solid #e59d23;outline-offset:3px}.bw-interactive-output{padding:1rem;border-radius:.75rem;background:color-mix(in srgb,var(--bw-accent,#6243a5) 10%,transparent);border-left:.3rem solid var(--bw-accent,#6243a5)}
.bw-interactive-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.bw-interactive-fields label{margin:0}.bw-interactive input[type=number]{box-sizing:border-box;width:100%;min-height:44px;margin-top:.25rem;padding:.55rem;border:1px solid color-mix(in srgb,currentColor 35%,transparent);border-radius:.5rem;background:var(--bw-surface,#fff);color:inherit;font:inherit}
.bw-interactive-meter{height:.75rem;border-radius:1rem;background:#d8d3e5;overflow:hidden;margin:.75rem 0}.bw-interactive-meter span{display:block;height:100%;width:var(--bw-value,0%);background:var(--bw-accent,#6243a5);transition:width .2s ease}
/* A chosen study theme beats the computer's setting: Paper stays light under a dark OS, Night, Exam and Lights Out stay dark under a light OS. */
@media(prefers-color-scheme:dark){:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive{--bw-surface:#171522;--bw-accent:#b9a2f1}:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive button:is([aria-pressed=true],[aria-selected=true],[aria-expanded=true]),:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive button:hover{color:#171522}:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive-meter{background:#40394d}}
:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive{--bw-surface:#171522;--bw-accent:#b9a2f1}:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive button:is([aria-pressed=true],[aria-selected=true],[aria-expanded=true]),:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive button:hover{color:#171522}:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive-meter{background:#40394d}
@media(prefers-reduced-motion:reduce){.bw-interactive-meter span{transition:none}}
@media(max-width:390px){.bw-interactive-controls,.bw-interactive-fields{display:grid;grid-template-columns:1fr}.bw-interactive button{width:100%}}
body:has(>main#lesson) .bwcr-table-wrap.bwcr-table-fit{min-width:0;max-width:100%;overflow-x:auto}
body:has(>main#lesson) .bwcr-table-wrap.bwcr-table-fit table{display:table;min-width:var(--bw-table-min-width,24rem);width:100%;table-layout:auto}
body:has(>main#lesson) .bwcr-table-wrap.bwcr-table-fit :is(th,td){min-width:10rem;white-space:normal;overflow:visible;text-overflow:clip}
body:has(>main#lesson) .bwcr-table-wrap.bwcr-table-fit :is(th,td),
body:has(>main#lesson) .bwcr-table-wrap.bwcr-table-fit :is(th,td) *{overflow-wrap:normal;word-break:normal;hyphens:none}
.bw-july-scroll-cue{display:block;margin:.5rem 0;font-size:.875rem;line-height:1.5;color:inherit}
@media(prefers-color-scheme:dark){:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive[data-july-source]{color:#f3f0fa}:root:not(:is(html[data-bw-theme="light"],html[data-bw-theme="paper"],html.phq-mode-light,html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark)) .bw-interactive[data-july-source] :is(h3,h4,p,label,li,summary,output){color:inherit}}
:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive[data-july-source]{color:#f3f0fa}:root:is(html[data-bw-theme="night"],html[data-bw-theme="exam"],html[data-bw-theme="lights-out"],html[data-bw-theme="dark"],html.phq-mode-dark) .bw-interactive[data-july-source] :is(h3,h4,p,label,li,summary,output){color:inherit}

/* The widget owns its ink as well as its surface, including inside the native reader. */
.bw-interactive{--bw-widget-ink:#17283c;color:var(--bw-widget-ink)}
@media(prefers-color-scheme:dark){:root:not(:is([data-bw-theme=light],[data-bw-theme=paper],.phq-mode-light,[data-bw-theme=night],[data-bw-theme=exam],[data-bw-theme=lights-out],[data-bw-theme=dark],.phq-mode-dark)) .bw-interactive{--bw-widget-ink:#f3f0fa}}
:root:is([data-bw-theme=night],[data-bw-theme=exam],[data-bw-theme=lights-out],[data-bw-theme=dark],.phq-mode-dark) .bw-interactive{--bw-widget-ink:#f3f0fa}
/* The resolved reader scheme takes precedence over the device and legacy theme. */
:root[data-bw-study-scheme=light] .bw-interactive{--bw-surface:#fff!important;--bw-accent:#6243a5!important;--bw-widget-ink:#17283c!important}
:root[data-bw-study-scheme=dark] .bw-interactive{--bw-surface:#171522!important;--bw-accent:#b9a2f1!important;--bw-widget-ink:#f3f0fa!important}
:root body:has(>main#lesson) main#lesson .bw-interactive :is(h3,h4,p,label,li,summary,output){color:var(--bw-widget-ink)}
:root[data-bw-study-scheme] .bw-interactive{color:var(--bw-widget-ink)!important}
:root[data-bw-study-scheme=light] .bw-interactive button:is([aria-pressed=true],[aria-selected=true],[aria-expanded=true],:hover){color:#fff!important}
:root[data-bw-study-scheme=dark] .bw-interactive button:is([aria-pressed=true],[aria-selected=true],[aria-expanded=true],:hover){color:#171522!important}
