/*
 * explainer.css — HSC Educational Explainer page
 * Desai Lab · Case Western Reserve University
 */

/* ===== EXPLAINER LAYOUT ===== */

.explainer-intro {
  max-width: var(--max-w-text);
  margin-bottom: var(--sp-16);
}

.explainer-intro p {
  font-size: 1.15rem;
  line-height: 1.78;
}

/* Table of contents */
.explainer-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-6) var(--sp-8);
  margin-bottom: var(--sp-16);
  max-width: 480px;
}

.explainer-toc-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.explainer-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.explainer-toc li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}

.explainer-toc li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

.explainer-toc a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--ease);
}

.explainer-toc a:hover {
  color: var(--accent);
}


/* ===== EXPLAINER SECTIONS ===== */

.explainer-sections {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

.explainer-section {
  scroll-margin-top: calc(var(--nav-h) + var(--sp-8));
}

.explainer-section-head {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.explainer-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
  outline: 1px solid var(--border);
}

.explainer-section-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explainer-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.explainer-section-body {
  max-width: var(--max-w-text);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-left: calc(48px + var(--sp-5));
}

.explainer-section-body p {
  font-size: 1.05rem;
  line-height: 1.82;
}

/* Highlight callout */
.explainer-callout {
  background: var(--accent-dim);
  border-radius: var(--r);
  padding: var(--sp-5) var(--sp-6);
  margin-top: var(--sp-2);
}

.explainer-callout p {
  font-size: 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-style: italic;
}

/* Lab connection note at bottom */
.explainer-lab-note {
  background: var(--plum-dim);
  border-radius: var(--r);
  padding: var(--sp-8);
  margin-top: var(--sp-20);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-8);
}

.explainer-lab-note-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  outline: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.explainer-lab-note-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explainer-lab-note-text p {
  font-size: 0.98rem;
  line-height: 1.72;
}

.explainer-lab-note-text a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-glow);
  transition: color var(--ease), border-color var(--ease);
}

.explainer-lab-note-text a:hover {
  color: var(--accent-bright);
  border-color: var(--accent-bright);
}

@media (max-width: 640px) {
  .explainer-section-body {
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: var(--sp-6);
  }

  .explainer-lab-note {
    flex-direction: column;
    gap: var(--sp-4);
  }
}
