@import "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap";

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:where(a) {
  color: var(--accent-navy);
  text-underline-offset: 2px;
}
:where(a:visited) {
  color: var(--accent-navy);
}
:where(a:hover, a:focus-visible) {
  color: var(--accent-crimson);
}

:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

.home-btn:focus-visible,
.theme-toggle:focus-visible,
.search-trigger:focus-visible,
.reminder-box :focus-visible,
.earn-it-feature :focus-visible,
.callout-left--strong :focus-visible {
  outline-color: var(--text-on-dark);
}
:root {
  --font-display: "Inter", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --paper: #fffef9;
  --background: #f6f3ea;
  --background-body: #f9f6ef;
  --ivory: #fffff0;
  --parchment: #fbf5df;
  --egg-white: #fefdf8;
  --primary: #1d1d1f;
  --ink-panel: #17130f;
  --header-title: #fbf5df;
  --dark-blue: #060647;
  --border: #d6d4ce;
  --border-light: #e8e8ed;
  --muted: #6e6e64;
  --surface: var(--paper);
  --surface-subtle: color-mix(in srgb, var(--background) 30%, var(--paper));

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #757579;
  --text-quaternary: #a1a1a6;
  --text-dark: #1d1d1f;
  --text-secondary-strong: #4a4a50;

  --text-on-dark: #ffffff;
  --text-on-dark-soft: rgba(255, 255, 255, 0.85);
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);

  --accent-navy: #1e3a5f;
  --accent-forest: #2c4c3b;
  --accent-terracotta: #9c5a24;
  --accent-crimson: #8b3a3a;

  --accent-navy-fill: #1e3a5f;
  --accent-forest-fill: #2c4c3b;
  --accent-terracotta-fill: #9c5a24;
  --accent-crimson-fill: #8b3a3a;

  --tint-true: color-mix(in srgb, var(--accent-forest) 10%, var(--paper));
  --tint-true-strong: color-mix(
    in srgb,
    var(--accent-forest) 18%,
    var(--paper)
  );
  --tint-false: color-mix(in srgb, var(--accent-crimson) 10%, var(--paper));
  --tint-false-strong: color-mix(
    in srgb,
    var(--accent-crimson) 18%,
    var(--paper)
  );

  --scroll-shadow: rgba(0, 0, 0, 0.28);

  /* Translucent white on dark panels: the header's round icon buttons */
  --on-dark-fill: rgba(255, 255, 255, 0.08);
  --on-dark-fill-hover: rgba(255, 255, 255, 0.16);
  --on-dark-border: rgba(255, 255, 255, 0.28);

  /* Channel values for colours used at many opacities:
     write rgba(var(--gold-rgb), 0.15), not a new hex each time.
     gold: rules and watermarks on dark blocks; slate: card watermarks. */
  --gold-rgb: 232, 200, 154;
  --slate-rgb: 108, 116, 132;

  /* Backdrops behind popups and sheets */
  --scrim: rgba(10, 10, 10, 0.72);
  --scrim-medium: rgba(10, 10, 10, 0.6);
  --scrim-soft: rgba(0, 0, 0, 0.45);

  /* Shadows for popups (modal) and bottom sheets */
  --bs-modal: 0 24px 64px rgba(0, 0, 0, 0.28);
  --bs-sheet: 0 -4px 32px rgba(0, 0, 0, 0.15);

  --fs-xs: clamp(0.75rem, 1.1vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 1.3vw, 1rem);
  --fs-base: clamp(1rem, 1.5vw, 1.125rem);
  --fs-md: clamp(1.15rem, 1.9vw, 1.3rem);
  --fs-lg: clamp(1.3rem, 2.2vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 2.8vw, 1.875rem);
  --fs-2xl: clamp(1.875rem, 3.6vw, 2.25rem);
  --fs-xxl: clamp(3.5rem, 6.5vw, 4.5rem);
  --fs-huge: clamp(3.5rem, 6.5vw, 4.5rem);
  --fs-watermark: clamp(6rem, 12vw, 9rem);
  --fs-watermark-lg: clamp(8rem, 16vw, 12rem);

  /* Icon glyph sizes: fixed, unlike text, so icons stay in proportion
     to their round buttons at every screen width. */
  --icon-xs: 0.8rem;
  --icon-sm: 1rem;
  --icon-md: 1.2rem;
  --icon-lg: 1.8rem;

  --ls-tighter: -0.02em;
  --ls-tight: -0.01em;
  --ls-normal: 0em;
  --ls-wide: 0.02em;
  --ls-wider: 0.05em;
  --ls-widest: 0.1em;
  --ls-huge: 0.2em;

  --bs-thin: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --bs-medium: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --bs-heavy: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
  --bs-veryheavy:
    0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);

  /* Breakpoints (CSS variables can't be used inside @media, so use
     only these widths): 480px phone, 700px large phone / small tablet,
     950px tablet, 1200px desktop. Pair max-width: 700px with
     min-width: 701px, and so on. */

  /* Spacing scale: one step = 0.25rem (--space-4 = 1rem).
     --space-half is for hairline gaps under 0.25rem. */
  --space-half: 0.125rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-9: 2.25rem;
  --space-10: 2.5rem;
  --space-11: 2.75rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Corner radius scale: 4 / 8 / 12 / 16 / 20px, plus fully round. */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
}

/* ════════════════════════════════════════════════════════════════
   DARK THEME
   ════════════════════════════════════════════════════════════════ */

html[data-theme="dark"] {
  --paper: #252525;
  --background: #211b15;
  --background-body: #0e0c0a;
  --ivory: #242422;
  --parchment: #242321;
  --egg-white: #212121;
  --ink-panel: #050403;
  --border: #141414;
  --border-light: #1c1c1c;
  --muted: #9a9a92;

  --primary: #c9cacd;
  --text-primary: #c2c3c6;
  --text-secondary: #929399;
  --text-tertiary: #8a8b91;
  --text-quaternary: #5e5f64;
  --text-dark: #c2c3c6;
  --text-secondary-strong: #9fa0a5;

  --text-on-dark: #e8e8e6;
  --text-on-dark-soft: rgba(232, 232, 230, 0.82);
  --text-on-dark-muted: rgba(232, 232, 230, 0.6);

  --accent-navy: #6c98b8;
  --accent-forest: #6aa887;
  --accent-terracotta: #d99a54;
  --accent-crimson: #d98884;
  --dark-blue: #7a8fd6;

  --scroll-shadow: rgba(255, 255, 255, 0.22);

  --bs-thin: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --bs-medium:
    0 4px 12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --bs-heavy: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --bs-veryheavy:
    0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-anchor: none;
}
body {
  font-family: var(--font-body);
  background: var(--background-body);
  color: var(--primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

p {
  max-width: clamp(48ch, 80vw, 90ch);
}

/* ════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════ */

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDownBanner {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shakeDismiss {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

strong {
  color: var(--dark-blue) !important;
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════ */

header {
  color: var(--text-on-dark);
  padding: var(--space-3) var(--space-12);
  position: sticky;
  top: 0;
  z-index: 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: left;
  gap: var(--space-2);
  background-color: var(--ink-panel);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid var(--chapter-accent, transparent);
}
header.has-home-btn {
  padding-right: 16rem;
}
header::before {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: var(--fs-watermark);
  font-weight: 600;
  color: color-mix(in srgb, var(--chapter-accent, #6c7484) 25%, transparent);
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
  max-width: 42vw;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to left, black 15%, transparent 65%);
  mask-image: linear-gradient(to left, black 15%, transparent 65%);
}
@media (max-width: 480px) {
  header::before {
    max-width: 30vw;
  }
}
html[data-theme="dark"] header::before {
  color: color-mix(in srgb, var(--chapter-accent, #8c94a4) 22%, transparent);
}
.header-logo-img {
  height: 84px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}
header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  letter-spacing: var(--ls-tighter);
  position: relative;
  color: var(--header-title);
}
header h1 span {
  color: var(--header-title);
}
header p {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  position: relative;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════════ */

.container {
  width: 95%;
  max-width: 1000px;
  min-width: 240px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-8) var(--space-16);
  flex: 1;
  box-sizing: border-box;
}
.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  margin-top: var(--space-20);
}
.section-label .num {
  background: var(--paper);
  color: var(--primary);
  font-size: var(--fs-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  letter-spacing: var(--ls-widest);
  white-space: nowrap;
  box-shadow: var(--bs-thin);
}
.section-label h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-tight);
}
.section-label h3 em {
  font-style: italic;
  color: var(--primary);
  font-size: var(--fs-base);
}
@media (max-width: 480px) and (orientation: portrait) {
  .section-label {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* ════════════════════════════════════════════════════════════════
   INTRO CARD
   ════════════════════════════════════════════════════════════════ */

.intro-card {
  background: color-mix(in srgb, var(--parchment) 35%, var(--paper));
  color: var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-10) var(--space-8);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-thin);
}
.intro-card::before {
  position: absolute;
  right: -1rem;
  top: -1rem;
  font-family: var(--font-display);
  font-size: var(--fs-watermark);
  font-weight: 600;
  color: rgba(var(--slate-rgb), 0.06);
  pointer-events: none;
  line-height: 1;
  content: "Intro";
}
html[data-theme="dark"] .intro-card::before {
  color: rgba(var(--slate-rgb), 0.06);
}
.intro-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
  line-height: 1.3;
  color: var(--primary);
}
.intro-card p {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--primary);
  max-width: clamp(42ch, 70vw, 78ch);
}
.intro-card p + p {
  margin-top: var(--space-4);
}

/* ════════════════════════════════════════════════════════════════
   LO CARD
   ════════════════════════════════════════════════════════════════ */

.lo-card {
  background: var(--paper);
  color: var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-10) var(--space-8);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-thin);
}
.lo-card::before {
  position: absolute;
  right: -1rem;
  top: -1rem;
  font-family: var(--font-display);
  font-size: var(--fs-watermark);
  font-weight: 600;
  color: rgba(var(--slate-rgb), 0.06);
  pointer-events: none;
  line-height: 1;
  content: "LOs";
}
html[data-theme="dark"] .lo-card::before {
  color: rgba(var(--slate-rgb), 0.06);
}
.lo-label {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: var(--space-2);
}
.lo-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-5);
  line-height: 1.3;
  color: var(--primary);
}
.lo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  counter-reset: item;
}
.lo-list li {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--primary);
  position: relative;
  padding-left: var(--space-6);
  counter-increment: item;
  max-width: clamp(48ch, 80vw, 90ch);
}
.lo-list li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: var(--fs-sm);
}

/* ════════════════════════════════════════════════════════════════
   REMINDER BOX
   ════════════════════════════════════════════════════════════════ */

.reminder-box {
  background: var(--ink-panel);
  color: var(--text-on-dark);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-10) var(--space-8);
  margin-bottom: var(--space-12);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-thin);
}
.reminder-box::before {
  position: absolute;
  right: -1rem;
  top: -1rem;
  font-family: var(--font-display);
  font-size: var(--fs-watermark);
  font-weight: 600;
  color: rgba(var(--slate-rgb), 0.3);
  pointer-events: none;
  line-height: 1;
}
html[data-theme="dark"] .reminder-box::before {
  color: rgba(var(--slate-rgb), 0.14);
}
.reminder-label {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-on-dark-soft) !important;
  margin-bottom: var(--space-2);
}
.reminder-box h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-5);
  line-height: 1.25;
  color: var(--text-on-dark);
}
.reminder-box h2 em {
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--text-on-dark-soft);
}
.reminder-box h2 strong {
  color: var(--text-on-dark-soft);
}
.reminder-pills {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.reminder-pill {
  background: var(--ink-panel);
  border-left: 0.1px solid var(--muted);
  padding: var(--space-4) var(--space-6);
  font-size: var(--fs-sm);
  line-height: 1.7;
  flex: 1;
  min-width: 180px;
  color: var(--text-on-dark-soft);
}
.reminder-pill strong {
  display: block;
  color: var(--text-on-dark-muted) !important;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

/* ════════════════════════════════════════════════════════════════
   DEFINITION CONTRAST
   ════════════════════════════════════════════════════════════════ */

.def-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.dc-col {
  padding: var(--space-6) var(--space-6);
}
.dc-col:first-child {
  background: var(--tint-false);
}
.dc-col:last-child {
  background: var(--tint-true);
}
.dc-col .dcc-label {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
}
.dc-col:first-child .dcc-label {
  color: var(--accent-navy);
}
.dc-col:last-child .dcc-label {
  color: var(--accent-forest);
}
.dc-col .dcc-word {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2);
  line-height: 1;
}
.dc-col:first-child .dcc-word {
  color: var(--primary);
}
.dc-col:last-child .dcc-word {
  color: var(--primary);
}
.dc-col .dcc-def {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.65;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--border);
}
.dc-traits {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dc-traits li {
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  line-height: 1.4;
  color: var(--primary);
}
.dc-traits li:last-child {
  border-bottom: none;
}
.def-foot {
  background: var(--background);
  box-shadow: none;
  padding: var(--space-4) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
}
.def-foot strong {
  color: var(--primary);
  font-style: normal;
}

/* ════════════════════════════════════════════════════════════════
   FEATURE CARD — ELEVATED
   ════════════════════════════════════════════════════════════════ */

.feature-card--elevated {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: var(--space-9) var(--space-10);
  margin-bottom: var(--space-12);
  color: var(--primary);
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--bs-medium);
}

/* ════════════════════════════════════════════════════════════════
   CARD BLOCK
   ════════════════════════════════════════════════════════════════ */

.card-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.card-block-head {
  background: var(--surface);
  padding: var(--space-5) var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.card-block-head .cbh-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
  display: block;
}
.card-block-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin: 0;
}
.card-block-head .tag-pill {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.card-block-body {
  background: var(--paper);
  padding: var(--space-6) var(--space-7);
}
.card-block-note {
  background: var(--background);
  padding: var(--space-4) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
}
.card-block-note strong {
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════
   DARK CARD
   ════════════════════════════════════════════════════════════════ */

.dark-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  margin-bottom: var(--space-12);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-heavy);
  color: var(--primary);
}
.dark-card::before {
  content: "❝";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: var(--fs-watermark-lg);
  font-weight: 600;
  color: rgba(133, 191, 207, 0.08);
  pointer-events: none;
  line-height: 1;
}
html[data-theme="dark"] .dark-card::before {
  color: rgba(133, 191, 207, 0.08);
}
.dark-card .dc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: var(--space-3);
}
.dark-card blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.55;
  color: var(--primary);
  max-width: 640px;
  margin: 0 0 var(--space-6);
}
.dark-card blockquote em {
  color: var(--primary);
}
.dark-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: var(--space-5);
  line-height: 1.3;
  color: var(--primary);
}
.dark-card p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════
   CALLOUT LEFT
   ════════════════════════════════════════════════════════════════ */

.callout-left {
  --accent: var(--border);
  background: var(--background-body);
  border-left: 3px solid var(--accent);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  box-shadow: none;
}
.callout-left .cl-label {
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.callout-left h3,
.callout-left p,
.callout-left .cl-label,
.callout-left .cl-label *,
.callout-left h3 *,
.callout-left p * {
  font-size: var(--fs-sm);
}
.callout-left .cl-label,
.callout-left .cl-label * {
  font-size: var(--fs-xs);
}
.callout-left h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.callout-left p {
  font-weight: 400;
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
}
.callout-left p strong {
  font-weight: 600;
}
.callout-left--neutral {
  --accent: var(--accent-navy);
}
.callout-left--warning {
  --accent: var(--accent-terracotta);
}
.callout-left--strong {
  --accent: var(--accent-crimson);
}
.callout-left--cool {
  --accent: var(--accent-forest);
}
.callout-left--beyond {
  background: var(--background-body);
  border-left-color: var(--accent-navy);
  margin-bottom: var(--space-8);
  padding: var(--space-6);
}
.callout-left--beyond .cl-label {
  font-size: var(--fs-sm) !important;
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: var(--space-2);
  font-weight: 600;
}
.callout-left--beyond h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.callout-left--beyond .description-text {
  font-size: var(--fs-base);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}
.callout-left--beyond .callout-left__errors-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.callout-left--beyond .callout-left__error-item {
  background: var(--paper);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--bs-medium);
}

/* ─────────────────────────────────────────
   IN-PAGE CTA BUTTON
   ───────────────────────────────────────── */
.callout-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--ink-panel);
  color: var(--text-on-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  margin-top: var(--space-4);
  min-height: 44px;
  box-shadow: var(--bs-medium);
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.callout-cta-btn i {
  font-size: var(--fs-sm);
}
.callout-cta-btn:active {
  transform: translateY(0);
  opacity: 0.88;
}
@media (hover: hover) and (any-pointer: fine) {
  .callout-cta-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
  }
}
.callout-left--beyond .callout-left__error-item strong {
  display: block;
  color: var(--primary);
  margin-bottom: var(--space-2);
  font-size: var(--fs-base);
  font-weight: 500;
}
.callout-left--beyond .callout-left__error-item p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════
   BEYOND BASICS TRIGGER
   ════════════════════════════════════════════════════════════════ */

.beyond-basics-trigger {
  border: none;
  border-left: 3px solid var(--accent-navy);
  background: var(--background-body);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  box-shadow: var(--bs-heavy);
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}
.beyond-basics-trigger:active {
  transform: scale(0.99);
}
.bbt-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.bbt-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--accent-navy);
  font-weight: 600;
}
.bbt-teaser {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  font-style: italic;
}

.bbt-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  margin-top: var(--space-3);
  transition: grid-template-rows 0.3s ease;
}
.bbt-content > * {
  overflow: hidden;
  min-height: 0;
}
.bbt-content.is-open {
  grid-template-rows: 1fr;
}
@media (prefers-reduced-motion: reduce) {
  .beyond-basics-trigger,
  .bbt-content {
    transition: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   CONTEXTUAL AWARENESS TRIGGER
   ════════════════════════════════════════════════════════════════ */

.ca-toggle {
  border: none;
  border-left: 3px solid var(--accent-forest);
  background: var(--background-body);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}
.ca-toggle:active {
  transform: scale(0.99);
}
.ca-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.ca-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--accent-forest);
  font-weight: 600;
}
.ca-teaser {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}

.ca-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  margin-top: var(--space-3);
  transition: grid-template-rows 0.3s ease;
}
.ca-content > * {
  overflow: hidden;
  min-height: 0;
}
.ca-content.is-open {
  grid-template-rows: 1fr;
}
@media (prefers-reduced-motion: reduce) {
  .ca-toggle,
  .ca-content {
    transition: none !important;
  }
}
.ca-content .callout-left--awareness {
  margin-bottom: 0;
}
.callout-left--awareness {
  background: var(--background-body);
  border-left-color: var(--accent-forest);
  margin-bottom: var(--space-8);
  padding: var(--space-6);
}
.callout-left--awareness .cl-label {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
  font-weight: 600;
}
.callout-left--awareness .section-label {
  margin-bottom: var(--space-3);
}
.callout-left--awareness .section-label .num {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--primary);
  background: rgba(0, 0, 0, 0.05);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-2);
}
.callout-left--awareness .section-label h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--primary);
  margin: var(--space-2) 0 0 0;
}
.callout-left--awareness .dc-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-huge);
  font-weight: 600;
  color: var(--accent-forest);
  margin-bottom: var(--space-2);
}
.callout-left--awareness h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.callout-left--awareness .description-text {
  font-size: var(--fs-base);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}
.callout-left--awareness .callout-left__bridge-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.callout-left--awareness .callout-left__bridge-step {
  background: var(--paper);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--bs-medium);
}
.callout-left--awareness .callout-left__bridge-step .bs-num {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--muted);
  display: inline-block;
  margin-bottom: var(--space-2);
}
.callout-left--awareness .callout-left__bridge-step h4 {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--primary);
  margin: 0 0 var(--space-2) 0;
}
.callout-left--awareness .callout-left__bridge-step p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  margin: 0;
}
.callout-left--awareness .footer-note {
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--primary);
  line-height: 1.7;
  text-align: center;
  padding-top: var(--space-5);
  margin-top: var(--space-5);
}
.callout-left--awareness .footer-note strong {
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════
   STEP BOX
   Used in: AnticipateTreatReassessDecide
   ════════════════════════════════════════════════════════════════ */

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-10);
}
.step-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.step-box {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--bs-medium);
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.step-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--bs-heavy);
}
.step-box .sb-num {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
  margin-bottom: var(--space-2);
  display: block;
}
.step-box .sb-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-navy);
  margin-bottom: var(--space-2);
}
.step-box .sb-desc {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════
   COMPARE GRID
   Used in: PatientTrust, ClinicalRegister
   ════════════════════════════════════════════════════════════════ */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.compare-col {
  padding: var(--space-6) var(--space-7);
}
.mis-col:first-child {
  background: var(--tint-false);
}
.mis-col:last-child {
  background: var(--tint-true);
}
.compare-col-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
  color: var(--primary);
}
.compare-col-role {
  font-size: var(--fs-xs);
  color: var(--primary);
  margin-bottom: var(--space-4);
  font-style: italic;
}
@media (max-width: 700px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-col:first-child {
    border-right: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   SPEECH BUBBLE
   Used in: PatientTrust, ClinicalRegister
   ════════════════════════════════════════════════════════════════ */

.speech-bubble {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin-bottom: var(--space-2);
}
.speech-bubble.student {
  background: var(--background);
  box-shadow: var(--bs-medium);
  color: var(--primary);
  font-style: italic;
}
.speech-bubble.correct {
  background: var(--background);
  color: var(--primary);
}
.speech-bubble .sb-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-1);
  opacity: 0.7;
}

/* ════════════════════════════════════════════════════════════════
   MAPPING SPLIT
   Used in: AnticipateTreatReassessDecide, BeyondTheSystem, CheckYourself
   ════════════════════════════════════════════════════════════════ */

.mapping-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--bs-medium);
}
.ms-col {
  padding: var(--space-5) var(--space-6);
}
.ms-col:not(:last-child):not(.ms-divider) {
  border-right: 1px solid var(--border-light);
}
.ms-col .msc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-2);
}
.ms-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  flex-direction: column;
  gap: var(--space-1);
}
.ms-divider .msd-arrow {
  font-size: var(--fs-lg);
  color: var(--primary);
}
.ms-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.ms-item {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.45;
  padding: var(--space-1) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

/* ════════════════════════════════════════════════════════════════
   FAILURE & COMPARISON CARD
   Used in: AnticipateTreatReassessDecide, BeDefensible, CheckYourself
   ════════════════════════════════════════════════════════════════ */

.failure-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}
.failure-card,
.comp-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.failure-card-head,
.comp-card-head {
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.failure-card.silent .failure-card-head,
.failure-card.reactive .failure-card-head {
  background: var(--background);
}
.failure-card-head .fch-content h4,
.comp-card-head .cch-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
}
.failure-card-head .fch-content h4 {
  margin-bottom: var(--space-half);
}
.comp-card-head .cch-content h4 {
  margin-bottom: var(--space-3);
}
.failure-card.silent .fch-content h4,
.failure-card.reactive .fch-content h4 {
  color: var(--primary);
}
.failure-card-head .fch-content p {
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.4;
}
.fc-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-md);
  margin-left: auto;
  flex-shrink: 0;
}
.failure-card.silent .fc-tag {
  background: var(--ink-panel);
  color: var(--text-on-dark);
}
.failure-card.reactive .fc-tag {
  background: var(--ink-panel);
  color: var(--text-on-dark);
}
.failure-card-body,
.comp-card-body {
  background: var(--paper);
  padding: var(--space-4) var(--space-6);
}
.fc-examples {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fc-examples li {
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  line-height: 1.4;
  color: var(--primary);
  font-style: italic;
}
.fc-examples li:last-child {
  border-bottom: none;
}
.fc-examples li::before {
  content: "→";
  color: var(--primary);
  font-size: var(--fs-xs);
  flex-shrink: 0;
  font-style: normal;
}
.failure-card-foot,
.comp-card-foot {
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.5;
}
.failure-card-foot {
  background: var(--background);
}
.failure-card.silent .failure-card-foot {
  border-top-color: var(--text-primary);
  background: var(--background);
}
.failure-card.reactive .failure-card-foot {
  border-top-color: var(--text-on-dark);
  background: var(--background);
}
.failure-card-foot strong {
  color: var(--primary);
  font-weight: 500;
}
.comp-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}
.comp-card--green {
  background: var(--tint-true);
}
.comp-card--red {
  background: var(--tint-false);
}
.comp-card--green .comp-card-head {
  background: var(--tint-true-strong);
}
.comp-card--red .comp-card-head {
  background: var(--tint-false-strong);
}
.comp-card--green .comp-card-body {
  background: var(--tint-true);
}
.comp-card--red .comp-card-body {
  background: var(--tint-false);
}
.comp-card-head .cch-content p {
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.4;
}
.comp-card .cc-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-md);
  margin-right: auto;
  flex-shrink: 0;
  background: var(--ink-panel);
  color: var(--text-on-dark);
}
.comp-card-foot strong {
  color: var(--primary);
}
.cc-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cc-items li {
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  line-height: 1.4;
  color: var(--primary);
}
.cc-items li:last-child {
  border-bottom: none;
}
.cc-items li::before {
  content: "→";
  color: var(--primary);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   SUMMARY PANEL
   Used in: AnticipateTreatReassessDecide, Summary
   ════════════════════════════════════════════════════════════════ */

.summary-panel {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--parchment) 50%, white),
    color-mix(in srgb, var(--ivory) 50%, white)
  );
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  margin-top: var(--space-12);
}
.summary-panel h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
  color: var(--primary);
}
.summary-panel > p {
  font-size: var(--fs-sm);
  color: var(--primary);
  margin-bottom: var(--space-6);
}
.summary-col {
  background: var(--paper);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.summary-col h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
}
.summary-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.summary-col li {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
  padding-left: var(--space-3);
  position: relative;
}
.summary-col li::before {
  content: "—";
  position: absolute;
  left: 0;
  opacity: 0.4;
}

/* ════════════════════════════════════════════════════════════════
   CORE CONTRAST
   Used in: CheckYourself, Summary
   ════════════════════════════════════════════════════════════════ */

.core-contrast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.cc-side {
  padding: var(--space-8) var(--space-8);
}
.cc-side .ccs-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.cc-side.description .ccs-label {
  color: var(--text-on-dark);
}
.cc-side.summary .ccs-label {
  color: var(--text-on-dark);
}
.cc-side.description {
  background: var(--ink-panel);
}
.cc-side.summary {
  background: var(--ink-panel);
}
.cc-side h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}
.cc-side.description h3 {
  color: var(--text-on-dark);
}
.cc-side.summary h3 {
  color: var(--text-on-dark);
}
.cc-side p {
  font-size: var(--fs-sm);
  color: var(--text-on-dark);
  line-height: 1.7;
}
.cc-side.summary p {
  color: var(--text-on-dark);
}
.cc-side.summary .ms-item {
  color: var(--text-on-dark);
}
.cc-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-3);
  gap: var(--space-2);
  background: var(--ink-panel);
}
.cc-divider .cd-arrow {
  font-size: var(--fs-xl);
  color: var(--text-on-dark);
}
.cc-divider .cd-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-on-dark);
  text-align: center;
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════
   REF TABLE
   Used in: BeyondTheSystem, Bridging, DiscriminatingQuestions,
   DxClinicalReasoning, ExaminationHypothesisTesting, KeyModifiers,
   TxClinicalReasoning, WhenRulesFail
   ════════════════════════════════════════════════════════════════ */

.ref-table-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-12);
}
.ref-table-block .ctb-head {
  background: var(--surface);
  padding: var(--space-5) var(--space-7);
}
.ref-table-block .ctb-head .ch-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.ref-table-block .ctb-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  margin: 0;
}
.ref-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
.ref-table thead tr {
  background: var(--ink-panel);
}
.ref-table thead th {
  font-family: var(--font-body);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 600;
  text-align: left;
  color: var(--text-on-dark);
}
.ref-table tbody tr:hover {
  background: var(--background);
}
.ref-table td {
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-sm);
  line-height: 1.5;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light);
}
.ref-table tbody tr:last-child td {
  border-bottom: none;
}
.ref-table td:first-child {
  font-weight: 500;
  color: var(--primary);
  white-space: normal;
}
.ref-table:not(.ref-table--compact) td:nth-child(2) {
  color: var(--primary);
  font-style: italic;
}
.ref-table:not(.ref-table--compact) td:nth-child(3) {
  color: var(--primary);
  font-weight: 500;
}
.ref-table:not(.ref-table--compact) td:nth-child(4) {
  color: var(--primary);
}
.ref-table:not(.ref-table--compact) th:first-child,
.ref-table:not(.ref-table--compact) td:first-child {
  width: 18%;
  white-space: normal;
}
.ref-table:not(.ref-table--compact) th:last-child,
.ref-table:not(.ref-table--compact) td:last-child {
  width: 35%;
}
.ref-table:not(.ref-table--compact) th:nth-child(2),
.ref-table:not(.ref-table--compact) td:nth-child(2) {
  width: 22%;
}
.ref-table:not(.ref-table--compact) th:nth-child(3),
.ref-table:not(.ref-table--compact) td:nth-child(3) {
  width: 25%;
}
.ref-table--compact td {
  color: var(--primary);
}

.block-note {
  background: var(--background);
  padding: var(--space-4) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}
.block-note strong {
  color: var(--primary);
}
.block-note--center {
  text-align: center;
}

/* ════════════════════════════════════════════════════════════════
   ERRORS BLOCK
   Used in: Most pages  (21/24)
   ════════════════════════════════════════════════════════════════ */

.errors-block {
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-12);
  margin-bottom: var(--space-8);
  background: var(--background-body);
  border-left: 3px solid var(--accent-terracotta);
  position: relative;
  overflow: hidden;
}
.errors-block::before {
  content: "⚠";
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 5rem;
  color: rgba(220, 38, 38, 0.04);
  pointer-events: none;
  font-family: var(--font-mono);
}
html[data-theme="dark"] .errors-block::before {
  color: rgba(220, 38, 38, 0.05);
}
.errors-block .eb-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--accent-crimson);
  font-weight: 600;
  padding-left: 0;
}
.errors-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  margin-bottom: var(--space-6);
  color: var(--primary);
  padding-left: 0;
  line-height: 1.3;
}
.errors-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.error-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--bs-medium);
  background: var(--paper);
  box-shadow: var(--bs-medium);
  color: var(--dark-blue);
  font-weight: 500;
  letter-spacing: var(--ls-normal);
  transition: all 0.2s ease;
}
.error-item .ei-note {
  display: block;
  width: 100%;
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
  letter-spacing: var(--ls-normal);
  text-transform: none;
  margin-top: var(--space-half);
  padding-left: var(--space-4);
  border-left: 2px solid var(--dark-blue);
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════
   FINAL MESSAGE
   ════════════════════════════════════════════════════════════════ */

.final-message {
  margin-top: var(--space-12);
  text-align: center;
  padding: var(--space-8) var(--space-8);
  background: color-mix(in srgb, var(--accent-navy) 8%, var(--paper));
  border-radius: var(--radius-lg);
  color: var(--primary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.final-message .fm-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: var(--space-2);
}
.final-message blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--accent-navy);
  max-width: 640px;
  margin: 0 auto var(--space-4);
  letter-spacing: var(--ls-tight);
}
.final-message p {
  color: var(--text-primary);
  font-size: var(--fs-sm);
  line-height: 1.8;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.fm-pills {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.fm-pill {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
  color: var(--text-on-dark);
  background: var(--ink-panel);
  letter-spacing: var(--ls-wider);
}

/* ════════════════════════════════════════════════════════════════
   XREF & FOOTNOTES
   Used in: Most pages  (21/24)
   ════════════════════════════════════════════════════════════════ */

.xref-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}
.xref-item {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.xref-item:hover {
  background: var(--background-body);
  box-shadow: var(--bs-medium);
}
.xref-item h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  color: var(--primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}
.xref-item p {
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.5;
}
.xref-item .footnote-marker {
  margin-top: auto;
}
.xref-item:hover .footnote-marker {
  background: var(--background-body);
  transition: background 0.2s;
}
.footnote-marker {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: var(--fs-xs);
  color: var(--primary);
}
.footnote-marker p {
  margin: 0;
  font-size: var(--fs-xs);
}

/* ════════════════════════════════════════════════════════════════
   REFLECTIVE ESSAY
   Used in: All pages
   ════════════════════════════════════════════════════════════════ */

.reflective-essay-block {
  background: var(--background);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
  box-shadow: var(--bs-medium);
}
.essay-prompt {
  margin-bottom: var(--space-4);
}
.prompt-text {
  font-size: var(--fs-base);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  color: var(--primary);
}
.disease-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.disease-tag {
  background: var(--paper);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  color: var(--primary);
}
.disease-tag:hover {
  background: var(--ink-panel);
  color: var(--text-on-dark);
  border-color: var(--primary);
}
.disease-tag.selected {
  background: var(--ink-panel);
  color: var(--text-on-dark);
  border-color: var(--primary);
}
.selected-disease-display {
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
  padding: var(--space-1) 0;
  color: var(--primary);
}
#selectedDiseaseName {
  font-weight: 600;
  color: var(--primary);
}
textarea {
  width: 100%;
  padding: var(--space-4);
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  resize: vertical;
  margin-bottom: var(--space-5);
  background: var(--paper);
}
.essay-submit-btn {
  font-family: var(--font-body);
  background: var(--ink-panel);
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s;
  min-height: 44px;
}
.essay-submit-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.essay-submit-btn:active {
  transform: translateY(0);
  background: var(--ink-panel);
  color: var(--text-on-dark);
}

.essay-reset-btn {
  font-family: var(--font-body);
  background: var(--background) !important;
  color: var(--primary) !important;
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  min-height: 44px;
}
.essay-reset-btn:hover {
  background: var(--border-light) !important;
  transform: translateY(-1px);
}
.essay-feedback {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 2px dashed var(--border);
}
.feedback-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.feedback-header h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin: 0;
}
.feedback-content {
  background: var(--paper);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--primary);
  margin-bottom: var(--space-5);
}
.feedback-content p {
  margin-bottom: var(--space-3);
}
.feedback-content strong {
  color: var(--primary);
}
.essay-reset-btn {
  background: var(--border);
  color: var(--primary);
}
#revealFeedbackBtn.disabled,
#revealFeedbackBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--border);
}
#revealFeedbackBtn:not(:disabled):hover {
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER & HOME BUTTON
   Used in: All pages
   ════════════════════════════════════════════════════════════════ */

footer {
  background: var(--surface);
  text-align: center;
  padding: var(--space-6) var(--space-12) var(--space-4);
  width: 100%;
  margin-top: auto;
  position: relative;
  border-top: 1px solid rgba(var(--gold-rgb), 0.5);
}
footer p {
  color: var(--text-primary);
  font-size: var(--fs-xs);
  text-align: center;
  letter-spacing: var(--ls-widest);
  position: relative;
  z-index: 1;
}

.home-btn {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  z-index: 1;
  width: 44px;
  height: 44px;
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-border);
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.home-btn i {
  font-size: var(--icon-sm);
}

.home-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.home-btn:active {
  opacity: 1;
}
@media (hover: hover) and (any-pointer: fine) {
  .home-btn:hover {
    opacity: 1;
    background: var(--on-dark-fill-hover);
  }
}

.theme-toggle {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-border);
  color: var(--text-on-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.theme-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.theme-toggle:active {
  opacity: 1;
}
@media (hover: hover) and (any-pointer: fine) {
  .theme-toggle:hover {
    opacity: 1;
    background: var(--on-dark-fill-hover);
  }
}
header.has-home-btn .theme-toggle {
  position: absolute;
  top: 50%;
  right: 4.6rem;
  transform: translateY(-50%);
  z-index: 1;
}

/* Search trigger (chapter pages): same 44px circle as .home-btn /
   .theme-toggle, one more slot further left in the icon cluster. */
.search-trigger {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-border);
  color: var(--text-on-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.search-trigger span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.search-trigger:active {
  opacity: 1;
}
@media (hover: hover) and (any-pointer: fine) {
  .search-trigger:hover {
    opacity: 1;
    background: var(--on-dark-fill-hover);
  }
}
header.has-home-btn .search-trigger {
  position: absolute;
  top: 50%;
  right: 7.95rem;
  transform: translateY(-50%);
  z-index: 1;
}

/* Framework Index link — same 44px icon-circle as .home-btn /
   .theme-toggle / .search-trigger, one more slot further left. */
.framework-index-link {
  position: absolute;
  top: 50%;
  right: 11.3rem;
  transform: translateY(-50%);
  z-index: 1;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-border);
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 50%;
  opacity: 0.85;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.framework-index-link i {
  font-size: var(--icon-sm);
}
.framework-index-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.framework-index-link:active {
  opacity: 1;
}
@media (hover: hover) and (any-pointer: fine) {
  .framework-index-link:hover {
    opacity: 1;
    background: var(--on-dark-fill-hover);
  }
}
.framework-index-link:focus-visible {
  outline: 2px solid var(--text-on-dark);
  outline-offset: 2px;
}

/* Tooltip for the round header buttons — created and positioned by
   components.js (ICON-BUTTON TOOLTIPS). Same card look as the home
   page's .topic-tooltip. */
.icon-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  max-width: 220px;
  padding: var(--space-1) var(--space-3);
  background: var(--background);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  line-height: 1.3;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  box-shadow: var(--bs-veryheavy);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s;
}
.icon-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .icon-tooltip {
    transition: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   BRIDGING-TO-CONTEXT BLOCK
   Used in: All pages
   ════════════════════════════════════════════════════════════════ */

.btc-section,
.xref-section {
  width: 100%;
  max-width: 1000px;
  min-width: 240px;
  margin: 0 auto;
  padding: 0 var(--space-8) var(--space-12);
  box-sizing: border-box;
}
.btc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  border: none;
  border-left: 3px solid var(--accent-navy);
  background: var(--background-body);
  padding: var(--space-4) var(--space-7);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}
.btc-toggle:active {
  transform: scale(0.99);
}
.btc-toggle-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-on-dark);
  white-space: nowrap;
  background: color-mix(in srgb, var(--ink-panel) 78%, transparent);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  box-shadow: 0 0 0 transparent;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}
@media (hover: hover) and (any-pointer: fine) {
  .btc-toggle:hover .btc-toggle-hint,
  .ca-toggle:hover .btc-toggle-hint,
  .beyond-basics-trigger:hover .btc-toggle-hint {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: var(--bs-medium);
  }
  .btc-toggle:hover .btc-toggle-hint i,
  .ca-toggle:hover .btc-toggle-hint i,
  .beyond-basics-trigger:hover .btc-toggle-hint i {
    animation: btcChevronNudge 0.6s ease;
  }
}
.btc-toggle:active .btc-toggle-hint,
.ca-toggle:active .btc-toggle-hint,
.beyond-basics-trigger:active .btc-toggle-hint {
  transform: scale(0.96);
}
@keyframes btcChevronNudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}
.btc-toggle[aria-expanded="true"]:hover .btc-toggle-hint i,
.ca-toggle[aria-expanded="true"]:hover .btc-toggle-hint i,
.beyond-basics-trigger[aria-expanded="true"]:hover .btc-toggle-hint i {
  animation: btcChevronNudgeFlipped 0.6s ease;
}
@keyframes btcChevronNudgeFlipped {
  0%,
  100% {
    transform: rotate(180deg) translateY(0);
  }
  50% {
    transform: rotate(180deg) translateY(3px);
  }
}

.btc-toggle-hint i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btc-toggle[aria-expanded="true"] .btc-toggle-hint i,
.ca-toggle[aria-expanded="true"] .btc-toggle-hint i,
.beyond-basics-trigger[aria-expanded="true"] .btc-toggle-hint i {
  transform: rotate(180deg);
}
.btc-toggle-text {
  display: inline-block;
  transition: opacity 0.15s ease;
}
.btc-toggle-text.is-swapping {
  opacity: 0;
}

.btc-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  margin-top: var(--space-3);
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.btc-content > * {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.3s ease 0s;
}
.btc-content.is-open {
  grid-template-rows: 1fr;
}
.btc-content.is-open > * {
  opacity: 1;
  transition: opacity 0.35s ease 0.1s;
}
@media (prefers-reduced-motion: reduce) {
  .btc-toggle,
  .btc-toggle-hint,
  .btc-toggle-hint i,
  .btc-toggle-text,
  .btc-content,
  .btc-content > * {
    transition: none !important;
    animation: none !important;
  }
}
.btc-block {
  border-left: 3px solid var(--accent-navy);
  background: var(--background-body);
  padding: var(--space-6) var(--space-7) var(--space-6);
  position: relative;
}
.btc-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: var(--space-2);
}
.btc-term {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}
.btc-bridge {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px dashed var(--border);
}
.btc-refs-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}
.btc-ref-list {
  list-style: decimal;
  padding-left: var(--space-5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.btc-ref-list li {
  font-size: var(--fs-xs);
  color: var(--dark-blue);
  line-height: 1.65;
}
.btc-ref-list li em {
  font-style: italic;
}
.btc-ref-list li strong {
  font-weight: 600;
}
/* Target of the Glossary's "Used in" links — clear the sticky header */
.btc-section {
  scroll-margin-top: 110px;
}

.btc-term-link {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.btc-term-link:hover,
.btc-term-link:focus-visible {
  color: var(--accent-crimson);
  text-decoration-style: solid;
}

/* ════════════════════════════════════════════════════════════════
   TOPIC OVERLAY
   Used in: index
   ════════════════════════════════════════════════════════════════ */

.topic-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--scrim-soft);
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.topic-overlay.visible .topic-overlay-panel {
  transform: translateY(0);
  opacity: 1;
}
.topic-overlay-panel {
  background: var(--paper);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-8) var(--space-7) var(--space-10);
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease;
  box-shadow: var(--bs-sheet);
}
.topic-overlay-panel::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border);
  margin: 0 auto var(--space-6);
}
.topic-overlay-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--background);
  border: none;
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.topic-overlay-close:hover {
  background: var(--border-light);
}
.to-meta {
  margin-bottom: var(--space-4);
}
.to-subtitle {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--muted);
  margin-bottom: var(--space-1);
}
.to-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--primary);
  line-height: 1.25;
  margin: 0;
}
.to-desc {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.75;
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

@media (hover: hover) and (pointer: fine) and (any-pointer: fine) {
  .topic-overlay {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   BALANCE TABLE
   Used in: DDx, DxClinicalReasoning, TxClinicalReasoning
   ════════════════════════════════════════════════════════════════ */

.balance-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}
.balance-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.balance-list li {
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  line-height: 1.5;
  color: var(--primary);
}
.balance-side {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.balance-side-body {
  background: var(--paper);
  padding: var(--space-5) var(--space-6);
}
.balance-side-head {
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.balance-side-head h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
}
.balance-side.against .balance-list li::before {
  content: "−";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.balance-side.for .balance-list li::before {
  content: "+";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.balance-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.balance-table-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.balance-table-wrap {
  background: var(--paper);
  padding: var(--space-6) var(--space-7);
}
.bs-icon {
  font-size: var(--fs-xl);
  flex-shrink: 0;
}
.bs-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  color: var(--text-primary);
  text-transform: uppercase;
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-md);
  margin-left: auto;
}
.bt-col {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.bt-col-body {
  background: var(--paper);
}
.bt-col-head {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.bt-col.against-col .bt-col-head {
  background: var(--background);
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}
.bt-col.against-col .bt-item::before {
  content: "−";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.bt-col.for-col .bt-col-head {
  background: var(--background);
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
}
.bt-col.for-col .bt-item::before {
  content: "+";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.bt-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  padding: var(--space-2) var(--space-4);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════
   DEFINITION & OBLIGATION BLOCK
   Used in: DDx, DxClinicalReasoning, TxClinicalReasoning
   ════════════════════════════════════════════════════════════════ */

.def-body {
  background: var(--paper);
  padding: var(--space-6) var(--space-7);
}
.def-obligation {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.def-obligation .do-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.do-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  line-height: 1.6;
}
.do-item::before {
  content: "→";
  color: var(--muted);
  flex-shrink: 0;
  font-size: var(--fs-sm);
}
.example-head .ex-num-pill {
  background: var(--ink-panel);
  color: var(--text-on-dark);
  font-size: var(--fs-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  letter-spacing: var(--ls-widest);
  flex-shrink: 0;
}
.example-verdict {
  background: var(--background);
  padding: var(--space-4) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
}
.example-verdict .verd-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-2);
}
.example-verdict strong {
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════
   FOUR-QUESTIONS BLOCK
   Used in: DDx
   ════════════════════════════════════════════════════════════════ */

.four-q-block {
  background: var(--ink-panel);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-10);
  margin-bottom: var(--space-12);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.four-q-block .fq-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: hsla(0, 0%, 100%, 0.45);
  margin-bottom: var(--space-2);
  font-weight: 400;
}
.four-q-block .fq-subtitle {
  font-size: var(--fs-sm);
  color: hsla(0, 0%, 100%, 0.55);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.four-q-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
  color: var(--text-on-dark);
}
.four-q-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.four-q-note {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  font-size: var(--fs-xs);
  color: hsla(0, 0%, 100%, 0.55);
  line-height: 1.7;
}
.four-q-note strong {
  color: var(--text-on-dark) !important;
  font-weight: 600;
}
.fq-card {
  background: hsla(0, 0%, 100%, 0.06);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
}
.fq-card .fq-num {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  color: var(--text-on-dark);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.fq-card h4 {
  font-size: var(--fs-base);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: hsla(0, 0%, 100%, 0.75);
  margin-bottom: var(--space-2);
  font-weight: 500;
}
.fq-card p {
  font-size: var(--fs-xs);
  color: hsla(0, 0%, 100%, 0.55);
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════
   PRIORITY & PRESENTATION BLOCK
   Used in: DDx, DxClinicalReasoning, TxClinicalReasoning
   ════════════════════════════════════════════════════════════════ */

.pr-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: var(--space-1);
}
.pr-content p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
}
.pr-content p strong {
  color: var(--primary);
}
.pr-rank {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 2px;
}
.pres-col {
  padding: var(--space-6) var(--space-6);
}
.pres-col .pc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  display: block;
}
.pres-col p {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--primary);
  font-style: italic;
}
.pres-col .pc-label {
  color: var(--primary);
}
.presentation-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.presentation-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.presentation-head {
  background: var(--background);
  padding: var(--space-5) var(--space-7);
}
.presentation-head .ph-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.presentation-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.priority-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.priority-head {
  background: var(--background);
  padding: var(--space-5) var(--space-7);
}
.priority-head .ph-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.priority-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.priority-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-7);
  transition: background 0.15s;
}
.priority-row:hover {
  background: var(--background);
}
.priority-row:last-child {
  border-bottom: none;
}
.priority-row .pr-content h4 {
  color: var(--primary);
}
.priority-row .pr-rank {
  background: var(--background);
  color: var(--primary);
}
.priority-rows {
  background: var(--paper);
}

/* ════════════════════════════════════════════════════════════════
   BEFORE / AFTER BLOCK
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.ba-col {
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.ba-col .ba-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 500;
  display: block;
  margin-bottom: var(--space-1);
}
.ba-col.after {
  background: var(--background);
  color: var(--primary);
  box-shadow: var(--bs-medium);
}
.ba-col.after .ba-label {
  color: var(--muted);
}
.ba-col.before {
  background: var(--background);
  box-shadow: var(--bs-medium);
  color: var(--primary);
  font-style: italic;
}
.ba-col.before .ba-label {
  color: var(--primary);
}
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* ════════════════════════════════════════════════════════════════
   DISTINCTION BLOCK
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.dist-divider {
  text-align: center;
  color: var(--primary);
  font-size: var(--fs-xl);
}
.dist-side .ds-type {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  display: block;
  font-weight: 600;
}
.dist-side h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}
.dist-side p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.6;
}
.dist-side:first-child .ds-type {
  color: var(--muted);
}
.dist-side:first-child h3 {
  color: var(--primary);
}
.dist-side:last-child .ds-type {
  color: var(--muted);
}
.dist-side:last-child h3 {
  color: var(--primary);
}
.distinction-block {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-12);
  color: var(--primary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.distinction-block .db-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.distinction-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-6);
  align-items: center;
}

/* ════════════════════════════════════════════════════════════════
   IMPACT CARD
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.impact-card,
.mc-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.impact-card-head {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.impact-card-head .ic-icon {
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.impact-card-head h4,
.mc-card-head h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
}
.impact-card.good {
  background: var(--tint-true);
}
.impact-card.poor {
  background: var(--tint-false);
}
.impact-card.good .impact-card-head {
  background: var(--tint-true-strong);
}
.impact-card.poor .impact-card-head {
  background: var(--tint-false-strong);
}
.impact-card.good .impact-card-head h4,
.impact-card.poor .impact-card-head h4 {
  color: var(--primary);
}
.impact-card.good .impact-items {
  background: var(--tint-true);
}
.impact-card.poor .impact-items {
  background: var(--tint-false);
}
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.impact-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.impact-item:last-child {
  border-bottom: none;
}
.impact-items {
  background: var(--paper);
  padding: var(--space-2) 0;
}

/* ════════════════════════════════════════════════════════════════
   SEEKER–RESPONDER BLOCK
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.sr-content {
  padding: var(--space-4) var(--space-6);
}
.sr-content .sc-example {
  font-size: var(--fs-xs);
  color: var(--primary);
  font-style: italic;
  border-left: 2px solid var(--border-light);
  padding-left: var(--space-2);
  margin-top: var(--space-2);
}
.sr-content p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.65;
  margin-bottom: var(--space-1);
}
.sr-content p strong {
  color: var(--primary);
}
.sr-name {
  padding: var(--space-4) var(--space-4);
}
.sr-name .sn-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
}
.sr-name h4 {
  font-weight: 500;
  font-size: var(--fs-base);
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.sr-num {
  padding: var(--space-4) var(--space-3) var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
  padding-top: var(--space-5);
}

/* ════════════════════════════════════════════════════════════════
   STEPS FLOW
   Used in: NarrativeCompetency, Questioning, SeekingHelp, Summary
   ════════════════════════════════════════════════════════════════ */

.step-body {
  padding: var(--space-5) var(--space-6);
}
.step-body p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.75;
  margin-bottom: var(--space-3);
}
.step-body p strong {
  color: var(--primary);
}
.step-body p:last-child {
  margin-bottom: 0;
}
.step-circle {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 500;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: var(--bs-medium);
  color: var(--text-on-dark);
}
.step-content {
  background: var(--paper);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  margin: var(--space-2) 0 var(--space-2) var(--space-4);
  overflow: hidden;
}
.step-content:hover {
  box-shadow: var(--bs-heavy);
}
.step-content--flat {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
}
.step-content--flat:hover {
  box-shadow: var(--bs-medium);
}
.step-head {
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.step-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.step-item {
  display: grid;
  grid-template-columns: 4.3rem 1fr;
  gap: 0;
  position: relative;
  z-index: 1;
}
.step-item .step-circle {
  background: var(--chapter-accent-fill, var(--ink-panel));
}
.step-circle--light {
  font-weight: 300;
  box-shadow: var(--bs-thin);
}
.step-item .step-circle--light {
  background: var(--background);
  color: var(--primary);
}
.step-item .step-tag {
  color: var(--muted);
}
.step-num-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--space-6);
}
.step-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.steps-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-12);
  position: relative;
}
.steps-flow::before {
  content: "";
  position: absolute;
  left: 2.15rem;
  top: 3.5rem;
  bottom: 3.5rem;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

/* ════════════════════════════════════════════════════════════════
   STRUCTURE BLOCK
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.structure-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.structure-head {
  background: var(--background);
  padding: var(--space-5) var(--space-7);
}
.structure-head .sh-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.structure-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.structure-rows {
  background: var(--paper);
}
.structure-row {
  display: grid;
  grid-template-columns: 3rem 1fr 2fr;
  align-items: start;
  transition: background 0.15s;
}
.structure-row:hover {
  background: var(--background);
}
.structure-row:last-child {
  border-bottom: none;
}
.structure-row h4 {
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════
   TRANSFORMATION BLOCK
   Used in: NarrativeCompetency, Questioning
   ════════════════════════════════════════════════════════════════ */

.trans-arrow-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-2);
}
.trans-arrow-col .ta-arrow {
  font-size: var(--fs-xl);
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-1);
}
.trans-arrow-col .ta-inner {
  text-align: center;
}
.trans-arrow-col .ta-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  line-height: 1.4;
}
.trans-col {
  padding: var(--space-7);
}
.trans-col .tc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
}
.trans-col .tc-role {
  font-size: var(--fs-sm);
  color: var(--primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.trans-col.clinical .tc-label {
  color: var(--primary);
}
.trans-col.clinical p {
  color: var(--primary);
  font-style: normal;
  background: var(--surface-subtle);
  border-color: var(--border-light);
  font-style: italic;
}
.trans-col.raw .tc-label {
  color: var(--primary);
}
.trans-col.raw p {
  color: var(--primary);
  font-style: normal;
  background: var(--surface-subtle);
  border-color: var(--border-light);
  font-style: italic;
}
.trans-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  background: var(--paper);
}
.trans-head {
  background: var(--surface);
  color: var(--primary);
  padding: var(--space-5) var(--space-7);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.trans-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
}
.trans-head .tag-pill {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.transformation-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}

/* ════════════════════════════════════════════════════════════════
   MISCONCEPTION CARD
   Used in: Uncertainty, VisitRevisit
   ════════════════════════════════════════════════════════════════ */

.mc-card-body {
  background: var(--paper);
  padding: var(--space-4) var(--space-6);
}
.mc-card-head {
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.mc-card.right {
  background: var(--tint-true);
}
.mc-card.wrong {
  background: var(--tint-false);
}
.mc-card.right .mc-card-head {
  background: var(--tint-true-strong);
}
.mc-card.wrong .mc-card-head {
  background: var(--tint-false-strong);
}
.mc-card.right .mc-card-head h4,
.mc-card.wrong .mc-card-head h4 {
  color: var(--primary);
}
.mc-card.right .mc-card-body {
  background: var(--tint-true);
}
.mc-card.wrong .mc-card-body {
  background: var(--tint-false);
}
.mc-icon {
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.misconception-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}

/* ════════════════════════════════════════════════════════════════
   EXAMPLE BLOCK
   Used in: DDx, ExaminationHypothesisTesting, KeyModifiers, Summary
   ════════════════════════════════════════════════════════════════ */

.example-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}
.example-head {
  background: var(--background);
  padding: var(--space-5) var(--space-7);
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.example-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.example-scenario {
  background: var(--paper);
  padding: var(--space-5) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
}
.example-scenario strong {
  color: var(--primary);
}
.ec-num {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
}
.example-card {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.example-three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--paper);
}
.examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

/* ════════════════════════════════════════════════════════════════
   CHECKLIST BLOCK
   Used in: ExaminationHypothesisTesting, Investigations
   ════════════════════════════════════════════════════════════════ */

.checklist-block .cb-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  letter-spacing: var(--ls-wider);
}

/* ════════════════════════════════════════════════════════════════
   PREFACE OVERLAY
   Used in: index
   ════════════════════════════════════════════════════════════════ */

.preface-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.preface-overlay.visible {
  display: flex;
  opacity: 1;
}
.preface-overlay.hidden {
  display: none;
}
.preface-modal {
  background: var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  box-shadow: var(--bs-modal);
  box-sizing: border-box;
}
.preface-modal .callout-left--awareness {
  padding: var(--space-11);
}
.preface-modal .callout-left__bridge-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.preface-modal .callout-left__bridge-step {
  padding: var(--space-4);
  background: hsla(0, 0%, 100%, 0.4);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}
.preface-modal .callout-left__bridge-step:hover {
  background: hsla(0, 0%, 100%, 0.6);
}
.preface-modal .callout-left__bridge-step h4 {
  margin-bottom: var(--space-2);
  color: var(--primary);
}
.preface-modal .callout-left__bridge-step p {
  margin-bottom: 0;
  line-height: 1.6;
}
.preface-modal .dc-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
}
.preface-modal .description-text {
  line-height: 1.7;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}
.preface-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: var(--icon-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.preface-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--primary);
  transform: scale(1.05);
}
.preface-modal::-webkit-scrollbar {
  width: 6px;
}
.preface-modal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
}
.preface-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}
.preface-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .preface-modal .callout-left__bridge-step {
  background: hsla(0, 0%, 100%, 0.06);
}
html[data-theme="dark"] .preface-modal .callout-left__bridge-step:hover {
  background: hsla(0, 0%, 100%, 0.1);
}
html[data-theme="dark"] .preface-close:hover {
  color: var(--text-primary);
}
html[data-theme="dark"] .preface-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .preface-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}
html[data-theme="dark"] .preface-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE – MEDIA QUERIES
   Used in: All pages
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {
  .container {
    padding: 0 var(--space-4);
    width: 100%;
  }

  header:not(.has-home-btn) {
    position: relative;
    top: auto;
  }

  header h1 {
    font-size: var(--fs-xl);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  header h1 span {
    display: block;
  }
  header::before {
    font-size: var(--fs-watermark);
  }
  .home-btn {
    right: 0.7rem;
    width: 44px;
    height: 44px;
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
  }
  header.has-home-btn .theme-toggle {
    right: 3.85rem;
  }
  .search-trigger {
    width: 44px;
    height: 44px;
  }
  header.has-home-btn .search-trigger {
    right: 7rem;
  }
  .framework-index-link {
    right: 10.15rem;
    width: 44px;
    height: 44px;
  }

  header.has-home-btn {
    transition:
      height 0.25s ease,
      padding 0.25s ease;
  }
  header.has-home-btn h1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.25s ease;
  }
  header.has-home-btn.header-compact {
    height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    justify-content: center;
  }
  header.has-home-btn.header-compact h1 {
    font-size: var(--fs-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  header.has-home-btn.header-compact p,
  header.has-home-btn.header-compact::before {
    opacity: 0;
    pointer-events: none;
    position: absolute;
  }
  .section-label h3 {
    font-size: var(--fs-lg);
    font-weight: 600;
  }
  .section-label .num {
    font-size: var(--fs-xs);
    padding: var(--space-1) var(--space-2);
  }
  footer p {
    font-size: var(--fs-xs);
  }
  .core-banner,
  .def-contrast,
  .failure-block,
  .maturity-compare,
  .barrier-compare,
  .authority-compare,
  .trans-compare,
  .mis-compare,
  .ndx-compare,
  .compare-grid,
  .speech-compare,
  .core-contrast {
    display: grid;
    grid-template-columns: 1fr;
  }
  .cb-arrow,
  .nf-arrow,
  .conf-arrow,
  .tbf-arrow,
  .reg-arrow {
    transform: rotate(90deg);
  }
  .socrates-grid,
  .domains-grid,
  .traits-grid,
  .pillars-grid,
  .four-q-grid {
    grid-template-columns: 1fr 1fr;
  }
  .example-three-col,
  .etc-col,
  .narrowing-flow,
  .dialogue-head,
  .dl-line,
  .arg-step,
  .hierarchy-row,
  .hp-item,
  .phrase-item,
  .xref-block,
  .reminder-pills,
  .checklist-row,
  .sequence-block,
  .errors-grid,
  .tq-grid,
  .bridge-steps,
  .comp-pair,
  .three-skills,
  .ladder-item,
  .confidence-spectrum,
  .balance-intro,
  .balance-table,
  .presentation-compare,
  .pb-three,
  .flow-block,
  .relevance-block,
  .mismatch-grid,
  .checklist-steps,
  .tier-diagnostic .purposes-grid,
  .tier-management .purposes-grid,
  .tab-compare,
  .checklist-grid,
  .sequence-flow,
  .distinction-row,
  .before-after,
  .structure-row,
  .impact-grid,
  .pipeline-stages,
  .trans-three-col,
  .registers-flow,
  .priority-flow,
  .midnight-calls,
  .dx-spectrum,
  .tier-flow,
  .prob-tiers,
  .misconception-block,
  .fw-step,
  .circle-stages,
  .why-rules-grid,
  .tb-flow,
  .cr-content,
  .sr-content,
  .ssr-content,
  .step-content,
  .level-content,
  .principle-row,
  .wc-card,
  .tt-card,
  .tl-item,
  .habits-grid,
  .contrast-grid,
  .levels-grid,
  .twoq-filter,
  .wheeze-cards,
  .tt-grid,
  .core-principle,
  .yield-grid,
  .scr-grid,
  .ss-row,
  .level-item,
  .tlc-body {
    grid-template-columns: 1fr;
  }
  .paeds-clues-grid {
    grid-template-columns: 1fr 1fr;
  }
  .traits-grid .trait-card:last-child {
    grid-column: 1/-1;
  }
  .soc-item:nth-child(2n),
  .dc-col:first-child,
  .etc-col,
  .mat-col:first-child,
  .barrier-col:first-child,
  .auth-col:first-child,
  .trans-col:first-child,
  .mis-col:first-child,
  .ndx-col:first-child,
  .cmp-col:first-child,
  .speech-col:first-child,
  .pres-col:first-child,
  .tq-card,
  .flow-step,
  .tlcb-col:first-child,
  .tab-col:first-child,
  .seq-step,
  .tier-col:first-child,
  .wc-card,
  .tt-card,
  .etcol,
  .prob-tier {
    border-right: none;
  }
  .soc-item:nth-child(n + 7),
  .etc-col:last-child,
  .mat-col:last-child,
  .tq-card:last-child,
  .wc-card:last-child,
  .tt-card:last-child,
  .etcol:last-child,
  .prob-tier:last-child,
  .seq-step:last-child {
    border-bottom: none;
  }
  .dc-col:first-child,
  .mat-col:first-child,
  .barrier-col:first-child,
  .auth-col:first-child,
  .tlcb-col:first-child,
  .tab-col:first-child {
    border-bottom: none;
  }
  header {
    padding: var(--space-2) var(--space-6);
    gap: var(--space-2);
    flex-wrap: wrap;
  }
  header.has-home-btn {
    padding-right: 14rem;
    flex-wrap: nowrap;
  }
  .header-logo-img {
    height: 52px;
  }
  .header-text {
    flex: 1;
    min-width: 0;
  }
  .preface-trigger {
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
  }
  .step-grid,
  .step-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
  .mapping-split {
    grid-template-columns: 1fr;
  }
  .mapping-split .ms-divider {
    display: none;
  }
  .lo-card h2,
  .reminder-box h2,
  .summary-panel h3 {
    font-size: var(--fs-lg);
  }
  .step-box .sb-num {
    font-size: var(--fs-2xl);
  }
  .wb-compare {
    grid-template-columns: 1fr;
  }
  .ta-arrow {
    transform: rotate(90deg);
  }
  .internal-reasoning,
  .external-reasoning {
    flex: 1 1 100%;
  }
  .principle-num-col {
    padding: var(--space-2) 0;
  }
  .ref-table {
    min-width: 520px;
  }
  .ref-table td:first-child {
    white-space: normal;
  }

  .ref-table-block {
    background:
      linear-gradient(
        to right,
        var(--background-body) 25%,
        rgba(255, 255, 255, 0)
      ),
      linear-gradient(
          to left,
          var(--background-body) 25%,
          rgba(255, 255, 255, 0)
        )
        100% 0,
      radial-gradient(
        farthest-side at 0 50%,
        var(--scroll-shadow),
        transparent
      ),
      radial-gradient(
          farthest-side at 100% 50%,
          var(--scroll-shadow),
          transparent
        )
        100% 0;
    background-repeat: no-repeat;
    background-color: var(--background-body);
    background-size:
      48px 100%,
      48px 100%,
      26px 100%,
      26px 100%;
    background-position:
      0 0,
      100% 0,
      0 0,
      100% 0;
    background-attachment: local, local, scroll, scroll;
  }
}

@media (min-width: 701px) and (max-width: 950px) and (orientation: landscape) {
  header h1 {
    font-size: var(--fs-2xl);
    line-height: 1.2;
  }
  header::before {
    font-size: var(--fs-watermark);
  }
  .section-label h3 {
    font-size: var(--fs-lg);
  }
  .lo-card h2,
  .reminder-box h2,
  .summary-panel h3 {
    font-size: var(--fs-lg);
  }
  .dark-card blockquote {
    font-size: var(--fs-lg);
  }
  .step-box .sb-num {
    font-size: var(--fs-2xl);
  }
  .fq-card .fq-num {
    font-size: var(--fs-xl);
  }
  .card-block-head h3,
  .dark-card h3,
  .callout-left h3 {
    font-size: var(--fs-md);
  }
  footer p {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--space-3);
  }
  header {
    gap: var(--space-2);
  }
  header h1 {
    font-size: var(--fs-lg);
  }
  header::before {
    font-size: var(--fs-watermark);
  }
  .header-logo-img {
    height: 40px;
  }
  .preface-trigger {
    padding: var(--space-1) var(--space-2);
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: var(--space-2);
  }
  .final-message blockquote {
    font-size: var(--fs-md);
  }
  .dark-card blockquote,
  .core-principle blockquote,
  .principle-block blockquote,
  .circle-block blockquote {
    font-size: var(--fs-base);
  }
  .golden-rule h3,
  .selfcheck-rule h3,
  .tier-col h3,
  .cc-side h3,
  .example-card-head h4,
  .errors-block h3,
  .mistakes-block h3,
  .card-block-head h3,
  .dark-card h3,
  .callout-left h3,
  .section-label h3 {
    font-size: var(--fs-base);
  }
  .lo-card h2,
  .summary-panel h3 {
    font-size: var(--fs-base);
  }
  .reminder-box h2 {
    font-size: var(--fs-lg);
  }
  .step-box .sb-num {
    font-size: var(--fs-xl);
  }
  .fq-card .fq-num {
    font-size: var(--fs-lg);
  }
  .domains-grid,
  .traits-grid,
  .pillars-grid,
  .four-q-grid,
  .socrates-grid {
    grid-template-columns: 1fr;
  }
  .paeds-clues-grid {
    grid-template-columns: 1fr 1fr;
  }
  .fm-pills {
    flex-direction: column;
    gap: var(--space-2);
  }
  .fm-pill {
    width: 100%;
    text-align: center;
  }
  .step-grid,
  .step-grid--3 {
    grid-template-columns: 1fr;
  }
  .thinking-tool-block h3,
  .framework-block h3,
  .four-q-block h3 {
    font-size: var(--fs-base);
  }
  .dist-side h3,
  .structure-head h3,
  .step-head h3,
  .presentation-head h3,
  .priority-head h3,
  .trans-head h3 {
    font-size: var(--fs-base);
  }
  footer p {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 700px) {
  .reminder-box h2 em {
    font-size: var(--fs-base);
  }
}

@media (max-width: 480px) {
  .reminder-box h2 em {
    font-size: var(--fs-base);
  }
}

/* ─────────────────────────────────────────
         DISTINCTION BLOCK (neutral)
      ───────────────────────────────────────── */
.distinct-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}

.d-head {
  background: var(--surface);
  padding: var(--space-5) var(--space-7);
}

.d-head .dh-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.d-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin: 0;
}

.d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}

.d-col {
  padding: var(--space-6) var(--space-7);
}

.d-col .dc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
}

.d-col:first-child .dc-label,
.d-col:last-child .dc-label {
  color: var(--primary);
}

.d-col h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: var(--space-2);
}

.d-col:first-child h4,
.d-col:last-child h4 {
  color: var(--primary);
}

.d-col p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
}

.d-col p strong {
  color: var(--primary);
}

@media (max-width: 700px) {
  .d-grid {
    grid-template-columns: 1fr;
  }

  .d-col:first-child {
    border-bottom: 1px solid var(--border-light);
  }

  .feature-card--elevated,
  .card-block,
  .dark-card,
  .failure-block,
  .comp-pair,
  .core-contrast,
  .ref-table-block,
  .xref-block,
  .balance-intro,
  .presentation-block,
  .priority-block,
  .distinction-block,
  .impact-grid,
  .steps-flow,
  .structure-block,
  .transformation-block,
  .misconception-block,
  .examples-list,
  .distinct-block {
    margin-bottom: var(--space-7);
  }
  .feature-card--elevated {
    padding: var(--space-6) var(--space-6);
  }
}

/* ════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY
   ════════════════════════════════════════════════════════════════ */
.gsearch-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim-medium);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem var(--space-5) var(--space-5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gsearch-overlay.visible {
  display: flex;
  opacity: 1;
}
.gsearch-overlay.hidden {
  display: none;
}

.gsearch-modal {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--bs-veryheavy);
}

.gsearch-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.gsearch-input-row svg {
  color: var(--muted);
  flex-shrink: 0;
}
.gsearch-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-primary);
}
.gsearch-input::placeholder {
  color: var(--text-tertiary);
}
.gsearch-close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--icon-sm);
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.15s;
}
@media (hover: hover) and (any-pointer: fine) {
  .gsearch-close:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
  }
}

.gsearch-results {
  overflow-y: auto;
  padding: var(--space-2);
}
.gsearch-section-heading {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: var(--space-3) var(--space-3) var(--space-1);
}
.gsearch-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-half);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
}
.gsearch-result-title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
}
.gsearch-result-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.gsearch-result mark {
  background: none;
  color: var(--accent-navy);
  font-weight: 700;
}
.gsearch-result.is-active,
.gsearch-result:hover {
  background: var(--surface-subtle);
}
.gsearch-result.is-active .gsearch-result-title {
  color: var(--accent-navy);
}

.gsearch-empty {
  padding: var(--space-8) var(--space-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.gsearch-hint-row {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.gsearch-hint-row kbd {
  font-family: var(--font-mono);
  background: var(--surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 0.05rem var(--space-1);
  font-size: 0.7em;
  margin-right: var(--space-1);
}

@media (max-width: 700px) {
  .gsearch-hint-row span:first-child {
    display: none; /* no arrow keys on a touch keyboard */
  }
  .gsearch-overlay {
    padding-top: var(--space-8);
  }
}
