/* Shared medical-review seal. One component for every content page type:
   lessons, deep dives, OMM pages, QBank explanation views, Cluecards.
   Dark surfaces are the Bone Wizardry default; the light block follows the
   system setting so a printed or light-mode page stays readable. */
.bw-rseal{
  --bw-rseal-surface:#191620;
  --bw-rseal-border:#393044;
  display:flex;
  align-items:flex-start;
  gap:1rem;
  margin:2rem auto;
  max-width:46rem;
  padding:1.25rem;
  border:1px solid var(--bw-rseal-border);
  border-radius:1rem;
  background:var(--bw-rseal-surface);
  text-align:left;
  font-family:'Space Grotesk',ui-sans-serif,system-ui,sans-serif;
  line-height:1.6;
}
.bw-rseal .bw-rseal-photo{
  flex:0 0 56px;
  width:56px;
  height:56px;
  max-width:56px;
  border-radius:50%;
  object-fit:cover;
  margin:0;
}
.bw-rseal-body{flex:1;min-width:0}
.bw-rseal .bw-rseal-role,
.bw-rseal .bw-rseal-policy{margin:.25rem 0 0;font-size:.82rem;color:#c8bed7}
.bw-rseal .bw-rseal-policy a{display:inline-flex;align-items:center;min-height:44px;color:inherit;text-underline-offset:.2em}
.bw-rseal .bw-rseal-updated{max-width:none;margin:.6rem 0 0;text-align:left;font-size:.76rem}
.bw-rseal-eyebrow{
  margin:0 0 0.25rem;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:0.5rem;
  font-size:0.72rem;
  font-weight:600;
  letter-spacing:0.16em;
  color:#c3aefb;
  text-transform:uppercase;
}
/* Page-level stylesheets load after this one and several size bare svg
   elements to the column width, so the mark and the eyebrow row are pinned
   with enough specificity to survive that. */
.bw-rseal .bw-rseal-eyebrow svg.bw-rseal-mark{
  width:15px;
  height:15px;
  min-width:15px;
  max-width:15px;
  flex:0 0 15px;
  display:inline-block;
  color:#b89cff;
}
.bw-rseal .bw-rseal-eyebrow{
  flex-wrap:nowrap;
  white-space:nowrap;
}
.bw-rseal-by{
  margin:0;
  font-size:0.84rem;
  color:#e2e8f0;
}
.bw-rseal-by a{
  color:#e9e3ff;
  text-decoration:none;
  border-bottom:1px solid #6d547f;
}
/* Keep a visible word gap even when an embedded reader turns this link into
   a flex/grid item and collapses the HTML space before the reviewer name.
   Apply to the name, not the link, so all reviewers and routes share the fix. */
.bw-rseal-by a > strong{margin-inline-start:.4em}
.bw-rseal-by a:hover{color:#d9ccff;border-bottom-color:#b89cff}
.bw-rseal-by a:focus-visible{outline:2px solid #b89cff;outline-offset:3px}
.bw-rseal-sep{margin:0 0.35rem;color:#9b8ab8}
.bw-rseal time{color:#e2e8f0;white-space:nowrap}

/* OS-level light preference: apply legible ink when no JS theme class is set.
   Explicit JS theme classes (data-bw-theme, phq-mode-light, etc.) override
   this block via the higher-specificity selectors below. */
/* The light block follows the page's resolved theme, the same guard the member palette uses:
   a dark study theme keeps the dark seal under a light OS, so its ink and surface always pair. */
/* The same light seal for a resolved light study scheme, whatever the device appearance is.
   workspace-pages.js publishes html[data-bw-study-scheme] beside the member's theme (PR #7288
   pattern); without this a Paper member on a dark device kept the dark seal and its ink paired
   with the Paper palette, which measured 1.02:1. */
html[data-bw-study-scheme="light"] .bw-rseal{--bw-rseal-surface:#faf8fc;--bw-rseal-border:#e2ddf0}
html[data-bw-study-scheme="light"] .bw-rseal .bw-rseal-eyebrow{color:#5b3fa8}
html[data-bw-study-scheme="light"] .bw-rseal .bw-rseal-mark{color:#6d4fc4}
html[data-bw-study-scheme="light"] :is(.bw-rseal-by,.bw-rseal time){color:#2b2740}
html[data-bw-study-scheme="light"] .bw-rseal .bw-rseal-sep{color:#6f6690}
html[data-bw-study-scheme="light"] .bw-rseal-by a{color:#3c2f6b;border-bottom-color:#c5b8e8}
html[data-bw-study-scheme="light"] .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy){color:#61566f}

@media (prefers-color-scheme: light) {
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal{--bw-rseal-surface:#faf8fc;--bw-rseal-border:#e2ddf0}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal .bw-rseal-eyebrow{color:#5b3fa8}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal .bw-rseal-mark{color:#6d4fc4}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal-by,html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal time{color:#2b2740}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal .bw-rseal-sep{color:#6f6690}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal-by a{color:#3c2f6b;border-bottom-color:#c5b8e8}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal .bw-rseal-role,html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal .bw-rseal-policy{color:#61566f}
}

/* Follow the page's explicit theme, never the operating-system preference:
   many lesson surfaces stay dark while the user has a light OS setting. */
body.sm-page .bw-rseal,
html[data-bw-theme="light"] .bw-rseal,
html.phq-mode-light .bw-rseal,
[data-bw-lesson-theme="light"] .bw-rseal{
  --bw-rseal-surface:#faf8fc;
  --bw-rseal-border:#e2ddf0;
}
body.sm-page .bw-rseal .bw-rseal-eyebrow,
html[data-bw-theme="light"] .bw-rseal .bw-rseal-eyebrow,
html.phq-mode-light .bw-rseal .bw-rseal-eyebrow,
[data-bw-lesson-theme="light"] .bw-rseal .bw-rseal-eyebrow{color:#5b3fa8}
body.sm-page .bw-rseal .bw-rseal-mark,
html[data-bw-theme="light"] .bw-rseal .bw-rseal-mark,
html.phq-mode-light .bw-rseal .bw-rseal-mark,
[data-bw-lesson-theme="light"] .bw-rseal .bw-rseal-mark{color:#6d4fc4}
body.sm-page .bw-rseal .bw-rseal-by,
body.sm-page .bw-rseal time,
html[data-bw-theme="light"] .bw-rseal .bw-rseal-by,
html[data-bw-theme="light"] .bw-rseal time,
html.phq-mode-light .bw-rseal .bw-rseal-by,
html.phq-mode-light .bw-rseal time,
[data-bw-lesson-theme="light"] .bw-rseal .bw-rseal-by,
[data-bw-lesson-theme="light"] .bw-rseal time{color:#2b2740}
html[data-bw-theme="light"] .bw-rseal .bw-rseal-by a,
body.sm-page .bw-rseal .bw-rseal-by a,
html.phq-mode-light .bw-rseal .bw-rseal-by a,
[data-bw-lesson-theme="light"] .bw-rseal .bw-rseal-by a{
  color:#3c2f6b;
  border-bottom-color:#c5b8e8;
}
body.sm-page .bw-rseal .bw-rseal-sep,
html[data-bw-theme="light"] .bw-rseal .bw-rseal-sep,
html.phq-mode-light .bw-rseal .bw-rseal-sep,
[data-bw-lesson-theme="light"] .bw-rseal .bw-rseal-sep{color:#6f6690}
html[data-bw-theme="light"] .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy),
html.phq-mode-light .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy),
[data-bw-lesson-theme="light"] .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy),
body.sm-page .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy){color:#61566f}
html[data-bw-theme="dark"] .bw-rseal,
html.phq-mode-dark .bw-rseal,
[data-bw-lesson-theme="dark"] .bw-rseal{
  --bw-rseal-surface:#191620;
  --bw-rseal-border:#393044;
}
html[data-bw-theme="dark"] .bw-rseal :is(.bw-rseal-by,.bw-rseal-by a,time),
html.phq-mode-dark .bw-rseal :is(.bw-rseal-by,.bw-rseal-by a,time),
[data-bw-lesson-theme="dark"] .bw-rseal :is(.bw-rseal-by,.bw-rseal-by a,time){color:#e9e3ff}
html[data-bw-theme="dark"] .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy,.bw-rseal-updated),
html.phq-mode-dark .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy,.bw-rseal-updated),
[data-bw-lesson-theme="dark"] .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy,.bw-rseal-updated){color:#c8bed7}

@media (max-width:600px){
  .bw-rseal{margin:1.5rem 0;padding:1rem;gap:.75rem}
  .bw-rseal-eyebrow{font-size:0.72rem;letter-spacing:0.13em}
  .bw-rseal-by{font-size:0.82rem}
  .bw-rseal-by a{display:inline-block;min-height:24px}
}
.bw-rseal-qbank{
  display:block;
  max-width:none;
  margin:1.1rem 0 0;
  padding:0.7rem 0.85rem;
  border:1px solid #322a4a;
  border-radius:0.65rem;
  background:#12111a;
  text-align:left;
}
.bw-rseal-qbank .bw-rseal-by{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:0 0.3em;
  color:#e2e8f0;
  font-size:0.8rem;
}
.bw-rseal-qbank .bw-rseal-by a{
  color:#e9e3ff;
  border-bottom:1px solid #6d547f;
}
.bw-rseal-updated{
  max-width:42rem;
  margin:0.65rem auto 1rem;
  color:#9b8ab8;
  font-size:0.78rem;
  line-height:1.5;
  text-align:center;
}
.bw-rseal-updated time{white-space:nowrap}
@media(prefers-color-scheme:light){
  .bw-rseal-qbank{border-color:#e2ddf0;background:#fff}
  .bw-rseal-qbank .bw-rseal-by{color:#2b2740}
  html:not([data-bw-theme='night']):not([data-bw-theme='lights-out']):not([data-bw-theme='exam']) .bw-rseal-updated{color:#6f6690}
}
body.sm-page .bw-rseal-qbank,
html[data-bw-theme="light"] .bw-rseal-qbank,
html.phq-mode-light .bw-rseal-qbank,
[data-bw-lesson-theme="light"] .bw-rseal-qbank{
  border-color:#e2ddf0;
  background:#fff;
}
body.sm-page .bw-rseal-qbank .bw-rseal-by,
html[data-bw-theme="light"] .bw-rseal-qbank .bw-rseal-by,
html.phq-mode-light .bw-rseal-qbank .bw-rseal-by,
[data-bw-lesson-theme="light"] .bw-rseal-qbank .bw-rseal-by{color:#2b2740}
body.sm-page .bw-rseal-qbank .bw-rseal-by a,
html[data-bw-theme="light"] .bw-rseal-qbank .bw-rseal-by a,
html.phq-mode-light .bw-rseal-qbank .bw-rseal-by a,
[data-bw-lesson-theme="light"] .bw-rseal-qbank .bw-rseal-by a{
  color:#3c2f6b;
  border-bottom-color:#c5b8e8;
}
body.sm-page .bw-rseal-updated,
html[data-bw-theme="light"] .bw-rseal-updated,
html.phq-mode-light .bw-rseal-updated,
[data-bw-lesson-theme="light"] .bw-rseal-updated{color:#6f6690}

/* Token-driven noncontent pages own their surfaces independently of the OS. */
body[data-bw-design]:is([data-bw-skin="paper"],[data-bw-skin="night"]) .bw-rseal{
  --bw-rseal-surface:var(--ui-surface);
  --bw-rseal-border:var(--ui-line);
  background:var(--bw-rseal-surface);
  border-color:var(--bw-rseal-border);
}
body[data-bw-design]:is([data-bw-skin="paper"],[data-bw-skin="night"]) .bw-rseal :is(.bw-rseal-by,.bw-rseal-by a,strong){
  color:var(--ui-ink);
}
body[data-bw-design]:is([data-bw-skin="paper"],[data-bw-skin="night"]) .bw-rseal :is(.bw-rseal-eyebrow,.bw-rseal-mark){
  color:var(--ui-accent);
}
/* Include time explicitly: its legacy fixed color does not inherit the role
   or updated paragraph's muted ink. Keep labels and dates on the same token. */
body[data-bw-design]:is([data-bw-skin="paper"],[data-bw-skin="night"]) .bw-rseal :is(.bw-rseal-role,.bw-rseal-policy,.bw-rseal-policy a,.bw-rseal-updated,.bw-rseal-sep,time),
body[data-bw-design]:is([data-bw-skin="paper"],[data-bw-skin="night"]) .bw-rseal-updated time{
  color:var(--ui-muted);
}

/* The lesson reading sheet colors every link in main#lesson for the page surface, which is
   unreadable on the seal's own surface in the dark themes. The seal's links take the ink of
   their line, so each theme's text and surface stay paired. */
body:has(> main#lesson) main#lesson .bw-rseal :is(.bw-rseal-by,.bw-rseal-policy) a{color:inherit}

/* Signed-out review evidence beside the title on explicitly verified free OMM lessons. */
.bw-rseal-near-title {
  margin: .65rem 0 1.1rem;
  padding: .65rem .8rem;
  border-inline-start: 3px solid #8b70bc;
  background: color-mix(in srgb, currentColor 5%, transparent);
  font: 400 .88rem/1.6 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  color: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.bw-rseal-near-title a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.bw-rseal-near-title time { white-space: nowrap; }
.bw-rseal-near-title a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
