/* ============================================================
   base.css  —  Reset, Base Styles, Layout & Components
   Paediatric Medical Education Notes
   ============================================================ */

/* ============================================================
   BASE
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@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);
  }
}

/* Home-page banner variants */
@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);
  }
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  color: var(--primary);
  padding: 1rem 3rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;

  background-color: var(--primary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

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: rgba(113, 124, 128, 0.15);
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}

.header-logo-img {
  height: 84px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.header-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  letter-spacing: var(--ls-tighter);
  margin-bottom: 0.25rem;
  position: relative;
  color: var(--text-on-dark-soft);
}
header h1 span {
  color: var(--text-on-dark-soft);
}

header p {
  color: var(--muted);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  position: relative;
  padding-left: 1rem;
  font-weight: 400;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 95%;
  max-width: 1000px;
  min-width: 240px;
  margin: 0 auto;
  padding: var(--space-2) 2rem var(--space-8);
  flex: 1;
  box-sizing: border-box;
}

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  margin-top: var(--space-10);
}
.section-label .num {
  background: var(--primary);
  color: var(--background);
  font-size: var(--fs-xs);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  letter-spacing: var(--ls-widest);
  white-space: nowrap;
}
.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);
}

/* ============================================================
   LEARNING OUTCOMES CARD
   ============================================================ */
.lo-card {
  background: var(--paper);
  color: var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5) var(--space-4);
  margin-bottom: var(--space-4);
  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(108, 116, 132, 0.06);
  pointer-events: none;
  line-height: 1;
  content: "LOs";
}

.lo-label {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: 0.5rem;
}

.lo-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  margin-bottom: 1.25rem;
  line-height: 1.3;
  color: var(--primary);
}

.lo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lo-list li {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--primary);
  position: relative;
  padding-left: 1.25rem;
}

.lo-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* ============================================================
   LEARNING TIME BOX
   ============================================================ */

.learning-time {
  background: transparent;
  color: var(--accent-navy);
  border-radius: 0;
  padding: 0.5rem 0;
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
  position: relative;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Remove any existing conflicting ::before styles */
.learning-time h3 {
  font-size: var(--fs-sm);
  color: var(--primary);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin: 0;
  position: relative;
  z-index: 1;
}

.learning-time i {
  position: relative;
  z-index: 1;
}

/* ============================================================
   REMINDER BOX
   ============================================================ */
.reminder-box {
  background: var(--paper);
  color: var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5) var(--space-4);
  margin-bottom: var(--space-6);
  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(108, 116, 132, 0.06);
  pointer-events: none;
  line-height: 1;
}
.reminder-label {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: 0.5rem;
}
.reminder-box h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  margin-bottom: 1.25rem;
  line-height: 1.25;
  color: var(--primary);
}
.reminder-box h2 em {
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--accent-navy);
}

.reminder-box h2 strong {
  color: var(--primary);
}

.reminder-pills {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.reminder-pill {
  background: rgba(255, 255, 255, 0.55);
  border-left: 1px solid var(--border);
  padding: 1rem 1.4rem;
  font-size: var(--fs-sm);
  line-height: 1.7;
  flex: 1;
  min-width: 180px;
  color: var(--primary);
}
.reminder-pill strong {
  display: block;
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

/* ─────────────────────────────────────────
         DEFINITION BLOCK
      ───────────────────────────────────────── */

.definition-block .def-head {
  background: var(--background);
  color: var(--paper);
  padding: 1.4rem 1.8rem;
  position: relative;
  overflow: hidden;
}

.def-head .def-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
  font-weight: 400;
}
.def-head blockquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-base);
  font-style: italic;
  line-height: 1.6;
  color: var(--primary);
  max-width: 680px;
}

.def-head small {
  display: block;
  margin-top: 0.8rem;
  font-size: var(--fs-base);
  color: var(--primary);
}

.def-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.dc-col {
  padding: 1.4rem 1.6rem;
}

.dc-col .dcc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border);
  display: block;
}
.dc-col:first-child .dcc-label {
  color: var(--primary);
}
.dc-col:last-child .dcc-label {
  color: var(--muted);
}
.dc-col .dcc-word {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-xl);
  margin-bottom: 0.5rem;
  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: 1rem;
  padding-bottom: 0.8rem;
  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: 0.45rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  line-height: 1.4;
  color: var(--primary);
}
.dc-traits li:last-child {
  border-bottom: none;
}
.dc-col:first-child .dc-traits li::before {
  content: "✘";
  color: var(--primary);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}
.dc-col:last-child .dc-traits li::before {
  content: "✔";
  color: var(--primary);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}
.def-foot {
  background: var(--background);
  box-shadow: none;
  padding: 0.9rem 1.8rem;
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  font-style: italic;
}
.def-foot strong {
  color: var(--primary);
  font-style: normal;
}

/* ============================================================
   CENTREPIECE  (light analogy block)
   ============================================================ */
.centrepiece {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-heavy);
}
.centrepiece::before {
  content: "←";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: var(--fs-watermark-lg);
  font-weight: 600;
  color: rgba(232, 200, 154, 0.03);
  pointer-events: none;
  line-height: 1;
}
.centrepiece .cp-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.centrepiece blockquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.55;
  color: var(--primary);
  max-width: 640px;
  margin: 0 auto 1rem;
}
.centrepiece blockquote em {
  color: var(--primary);
}
.centrepiece p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.7;
}

/* ============================================================
   CARD-BLOCK  — cream header + white body
   Universal container replacing: analogy-block, instinct-block,
   three-q-block, worked-block, checklist-block, blame-resp-block
   ============================================================ */
.card-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}
.card-block-head {
  background: var(--master);
  padding: 1.2rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  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: 0.3rem;
  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(--paper);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.card-block-body {
  background: var(--paper);
  padding: 1.5rem 1.8rem;
}
.card-block-note {
  background: var(--background);
  padding: 0.9rem 1.8rem;
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
}
.card-block-note strong {
  color: var(--primary);
}

/* ============================================================
   DARK-CARD  — full dark card with watermark glyph
   Replaces: bridge-rule, reflection-rule, warehouse-block, smoke-block
   ============================================================ */
.dark-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-heavy);
  color: var(--primary);
}
/* Set glyph per use: .dark-card::before { content: "→"; } */
.dark-card::before {
  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;
}
.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: 0.8rem;
}
.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 1.5rem;
}
.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: 1.2rem;
  line-height: 1.3;
  color: var(--primary);
}
.dark-card p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.7;
}

/* ============================================================
   BASE CALLOUT
   ============================================================ */
.callout-left {
  --accent: var(--border);

  background: var(--background);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: var(--space-4) 0;
  background: var(--paper);
  box-shadow: none;
}

/* Label */
.callout-left .cl-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

/* Heading */
.callout-left h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: 0.8rem;
}

/* Body */
.callout-left p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.callout-left p strong {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   VARIANTS (COLOR ONLY)
   ============================================================ */

/* Neutral (default subtle tone) */
.callout-left--neutral {
  background: var(--background);
  --accent: var(--muted);
}

/* Warning */
.callout-left--warning {
  background: var(--background);
  --accent: var(--accent-terracotta);
}

/* Strong (high emphasis) */
.callout-left--strong {
  --accent: var(--accent-crimson);
  background: var(--background);
  color: var(--primary);
}

/* Strong typography adjustments */
.callout-left--strong .cl-label {
  background: var(--background);
  color: var(--primary);
  font-size: var(--fs-sm);
}

.callout-left--strong h3,
.callout-left--strong p,
.callout-left--strong p strong {
  color: var(--primary);
}

/* ============================================
   BEYOND BASICS CALLOUT
   ============================================ */
.callout-left--beyond {
  background: var(--background);
  border-left-color: var(--accent-navy);
  margin-bottom: 2rem;
  padding: 1.5rem;
}

.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: 0.5rem;
  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: 0.8rem;
}

.callout-left--beyond .description-text {
  font-size: var(--fs-base);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.callout-left--beyond .callout-left__errors-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual error item */
.callout-left--beyond .callout-left__error-item {
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--bs-medium);
}

.callout-left--beyond .callout-left__error-item strong {
  display: block;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: var(--fs-sm);
  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;
}

/* ============================================
   ADVANCED AWARENESS CALLOUT
   ============================================ */
.callout-left--awareness {
  background: var(--background);
  border-left-color: var(--accent-forest);
  margin-bottom: 2rem;
  padding: 1.5rem;
}

.callout-left--awareness .cl-label {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.callout-left--awareness .section-label {
  margin-bottom: 0.75rem;
}

.callout-left--awareness .section-label .num {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xl);
  margin-bottom: 0.5rem;
}

.callout-left--awareness .section-label h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--primary);
  margin: 0.5rem 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: 0.5rem;
}

.callout-left--awareness h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.callout-left--awareness .description-text {
  font-size: var(--fs-base);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

/* VERTICAL STACK: bridge steps */
.callout-left--awareness .callout-left__bridge-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Individual bridge step */
.callout-left--awareness .callout-left__bridge-step {
  background: var(--paper);
  padding: 1.25rem 1.5rem;

  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: 0.5rem;
}

.callout-left--awareness .callout-left__bridge-step h4 {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
}

.callout-left--awareness .callout-left__bridge-step p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  margin: 0;
}

/* Footer note */
.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: 1.25rem;
  margin-top: 1.25rem;
}

.callout-left--awareness .footer-note strong {
  color: var(--primary);
}

/* ============================================================
   STEP-GRID  — numbered step boxes (3- or 4-col)
   Replaces: three-questions (.q-box), steps (.step-box),
             summary-question inner divs
   Usage: add class .step-grid--3 or .step-grid--4 (default 4)
   ============================================================ */
.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.step-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.step-box {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  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-xl);
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}
.step-box .sb-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.step-box .sb-desc {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
}
.step-box .sb-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--bs-medium);
}

/* ============================================================
   MAPPING-SPLIT  — left column → arrow → right column
   Replaces: warehouse-mappings, sequence-block, tier-flow (3-col)
   ============================================================ */
.mapping-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.ms-col {
  padding: 1.2rem 1.4rem;
}
.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: 0.6rem;
}
.ms-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.8rem;
  flex-direction: column;
  gap: 0.3rem;
}
.ms-divider .msd-arrow {
  font-size: var(--fs-lg);
  color: var(--primary);
}
.ms-divider .msd-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  text-align: center;
  line-height: 1.3;
}
.ms-items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ms-item {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.45;
  padding: 0.3rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

/* ─────────────────────────────────────────
         TWO FAILURE MODES (in some cases)
      ───────────────────────────────────────── */
.failure-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.failure-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.failure-card-head {
  padding: 1rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.failure-card.silent .failure-card-head {
  background: var(--background);
}
.failure-card.reactive .failure-card-head {
  background: var(--background);
}
.failure-card-head .fch-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: 0.15rem;
}
.failure-card.silent .fch-content h4 {
  color: var(--primary);
}
.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: 0.15rem 0.5rem;
  border-radius: var(--radius-md);
  margin-left: auto;
  flex-shrink: 0;
}
.failure-card.silent .fc-tag {
  background: var(--background);
  color: var(--background);
}
.failure-card.reactive .fc-tag {
  background: var(--primary);
  color: var(--background);
}
.failure-card-body {
  background: var(--paper);
  padding: 1.1rem 1.4rem;
}
.fc-examples {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fc-examples li {
  font-size: var(--fs-sm);
  padding: 0.45rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  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 {
  background: var(--background);
  padding: 0.7rem 1.2rem;
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.5;
}
.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(--background);
  background: var(--background);
}
.failure-card-foot strong {
  color: var(--primary);
}

/* ============================================================
   COMP-PAIR  — working / failed side-by-side cards
   Replaces: comparison-grid + comp-card, culture-block + culture-card,
   ============================================================ */
.comp-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.comp-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.comp-card-head {
  padding: 1rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
/* Colour variants */
.comp-card--green .comp-card-head {
  background: var(--background);
}
.comp-card--red .comp-card-head {
  background: var(--background);
}
.comp-card--cream .comp-card-head {
  background: var(--background);
}
.comp-card--blue .comp-card-head {
  background: var(--surface-subtle);
}

.comp-card-head .cc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.comp-card--green .cc-dot {
  background: var(--primary);
}
.comp-card--red .cc-dot {
  background: var(--background);
}

.comp-card-head .cch-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: 0.15rem;
}
.comp-card--red .cch-content h4 {
  color: var(--primary);
}
.comp-card--green .cch-content h4 {
  color: var(--primary);
}

.comp-card-head .cch-content p {
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.4;
}
.cc-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-md);
  margin-left: auto;
  flex-shrink: 0;
}
.comp-card--red .cc-tag {
  background: var(--background);
  color: var(--background);
}
.comp-card--green .cc-tag {
  background: var(--primary);
  color: var(--background);
}

.comp-card-body {
  background: var(--paper);
  padding: 1.1rem 1.4rem;
}
.comp-card-foot {
  padding: 0.7rem 1.2rem;
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.5;
}
.comp-card--red .comp-card-foot {
  background: var(--background);
}
.comp-card--green .comp-card-foot {
  background: var(--background);
}
.comp-card--cream .comp-card-foot {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme-5-start) 60%, white),
    color-mix(in srgb, var(--theme-5-end) 60%, white)
  );
}
.comp-card-foot strong {
  color: var(--primary);
}

/* Items inside comp-card */
.cc-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cc-items li {
  font-size: var(--fs-sm);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  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;
}
/* Checkmark variant */
.cc-items--check li::before {
  content: "✔";
  color: var(--primary);
}
.cc-items--cross li::before {
  content: "✘";
  color: var(--primary);
}

/* ============================================================
   SUMMARY-PANEL
   ============================================================ */
.summary-panel {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme-5-start) 50%, white),
    color-mix(in srgb, var(--theme-5-end) 50%, white)
  );
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin-top: 3rem;
}
.summary-panel h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.summary-panel > p {
  font-size: var(--fs-sm);
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.summary-col {
  background: var(--paper);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}
.summary-col h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  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: 0.4rem;
}
.summary-col li {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
  padding-left: 0.8rem;
  position: relative;
}
.summary-col li::before {
  content: "—";
  position: absolute;
  left: 0;
  opacity: 0.4;
}

/* ============================================================
   ACCORDION
   ============================================================ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.acc-item {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.acc-item:hover {
  box-shadow: var(--bs-heavy);
}
.acc-item.open {
  box-shadow: var(--bs-heavy);
}

.acc-trigger {
  width: 100%;
  background: var(--master);
  border: none;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  text-align: left;
  transition: background 0.2s;
}

.acc-badge {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.badge-raw {
  color: var(--muted);
}
.badge-factory {
  color: var(--muted);
}
.badge-loss {
  color: var(--muted);
}

.acc-title {
  flex: 1;
  font-weight: 500;
}

.acc-body {
  display: none;
  padding: 1.4rem;
  background: var(--paper);
  animation: slideDown 0.25s ease;
}
.acc-item.open .acc-body {
  display: block;
}

/* ============================================================
   CONDITION LIST  (inside accordion body)
   ============================================================ */
.condition-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.condition-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: var(--fs-sm);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
  color: var(--primary);
}
.condition-item:last-child {
  border-bottom: none;
}

.condition-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.dot-raw {
  background: var(--primary);
}
.dot-factory {
  background: var(--background);
}
.dot-loss {
  background: var(--primary);
}

/* ─────────────────────────────────────────
         CORE PRINCIPLE — DESCRIPTION vs SUMMARY

         TWO SIDE-BY SIDE PANELS WITH DIVIDER AND ARROW
      ───────────────────────────────────────── */
.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: 3rem;
}
.cc-side {
  padding: 2rem 2rem;
}
.cc-side .ccs-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}
.cc-side.description .ccs-label {
  color: var(--muted);
}
.cc-side.summary .ccs-label {
  color: var(--primary);
}
.cc-side.description {
  background: var(--background);
}
.cc-side.summary {
  background: var(--background);
}

.cc-side h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: 0.5rem;
}
.cc-side.description h3 {
  color: var(--primary);
}
.cc-side.summary h3 {
  color: var(--primary);
}
.cc-side p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
}
.cc-side.summary p {
  color: var(--primary);
}
.cc-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 1.5rem 0.8rem;
  gap: 0.4rem;
  background: var(--background);
}
.cc-divider .cd-arrow {
  font-size: var(--fs-xl);
  color: var(--primary);
}
.cc-divider .cd-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  text-align: center;
  line-height: 1.4;
}

/* ============================================================
   COMPARE TABLE
   ============================================================ */
.compare-table-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}
.ctb-head {
  background: var(--master);
  padding: 1.2rem 1.8rem;
}
.ctb-head .ch-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.ctb-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  margin: 0;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table thead tr {
  background: var(--primary);
}
.compare-table thead th {
  font-family: var(--font-body);
  padding: 0.8rem 1.2rem;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 600;
  text-align: left;
  color: var(--background);
}

.compare-table tbody tr:hover {
  background: var(--background);
}
.compare-table td {
  padding: 0.9rem 1.2rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light);
}
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
.compare-table td:first-child {
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
}
.compare-table td:nth-child(2) {
  color: var(--primary);
  font-style: italic;
}
.compare-table td:nth-child(3) {
  color: var(--primary);
  font-weight: 500;
}
.compare-table td:nth-child(4) {
  color: var(--primary);
}
.compare-table-note {
  background: var(--background);
  padding: 0.85rem 1.4rem;
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
}
.compare-table-note strong {
  color: var(--primary);
}

/* ============================================================
   ERRORS BLOCK
   COMMON STUDENT ERRORS
   ============================================================ */
.errors-block {
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-6);
  box-shadow: var(--bs-medium);
  background: var(--background);
  margin-bottom: var(--space-4);
}

.errors-block .eb-label {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--accent-crimson);
  font-weight: 500;
  padding-left: 0;
}

.errors-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: 1.5rem;
  color: var(--primary);
  padding-left: 0;
}

.errors-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.error-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--accent-crimson);
  background: var(--background);
  box-shadow: none;
  color: var(--primary);
  font-weight: 400;
  letter-spacing: var(--ls-normal);
  transition: background 0.2s ease;
}

.error-item:hover {
  background: color-mix(in srgb, var(--master) 60%, var(--background));
}

.error-item .ei-note {
  display: block;
  width: 100%;
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: var(--ls-normal);
  text-transform: none;
  margin-top: 0.25rem;
}

/* ─────────────────────────────────────────
         FINAL RULE — BASE
      ───────────────────────────────────────── */
.final-rule {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin-bottom: 3rem;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}

/* Left text column */
.fnl-text {
  flex: 1;
  min-width: 200px;
}

.fnl-text .fnl-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.fnl-text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

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

.fnl-text p strong {
  color: var(--primary);
  font-weight: 600;
}

/* ─────────────────────────────────────────
         FINAL RULE — DEFEND VARIANT
      ───────────────────────────────────────── */
.final-rule.defend {
  display: block;
  padding: 2.2rem 2.5rem;
}

.final-rule.defend .fnl-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.final-rule.defend h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* Defend grid */
.fnl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.fnl-card {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.fnl-card .fn-term {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 400;
  font-style: italic;
  color: var(--primary);
  display: block;
  margin-bottom: 0.4rem;
}

.fnl-card .fn-standard {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.3rem;
}

.fnl-card p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.55;
}

/* Defend rule footer */
.fn-rule {
  padding-top: 1rem;
  border-top: 1px solid rgba(232, 200, 154, 0.15);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.7;
}

.fn-rule strong {
  color: var(--primary);
  font-weight: 600;
}
/* ============================================================
   FINAL MESSAGE  (take-home)
   ============================================================ */
.final-message {
  margin-top: var(--space-6);
  text-align: center;
  padding: var(--space-4) var(--space-4);
  background: var(--master);
  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-base);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: var(--space-1);
}
.final-message blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--primary);
  max-width: 640px;
  margin: 0 auto var(--space-2);
  letter-spacing: var(--ls-tight);
}
.final-message p {
  color: var(--text-primary);
  font-size: var(--fs-xs);
  line-height: 1.8;
  margin-bottom: var(--space-2);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.fm-pills {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fm-pill {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.1rem;
  font-size: var(--fs-xs);
  color: var(--paper);
  background: var(--primary);
  letter-spacing: var(--ls-wider);
}

/* ============================================================
   CROSS-REFERENCE CALLOUT
   ============================================================ */
.xref-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 3rem;
}
.xref-item {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;

  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.xref-item:hover {
  background: var(--master);
  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: 0.3rem;
  line-height: 1.3;
}
.xref-item p {
  font-size: var(--fs-xs);
  color: var(--primary);
  line-height: 1.5;
}

/* ============================================================
   REFLECTIVE ESSAY
   ============================================================ */
.reflective-essay-block {
  background: var(--background);
  border-radius: var(--radius-xl);
  padding: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--bs-medium);
}

.essay-prompt {
  margin-bottom: 1rem;
}

.prompt-text {
  font-size: var(--fs-base);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: var(--primary);
}

.disease-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.disease-tag {
  background: var(--paper);
  padding: 0.4rem 1rem;
  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(--primary);
  color: var(--paper);
  border-color: var(--primary);
}

.disease-tag.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.selected-disease-display {
  font-size: var(--fs-sm);
  margin-bottom: 1rem;
  padding: 0.3rem 0;
  color: var(--primary);
}

#selectedDiseaseName {
  font-weight: 600;
  color: var(--primary);
}

textarea {
  width: 100%;
  padding: 1rem;
  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: 1.2rem;
  background: var(--paper);
}

.essay-submit-btn,
.essay-reset-btn {
  font-family: var(--font-body);
  background: var(--blue);
  color: var(--paper);
  border: none;
  padding: 0.65rem 1.5rem;
  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-submit-btn:hover,
.essay-reset-btn:hover {
  background: var(--blue);
  color: var(--paper);
  transform: translateY(-1px);
}

.essay-submit-btn:active,
.essay-reset-btn:active {
  transform: translateY(0);
  background: var(--blue);
  color: var(--paper);
}

.essay-feedback {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.feedback-icon {
  font-size: 1.6rem;
}

.feedback-header h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  margin: 0;
}

.feedback-content {
  background: var(--paper);
  padding: 1.4rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--primary);
  margin-bottom: 1.2rem;
}

.feedback-content p {
  margin-bottom: 0.8rem;
}

.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);
}

/* Optional: Add hover effect for enabled state */
#revealFeedbackBtn:not(:disabled):hover {
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--master);
  text-align: center;
  padding: 1.5rem 3rem 1rem;
  width: 100%;
  margin-top: auto;
  position: relative;
  border-top: 1px solid rgba(232, 200, 154, 0.2);
}
footer p {
  color: var(--text-primary);
  font-size: var(--fs-xs);
  text-align: center;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* ============================================================
   FLOATING HOME BUTTON
   ============================================================ */
.home-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: var(--blue);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--bs-thin);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}
.home-btn::before {
  content: "←";
  color: var(--background);
  font-size: var(--fs-sm);
}
.home-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--bs-medium);
}
.home-btn:active {
  transform: translateY(0);
}

/* Responsive rules live in responsive-sm.css (≤700px) and responsive-xs.css (≤480px) */

/* ═══════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════ */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: var(--radius-pill);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--primary);
  transform: scale(1.08);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}
