/* Imported only by the receipt's 80 authored lessons. Preserve diagram and outcome colors. */
body:has(> main#lesson) {
  --a11y-ink: #17283c; --a11y-surface: #fff; --a11y-panel: #f4f8fc;
  --a11y-link: #075a85; --a11y-focus: #9b4600;
}
@media (prefers-color-scheme: dark) {
  body:has(> main#lesson) {
    --a11y-ink: #e7eeec; --a11y-surface: #101414; --a11y-panel: #191f20;
    --a11y-link: #8dcbea; --a11y-focus: #ffd092;
  }
}
/* Honor explicit site preferences ahead of the OS default, as lesson-links.css does.
   Paper is a light study theme and Night, Exam and Lights Out are dark ones, whatever the computer's setting. */
:is(html[data-bw-theme="light"], html.phq-mode-light, html[data-bw-theme="paper"]) body:has(> main#lesson) {
  --a11y-ink: #17283c; --a11y-surface: #fff; --a11y-panel: #f4f8fc;
  --a11y-link: #075a85; --a11y-focus: #9b4600; color-scheme: light;
}
:is(html[data-bw-theme="dark"], html.phq-mode-dark, html[data-bw-theme="night"], html[data-bw-theme="exam"], html[data-bw-theme="lights-out"]) body:has(> main#lesson) {
  --a11y-ink: #e7eeec; --a11y-surface: #101414; --a11y-panel: #191f20;
  --a11y-link: #8dcbea; --a11y-focus: #ffd092; color-scheme: dark;
}
body:has(> main#lesson) { color: var(--a11y-ink); background: var(--a11y-surface); }
body main#lesson > section, body main#lesson details { background: var(--a11y-panel); }
body main#lesson :is(h1,h2,h3,h4,h5,h6) { color: var(--a11y-ink); }
body main#lesson a { color: var(--a11y-link); }
body main#lesson > header.bwcr-intro { background: var(--a11y-panel); }
body main#lesson > header.bwcr-intro p { color: var(--a11y-ink); }
body main#lesson .bw-phase2-credit { opacity: 1; }
body main#lesson svg[role="img"] { background: #fff; }
body main#lesson :is(caption,.bwcr-credit,.bw-phase2-credit) {
  background: var(--a11y-panel); color: var(--a11y-ink);
}
body #bw-global-header :is(a[href],button,summary) {
  min-inline-size: 44px !important; min-block-size: 44px !important;
}
body :is(a[href],button,input:not([type="hidden"]),select,textarea,summary,[role="button"]) {
  min-block-size: 44px; min-inline-size: 44px;
}
body main#lesson a[href] { display: inline-flex; align-items: center; justify-content: center; }
body main#lesson summary { padding-block: .45rem; cursor: pointer; }
body :is(a[href],button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid var(--a11y-focus); outline-offset: 3px;
}
/* Legacy freemium cards ship dark-only inline colors; keep the whole panel coherent. */
body main#lesson .bw-freemium-teaser { background: var(--a11y-panel); }
body main#lesson .bw-freemium-teaser :is(p,li,span,small,button) { color: var(--a11y-ink); }
body main#lesson .bw-freemium-teaser .bw-freemium-primary {
  background: #553278; color: #fff; border-color: #553278;
}
body :is(#bw-global-header,#header-search) :focus-visible { outline-color: #ffd092; }
@media (forced-colors: active) {
  body :is(main#lesson,#bw-global-header,#header-search) :focus-visible { outline: 3px solid Highlight; }
}
/* Lesson inline style sets table{display:block;overflow:auto}. Override it so
   the scrollable region is the wrapper div, which carries tabindex="0" for
   keyboard access (WCAG 2.1 SC 2.1.1, scrollable-region-focusable). */
body:has(> main#lesson) main#lesson table {
  display: table;
  overflow: visible;
}
body:has(> main#lesson) main#lesson .bwcr-table-wrap {
  overflow-x: auto;
}
body:has(> main#lesson) main#lesson .bwcr-table-wrap[tabindex="0"]:focus-visible {
  outline: 3px solid var(--a11y-focus);
  outline-offset: 2px;
}
