/* ═══════════════════════════════════════════
   CLINICAL AROMATHERAPY — Course UI
   ═══════════════════════════════════════════ */

:root {
  /* Botanical palette */
  --bg:          #f8f7f4;
  --bg-alt:     #f1ede6;
  --surface:    #ffffff;
  --surface-2:  #faf8f5;
  --ink:        #2a2a28;
  --ink-soft:   #5c5a55;
  --ink-faint:  #97948e;
  --accent:     #4a7c59;
  --accent-dark:#3a6347;
  --accent-light:#e8f0ec;
  --accent-glow:rgba(74,124,89,0.15);
  --warm:       #c9863d;
  --warm-light: #faf0e1;
  --rose:       #b85450;
  --rose-light: #f9eae9;
  --border:     #e5e1da;
  --border-strong:#d4cec3;
  --radius:     14px;
  --radius-sm:  8px;
  --sidebar-w:  290px;
  --shadow:     0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.08);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.course-network {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 42px;
  padding: 7px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.course-network > span {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-network > div {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.course-network a {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.course-network a:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.course-network a[aria-current="page"] {
  background: var(--accent);
  color: white;
}

#app { display: flex; min-height: 100vh; }

@media (max-width: 640px) {
  .course-network {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-inline: 12px;
    scrollbar-width: thin;
  }

  .course-network > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ═══ SIDEBAR ═══ */
#sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  color: var(--accent);
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}
.logo-mark svg { width: 100%; height: 100%; }

.sidebar-title h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.3;
}
.sidebar-title p {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#module-nav { padding: 16px 12px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.2s ease;
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-alt);
  color: var(--ink);
}
.nav-item.active {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item.completed .nav-num,
.nav-item.completed .nav-icon {
  background: var(--accent);
  color: white;
}
.nav-num, .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.nav-item.active .nav-num,
.nav-item.active .nav-icon {
  background: var(--accent);
  color: white;
}
.nav-text { flex: 1; }

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.progress-wrap { margin-bottom: 16px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.progress-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 3px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.ce-notice {
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.5;
}

/* ═══ MAIN ═══ */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
#sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink-soft);
  cursor: pointer;
}
#breadcrumb {
  font-size: 13px;
  color: var(--ink-faint);
  flex: 1;
  font-weight: 500;
}
.topbar-right { display: flex; gap: 8px; align-items: center; }
.topbar-link {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background 0.2s, border-color 0.2s;
}
.topbar-link:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  text-decoration: none;
}
.topbar-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}
.topbar-badge.accent {
  background: var(--accent-light);
  color: var(--accent-dark);
}

#content-area {
  flex: 1;
  padding: 0;
  overflow-x: hidden;
}

/* ═══ CONTENT STYLES ═══ */
.module-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 32px 120px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero sections */
.module-hero {
  margin: -48px -32px 40px;
  padding: 56px 32px 48px;
  background: linear-gradient(135deg, var(--accent-light), var(--bg-alt));
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.module-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.module-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.module-hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 650px;
}

.module-hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 600px;
  line-height: 1.6;
}

.module-stats {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.stat-chip span:first-child { color: var(--accent); font-size: 16px; }

/* Section headings */
.module-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  display: inline-block;
}

.module-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 32px 0 12px;
}

.module-content p {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 15.5px;
}

.module-content ul, .module-content ol {
  margin: 0 0 20px 4px;
  padding-left: 22px;
}
.module-content li {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 15.5px;
}
.module-content li::marker { color: var(--accent); }

.module-content strong { font-weight: 600; color: var(--ink); }
.module-content em { font-style: italic; color: var(--ink-soft); }

/* Callout boxes */
.callout {
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0;
  border-left: 4px solid;
  position: relative;
}
.callout-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout p { margin-bottom: 8px; font-size: 14.5px; }
.callout p:last-child { margin-bottom: 0; }

.callout.info { background: var(--accent-light); border-color: var(--accent); }
.callout.info .callout-title { color: var(--accent-dark); }

.callout.warn { background: var(--warm-light); border-color: var(--warm); }
.callout.warn .callout-title { color: #8a5a20; }

.callout.danger { background: var(--rose-light); border-color: var(--rose); }
.callout.danger .callout-title { color: #8a3a37; }

.callout.tip { background: #f0f4ff; border-color: #5b7cb8; }
.callout.tip .callout-title { color: #3d5a8e; }

/* Tables */
.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data-table th {
  background: var(--bg-alt);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-strong);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: top;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:nth-child(even) td { background: var(--surface-2); }

/* Monograph cards */
.monograph {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin: 24px 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.monograph::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--accent);
}
.monograph.warn-mono::before { background: var(--warm); }
.monograph.danger-mono::before { background: var(--rose); }

.mono-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.mono-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.mono-latin {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-faint);
  margin-top: 2px;
}
.mono-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mono-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent-dark);
}
.mono-tag.warm { background: var(--warm-light); color: #8a5a20; }
.mono-tag.danger { background: var(--rose-light); color: #8a3a37; }

.mono-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.mono-section h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.mono-section p, .mono-section li {
  font-size: 14px;
  line-height: 1.6;
}
.mono-section ul { padding-left: 18px; }

/* Quiz */
.quiz-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 32px 0;
  box-shadow: var(--shadow);
}
.quiz-section h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--ink);
  border: none;
  padding: 0;
  display: block;
}
.quiz-subtitle {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 24px;
}
.quiz-question {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.quiz-question:last-child { border-bottom: none; }
.quiz-question p.q-text {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--ink);
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.quiz-option:hover {
  background: var(--bg-alt);
  color: var(--ink);
}
.quiz-option.selected {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent);
  font-weight: 600;
}
.quiz-option.correct {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #66bb6a;
  font-weight: 600;
}
.quiz-option.incorrect {
  background: var(--rose-light);
  color: #c62828;
  border-color: #ef9a9a;
}
.quiz-option .option-letter {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.quiz-option.selected .option-letter,
.quiz-option.correct .option-letter {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.quiz-option.incorrect .option-letter {
  background: var(--rose);
  color: white;
  border-color: var(--rose);
}
.quiz-feedback {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: none;
}
.quiz-feedback.show { display: block; animation: fadeIn 0.3s ease; }
.quiz-feedback.correct {
  background: #e8f5e9;
  color: #2e7d32;
}
.quiz-feedback.incorrect {
  background: var(--rose-light);
  color: #c62828;
}

.quiz-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.quiz-submit:hover { background: var(--accent-dark); transform: translateY(-1px); }
.quiz-score {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: none;
}
.quiz-score.show { display: block; }
.quiz-score.pass { background: #e8f5e9; color: #2e7d32; }
.quiz-score.fail { background: var(--warm-light); color: #8a5a20; }

/* Module navigation buttons */
.module-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.mod-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.mod-btn:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent);
}
.mod-btn:disabled, .mod-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.mod-btn .label { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.mod-btn .title { font-size: 14px; }
.mod-btn.next .label, .mod-btn.next .title { text-align: right; }

/* Overview page */
.overview-hero {
  padding: 64px 32px 56px;
  background: linear-gradient(135deg, #3a6347, #4a7c59, #5b9468);
  color: white;
  margin: -48px -32px 40px;
  position: relative;
  overflow: hidden;
}
.overview-hero::before {
  content: '';
  position: absolute;
  right: -100px; bottom: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
}
.overview-hero h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 18px;
  max-width: 600px;
}
.overview-hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 550px;
  line-height: 1.6;
  margin-bottom: 0;
}
.overview-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 16px;
}

.obj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.obj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.obj-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.obj-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}
.obj-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.obj-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.skill-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.skill-pill:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent);
}

.module-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.module-card .mc-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.module-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.module-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.module-card .mc-stats {
  margin-top: 12px;
  font-size: 11px;
  color: var(--ink-faint);
  display: flex;
  gap: 10px;
}

/* Oil index grid */
.oil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.oil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.oil-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.oil-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.oil-card h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.oil-card p { font-size: 12px; color: var(--ink-faint); margin: 0; font-style: italic; }

/* Reference list */
.ref-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.ref-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.ref-list li:last-child { border-bottom: none; }
.ref-list .ref-author { font-weight: 600; color: var(--ink); }
.ref-list .ref-title { font-style: italic; }
.ref-list .ref-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}
.ref-list .ref-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .obj-grid, .module-cards { grid-template-columns: 1fr; }
  .oil-grid { grid-template-columns: 1fr 1fr; }
  .mono-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #sidebar {
    position: fixed;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  #sidebar.open { transform: translateX(0); }
  #sidebar-toggle { display: block; }
  .module-content { padding: 32px 20px 80px; }
  .module-hero, .overview-hero { margin: -32px -20px 32px; padding: 40px 20px; }
  .overview-hero h1 { font-size: 30px; }
  .module-hero h1 { font-size: 26px; }
  .oil-grid { grid-template-columns: 1fr; }
  .module-stats { gap: 10px; }
}

/* Evidence-first clinical reference panels */
.evidence-primer {
  margin: 0 0 30px;
  padding: 22px 24px;
  border: 1px solid #cfdce6;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #f1f6f9, #fafbf9);
  box-shadow: var(--shadow);
}
.evidence-primer-title {
  color: #315a79;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 17px;
  margin-bottom: 8px;
}
.evidence-primer p { margin: 0; color: #3f4f5b; font-size: 14.5px; }

/* Evidence-first clinical reference panels */
.evidence-panel,
.clinical-bottom-line,
.limitations-panel {
  grid-column: span 2;
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 2px;
}
.evidence-panel {
  background: #edf4ef;
  border: 1px solid #c7ddcd;
}
.evidence-limited-mixed-human { background: #f7f1e8; border-color: #e5d2aa; }
.evidence-traditional-historical { background: #f1f1ee; border-color: #dad8d0; }
.evidence-label,
.clinical-bottom-line-title,
.limitations-title {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 6px;
}
.evidence-label { color: var(--accent-dark); }
.evidence-panel p,
.clinical-bottom-line p,
.limitations-panel p { margin: 0; font-size: 14px; }
.route-evidence-list { display: grid; gap: 10px; }
.route-evidence-item {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 14px;
}
.route-evidence-item p { margin: 6px 0 0; font-size: 13px; }
.route-badge {
  display: inline-flex;
  align-items: center;
  background: #e8edf3;
  color: #36516a;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25px;
}
.clinical-bottom-line {
  background: #e9f3ee;
  border-left: 4px solid var(--accent);
}
.clinical-bottom-line-title { color: var(--accent-dark); }
.limitations-panel {
  background: #fbf5e8;
  border-left: 4px solid var(--warm);
}
.limitations-title { color: #8a5a20; }
.limitations-panel ul { margin: 0; padding-left: 20px; }
.limitations-panel li { font-size: 13px; margin-bottom: 4px; }

/* Research-frontier caution */
.research-frontier-notice {
  margin: 0 0 30px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: #f1eef8;
  border: 1px solid #d5cce8;
  border-left: 4px solid #725b9e;
}
.research-frontier-title {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #58427f;
  margin-bottom: 7px;
}
.research-frontier-notice p { margin: 0; font-size: 14px; color: #4c445d; }

/* Quick editorial polish — clearer hierarchy, comfortable reading measure, refined focus states */
.module-content {
  max-width: 980px;
}
.module-content > section,
.module-content .section {
  scroll-margin-top: 28px;
}
.module-content h2 {
  letter-spacing: -0.025em;
  margin-top: 2.25em;
  padding-top: 0.85em;
  border-top: 1px solid var(--border);
}
.module-content h2:first-child { border-top: 0; padding-top: 0; }
.module-content p,
.module-content li {
  max-width: 76ch;
}
.module-content p + p { margin-top: 1.05em; }
.module-content ul,
.module-content ol { max-width: 78ch; }
.module-content table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(31, 43, 36, 0.04);
}
.module-content th {
  background: #edf3ee;
  color: #31583e;
  font-size: 12px;
  letter-spacing: 0.025em;
}
.module-content td { vertical-align: top; }
.callout,
.evidence-primer,
.research-frontier-notice,
.evidence-panel,
.clinical-bottom-line,
.limitations-panel {
  box-shadow: 0 5px 18px rgba(35, 48, 40, 0.045);
}
.mono-card {
  border-color: #deded8;
  box-shadow: 0 2px 10px rgba(35, 48, 40, 0.035);
}
.mono-card:hover {
  border-color: #b9cdbc;
  box-shadow: 0 10px 26px rgba(35, 48, 40, 0.075);
}
.mono-section h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #42634c;
}
.route-evidence-item {
  border-left: 3px solid #a9c5af;
}
.module-content a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.module-content a:hover { text-decoration-thickness: 2px; }
.nav-item:focus-visible,
.module-card:focus-visible,
.quiz-option:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(74, 124, 89, 0.33);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .module-content p,
  .module-content li { max-width: none; }
  .module-content h2 { margin-top: 1.8em; }
}

/* Inline citation links */
.module-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.module-content a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.module-content sup {
  font-size: 0.75em;
  vertical-align: super;
  color: var(--ink-faint);
}

/* Old Meets New special styling */
.module-hero.old-meets-new {
  background: linear-gradient(135deg, #2d3561, #4a5490, #6b5b95);
  color: white;
}
.module-hero.old-meets-new::after {
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
}
.module-hero.old-meets-new h1 { color: white; }
.module-hero.old-meets-new p.lead { color: rgba(255,255,255,0.85); }
.module-hero.old-meets-new .module-kicker { color: #c0cae0; }

/* Scrollbar */
#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* Public collection mobile release fix: wrap topbar items inside the viewport. */
.module-content .overview-hero p { color: rgba(255, 255, 255, 0.94); }
@media (max-width: 640px) {
  #topbar { flex-wrap: wrap; padding: 12px 20px; gap: 12px; }
  #breadcrumb { min-width: 0; }
  .topbar-right { width: 100%; min-width: 0; flex-wrap: wrap; }
}
