/* Course reading layout. Figures and tracing canvases keep their own widths. */
body.has-fundamentals-reader .page-eeg_lead_simulator {
  --lesson-measure: 44rem;
}
body .page-eeg_lead_simulator .section-header {
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem);
  line-height: 1.22;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-align: left;
}
body .page-eeg_lead_simulator .fundamentals-section > .section-badge {
  position: static;
  display: inline-block;
  margin: 0 0 1rem;
  text-transform: none;
  letter-spacing: .015em;
  font-size: .8rem;
}
body.has-fundamentals-reader .page-eeg_lead_simulator :is(
  .fundamentals-section > p, .fundamentals-section > ul, .fundamentals-section > ol,
  .fundamentals-text > p, .fundamentals-text > ul, .fundamentals-text > ol,
  .fundamentals-card > p, .lesson-lead, .var-panel > p, .lesson-features,
  .aq-primer, .aq-ask, .aq-explain > p, .clinical-reading > p,
  .teaching-card > p, .lead-lab-header p, .lab-step-panel > p
) {
  box-sizing: border-box;
  max-width: var(--lesson-measure);
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}
body .page-eeg_lead_simulator :is(.fundamentals-section, .lead-lab) :is(p, li, dd) {
  overflow-wrap: break-word;
}
body .page-eeg_lead_simulator :is(.fundamentals-section > p, .fundamentals-text > p, .var-panel > p) {
  margin-top: 0;
  margin-bottom: 1rem;
}
body .page-eeg_lead_simulator .fundamentals-layout { align-items: flex-start; }
body .page-eeg_lead_simulator :is(.fundamentals-section, .fundamentals-text, .var-panel, .teaching-card, .clinical-reading) > h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-align: left;
  margin: 1.6rem 0 .65rem;
  max-width: 48ch;
  text-wrap: balance;
}
body .page-eeg_lead_simulator :is(.fundamentals-text, .var-panel, .teaching-card, .clinical-reading) > h3:first-child {
  margin-top: 0;
}
body .page-eeg_lead_simulator .fundamentals-section > h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 1.4rem 0 .6rem;
}
body .page-eeg_lead_simulator .lesson-features {
  padding-left: 1.3rem;
  margin-top: .4rem;
  margin-bottom: 1.2rem;
}
body .page-eeg_lead_simulator .lesson-features li { margin-bottom: .6rem; }
body .page-eeg_lead_simulator :is(.important-note, .golden-rule, .pro-tip) p {
  line-height: 1.65;
  max-width: 72ch;
  text-align: left;
}
body .page-eeg_lead_simulator :is(.important-note, .golden-rule, .pro-tip) > i { flex-shrink: 0; }
body .page-eeg_lead_simulator .teaching-options {
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--lesson-measure);
  gap: .5rem;
}
body .page-eeg_lead_simulator .teaching-options button { text-align: left; line-height: 1.5; }
body .page-eeg_lead_simulator :is(.teaching-assumption, .teaching-readout) { font-size: .9375rem; }
body .page-eeg_lead_simulator .eeg-report-sheet { width: 100%; max-width: 88ch; margin-inline: auto; box-sizing: border-box; }
body .page-eeg_lead_simulator .eeg-report-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2.6fr);
  gap: .5rem 1.25rem;
  padding: .85rem 0;
}
body .page-eeg_lead_simulator .eeg-report-row dt {
  font-size: .9375rem;
  line-height: 1.5;
  letter-spacing: 0;
  font-weight: 700;
}
body .page-eeg_lead_simulator .eeg-report-row dd { margin: 0; font-size: 1rem; line-height: 1.6; }
body .page-eeg_lead_simulator .eeg-report-phrases { box-sizing: border-box; margin-inline: auto; padding: 1rem 1.1rem; }
body .page-eeg_lead_simulator .eeg-report-phrases summary { cursor: pointer; font-weight: 650; line-height: 1.5; }
body .page-eeg_lead_simulator .eeg-report-phrases[open] summary { margin-bottom: 1rem; }
body .page-eeg_lead_simulator .eeg-report-phrases h3 { font-size: 1.05rem; margin-top: 1.5rem; }
body .page-eeg_lead_simulator .report-phrase-table { table-layout: fixed; width: 100%; }
body .page-eeg_lead_simulator .report-phrase-table :is(th,td) { font-size: .9375rem; line-height: 1.5; padding: .7rem; overflow-wrap: anywhere; }
body .page-eeg_lead_simulator .report-phrase-table code { white-space: normal; overflow-wrap: anywhere; }
body .page-eeg_lead_simulator .report-phrase-table .copy-button { margin: .4rem 0 0; min-height: 40px; }
body .page-eeg_lead_simulator .eeg-report-phrases summary:focus-visible { outline: 3px solid #c57917; outline-offset: 5px; }
body.dark .page-eeg_lead_simulator .var-panel > h3 { color: #8bc6f5; }
@media (max-width: 600px) {
  body .page-eeg_lead_simulator .fundamentals-section > .section-badge { margin-bottom: .85rem; }
  body .page-eeg_lead_simulator .eeg-report-row { grid-template-columns: 1fr; gap: .25rem; }
  body .page-eeg_lead_simulator .eeg-report-sheet { padding: .8rem; }
  body .page-eeg_lead_simulator .eeg-report-phrases { padding: .8rem; }
  body .page-eeg_lead_simulator .report-phrase-table :is(th,td) { padding: .5rem .35rem; font-size: .875rem; }
}
body.has-fundamentals-reader .page-eeg_lead_simulator .course-syllabus-lead {
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center;
  text-align: center;
}
body .page-eeg_lead_simulator .course-syllabus {
  max-width: var(--lesson-measure);
  margin-left: auto !important;
  margin-right: auto !important;
}
body .page-eeg_lead_simulator .var-caption { font-size: .875rem; line-height: 1.55; }
body .page-eeg_lead_simulator .var-meta li { font-size: .875rem; line-height: 1.45; padding: .4rem .6rem; }
body .page-eeg_lead_simulator .var-meta li span { font-size: .75rem; text-transform: none; letter-spacing: 0; }
body .page-eeg_lead_simulator .var-panel .var-tell { font-size: .9375rem !important; line-height: 1.65; margin-bottom: .8rem !important; }
body .page-eeg_lead_simulator :is(.eeg-report-checklist, .eeg-report-phrases > p) { font-size: .9375rem; line-height: 1.65; }
body .page-eeg_lead_simulator .eeg-report-phrases summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; }
body .page-eeg_lead_simulator .eeg-report-phrases summary::-webkit-details-marker { display: none; }
body .page-eeg_lead_simulator .eeg-report-phrases summary::after { content: "+"; font-size: 1.3rem; font-weight: 500; }
body .page-eeg_lead_simulator .eeg-report-phrases[open] summary::after { content: "−"; }
body .page-eeg_lead_simulator .course-syllabus a { font-size: .9375rem; line-height: 1.5; padding: .55rem .65rem; }

/* Balance the reading column within wide lessons, with shared heading edges. */
body.has-fundamentals-reader .page-eeg_lead_simulator :is(
  .fundamentals-section > h3, .fundamentals-section > h4,
  .fundamentals-text > h3, .fundamentals-text > h4,
  .fr-divider
) {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--lesson-measure);
  margin-left: auto;
  margin-right: auto;
}

/* Figure-led lessons stack image then prose. Without this, tables and notes
   span the full section while paragraphs sit in the centered measure, so
   pediatrics/ACNS copy reads as left-biased. */
body.has-fundamentals-reader .page-eeg_lead_simulator .fundamentals-layout.figure-led > .fundamentals-text {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--lesson-measure);
  margin-left: auto;
  margin-right: auto;
}

body.has-fundamentals-reader .page-eeg_lead_simulator :is(
  .fundamentals-text > .code-table-wrap,
  .fundamentals-text > .important-note,
  .fundamentals-text > .golden-rule,
  .fundamentals-text > .pro-tip,
  .fundamentals-text > .analogy-box,
  .fundamentals-text > .label-breakdown,
  .aq-section-primer
) {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--lesson-measure);
  margin-left: auto;
  margin-right: auto;
}

/* Spot-check cards: keep the EEG page and answer row on the same center line
   as the primers, not stuck to the left of a full-bleed card. */
body.has-fundamentals-reader .page-eeg_lead_simulator .atlas-quiz {
  box-sizing: border-box;
  width: 100%;
  max-width: min(100%, 72rem);
  margin-left: auto;
  margin-right: auto;
}

body .page-eeg_lead_simulator :is(.teaching-card, .clinical-reading, .var-panel) {
  box-sizing: border-box;
  max-width: calc(var(--lesson-measure) + 2.5rem);
  margin-left: auto;
  margin-right: auto;
}
body .page-eeg_lead_simulator .teaching-options { margin-inline: auto; }
body .page-eeg_lead_simulator :is(.important-note, .golden-rule, .pro-tip) {
  box-sizing: border-box;
  max-width: calc(var(--lesson-measure) + 3rem);
  margin-left: auto;
  margin-right: auto;
}
