/* ============================================================
   Classicalia — shared design system
   classicalia.co.uk
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy:       #0E1E3F;
  --brand:      #1A6FFF;
  --ink:        #1c2540;
  --muted:      #5e6a85;
  --rule:       #d8dde8;
  --rule-faint: #e9ecf1;
  --paper:      #ffffff;
  --cream:      #fbfaf6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

/* ── NAV (dark — sits over navy header) ── */
.nav {
  background: transparent;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: white;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 5px;
  text-decoration: none;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-link.active { color: white; font-weight: 600; }
.nav-div { width: 1px; height: 16px; background: rgba(255,255,255,0.15); margin: 0 6px; }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 7px 18px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  margin-left: 8px;
}
.nav-cta:hover { background: rgba(255,255,255,0.22); }

/* ── DARK HEADER (used on subject/module pages) ── */
.page-header {
  background: var(--navy);
  border-bottom: 1px solid #1e3260;
  padding: 80px 0 52px;
  position: relative;
  overflow: hidden;
}
.page-header-dots { position: absolute; inset: 0; pointer-events: none; }
.page-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
.page-header-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6ba0ff;
  font-weight: 700;
  margin-bottom: 10px;
  opacity: 0.8;
}
.page-header-title {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 46px;
  color: white;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.page-header-deck {
  font-family: 'Lora', serif;
  font-style: italic;
  color: #8fa8cc;
  font-size: 14px;
  line-height: 1.7;
  max-width: 58ch;
}

/* ── TABS (sticky below header) ── */
.page-tabs {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 90;
  overflow-x: auto;
}
.page-tabs-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
}
.page-tab {
  padding: 12px 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  border-right: 1px solid var(--rule-faint);
}
.page-tab:last-child { border-right: none; }
.page-tab:hover { color: var(--brand); border-bottom-color: #b8d0ff; }
.page-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── TWO-COLUMN LAYOUT ── */
.two-col {
  max-width: 1080px;
  margin: 0 auto;
  padding: 52px 40px 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
}

/* sticky left context panel */
.context-col { position: sticky; top: 56px; }
.context-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 5px;
}
.context-title {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.2;
}
.context-rule { width: 40px; height: 3px; background: var(--brand); border-radius: 2px; margin-bottom: 12px; }
.context-desc {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

/* ── COMPONENT/COURSE LIST ── */
.group { margin-bottom: 32px; }
.group-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.group-note {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-style: italic;
}
.comp-list { list-style: none; }
.comp-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dotted var(--rule-faint);
  align-items: center;
  text-decoration: none;
}
.comp-row:last-child { border-bottom: 1px solid var(--rule); }
.comp-row:hover .comp-name { color: var(--brand); }
.comp-row:hover .comp-arrow { opacity: 1; color: var(--brand); }
.comp-code {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.comp-name {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: var(--navy);
  transition: color 0.12s;
}
.comp-detail {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0;
}

/* parent author row — not a link itself */
.comp-row-head {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 16px 0 2px;
  align-items: baseline;
}
.comp-row-head .comp-name { font-size: 17px; }

/* sub-rows — indented group selections */
.comp-sublist { list-style: none; padding-left: 88px; margin-bottom: 8px; }
.comp-subrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule-faint);
  text-decoration: none;
}
.comp-subrow:last-child { border-bottom: 1px solid var(--rule); }
.comp-subrow:hover .comp-subname { color: var(--brand); }
.comp-subrow:hover .comp-arrow { opacity: 1; color: var(--brand); }
.comp-sublabel {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  width: 52px;
  opacity: 0.7;
}
.comp-subname {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 13.5px;
  color: var(--ink);
  flex-grow: 1;
  line-height: 1.5;
  transition: color 0.12s;
}
.comp-subrow .comp-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comp-right { display: flex; align-items: center; gap: 10px; }
.comp-arrow { font-size: 16px; color: var(--muted); opacity: 0.2; transition: opacity 0.12s, color 0.12s; }

/* ── BADGES ── */
.badge, .comp-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
}
.badge-live        { background: #eef4ff; color: var(--brand); }
.badge-soon        { background: var(--rule-faint); color: var(--muted); }
.badge-compulsory  { background: #fff8e0; color: #7a5900; border: 1px solid #e5cc70; }
.badge-lesson      { background: #eef6ee; color: #2a6e2a; border: 1px solid #b6d9b6; }
.badge-pdf         { background: var(--cream); color: var(--muted); border: 1px solid var(--rule); }

/* ── LEVEL DIVIDER ── */
.level-div { border: none; border-top: 2px solid var(--rule-faint); margin: 52px 0; }

/* ── LEVEL HEADING ── */
.level-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 5px;
}
.level-title {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 30px;
  color: var(--navy);
  margin-bottom: 6px;
}
.level-rule { width: 48px; height: 3px; background: var(--brand); border-radius: 2px; margin-bottom: 12px; }
.level-desc {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── ACCORDION ── */
.accordion { list-style: none; }
.accordion-item { border-top: 1px solid var(--rule); }
.accordion-item:last-child { border-bottom: 1px solid var(--rule); }
.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 16px;
  padding: 16px 0;
  align-items: center;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
}
.accordion-trigger:hover .acc-title { color: var(--brand); }
.acc-n {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--brand);
  opacity: 0.5;
  line-height: 1;
}
.accordion-item.open .acc-n { opacity: 1; }
.acc-title {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.3;
  transition: color 0.12s;
}
.accordion-item.open .acc-title { color: var(--brand); }
.acc-badges { display: flex; gap: 5px; align-items: center; }
.acc-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}
.accordion-item.open .acc-chevron { transform: rotate(180deg); }
.accordion-panel { display: none; padding: 0 0 20px 56px; }
.accordion-item.open .accordion-panel { display: block; }

/* ── RESOURCE ROWS ── */
.resource-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule-faint);
  align-items: start;
}
.resource-row:last-child { border-bottom: none; }
.type-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.type-lesson { background: #eef6ee; color: #2a6e2a; border: 1px solid #b6d9b6; }
.type-pdf    { background: var(--cream); color: var(--muted); border: 1px solid var(--rule); }
.row-body { min-width: 0; }
.row-title { font-size: 13.5px; color: var(--ink); font-weight: 500; line-height: 1.35; margin-bottom: 3px; }
.row-desc  { font-size: 12px; color: var(--muted); line-height: 1.5; font-family: 'Lora', serif; font-style: italic; }
.row-action { flex-shrink: 0; padding-top: 1px; }

/* ── PILLS ── */
.pill {
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  padding: 5px 13px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.pill-solid   { background: var(--brand); color: white; }
.pill-solid:hover { background: #155ee0; }
.pill-outline { border: 1px solid var(--rule); color: var(--muted); }
.pill-outline:hover { border-color: #aab8d4; color: var(--ink); }

/* ── SEARCH BAR ── */
.search-bar { margin-bottom: 32px; }
.search-wrap { position: relative; max-width: 520px; }
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,111,255,0.1); }
.search-input::placeholder { color: var(--muted); }
.search-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px; line-height: 1;
  padding: 2px; display: none;
}
.search-clear:hover { color: var(--ink); }
.search-meta { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 18px; }
.search-meta .match { color: var(--brand); font-weight: 600; }
.accordion-item.search-hidden { display: none; }
.accordion-item.search-match { display: block; }
.accordion-item.search-match .accordion-panel { display: block; }
.resource-row.search-hidden { display: none; }
mark { background: #fff3b0; color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── EXAM RESOURCES ── */
.exam-section { margin-top: 52px; padding-top: 48px; border-top: 2px solid var(--rule-faint); }
.exam-eyebrow { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.exam-title { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 26px; color: var(--navy); margin-bottom: 6px; }
.exam-rule { width: 48px; height: 3px; background: var(--rule); border-radius: 2px; margin-bottom: 14px; }
.exam-deck { font-family: 'Lora', serif; font-style: italic; color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 58ch; margin-bottom: 24px; }
.exam-list { list-style: none; }
.exam-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px; padding: 11px 0;
  border-top: 1px solid var(--rule);
  align-items: center;
}
.exam-row:last-child { border-bottom: 1px solid var(--rule); }

/* ── TEACHER AREA ── */
.teacher-section { margin-top: 32px; }
.teacher-band { background: var(--cream); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.teacher-band-head { padding: 14px 20px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 10px; }
.teacher-lock-icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.teacher-band-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.teacher-band-sub { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.teacher-band-sub a { color: var(--brand); font-weight: 600; text-decoration: none; }
.locked-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 11px 20px; border-bottom: 1px dotted var(--rule-faint); align-items: center; opacity: 0.55; }
.locked-row:last-child { border-bottom: none; }
.locked-title { font-size: 13.5px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.locked-action { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.locked-action svg { width: 13px; height: 13px; }
.teacher-prompt { padding: 16px 20px; border-top: 1px solid var(--rule); background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.teacher-prompt-text { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.teacher-prompt-text strong { color: var(--ink); font-weight: 600; }
.teacher-prompt-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-teacher-signin { font-size: 12px; font-weight: 600; font-family: 'DM Sans', sans-serif; background: var(--navy); color: white; padding: 7px 16px; border-radius: 5px; text-decoration: none; white-space: nowrap; }
.btn-teacher-register { font-size: 12px; font-weight: 600; font-family: 'DM Sans', sans-serif; background: transparent; color: var(--ink); padding: 7px 16px; border-radius: 5px; border: 1px solid var(--rule); text-decoration: none; white-space: nowrap; }

/* ── FOOTER ── */
.footer { background: var(--paper); border-top: 1px solid var(--rule); }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 16px 40px; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 17px; color: var(--brand); text-decoration: none; }
.footer-links { display: flex; gap: 18px; }
.footer-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--ink); }
.footer-copy { font-size: 11.5px; color: var(--muted); }

/* ── HOMEPAGE HERO ── */
.hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero-dots { position: absolute; inset: 0; pointer-events: none; }
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 40px 80px;
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #6ba0ff; font-weight: 700; margin-bottom: 20px; }
.hero-title { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 72px; line-height: 0.95; color: white; letter-spacing: -0.025em; margin-bottom: 24px; }
.hero-title .amp { color: #6ba0ff; }
.hero-deck { font-family: 'Lora', serif; font-style: italic; color: #8fa8cc; font-size: 15px; line-height: 1.7; max-width: 52ch; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 24px; align-items: center; }

/* hero buttons */
.btn-p { font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 700; color: var(--navy); background: white; padding: 11px 24px; border-radius: 5px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none; }
.btn-p:hover { background: #eef3ff; }
.btn-p-arrow { color: var(--brand); font-size: 16px; }
.btn-g { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 15.5px; color: rgba(255,255,255,0.48); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.18); padding-bottom: 1px; display: inline-flex; align-items: center; gap: 6px; }
.btn-g:hover { color: rgba(255,255,255,0.82); border-bottom-color: rgba(255,255,255,0.42); }

/* hero panel */
.hero-panel { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; padding: 22px; }
.hero-panel-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #6ba0ff; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.at-row { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dotted rgba(255,255,255,0.08); align-items: baseline; }
.at-row:last-child { border-bottom: none; }
.at-k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); font-weight: 600; }
.at-v { font-family: 'Lora', serif; font-style: italic; color: rgba(255,255,255,0.8); font-size: 13.5px; }

/* ── SUBJECT TILES ── */
.tiles-band { background: var(--cream); border-bottom: 1px solid var(--rule); }
.tiles-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; align-items: stretch; }
.tile { padding: 36px 32px; border-right: 1px solid var(--rule); text-decoration: none; display: flex; flex-direction: column; transition: background 0.14s; }
.tile:last-child { border-right: none; }
.tile:hover { background: white; }
.tile:hover .tile-cta { color: #155ee0; }
.tile-glyph { display: none; }
.tile-title { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 24px; color: var(--navy); margin-bottom: 8px; }
.tile-body { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.tile-courses { list-style: none; margin-bottom: 18px; flex-grow: 1; }
.tile-course { font-size: 12px; color: var(--muted); padding: 4px 0; border-bottom: 1px dotted var(--rule-faint); display: flex; gap: 8px; align-items: center; }
.tile-course:last-child { border-bottom: none; }
.tile-course::before { content: ''; width: 4px; height: 4px; background: var(--brand); border-radius: 50%; flex-shrink: 0; opacity: 0.45; }
.tile-cta { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: 0.02em; margin-top: auto; }

/* ── TYPES BAND ── */
.types-band { background: var(--navy); }
.types-inner { max-width: 1080px; margin: 0 auto; padding: 48px 40px 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.type-col { padding: 0 32px; border-right: 1px solid #1e3260; }
.type-col:first-child { padding-left: 0; }
.type-col:last-child { border-right: none; padding-right: 0; }
.type-n { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 48px; color: #1e3260; line-height: 1; margin-bottom: 12px; }
.type-title { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #6ba0ff; margin-bottom: 8px; }
.type-body { font-size: 13px; color: #8fa8cc; line-height: 1.65; }

/* ── CURTAIN ── */
.curtain {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 100;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.curtain.open {
  transform: translateY(0);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.curtain-dots { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.curtain-close {
  position: fixed; top: 68px; right: 40px; z-index: 200;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.7); font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 5px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s 0.3s, background 0.12s;
}
.curtain-close.visible { opacity: 1; pointer-events: auto; }
.curtain-close:hover { background: rgba(255,255,255,0.14); color: white; }
.curtain-close-x { font-size: 18px; line-height: 1; font-weight: 300; opacity: 0.6; }
.curtain-inner { max-width: 1080px; margin: 0 auto; padding: 80px 40px 100px; position: relative; z-index: 2; }
.curtain-kicker { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: #6ba0ff; font-weight: 700; margin-bottom: 48px; opacity: 0.7; }
.curtain-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 72px; align-items: start; }
.curtain-title { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 44px; color: white; line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 28px; }
.curtain-title .amp { color: #6ba0ff; }
.curtain-body { font-family: 'Lora', serif; font-style: italic; color: #8fa8cc; font-size: 15px; line-height: 1.75; }
.curtain-body p { margin-bottom: 18px; }
.curtain-body p:last-child { margin-bottom: 0; }
.curtain-body em { color: rgba(255,255,255,0.75); font-style: normal; }
.curtain-creds-head { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #6ba0ff; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #1e3260; opacity: 0.8; }
.cred-list { list-style: none; }
.cred-item { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dotted #1e3260; align-items: start; }
.cred-item:last-child { border-bottom: none; }
.cred-dot { width: 5px; height: 5px; background: #6ba0ff; border-radius: 50%; margin-top: 6px; opacity: 0.6; }
.cred-text { font-size: 13px; color: #8fa8cc; line-height: 1.5; }
.cred-text strong { color: rgba(255,255,255,0.7); font-weight: 600; }
.curtain-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #1e3260; padding-top: 40px; }
.curtain-stat { padding: 0 32px; border-right: 1px solid #1e3260; }
.curtain-stat:first-child { padding-left: 0; }
.curtain-stat:last-child { border-right: none; }
.curtain-stat-n { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 34px; color: #6ba0ff; line-height: 1; margin-bottom: 5px; letter-spacing: -0.02em; }
.curtain-stat-l { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.4; }
.curtain-cta-row { margin-top: 52px; padding-top: 36px; border-top: 1px solid #1e3260; display: flex; align-items: center; gap: 20px; }
.curtain-cta-primary { font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 700; color: var(--navy); background: white; padding: 11px 24px; border-radius: 5px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.curtain-cta-primary:hover { background: #eef3ff; }
.curtain-cta-primary span { color: var(--brand); font-size: 16px; }
.curtain-cta-sec { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 15px; color: rgba(255,255,255,0.4); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 1px; cursor: pointer; }
.curtain-cta-sec:hover { color: rgba(255,255,255,0.75); }

/* ── SUBJECT/COURSE PAGE (class civ etc) ── */
.header {
  background: var(--navy);
  border-bottom: 1px solid #1e3260;
  padding: 80px 0 52px;
  position: relative;
  overflow: hidden;
}
.header-dots { position: absolute; inset: 0; pointer-events: none; }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }
.header-eyebrow { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #6ba0ff; font-weight: 700; margin-bottom: 10px; opacity: 0.8; }
.header-title { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 46px; color: white; line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 12px; }
.header-deck { font-family: 'Lora', serif; font-style: italic; color: #8fa8cc; font-size: 14px; line-height: 1.7; max-width: 56ch; }

.level-tabs { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 90; }
.level-tabs-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; display: flex; }
.level-tab { padding: 13px 24px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; border-right: 1px solid var(--rule-faint); text-decoration: none; }
.level-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.level-tab:hover { color: var(--brand); border-bottom-color: #b8d0ff; }

.body-outer { max-width: 1080px; margin: 0 auto; padding: 52px 40px 100px; }

/* ── MODULE BODY — two column (module/topic pages only) ── */
.module-body { max-width: 1080px; margin: 0 auto; padding: 52px 40px 100px; display: grid; grid-template-columns: 220px 1fr; gap: 60px; align-items: start; }

/* ── MODULE TABS ── */
.module-tabs { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
.module-tabs-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; display: flex; gap: 0; overflow-x: auto; }
.module-tab { font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 14px 18px; border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.12s, border-color 0.12s; }
.module-tab:hover { color: var(--ink); }
.module-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── MODULE BODY — two column ── */
.module-body { max-width: 1080px; margin: 0 auto; padding: 40px 40px 100px; display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }

/* ── CONTEXT PANEL ── */
.context { position: sticky; top: 56px; }
.context-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.context-title { font-family: 'Lora', serif; font-style: italic; font-weight: 700; font-size: 22px; color: var(--navy); line-height: 1.2; margin-bottom: 10px; }
.context-rule { width: 36px; height: 3px; background: var(--brand); border-radius: 2px; margin-bottom: 12px; }
.context-desc { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

/* ── SEARCH BAR ── */
.search-bar { margin-bottom: 24px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-input { width: 100%; padding: 10px 36px 10px 38px; border: 1px solid var(--rule); border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--ink); background: var(--paper); outline: none; transition: border-color 0.12s; }
.search-input:focus { border-color: var(--brand); }
.search-input::placeholder { color: var(--muted); }
.search-clear { position: absolute; right: 10px; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; display: none; }
.search-clear.visible { display: block; }
.search-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; min-height: 18px; }

/* ── RESOURCE ROWS ── */
.resource-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-faint); align-items: start; }
.resource-row:last-child { border-bottom: none; }
.type-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; white-space: nowrap; margin-top: 2px; }
.type-lesson { background: #e8f4e0; color: #2a5010; }
.type-pdf { background: #ddeeff; color: #1a4a80; }
.type-revision { background: #d1fae5; color: #065f46; }
.type-questions { background: #fef9c3; color: #854d0e; }
.row-body {}
.row-title { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 14.5px; color: var(--navy); margin-bottom: 3px; }
.row-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.row-action { display: flex; align-items: flex-start; gap: 8px; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 5px 14px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
.pill-solid { background: var(--brand); color: white; }
.pill-solid:hover { background: #155ee0; }
.pill-outline { border: 1px solid var(--brand); color: var(--brand); }
.pill-outline:hover { background: #eef3ff; }

/* mini badges on accordion trigger */
.acc-badges { display: flex; gap: 4px; margin-left: 4px; }
.mini-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; }
.mini-lesson { background: #e8f4e0; color: #2a5010; }
.mini-pdf { background: #ddeeff; color: #1a4a80; }

.level { display: grid; grid-template-columns: 220px 1fr; gap: 60px; margin-bottom: 60px; align-items: start; }
.level-meta { position: sticky; top: 56px; }
.groups { }

.breadcrumb { display: none; }
