/* /courses/ page — course switcher + per-course panels.
   Relies on landing.css for :root tokens (--text/--brand/--brand-deep/--cta/...), the
   site fonts, nav/footer chrome, .section-eyebrow/.section-title/.section-body,
   .btn-primary/.btn-ghost, and .reveal. Only course-page-specific sections
   live here. */

/* ── COURSE SWITCHER (sticky, under the fixed nav) ── */
.switcher {
  position: sticky;
  top: 68px;
  margin-top: 68px;
  z-index: 90;
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: stretch;
  padding: 0 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher-label {
  display: flex;
  align-items: center;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-right: 28px;
  margin-right: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.switch-tab {
  text-decoration: none;
  padding: 16px 22px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  transition: color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.switch-tab .st-level {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.switch-tab .st-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-soft);
  transition: color 0.2s;
}
.switch-tab .st-name em { font-style: italic; color: var(--text-mid); }
.switch-tab:hover .st-name { color: var(--text); }
.switch-tab.active .st-name { color: var(--text); }
.switch-tab.active::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: var(--brand-deep);
}

/* ── FAMILY PARTS (a family page and its parts share one row of part tabs) ── */
.parts-nav {
  display: flex;
  align-items: stretch;
  padding: 0 62px;
  background: var(--brand-tint);
  border-bottom: 0.5px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.parts-nav::-webkit-scrollbar { display: none; }
.part-tab {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 18px 16px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  text-decoration: none;
}
.part-tab .pt-n {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.part-tab .pt-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  color: var(--text-mid);
  transition: color 0.2s;
}
.part-tab:hover .pt-name,
.part-tab.active .pt-name { color: var(--text); }
.part-tab.active::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: var(--brand-deep);
}

/* ── COURSE HERO ── */
.c-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-bottom: 0.5px solid var(--border);
  min-height: 560px;
}
.c-hero-left {
  padding: 72px 64px 64px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.c-hero-left::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.5px;
  background: var(--border);
}
.breadcrumb {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb a { color: var(--text-soft); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .field { color: var(--brand-deep); }
.c-level {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.c-level::before { content: ''; display: block; width: 32px; height: 0.5px; background: var(--brand); }
.c-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.c-title em { font-style: italic; color: var(--text-mid); }
.c-tagline {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 460px;
  margin-bottom: 40px;
}
.c-hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-note {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-top: 18px;
  width: 100%;
}
.c-hero-right {
  background: var(--brand-wash);
  background-size: cover;
  background-position: center;
  position: relative;
}
.c-hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(30, 42, 58, 0) 40%, rgba(30, 42, 58, 0.35) 100%);
}

/* ── FACTS BAR ── */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 0.5px solid var(--border);
  background: var(--brand-wash);
}
.fact { padding: 26px 40px; border-right: 0.5px solid var(--border); background: var(--surface); }
.fact:last-child { border-right: none; }
.fact-k {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 8px;
}
.fact-v { font-family: 'EB Garamond', Georgia, serif; font-size: 22px; font-weight: 400; color: var(--text); }

/* ── SHARED COURSE BLOCK ── */
.course-panel section.block { padding: 88px 80px; border-bottom: 0.5px solid var(--border); }

/* Overview */
.overview-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 72px; align-items: start; }
.overview-body p { font-size: 15.5px; color: var(--text-mid); line-height: 1.85; margin-bottom: 22px; max-width: 640px; }
.overview-body p:last-child { margin-bottom: 0; }
/* Markdown bodies (render_markdown): headings clamped to h2–h4, images lazy-load. */
.overview-body > :first-child { margin-top: 0; }
.overview-body h2,
.overview-body h3,
.overview-body h4 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
  max-width: 640px;
  margin: 40px 0 14px;
}
.overview-body h2 { font-size: 30px; }
.overview-body h3 { font-size: 24px; }
.overview-body h4 { font-size: 20px; }
.overview-body ul,
.overview-body ol {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 0 22px;
  padding-left: 22px;
}
.overview-body li { margin-bottom: 6px; }
.overview-body a { color: var(--brand-deep); text-underline-offset: 3px; }
.overview-body img { display: block; max-width: 100%; height: auto; margin: 28px 0; }
.overview-body blockquote {
  border-left: 2px solid var(--brand);
  padding-left: 22px;
  margin: 0 0 22px;
  font-style: italic;
}
.overview-body hr { border: none; border-top: 0.5px solid var(--border); margin: 32px 0; }
.pullquote {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.45;
  color: var(--text);
  border-left: 2px solid var(--brand);
  padding-left: 28px;
  margin-top: 40px;
}

/* Curriculum */
.course-panel section.curriculum { background: var(--brand-wash); }
.course-panel section.curriculum .section-eyebrow { color: var(--text); }
.course-panel section.curriculum .section-eyebrow::before { background: var(--text); }
.modules { margin-top: 48px; border-top: 0.5px solid var(--border-strong); }
.module {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  gap: 32px;
  padding: 30px 8px;
  border-bottom: 0.5px solid var(--border);
  align-items: baseline;
  transition: padding-left 0.2s, background 0.2s;
}
.module:hover { padding-left: 20px; background: rgba(30, 42, 58, 0.02); }
.module-n { font-family: 'EB Garamond', Georgia, serif; font-size: 30px; font-weight: 300; color: var(--text); line-height: 1; }
.module-title { font-family: 'EB Garamond', Georgia, serif; font-size: 24px; font-weight: 400; margin-bottom: 8px; }
.module-desc { font-size: 14px; color: var(--text-mid); line-height: 1.75; max-width: 560px; }
.module-meta { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mid); text-align: right; }

/* Nirvan pathway strip (D1-D5), scoped to the course page's light background */
.nirvan-block { margin-top: 48px; }
.nirvan-block .nirvan-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.nirvan-block .nirvan-steps { display: flex; border: 0.5px solid var(--border-strong); background: var(--bg); }
.nirvan-block .nirvan-step { flex: 1; padding: 28px 24px; border-right: 0.5px solid var(--border); transition: background 0.2s; }
.nirvan-block .nirvan-step:last-child { border-right: none; }
.nirvan-block .nirvan-step:hover { background: var(--brand-tint); }
.nirvan-block .nirvan-d { font-family: 'EB Garamond', Georgia, serif; font-size: 34px; font-weight: 300; color: var(--brand-deep); line-height: 1; margin-bottom: 8px; }
.nirvan-block .nirvan-n { font-size: 12.5px; color: var(--text-mid); letter-spacing: 0.04em; }

/* Outcomes */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  margin-top: 48px;
}
.outcome { background: var(--bg); padding: 36px 36px; }
.outcome-mark { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 15px; color: var(--brand-deep); margin-bottom: 16px; }
.outcome h4 { font-family: 'EB Garamond', Georgia, serif; font-size: 22px; font-weight: 400; margin-bottom: 8px; }
.outcome p { font-size: 14px; color: var(--text-soft); line-height: 1.7; }

/* Who / prereqs + schedule */
.course-panel section.who { background: var(--brand-wash); }
.course-panel section.who .section-eyebrow { color: var(--text); }
.course-panel section.who .section-eyebrow::before { background: var(--text); }
.who-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: start; }
.who-body p { font-size: 15px; color: var(--text-mid); line-height: 1.85; margin-bottom: 28px; max-width: 560px; }
.prereq-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  border: 0.5px solid var(--border-strong);
  padding: 16px 22px;
  background: var(--bg);
}
.prereq-tag .pk { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-deep); }
.prereq-tag .pv { font-size: 14px; color: var(--text); }
.schedule-card { border: 0.5px solid var(--border-strong); background: var(--bg); }
.schedule-card h4 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  padding: 22px 26px;
  border-bottom: 0.5px solid var(--border);
}
.sched-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 26px; border-bottom: 0.5px solid var(--border); font-size: 13.5px; }
.sched-row:last-child { border-bottom: none; }
.sched-row .sk { color: var(--text-soft); letter-spacing: 0.06em; }
.sched-row .sv { font-family: 'EB Garamond', Georgia, serif; font-size: 18px; color: var(--text); }

/* Teacher */
.course-panel section.teacher { background: var(--brand); color: var(--text); }
.teacher-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }
.teacher-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--brand-tint);
  background-size: cover;
  background-position: center top;
  border: 0.5px solid var(--border);
}
.teacher .section-eyebrow { color: var(--text); }
.teacher .section-eyebrow::before { background: var(--text); }
.teacher-name { font-family: 'EB Garamond', Georgia, serif; font-size: clamp(32px, 3.4vw, 44px); font-weight: 300; margin-bottom: 20px; }
.teacher-name em { font-style: italic; }
.teacher-body p { font-size: 15px; color: var(--text-mid); line-height: 1.85; margin-bottom: 20px; max-width: 620px; }
.teacher-body p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-list { margin-top: 40px; border-top: 0.5px solid var(--border); max-width: 820px; }
.faq-item { border-bottom: 0.5px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--text);
  padding: 24px 40px 24px 0;
  position: relative;
  display: block;
}
.faq-q::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--brand-deep);
  transition: transform 0.25s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.8;
  max-width: 680px;
}
.faq-item.open .faq-a { max-height: 260px; padding: 0 0 26px 0; }

/* Enrol band */
.enrol {
  background: var(--brand-wash);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 64px 80px;
  border-bottom: 0.5px solid var(--border);
}
.enrol-title { font-family: 'EB Garamond', Georgia, serif; font-size: clamp(28px, 3vw, 40px); font-weight: 300; line-height: 1.15; margin-bottom: 10px; }
.enrol-title em { font-style: italic; color: var(--text-mid); }
.enrol-sub { font-size: 14px; color: var(--text-mid); }
.enrol-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  margin-top: 40px;
}
.related-card {
  background: var(--bg);
  padding: 36px 36px;
  transition: background 0.2s;
  text-align: left;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-card:hover { background: var(--brand-tint); }
.related-card .rc-level { font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand-deep); }
.related-card .rc-title { font-family: 'EB Garamond', Georgia, serif; font-size: 24px; font-weight: 400; color: var(--text); }
.related-card .rc-title em { font-style: italic; color: var(--text-mid); }
.related-card .rc-go {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.related-card .rc-go::after { content: '→'; }

/* Family page: each part is a curriculum row linking to the part's own page */
a.module-link { color: var(--text); text-decoration: none; }
a.module-link .module-title em { font-style: italic; color: var(--text-mid); }
a.module-link .module-meta::after { content: ' →'; }

/* Part page: the previous and next part */
.part-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 0.5px solid var(--border);
}
.pp-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 40px 80px;
  text-decoration: none;
  transition: background 0.2s;
}
.pp-link:hover { background: var(--brand-tint); }
.pp-next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
  border-left: 0.5px solid var(--border);
}
.pp-dir { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.pp-prev .pp-dir::before { content: '← '; }
.pp-next .pp-dir::after { content: ' →'; }
.pp-name { font-family: 'EB Garamond', Georgia, serif; font-size: 22px; color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .switcher { padding: 0 32px; }
  .parts-nav { padding: 0 14px; }
  .pp-link { padding: 32px; }
  .c-hero { grid-template-columns: 1fr; }
  .c-hero-left { padding: 56px 32px; }
  .c-hero-left::after { display: none; }
  .c-hero-right { min-height: 320px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact:nth-child(1), .fact:nth-child(2) { border-bottom: 0.5px solid var(--border); }
  .course-panel section.block { padding: 64px 32px; }
  .overview-grid, .who-grid { grid-template-columns: 1fr; gap: 40px; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .module { grid-template-columns: 60px 1fr; }
  .module-meta { display: none; }
  .teacher-grid { grid-template-columns: 1fr; gap: 36px; }
  .teacher-photo { max-width: 240px; }
  .nirvan-block .nirvan-steps { flex-wrap: wrap; }
  .nirvan-block .nirvan-step { flex: 1 0 33%; border-bottom: 0.5px solid var(--border); }
  .enrol { grid-template-columns: 1fr; gap: 28px; padding: 48px 32px; }
  .enrol-actions { align-items: flex-start; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .switcher { padding: 0 20px; }
  .switcher-label { display: none; }
  .parts-nav { padding: 0 2px; }
  .part-pager { grid-template-columns: 1fr; }
  .pp-next { grid-column: 1; border-left: none; border-top: 0.5px solid var(--border); }
  .pp-link { padding: 28px 20px; }
  .c-hero-left { padding: 44px 20px; }
  .facts { grid-template-columns: 1fr; }
  .fact { border-right: none; border-bottom: 0.5px solid var(--border); }
  .fact:last-child { border-bottom: none; }
  .course-panel section.block { padding: 52px 20px; }
  .nirvan-block .nirvan-step { flex: 1 0 50%; }
}
