/* RMD Instructor Weekend Platform — Design System */
/* Palette refresh 2026: aligned with rmd.uk.com marketing site
   (purple/blue primary, orange key accent). Variable names kept
   unchanged so no selector/JS-hook updates were needed. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --rmd-navy:       #44247C;  /* brand purple (was navy #160b52) */
  --rmd-blue:       #0067A4;  /* brand blue (was #0b5394) */
  --rmd-mid:        #00547F;  /* blue-dark (was #1a6090) */
  --rmd-light:      #E3DCF2;  /* pale purple tint (was pale blue #d6e4f0) */
  --rmd-pale:       #F5F7FA;  /* off-white page bg, matches marketing site (was #eaf3fb) */
  --rmd-white:      #ffffff;
  --rmd-current:    #C26A00;   /* current session highlight — orange-dark, accessible on white (was #b7410e) */
  --rmd-current-bg: #FDEACB;
  --rmd-warn:       #F49001;  /* brand orange accent (was logo red #e2001a) */
  --rmd-success:    #1e8449;
  --rmd-amber:      #e67e22;
  --rmd-text:       #1A2233;
  --rmd-muted:      #6B7C93;
  --rmd-border:     #E8ECF1;
  --rmd-shadow:     0 2px 8px rgba(68,36,124,0.12);
  --font:           'Inter', 'Segoe UI', Arial, sans-serif;
  --radius:         8px;
  --radius-sm:      4px;

  /* ── Marketing-site variable names (national/marketing pages migrated
     from the standalone rmd.uk.com rebuild use this naming convention).
     Added 2026-06-30 so ported pages work without rewriting every
     var() reference. Same brand values as the --rmd-* set above. ── */
  --purple:       #44247C;
  --purple-dark:  #2E1856;
  --blue:         #0067A4;
  --blue-dark:    #00547F;
  --accent-light: #7EB8E8;
  --orange:       #F49001;
  --orange-dark:  #C26A00;
  --rcuk-red:     #E2001A;
  --rcuk-red-dark:#B0001A;
  --cyan:         #07748F;
  --cyan-bright:  #07A6D5;
  --magenta:      #BF0278;
  --off-white:    #F5F7FA;
  --light-gray:   #E8ECF1;
  --mid-gray:     #6B7C93;
  --text:         #1A2233;
  --white:        #ffffff;
  --shadow:       0 2px 12px rgba(68,36,124,0.10);
  --shadow-lg:    0 6px 32px rgba(68,36,124,0.16);
  --transition:   0.2s ease;
}

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

body {
  font-family: var(--font);
  background: var(--rmd-pale);
  color: var(--rmd-text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ── */
.rmd-header {
  background: var(--rmd-navy);
  color: var(--rmd-white);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.rmd-header img.logo {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: white;
}

.rmd-header .title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rmd-header .subtitle {
  font-size: 11px;
  opacity: 0.75;
  display: block;
  font-weight: 400;
}

.role-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Navigation ── */
.day-nav {
  background: var(--rmd-blue);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-nav::-webkit-scrollbar { display: none; }

.day-tab {
  flex: 0 0 auto;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.day-tab:hover { color: white; }
.day-tab.active {
  color: white;
  border-bottom-color: #F49001;
}

/* ── Live indicator ── */
.live-bar {
  background: var(--rmd-navy);
  color: var(--rmd-white);
  padding: 6px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.current-time {
  font-weight: 700;
  font-size: 14px;
}

.next-session-info {
  margin-left: auto;
  opacity: 0.8;
  font-size: 11px;
}

/* ── Timetable ── */
.timetable {
  padding: 12px 12px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.day-section { display: none; }
.day-section.active { display: block; }

.session-row {
  background: var(--rmd-white);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--rmd-shadow);
  overflow: hidden;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.session-row.current {
  border-left-color: var(--rmd-current);
  box-shadow: 0 4px 16px rgba(194,106,0,0.2);
}

.session-row.past {
  opacity: 0.55;
}

.session-row.faculty-only {
  border-left-color: var(--rmd-mid);
}

.session-row.break-row {
  background: var(--rmd-pale);
  box-shadow: none;
  border: 1px dashed var(--rmd-border);
}

/* ── Stream toggle — lets director/faculty view the instructor-candidate and
   assessor programmes as separate pages instead of one merged/interleaved
   list (they run in parallel on the same day, different rooms). ── */
.stream-nav {
  background: var(--rmd-navy);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.stream-nav::-webkit-scrollbar { display: none; }

.stream-tab {
  flex: 1 1 auto;
  padding: 10px 16px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-align: center;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.stream-tab:hover { color: white; }
.stream-tab.active {
  color: white;
  border-bottom-color: var(--rmd-amber);
  background: rgba(255,255,255,0.06);
}

.session-main {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.session-time {
  min-width: 80px;
  text-align: right;
  font-size: 13px;
  color: var(--rmd-muted);
  padding-top: 2px;
  flex-shrink: 0;
}

.session-time .start { font-weight: 700; color: var(--rmd-navy); font-size: 15px; }
.session-time .duration { font-size: 11px; color: var(--rmd-muted); }

.session-content { flex: 1; min-width: 0; }

.session-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--rmd-navy);
  line-height: 1.3;
}

.session-row.current .session-title { color: var(--rmd-current); }

.session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.meta-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.tag-location { background: var(--rmd-light); color: var(--rmd-navy); }
.tag-lead { background: #e8f5e9; color: #2e7d32; }
.tag-gateway { background: #FDEACB; color: var(--rmd-current); }
.tag-itc { background: #e8eaf6; color: #3949ab; }
.tag-resource { background: var(--rmd-navy); color: white; text-decoration: none; cursor: pointer; }
.tag-resource:hover { background: var(--rmd-blue); }

.current-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--rmd-current);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Session detail (expanded) ── */
.session-detail {
  display: none;
  padding: 0 14px 14px 106px;
  border-top: 1px solid var(--rmd-border);
  padding-top: 10px;
}

.session-detail.open { display: block; }

.session-notes {
  font-size: 13px;
  color: var(--rmd-muted);
  line-height: 1.6;
  white-space: pre-line;
}

.resource-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rmd-navy);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.resource-btn:hover { background: var(--rmd-blue); }
.resource-btn .icon { font-size: 15px; }

/* ── Director-only: timer chip ── */
.session-timer-btn {
  background: none;
  border: 1px solid var(--rmd-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--font);
  color: var(--rmd-navy);
  cursor: pointer;
  transition: all 0.2s;
}

.session-timer-btn:hover { background: var(--rmd-navy); color: white; }

/* ── Noticeboard / messages ── */
.noticeboard {
  background: var(--rmd-white);
  border-radius: var(--radius);
  box-shadow: var(--rmd-shadow);
  margin: 12px 12px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.noticeboard-header {
  background: var(--rmd-navy);
  color: white;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.noticeboard-body { padding: 12px 16px; }

.message-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--rmd-border);
  font-size: 14px;
}

.message-item:last-child { border-bottom: none; }
.message-time { font-size: 11px; color: var(--rmd-muted); }
.no-messages { color: var(--rmd-muted); font-size: 13px; font-style: italic; }

/* ── Director panel ── */
.director-panel {
  background: var(--rmd-white);
  border-radius: var(--radius);
  box-shadow: var(--rmd-shadow);
  margin: 12px;
  overflow: hidden;
}

.panel-header {
  background: var(--rmd-navy);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-body { padding: 16px; }

.msg-compose {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.msg-input {
  flex: 1;
  border: 1px solid var(--rmd-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 14px;
}

.btn {
  background: var(--rmd-navy);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--rmd-blue); }
.btn.btn-amber { background: var(--rmd-amber); }
.btn.btn-warn { background: var(--rmd-warn); }
.btn.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Room grid (director view) ── */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.room-card {
  border: 2px solid var(--rmd-border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.room-card.active { border-color: var(--rmd-success); }
.room-card .room-name { font-weight: 700; color: var(--rmd-navy); margin-bottom: 6px; }
.room-card .room-timer { font-size: 24px; font-weight: 700; color: var(--rmd-current); font-variant-numeric: tabular-nums; }
.room-card .room-msg { font-size: 11px; color: var(--rmd-muted); margin-top: 4px; }

/* ── Role selector (dev/demo only) ── */
.role-selector {
  background: #fff3cd;
  border-bottom: 1px solid #ffc107;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.role-selector label { font-weight: 700; color: #856404; }

.role-selector select {
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: var(--font);
  font-size: 13px;
  background: white;
}

/* ── Gateway alert ── */
.gateway-alert {
  background: #FDEACB;
  border: 2px solid var(--rmd-current);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--rmd-current);
}

/* ── Utility ── */
.hidden { display: none !important; }
.text-muted { color: var(--rmd-muted); }
.text-sm { font-size: 12px; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .session-time { min-width: 64px; }
  .session-detail { padding-left: 76px; }
  .rmd-header .title { font-size: 14px; }
}

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--rmd-navy) 0%, var(--rmd-blue) 100%);
  padding: 24px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  text-align: center;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.login-title {
  color: var(--rmd-navy);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--rmd-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.login-form { display: flex; flex-direction: column; gap: 12px; }

.form-input {
  width: 100%;
  border: 1.5px solid var(--rmd-border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--rmd-blue);
  box-shadow: 0 0 0 3px rgba(0,103,164,0.15);
}

.btn-login {
  background: var(--rmd-navy);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 13px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  margin-top: 4px;
}

.btn-login:hover { background: var(--rmd-blue); }

.login-divider {
  border: none;
  border-top: 1px solid var(--rmd-border);
  margin: 20px 0;
}

.qr-hint {
  font-size: 13px;
  color: var(--rmd-muted);
}

/* ── Room screen ── */
.room-screen {
  min-height: 100vh;
  background: var(--rmd-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 32px;
  text-align: center;
}

.room-screen .room-id { font-size: 14px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.room-screen .session-name { font-size: 28px; font-weight: 700; margin-bottom: 16px; line-height: 1.2; max-width: 600px; }
.room-screen .big-timer {
  font-size: 96px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  line-height: 1;
  margin: 16px 0;
  color: #F49001;
}

.room-screen .big-timer.warning { color: var(--rmd-current); animation: flash 1s infinite; }
@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.room-screen .room-message {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 16px 24px;
  font-size: 22px;
  font-weight: 600;
  max-width: 600px;
  margin-top: 24px;
}

.room-screen .rmd-logo-small {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  opacity: 0.5;
}

/* ── RMD UK content pages (home hero, chapter pages, faculty pages) ── */
.site-nav {
  background: var(--rmd-navy);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav .logo {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  background: white;
}

.site-nav .site-title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.site-nav .site-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav .site-links > a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.site-nav .site-links > a:hover { color: white; text-decoration: underline; }

/* ── Nav dropdown (Chapters menu, etc.) ── */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown-toggle:hover { color: white; }
.nav-dropdown-toggle::after { content: "\25BE"; font-size: 10px; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 14px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-toggle[aria-expanded="true"] { color: white; }

.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--rmd-navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.nav-dropdown-menu a:hover { background: var(--rmd-pale); }

.nav-dropdown-menu .menu-status {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--rmd-muted);
  margin-top: 1px;
}

.nav-dropdown-menu a.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.nav-dropdown-menu a.nav-dropdown-viewall {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--light-gray);
  color: var(--purple);
}

.content-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.rmd-hero {
  position: relative;
  background: radial-gradient(circle at 18% 18%, #5A3499 0%, var(--rmd-navy) 45%, #1A0F33 100%);
  color: white;
  padding: 44px 20px 38px;
}

.rmd-hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 6px;
  color: white;
  letter-spacing: 0.01em;
  text-align: left;
}

.rmd-hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.chapter-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.chapter-card:hover { background: rgba(255,255,255,0.22); }
.chapter-card.coming-soon { opacity: 0.55; cursor: default; }
.chapter-card .chapter-status { display: block; font-size: 11px; font-weight: 400; opacity: 0.8; margin-top: 2px; }

/* ── RMD UK national landing hero (index.html only) ── */
.rmd-hero-home {
  position: relative;
  background: radial-gradient(circle at 18% 18%, #5A3499 0%, var(--rmd-navy) 45%, #1A0F33 100%);
  padding: 64px 20px 56px;
  overflow: hidden;
}

.rmd-hero-home-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  z-index: 1;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(226,0,26,0.5);
  background: rgba(226,0,26,0.14);
  color: #ff8a95;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.rmd-hero-home h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  color: white;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  line-height: 1.08;
}

.rmd-hero-home h1 .hero-accent { color: var(--rcuk-red); }

.hero-tagline-acronym {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--rmd-light);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 18px;
}

.hero-tagline-acronym .accent-letter {
  color: var(--rcuk-red);
  font-weight: 800;
}

.hero-body-text {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-btn-primary {
  background: var(--rcuk-red);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-block;
}
.hero-btn-primary:hover { background: var(--rcuk-red-dark); }

/* ── Homepage image carousel (real CPR/BLS training photos) ── */
.rmd-carousel-section {
  background: var(--rmd-pale);
  padding: 36px 20px 44px;
}

.hero-carousel {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--rmd-shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-height: 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 44px;
  color: white;
  background-size: cover;
  background-position: center;
}

.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(68,36,124,0.8), rgba(0,103,164,0.55));
  z-index: 0;
}

.carousel-slide h3,
.carousel-slide p {
  position: relative;
  z-index: 1;
}

.carousel-slide h3 {
  font-size: clamp(19px, 3.2vw, 26px);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.carousel-slide p {
  font-size: 14px;
  opacity: 0.92;
  max-width: 480px;
  margin: 0 auto;
}

.carousel-slide.slide-1 { background-image: url('../assets/carousel-cpr-1.jpg'); }
.carousel-slide.slide-2 { background-image: url('../assets/carousel-cpr-2.jpg'); }
.carousel-slide.slide-3 { background-image: url('../assets/carousel-cpr-3.jpg'); }
.carousel-slide.slide-4 { background-image: url('../assets/carousel-cpr-4.jpg'); }

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active { background: white; }

.rmd-mission-banner {
  background: linear-gradient(160deg, var(--rmd-navy) 0%, var(--rmd-blue) 100%);
  color: white;
  padding: 36px 20px 40px;
}

.rmd-mission-banner-inner {
  max-width: 900px;
  margin: 0 auto;
}

.rmd-mission-banner p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto 10px;
  text-align: center;
}

.rmd-mission-banner p:last-of-type { margin-bottom: 0; }

.rmd-mission-banner .chapter-grid { margin-top: 26px; }

.content-card {
  background: var(--rmd-white);
  border-radius: var(--radius);
  box-shadow: var(--rmd-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.content-card h2 {
  color: var(--rmd-navy);
  font-size: 18px;
  margin-bottom: 12px;
}

.content-card p { margin-bottom: 12px; line-height: 1.65; }
.content-card p:last-child { margin-bottom: 0; }

.chapter-photo {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  margin: 0 auto 16px auto;
  display: block;
}

.chapter-photo-placeholder {
  width: 100%;
  min-height: 200px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: var(--rmd-light);
  border: 2px dashed var(--rmd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--rmd-muted);
  font-size: 13px;
  padding: 20px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.stat-box {
  background: var(--rmd-pale);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.stat-box .stat-num { font-size: 20px; font-weight: 700; color: var(--rmd-navy); }
.stat-box .stat-label { font-size: 11px; color: var(--rmd-muted); }

.faculty-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.faculty-buttons a.btn {
  text-decoration: none;
  display: inline-block;
}

.faculty-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.faculty-list li {
  background: var(--rmd-pale);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rmd-navy);
}

.faculty-list li .faculty-role {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--rmd-muted);
  margin-top: 2px;
}

.faculty-team-group { margin-bottom: 18px; }
.faculty-team-group:last-child { margin-bottom: 0; }

.faculty-team-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--rmd-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.faculty-list.has-photos {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.faculty-list.has-photos li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px 12px 16px;
}

.faculty-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--rmd-light);
  border: 2px dashed var(--rmd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--rmd-muted);
  flex-shrink: 0;
}

.faculty-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--rmd-border);
  flex-shrink: 0;
}

.faculty-toggle { display: flex; gap: 10px; margin-bottom: 20px; }

.faculty-toggle a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  background: var(--rmd-light);
  color: var(--rmd-navy);
}

.faculty-toggle a.active { background: var(--rmd-navy); color: white; }

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rmd-blue);
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

/* ── Site-nav: mobile toggle for the fuller national link set ──────────
   Added 2026-06-30 alongside the marketing-page migration. The dropdown
   ("Chapters") pattern above is unchanged; this just lets .site-links
   collapse on narrow screens once more top-level links were added
   (About, Faculty, Resources, News, For Institutions). ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.site-nav .site-links > a.nav-cta {
  background: var(--rmd-warn);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}

.site-nav .site-links > a.nav-cta:hover { color: white; text-decoration: none; opacity: 0.92; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav .site-links {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 14px;
  }

  .site-nav .site-links.is-open { display: flex; }

  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu { position: static; box-shadow: none; margin-top: 8px; }
}

/* ── Footer (national/marketing pages only — not used on the internal
   admin/Firebase tool pages, which have no footer by design) ── */
.rmd-footer {
  background: var(--rmd-navy);
  color: rgba(255,255,255,0.75);
  padding: 40px 20px 28px;
}

.rmd-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.rmd-footer h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.rmd-footer p { font-size: 13px; line-height: 1.6; max-width: 360px; }

.rmd-footer ul { list-style: none; padding: 0; margin: 0; }
.rmd-footer ul li { margin-bottom: 8px; }

.rmd-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
}

.rmd-footer a:hover { color: white; text-decoration: underline; }

.rmd-footer-bottom {
  max-width: 1000px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  opacity: 0.7;
}

@media (max-width: 700px) {
  .rmd-footer-inner { grid-template-columns: 1fr; }
}

/* ── Filter pills (faculty directory, and other listing/filter pages) ── */
.faculty-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }

.filter-pill {
  padding: 7px 16px;
  border: 1.5px solid var(--rmd-border);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--rmd-muted);
  cursor: pointer;
  transition: border-color 0.15s;
}

.filter-pill:hover { border-color: var(--rmd-blue); }
.filter-pill.active { background: var(--rmd-navy); border-color: var(--rmd-navy); color: white; }

/* ── Chapter page components (rmd-bristol/warwick/brunel/plymouth.html),
   ported from the marketing-site rebuild's style.css. These pages use
   .container-based layout rather than .content-wrap, so they're additive
   rather than reusing the .content-card pattern. Added 2026-06-30. ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.page-hero {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: white;
  padding: 56px 0 44px;
}

.page-hero h1 { color: white; font-size: 2.1rem; margin: 0 0 6px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin: 0; }

.breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.85); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 6px; opacity: 0.6; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 12px; border-radius: 999px;
}
.status-badge .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-badge.is-live { background: rgba(255,255,255,0.15); color: #fff; }
.status-badge.is-live .dot { background: #3FD68C; }
.status-badge.in-dev { background: rgba(255,255,255,0.15); color: #fff; }
.status-badge.in-dev .dot { background: var(--orange); }

.stats-bar { background: var(--off-white); border-bottom: 1px solid var(--light-gray); padding: 22px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--purple); }
.stat-label { font-size: 0.8rem; color: var(--mid-gray); margin-top: 2px; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.section-label {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--mid-gray); margin: 0 0 6px;
}
.section-label.accent-magenta { color: var(--magenta); }
.section-title { font-size: 1.6rem; color: var(--purple-dark); margin: 0 0 0.75rem; }
.section-intro { color: var(--mid-gray); font-size: 0.98rem; max-width: 620px; }
.section-header { margin-bottom: 1.75rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-intro { margin: 0 auto; }
section { padding: 48px 0; }
.divider { border: none; border-top: 1px solid var(--light-gray); margin: 0; }
.bg-offwhite { background: var(--off-white); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.gallery-item { border-radius: 10px; overflow: hidden; }
.gallery-placeholder {
  aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: var(--light-gray); color: var(--mid-gray); border-radius: 10px;
}
.gallery-placeholder .ph-icon { font-size: 1.8rem; opacity: 0.6; }
.gallery-placeholder .ph-label { font-size: 0.78rem; }

.pathway { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.pathway-step { background: white; border: 1px solid var(--light-gray); border-radius: 10px; padding: 1.25rem 1rem; text-align: center; }
.pathway-step h4 { margin: 0.5rem 0 0.35rem; color: var(--purple-dark); font-size: 1rem; }
.pathway-step p { font-size: 0.85rem; color: var(--mid-gray); margin: 0; }
.pathway-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto;
}
@media (max-width: 760px) { .pathway { grid-template-columns: repeat(2, 1fr); } }

.testimonial { text-align: center; }
.testimonial p { font-size: 1.15rem; font-style: italic; color: var(--text); line-height: 1.6; }
.testimonial cite { display: block; margin-top: 1rem; font-size: 0.85rem; color: var(--mid-gray); font-style: normal; font-weight: 600; }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.btn.btn-primary { background: var(--purple); color: white; }
.btn.btn-primary:hover { background: var(--purple-dark); }
.btn.btn-outline { background: transparent; color: var(--purple); border: 1.5px solid var(--purple); }
.btn.btn-outline:hover { background: var(--purple); color: white; }
.btn.btn-navy { background: var(--rmd-navy); color: white; }
.btn.btn-navy:hover { background: var(--rmd-blue); }
.mt-2 { margin-top: 0.5rem; }
.accent-cyan { color: var(--cyan); }

/* ── About page: three pillars + governance tiers ── */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; margin-top: 1.5rem; }
.pillar { background: white; border: 1px solid var(--light-gray); border-radius: 12px; padding: 1.75rem 1.5rem; }
.pillar-letter {
  width: 44px; height: 44px; border-radius: 10px; background: var(--purple); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 0.9rem;
}
.pillar h3 { color: var(--purple-dark); margin: 0 0 0.6rem; }
.pillar p { font-size: 0.9rem; color: var(--mid-gray); line-height: 1.6; }
@media (max-width: 800px) { .pillars-grid { grid-template-columns: 1fr; } }

.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.tier-card { background: white; border: 1px solid var(--light-gray); border-radius: 12px; padding: 1.75rem; }
.tier-card.network { border-color: var(--purple); background: #F8F4FC; }
.tier-card h3 { color: var(--purple-dark); margin: 0 0 0.6rem; }
.tier-card p { font-size: 0.9rem; color: var(--mid-gray); line-height: 1.6; margin: 0; }
@media (max-width: 700px) { .tier-grid { grid-template-columns: 1fr; } }

/* ── Enquiry / MOU form cards on national pages (for-institutions.html) ── */
.form-card { background: white; border: 1px solid var(--light-gray); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-group label span { color: var(--magenta); }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.6rem 0.75rem; border: 1px solid var(--light-gray); border-radius: 8px; font-family: inherit; font-size: 0.92rem;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--mid-gray); text-align: center; margin-top: 0.75rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Network directory cards (sites.html) ── */
.site-card { background: white; border: 1px solid var(--light-gray); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.site-card-header { background: var(--rmd-navy); padding: 1.75rem 2rem; }
.site-card-header h3 { margin: 0.15rem 0; }
.site-uni { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }
.site-card-body { padding: 1.75rem 2rem; }
.site-card-body p { color: var(--mid-gray); }
.site-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 0; }
.site-tag { background: var(--off-white); border: 1px solid var(--light-gray); border-radius: 20px; padding: 0.35rem 0.9rem; font-size: 0.82rem; color: var(--text); white-space: nowrap; }
