/* One explanation treatment for legacy disclosures and authored interactive cards. */
:is(main#lesson,main.bwcr,main) .bw-authored-case{
  --lr-ink:#17283c;--lr-muted:#34465a;--lr-surface:#f5f7fb;--lr-line:#aebccc;
  --lr-green:#17633b;--lr-green-bg:#edf7f1;--lr-red:#9f2034;--lr-red-bg:#fff0f2;
  --lr-note:#eef2f8;max-width:100%;overflow-wrap:break-word;
}
/* The study scheme on <html> (Exam, Night, Paper, Lights Out all resolve to light or dark) wins over the OS scheme. */
/* Before the scheme is resolved, the theme name decides: Night, Exam and Lights Out are dark, Paper is light. */
html[data-bw-study-scheme="dark"] :is(main#lesson,main.bwcr,main) .bw-authored-case,
html:not([data-bw-study-scheme]):is([data-bw-theme="night"],[data-bw-theme="exam"],[data-bw-theme="lights-out"]) :is(main#lesson,main.bwcr,main) .bw-authored-case,
:root[data-theme="dark"]:not([data-bw-study-scheme="light"]):not([data-bw-theme="paper"]) :is(main#lesson,main.bwcr,main) .bw-authored-case{
  --lr-ink:#e7eeec;--lr-muted:#c8d5d1;--lr-surface:#151c1d;--lr-line:#657974;
  --lr-green:#8ee6bb;--lr-green-bg:#172d23;--lr-red:#ffa6b8;--lr-red-bg:#361e27;
  --lr-note:#202b30;
}
html[data-bw-study-scheme="light"] :is(main#lesson,main.bwcr,main) .bw-authored-case,
html:not([data-bw-study-scheme])[data-bw-theme="paper"] :is(main#lesson,main.bwcr,main) .bw-authored-case{
  --lr-ink:#17283c;--lr-muted:#34465a;--lr-surface:#f5f7fb;--lr-line:#aebccc;
  --lr-green:#17633b;--lr-green-bg:#edf7f1;--lr-red:#9f2034;--lr-red-bg:#fff0f2;
  --lr-note:#eef2f8;
}
/* Fallback only when no study scheme is set. */
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]):not([data-bw-study-scheme]):not([data-bw-theme="paper"]) :is(main#lesson,main.bwcr,main) .bw-authored-case{
    --lr-ink:#e7eeec;--lr-muted:#c8d5d1;--lr-surface:#151c1d;--lr-line:#657974;
  --lr-green:#8ee6bb;--lr-green-bg:#172d23;--lr-red:#ffa6b8;--lr-red-bg:#361e27;
  --lr-note:#202b30;
  }
}
:is(main#lesson,main.bwcr,main) details.bw-lesson-rationales{
  padding:0;border:0;border-radius:0;background:transparent;margin-block:1.25rem;
  color:var(--lr-ink);font-size:1.03125rem;line-height:1.7;
}
.bw-lesson-rationales>summary{padding:.75rem 0;line-height:1.7;cursor:pointer}
:is(main#lesson,main.bwcr,main) .bw-rationale-list{display:grid;gap:12px;list-style:none;margin:12px 0;padding:0}
:is(main#lesson,main.bwcr,main) .bw-rationale-list>.bw-rationale-option{
  box-sizing:border-box;max-width:none;margin:0;padding:12px;
  border-inline-start:3px solid var(--lr-line);border-radius:0 8px 8px 0;
  background:var(--lr-surface);color:var(--lr-ink);
}
.bw-rationale-heading{display:flex;align-items:flex-start;gap:10px}
.bw-rationale-letter{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 26px;
  height:26px;border:1px solid var(--lr-line);border-radius:7px;
  color:var(--lr-ink);font-size:.8125rem;font-weight:700;line-height:1;
}
.bw-rationale-title{flex:1;min-width:0;font-weight:650}
.bw-rationale-status{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  padding:3px 7px;border:1px solid currentColor;border-radius:999px;color:var(--lr-green);background:var(--lr-green-bg);
  font:600 .75rem/1.4 system-ui,sans-serif;white-space:nowrap;
}
.bw-rationale-option.is-correct{border-inline-start-color:var(--lr-green);background:var(--lr-green-bg)}
.bw-rationale-list .bw-rationale-body{
  max-width:74ch;margin:7px 0 0;font-size:1.03125rem;font-weight:400;line-height:1.7;
  color:var(--lr-ink);
}
.bw-lesson-rationales>.bw-rationale-takeaway{
  max-width:74ch;margin:18px 0 0;padding:12px 14px;border-inline-start:3px solid var(--lr-muted);
  border-radius:0 8px 8px 0;background:var(--lr-note);color:var(--lr-ink);
  font-size:1.03125rem;line-height:1.7;
}
 .bw-authored-case.bw-op.bw-lesson-mcq .bw-op-signin{display:block;max-width:100%;margin:1rem 0;padding:.65rem .85rem;border:1px solid var(--op-hair,#9786a8);border-radius:.5rem;background:var(--op-violet-wash,#eee8f5);color:var(--op-ink,#191923)}
 .bw-authored-case.bw-op.bw-lesson-mcq .bw-op-signin a{color:var(--op-violet,#593a87);font-weight:650;text-decoration:underline;overflow-wrap:anywhere}
 .bw-lesson-mcq .bw-op-signin[hidden]{display:none!important}
/* Fail-safe card for a question that could not be split into choices: choices only, the answer behind a button. */
.bw-lesson-mcq-failsafe{color:var(--lr-ink)}
.bw-lesson-mcq-failsafe .bw-op-failsafe-choices{margin:12px 0;padding-inline-start:1.6em;display:grid;gap:8px;color:var(--lr-ink)}
.bw-lesson-mcq-failsafe .bw-op-failsafe-show{min-height:44px;padding:10px 16px;border:1px solid var(--lr-line);border-radius:8px;background:var(--lr-surface);color:var(--lr-ink);font:600 .9375rem/1.4 system-ui,sans-serif;cursor:pointer}
.bw-lesson-mcq-failsafe .bw-op-failsafe-reveal{margin-top:14px}
.bw-lesson-mcq-failsafe .bw-op-failsafe-reveal[hidden]{display:none}
.bw-lesson-mcq-failsafe .bw-op-failsafe-key{margin:0 0 8px;font-weight:700;color:var(--lr-green)}
/* The interactive card's palette (opener-v2.css) resolves light-dark() from color-scheme. Pin it to the study theme so
   a Night page never shows a light card when the root color-scheme was not set (live member pages before theme boot). */
html[data-bw-study-scheme="dark"] :is(main#lesson,main.bwcr,main) .bw-authored-case.bw-op,
html:not([data-bw-study-scheme]):is([data-bw-theme="night"],[data-bw-theme="exam"],[data-bw-theme="lights-out"]) :is(main#lesson,main.bwcr,main) .bw-authored-case.bw-op{color-scheme:dark}
html[data-bw-study-scheme="light"] :is(main#lesson,main.bwcr,main) .bw-authored-case.bw-op,
html:not([data-bw-study-scheme])[data-bw-theme="paper"] :is(main#lesson,main.bwcr,main) .bw-authored-case.bw-op{color-scheme:light}
