@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('./fonts/source-sans-3.woff2') format('woff2');
}

:root {
  --brand-teal: #005F83;
  --brand-teal-bright: #0076A0;
  --brand-ink-on-teal: #FFFFFF;

  --ink: #142A32;
  --ink-soft: #4F6A74;
  --paper: #FFFFFF;
  --surface: #EBF2F4;
  --surface-raised: #F7FAFB;
  --line: rgba(9,45,58,0.12);
  --line-strong: rgba(9,45,58,0.22);
  --accent: #005F83;
  --accent-bright: #0076A0;
  --accent-ink: #FFFFFF;
  --accent-deep: #003D54;
  --accent-deep-ink: #FFFFFF;
  --gold: #A9791F;
  --gold-surface: #F6ECD4;
  --success: #1E7A4C;
  --success-surface: #E4F3EA;
  --danger: #A23B2E;
  --danger-surface: #F8E7E2;
  --shadow: 0 1px 2px rgba(6,33,42,0.07), 0 8px 24px -12px rgba(6,33,42,0.2);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E7F1F4;
    --ink-soft: #9AB4BE;
    --paper: #071B22;
    --surface: #0D2830;
    --surface-raised: #11313A;
    --line: rgba(231,241,244,0.12);
    --line-strong: rgba(231,241,244,0.22);
    --accent: #2C9BC4;
    --accent-bright: #4AB4DC;
    --accent-ink: #052027;
    --accent-deep: #146B8C;
    --accent-deep-ink: #FFFFFF;
    --gold: #E3AE55;
    --gold-surface: #2E2513;
    --success: #4CAE7F;
    --success-surface: #123425;
    --danger: #E17A64;
    --danger-surface: #2E1913;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 8px 24px -12px rgba(0,0,0,0.55);
  }
}
:root[data-theme="dark"] {
  --ink: #E7F1F4; --ink-soft: #9AB4BE; --paper: #071B22; --surface: #0D2830;
  --surface-raised: #11313A; --line: rgba(231,241,244,0.12); --line-strong: rgba(231,241,244,0.22);
  --accent: #2C9BC4; --accent-bright: #4AB4DC; --accent-ink: #052027; --accent-deep: #146B8C; --accent-deep-ink: #FFFFFF;
  --gold: #E3AE55; --gold-surface: #2E2513; --success: #4CAE7F; --success-surface: #123425;
  --danger: #E17A64; --danger-surface: #2E1913;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 8px 24px -12px rgba(0,0,0,0.55);
}
:root[data-theme="light"] {
  --ink: #142A32; --ink-soft: #4F6A74; --paper: #FFFFFF; --surface: #EBF2F4;
  --surface-raised: #F7FAFB; --line: rgba(9,45,58,0.12); --line-strong: rgba(9,45,58,0.22);
  --accent: #005F83; --accent-bright: #0076A0; --accent-ink: #FFFFFF; --accent-deep: #003D54; --accent-deep-ink: #FFFFFF;
  --gold: #A9791F; --gold-surface: #F6ECD4; --success: #1E7A4C; --success-surface: #E4F3EA;
  --danger: #A23B2E; --danger-surface: #F8E7E2;
  --shadow: 0 1px 2px rgba(6,33,42,0.07), 0 8px 24px -12px rgba(6,33,42,0.2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
a { color: inherit; }
button { font-family: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: linear-gradient(100deg, var(--brand-teal) 0%, var(--brand-teal) 55%, var(--brand-teal-bright) 130%);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .brand-logo { height: 30px; width: auto; display: block; flex: none; }
.brand .brand-type { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.brand .brand-word {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  color: var(--brand-ink-on-teal);
  white-space: nowrap;
}
.brand .brand-word b { font-weight: 700; }
.brand .brand-word span.light { font-weight: 500; opacity: 0.92; }
.brand .tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.progress-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  font-variant-numeric: tabular-nums;
}
.progress-track {
  width: 84px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.22);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.progress-fill { height: 100%; background: #FFFFFF; transition: width .4s ease; }
.learner-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--brand-ink-on-teal);
  cursor: pointer;
}
.learner-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: 'Poppins', sans-serif;
}
.topbar .learner-avatar { background: #FFFFFF; color: var(--brand-teal); }
.icon-btn {
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1);
  color: var(--brand-ink-on-teal);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s ease, background .15s ease;
  text-decoration: none;
}
.icon-btn:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.18); }
.icon-btn.active { background: #FFFFFF; color: var(--brand-teal); border-color: #FFFFFF; }

/* ---- Layout ---- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  gap: 0;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .rail { border-right: none; border-bottom: 1px solid var(--line); }
}

/* ---- Course rail ---- */
.rail {
  border-right: 1px solid var(--line);
  padding: 24px 18px 60px;
}
.rail-heading {
  padding: 0 6px 14px;
}
.rail-heading .display { font-size: 20px; }
.rail-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  text-decoration: none; margin: 0 6px 14px; cursor: pointer;
  background: none; border: none; padding: 0; font-family: inherit;
}
.rail-back:hover { color: var(--accent); }
.course-list { display: flex; flex-direction: column; gap: 6px; list-style: none; margin: 0; padding: 0; }
.course-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.course-item:hover { background: var(--surface); }
.course-item.selected { background: var(--surface); border-color: var(--line); }
.course-item.locked { cursor: default; opacity: 0.55; }
.course-item.locked:hover { background: transparent; }
.stage-num {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  margin-top: 1px;
}
.course-item.passed .stage-num { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-deep-ink); }
.course-item.available .stage-num, .course-item.selected .stage-num { border-color: var(--accent); color: var(--accent); }
.course-body { flex: 1; min-width: 0; }
.course-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.course-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.course-status {
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.status-locked { background: var(--surface); color: var(--ink-soft); }
.status-available { background: var(--gold-surface); color: var(--gold); }
.status-passed { background: var(--accent-deep); color: var(--accent-deep-ink); }
.status-progress { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.status-draft { background: var(--gold-surface); color: var(--gold); }

.rail-divider { height: 1px; background: var(--line); margin: 18px 6px; }
.rail-note {
  padding: 12px 12px 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---- Main pane ---- */
.main { padding: 40px 44px 90px; min-width: 0; }
@media (max-width: 620px) { .main { padding: 28px 20px 70px; } }
.page-wrap { max-width: 1180px; margin: 0 auto; width: 100%; padding: 40px 28px 90px; }

/* Welcome / auth screens */
.welcome { max-width: 520px; margin: 4vh auto 0; text-align: left; position: relative; }
.owl-watermark {
  position: absolute;
  top: -18px;
  right: -108px;
  width: 130px;
  height: 152px;
  opacity: 0.15;
  pointer-events: none;
  background-color: var(--accent);
  -webkit-mask-image: url('./owl-mask.png');
  mask-image: url('./owl-mask.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
@media (max-width: 760px) { .owl-watermark { display: none; } }
.welcome .display { font-size: 34px; line-height: 1.15; margin-bottom: 14px; }
.welcome p.lede { color: var(--ink-soft); font-size: 16px; margin: 0 0 28px; }
.field-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); display: block; margin-bottom: 8px; }
.text-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 13px 15px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
  margin-bottom: 18px;
}
.text-input:focus { border-color: var(--accent); outline: none; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 13px 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 12px 20px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface); }
.btn-danger-ghost {
  background: transparent; color: var(--danger); border: 1px solid var(--danger);
  padding: 10px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.btn-danger-ghost:hover { background: var(--danger-surface); }
.form-error {
  background: var(--danger-surface); color: var(--danger);
  padding: 11px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 16px;
}
.form-success {
  background: var(--success-surface); color: var(--success);
  padding: 11px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 16px;
}
.auth-footer-link { font-size: 13.5px; color: var(--ink-soft); margin-top: 18px; }
.auth-footer-link a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-footer-link a:hover { text-decoration: underline; }

/* Course library home */
.library-head { max-width: 720px; margin: 0 0 32px; }
.library-head .display { font-size: 32px; }
.library-head p { color: var(--ink-soft); font-size: 15px; margin-top: 10px; }
.course-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.course-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, transform .15s ease;
}
.course-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.course-card .display { font-size: 20px; }
.course-card p { color: var(--ink-soft); font-size: 13.5px; margin: 0; flex: 1; }
.course-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.course-card-progress { display: flex; align-items: center; gap: 8px; }

/* Module header */
.module-head { margin-bottom: 30px; }
.module-head .eyebrow { margin-bottom: 8px; }
.module-head .display { font-size: 30px; }
.module-head .desc { color: var(--ink-soft); font-size: 15px; margin-top: 10px; max-width: 62ch; }
.lesson-progress { display: flex; gap: 5px; margin-top: 20px; }
.lesson-dot { height: 5px; flex: 1; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.lesson-dot.done { background: var(--accent-deep); border-color: var(--accent-deep); }
.lesson-dot.current { background: var(--accent); border-color: var(--accent); }

/* Lesson card */
.lesson-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 38px;
  box-shadow: var(--shadow);
  max-width: 640px;
}
@media (max-width: 620px) { .lesson-card { padding: 26px 22px; } }
.lesson-kicker { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.lesson-card h2 { font-size: 25px; line-height: 1.2; margin-bottom: 16px; }
.lesson-card .body-text { font-size: 15.5px; color: var(--ink); }
.lesson-card .body-text p { margin: 0 0 14px; }
.lesson-card .body-text p:last-child { margin-bottom: 0; }
.lesson-card .body-text ul { margin: 0 0 14px; padding-left: 20px; }
.lesson-card .body-text li { margin-bottom: 7px; }
.lesson-card .body-text strong { color: var(--ink); }
.callout {
  margin-top: 18px;
  padding: 13px 16px;
  background: var(--gold-surface);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink);
  border-left: 3px solid var(--gold);
}
.tier-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tier {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--paper);
}
.tier .tier-name { font-weight: 700; font-size: 13.5px; color: var(--accent-deep); }
.tier .tier-body { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

.lesson-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; max-width: 640px; }
.lesson-nav .counter { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.nav-btns { display: flex; gap: 10px; }

/* Quiz */
.quiz-card { max-width: 640px; }
.quiz-intro { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; padding: 40px 38px; box-shadow: var(--shadow); text-align: left; }
.quiz-intro .display { font-size: 26px; margin-bottom: 12px; }
.quiz-intro p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 20px; }
.quiz-stat-row { display: flex; gap: 22px; margin: 18px 0 26px; }
.quiz-stat .num { font-family: 'Poppins', sans-serif; font-size: 26px; font-weight: 700; }
.quiz-stat .lbl { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }

.q-block {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 34px;
  box-shadow: var(--shadow);
}
.q-count { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.q-block h3 { font-size: 19px; line-height: 1.35; margin-bottom: 18px; }
.options { display: flex; flex-direction: column; gap: 9px; }
.option {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 15px;
  cursor: pointer;
  font-size: 14.5px;
  background: var(--paper);
  transition: border-color .12s ease, background .12s ease;
}
.option:hover { border-color: var(--accent); }
.option .radio {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
}
.option.selected { border-color: var(--accent); background: var(--surface); }
.option.selected .radio { border-color: var(--accent); }
.option.selected .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.option.correct { border-color: var(--success); background: var(--success-surface); }
.option.correct .radio { border-color: var(--success); }
.option.correct .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.option.incorrect { border-color: var(--danger); background: var(--danger-surface); }
.option.incorrect .radio { border-color: var(--danger); }
.option.incorrect .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.option.disabled { cursor: default; }

.quiz-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; max-width: 640px; }

.result-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 42px 38px;
  box-shadow: var(--shadow);
  max-width: 640px;
  text-align: left;
}
.result-badge {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 20px;
  margin-bottom: 18px;
}
.result-badge.pass { background: var(--success); color: #FFFFFF; }
.result-badge.fail { background: var(--danger-surface); color: var(--danger); }
.result-card .display { font-size: 25px; margin-bottom: 10px; }
.result-card p.lede { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 24px; }
.result-actions { display: flex; gap: 10px; }

/* Roadmap / locked module preview */
.locked-view { max-width: 620px; }
.locked-view .lock-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.locked-view .display { font-size: 26px; margin-bottom: 10px; }
.locked-view p { color: var(--ink-soft); font-size: 14.5px; max-width: 52ch; }

/* Admin view */
.mgr-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mgr-head .display { font-size: 27px; }
.mgr-head p { color: var(--ink-soft); font-size: 14px; margin-top: 8px; max-width: 60ch; }
.demo-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gold); background: var(--gold-surface); padding: 4px 10px; border-radius: 999px;
  margin-top: 12px;
}
.team-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13.5px; }
.team-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-soft); font-weight: 700; padding: 0 14px 10px; border-bottom: 1px solid var(--line-strong);
}
.team-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.team-table tr:last-child td { border-bottom: none; }
.team-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.team-name .learner-avatar { width: 26px; height: 26px; font-size: 11px; }
.you-flag { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--surface); padding: 2px 7px; border-radius: 999px; margin-left: 6px; }

/* Hamburger + the slide-out business menu */
.burger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 38px; padding: 0 9px; margin-right: 4px; cursor: pointer; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.28); border-radius: 10px; flex: 0 0 auto; }
.burger span { display: block; height: 2px; border-radius: 2px; background: #fff; }
.burger:hover { background: rgba(255,255,255,0.18); }

.drawer-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(4,26,34,0.42); display: flex; }
.drawer { width: min(340px, 86vw); height: 100%; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); box-shadow: 2px 0 28px rgba(4,26,34,0.22); animation: drawer-in .16s ease-out; }
@keyframes drawer-in { from { transform: translateX(-14px); opacity: .4; } to { transform: none; opacity: 1; } }

.drawer-head { position: relative; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-title { font-family: Poppins, system-ui, sans-serif; font-weight: 600; font-size: 19px; color: var(--ink); margin-top: 3px; }
.drawer-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; font-size: 21px; line-height: 1; cursor: pointer; color: var(--ink-soft); background: transparent; border: none; border-radius: 8px; }
.drawer-close:hover { background: var(--surface); color: var(--ink); }

.drawer-list { padding: 10px; overflow-y: auto; }
.drawer-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 12px 13px; margin-bottom: 4px; cursor: pointer; background: transparent; border: 1px solid transparent; border-radius: 11px; font: inherit; }
.drawer-item:hover { background: var(--surface); }
.drawer-item.active { background: var(--surface); border-color: var(--line-strong); }
.drawer-swatch { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--ink-soft); }
.drawer-swatch.all { background: linear-gradient(135deg, #005F83 0%, #0076A0 34%, #2E7D5B 67%, #B4571E 100%); }
.drawer-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.drawer-item-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.drawer-item-meta { font-size: 12px; color: var(--ink-soft); }

/* Which business a course belongs to, on the library card */
.brand-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-soft); white-space: nowrap; }

/* "Viewing as" — super-admin preview switcher in the topbar */
.viewas { display: flex; align-items: center; gap: 7px; padding: 4px 6px 4px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.10); }
.viewas-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,0.82); white-space: nowrap; }
.viewas-select { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid transparent; border-radius: 999px; padding: 4px 8px; }
.viewas-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
.viewas-exit { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--gold); background: var(--gold-surface); border: none; border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.viewas-exit:hover { filter: brightness(0.96); }
.viewas.previewing { background: var(--gold-surface); border-color: var(--gold); }
.viewas.previewing .viewas-label { color: var(--gold); }
.viewas.previewing .viewas-select { border-color: var(--gold); }

/* Access levels: learner / tutor / super admin */
.role-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.role-badge.role-learner { color: var(--ink-soft); background: var(--surface); border-color: var(--line); }
.role-badge.role-tutor { color: var(--accent); background: var(--surface); border-color: var(--accent); }
.role-badge.role-super_admin { color: var(--accent-ink); background: var(--accent); }
.role-select { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; max-width: 150px; }
.role-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,95,131,0.18); }
.role-select:disabled { opacity: .55; }
.mini-bar-track { width: 90px; height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); }
.mini-bar-fill { height: 100%; background: var(--accent-deep); }
.score-chip { font-variant-numeric: tabular-nums; font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* Admin invite form */
.invite-card {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; box-shadow: var(--shadow); max-width: 420px; margin-bottom: 30px;
}
.invite-card .display { font-size: 17px; margin-bottom: 4px; }
.invite-card p { color: var(--ink-soft); font-size: 13px; margin: 0 0 16px; }
.invite-form-row { display: flex; gap: 10px; align-items: flex-start; }
.invite-form-row .text-input { margin-bottom: 0; }

.admin-nav { display: flex; gap: 10px; margin-bottom: 26px; }

/* Course-builder CMS */
.builder-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .builder-layout { grid-template-columns: 1fr; } }
.builder-pane {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; box-shadow: var(--shadow);
}
.builder-pane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.builder-pane-head .eyebrow { margin: 0; }
.builder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.builder-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 10px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
}
.builder-item:hover { background: var(--surface); }
.builder-item.selected { background: var(--surface); border-color: var(--line-strong); }
.builder-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-item-meta { flex-basis: 100%; padding-left: 21px; font-size: 11px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-item-actions { display: flex; gap: 2px; flex: none; }
.builder-item-actions button {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  font-size: 13px; padding: 3px 5px; border-radius: 5px; line-height: 1;
}
.builder-item-actions button:hover { background: var(--surface); color: var(--ink); }
.builder-empty { padding: 20px 10px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.builder-detail { display: flex; flex-direction: column; gap: 18px; }
.builder-card {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; box-shadow: var(--shadow);
}
.builder-card h3 { font-size: 16px; margin-bottom: 14px; }
.builder-field { margin-bottom: 14px; }
.builder-field:last-child { margin-bottom: 0; }
.builder-field textarea.text-input { min-height: 120px; resize: vertical; font-family: 'Courier New', monospace; font-size: 13.5px; }
.builder-row { display: flex; gap: 10px; }
.builder-row > * { flex: 1; }
.builder-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.builder-tab {
  background: none; border: 1px solid var(--line-strong); color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.builder-tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.publish-toggle { display: flex; align-items: center; gap: 10px; }
.option-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.option-row input[type="radio"] { flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.option-row .text-input { margin-bottom: 0; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); z-index: 50;
}
.toast.error { background: var(--danger); color: #FFFFFF; }

.reset-link { font-size: 11.5px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Completion certificate
   Deliberately uses FIXED colours rather than the theme tokens:
   a certificate is a document, so it must look and print the
   same whether the viewer is in light or dark mode.
   ============================================================ */
:root {
  --cert-teal:#005F83;
  --cert-teal-deep:#06303F;
  --cert-ink:#12262E;
  --cert-soft:#5A7683;
  --cert-rule:rgba(0,95,131,.28);
}

.cert-page { min-height:100vh; display:flex; flex-direction:column; align-items:center; padding:0 0 60px; }
.cert-bar {
  width:100%; max-width:1122px; display:flex; align-items:center; justify-content:space-between;
  gap:16px; flex-wrap:wrap; padding:26px 22px 20px;
}
.cert-bar .cb-title { font-family:'Poppins',sans-serif; font-weight:600; font-size:18px; color:var(--ink); }
.cert-bar .cb-sub { font-size:13.5px; color:var(--ink-soft); margin-top:3px; }
.cert-bar .cb-actions { display:flex; gap:10px; align-items:center; }

.cert-scaler { transform-origin:top center; }
.sheet {
  width:297mm; height:210mm; background:#fff; position:relative; overflow:hidden;
  box-shadow:0 2px 6px rgba(6,33,42,.10), 0 26px 60px -24px rgba(6,33,42,.40);
}
.sheet-inner { position:absolute; inset:0; padding:17mm 20mm 14mm; display:flex; flex-direction:column; }
/* inset hairline frame — classic certificate framing, no heavy border */
.sheet-inner::before {
  content:""; position:absolute; inset:8mm; border:0.4mm solid var(--cert-rule); pointer-events:none;
}
.cert-owl {
  /* sits in the empty right-hand space, clear of the footer row below */
  position:absolute; right:17mm; bottom:36mm; width:44mm; height:52mm; opacity:.06;
  background-color:var(--cert-teal); pointer-events:none;
  -webkit-mask:url('./owl-mask.png') center/contain no-repeat;
  mask:url('./owl-mask.png') center/contain no-repeat;
}

.cert-head { display:flex; align-items:center; gap:5mm; position:relative; z-index:1; }
.cert-logo {
  width:13mm; height:13mm; flex:none; background-color:var(--cert-teal);
  -webkit-mask:url('./hartley-logo-white.png') left center/contain no-repeat;
  mask:url('./hartley-logo-white.png') left center/contain no-repeat;
}
.cert-brand { line-height:1.25; }
.cert-brand .bn { font-family:'Poppins',sans-serif; font-weight:700; font-size:13pt; letter-spacing:.04em; color:var(--cert-teal-deep); }
.cert-brand .bs { font-size:8pt; letter-spacing:.13em; text-transform:uppercase; color:var(--cert-soft); margin-top:1mm; }

.cert-body { flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; position:relative; z-index:1; }
.cert-kicker {
  font-family:'Poppins',sans-serif; font-weight:700; font-size:10.5pt;
  letter-spacing:.30em; text-transform:uppercase; color:var(--cert-teal); margin-bottom:9mm;
}
.cert-intro { font-size:11pt; color:var(--cert-soft); }
.cert-name {
  font-family:'Poppins',sans-serif; font-weight:600; font-size:33pt; line-height:1.12;
  color:var(--cert-ink); margin:4mm 0 3mm; padding:0 6mm 4mm;
  border-bottom:0.35mm solid var(--cert-rule); max-width:200mm;
}
.cert-course {
  font-family:'Poppins',sans-serif; font-weight:600; font-size:19pt; line-height:1.2;
  color:var(--cert-teal); margin:3mm 0 0; max-width:200mm;
}
.cert-course-sub { font-size:10pt; color:var(--cert-soft); margin-top:2mm; }

.cert-foot {
  display:flex; justify-content:space-between; align-items:flex-end; gap:8mm;
  position:relative; z-index:1; padding-top:6mm;
}
.cert-foot .fcol { display:flex; flex-direction:column; gap:1.5mm; }
.cert-foot .lbl { font-size:7pt; letter-spacing:.14em; text-transform:uppercase; color:var(--cert-soft); }
.cert-foot .val { font-family:'Poppins',sans-serif; font-weight:600; font-size:10pt; color:var(--cert-ink); font-variant-numeric:tabular-nums; }
.cert-foot .fcol.right { text-align:right; align-items:flex-end; }

.cert-msg { max-width:520px; margin:12vh auto 0; padding:0 22px; text-align:left; }
.cert-msg .display { font-size:26px; margin-bottom:10px; }
.cert-msg p { color:var(--ink-soft); font-size:15px; margin:0 0 22px; }

@media print {
  @page { size:A4 landscape; margin:0; }
  html, body { background:#fff !important; }
  * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
  .topbar, .cert-bar { display:none !important; }
  .cert-page { padding:0; display:block; min-height:0; }
  .cert-scaler { transform:none !important; height:auto !important; }
  .sheet { box-shadow:none; width:297mm; height:210mm; page-break-after:avoid; }
}

/* ---- Lesson video ---- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* the builder's small "does my link work?" preview */
.video-preview { max-width: 340px; margin-top: 10px; }
.video-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.video-hint.bad { color: var(--danger); }

/* ---- Assignments & due dates ---- */
.due-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.due-chip .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.due-overdue    { background: var(--danger-surface);  color: var(--danger); }
.due-overdue .dot    { background: var(--danger); }
.due-due-soon   { background: var(--gold-surface);    color: var(--gold); }
.due-due-soon .dot   { background: var(--gold); }
.due-upcoming   { background: var(--surface);         color: var(--ink-soft); }
.due-upcoming .dot   { background: var(--ink-soft); }
.due-done       { background: var(--success-surface); color: var(--success); }
.due-done .dot       { background: var(--success); }
.due-none       { background: var(--surface);         color: var(--ink-soft); }
.due-none .dot       { background: var(--ink-soft); }

/* in-app nudge — the reminder that needs no email provider */
.nudge {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border-radius: 14px; margin-bottom: 26px;
  background: var(--gold-surface); border: 1px solid var(--gold);
}
.nudge.urgent { background: var(--danger-surface); border-color: var(--danger); }
.nudge .n-icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  background: var(--gold); color: #fff;
}
.nudge.urgent .n-icon { background: var(--danger); }
.nudge .n-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); }
.nudge .n-body { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

.section-label {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 12px;
}
.section-label.muted { color: var(--ink-faint, var(--ink-soft)); }
.course-group { margin-bottom: 34px; }
.course-card .card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 2px;
}

/* admin assign panel */
.assign-card {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 30px;
}
.assign-card .display { font-size: 17px; margin-bottom: 4px; }
/* Small explanatory text under a field. Was only ever defined inside
   .assign-card, so every other .hint on the site rendered at body size and
   crowded whatever followed it. */
.hint { color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.assign-card p.hint { margin: 0 0 16px; }
.assign-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.assign-row .fgroup { display: flex; flex-direction: column; gap: 6px; }
.assign-row select.text-input,
.assign-row input.text-input { margin-bottom: 0; min-width: 190px; }
.people-box {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px;
  max-height: 190px; overflow-y: auto; background: var(--paper); margin-bottom: 14px;
}
.people-box label {
  display: flex; align-items: center; gap: 9px; padding: 5px 2px;
  font-size: 14px; cursor: pointer;
}
.people-box input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); flex: none; }
.people-box .all-row { border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 8px; font-weight: 700; }

/* Invite link — shown once, after creating someone's account */
.invite-link-panel { margin: 14px 0 4px; padding: 15px 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--surface); }
.invite-link-head { font-family: Poppins, system-ui, sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); }
.invite-link-panel .hint { margin: 4px 0 11px; }
.invite-link-field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.invite-link-field .text-input { flex: 1; min-width: 240px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* Invite form — roomy, one labelled field per row */
.invite-field { margin-bottom: 14px; }
.invite-field .field-label { display: block; margin-bottom: 5px; }
.invite-field .hint { margin: 5px 0 0; }
.invite-email-input { width: 100%; font-size: 16px; padding: 12px 14px; }
.invite-picker-row { display: flex; gap: 14px; flex-wrap: wrap; }
.invite-picker-row .invite-field { flex: 1 1 220px; margin-bottom: 14px; }
.invite-picker-row .text-input { width: 100%; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* Contact details collected at sign-up */
.contact-cell { font-size: 12.5px; }
.contact-line { display: block; color: var(--ink); text-decoration: none; line-height: 1.45; }
a.contact-line:hover { color: var(--accent); text-decoration: underline; }
.contact-line.muted { color: var(--ink-soft); }
.contact-line.pending { color: var(--gold); font-weight: 700; font-size: 11.5px; margin-top: 2px; }

/* Compliance files */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-card { border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px; background: var(--surface-raised); }
.doc-card.done { border-color: var(--success); background: var(--success-surface); }
.doc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-card-title { font-family: Poppins, system-ui, sans-serif; font-weight: 600; font-size: 15.5px; color: var(--ink); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.doc-optional { font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

.doc-status { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.doc-accepted { color: var(--success); background: var(--success-surface); border: 1px solid var(--success); }
.doc-pending  { color: var(--gold);    background: var(--gold-surface);    border: 1px solid var(--gold); }
.doc-rejected { color: var(--danger);  background: var(--danger-surface);  border: 1px solid var(--danger); }

.doc-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 11px 0 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.doc-file-name { font-weight: 600; font-size: 13.5px; word-break: break-all; }
.doc-file-meta { font-size: 12px; color: var(--ink-soft); }
.doc-note { margin-top: 9px; padding: 9px 11px; font-size: 13px; border-radius: 9px; color: var(--ink); background: var(--danger-surface); border: 1px solid var(--danger); }
.doc-upload { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 12px; }
.doc-upload-hint { font-size: 12px; color: var(--ink-soft); }

.doc-progress { margin: 4px 0 20px; padding: 12px 15px; border-radius: 11px; font-size: 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.doc-progress.complete { border-color: var(--success); background: var(--success-surface); color: var(--success); }

.admin-doc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-doc-row:last-child { border-bottom: none; }
.admin-doc-main { flex: 1 1 260px; min-width: 0; }
.admin-doc-req { font-weight: 700; font-size: 14px; }
.admin-doc-meta { font-size: 12.5px; color: var(--ink-soft); word-break: break-all; }
.admin-doc-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.icon-btn.subtle { background: var(--surface); border-color: var(--line); color: var(--accent); }
.icon-btn.subtle:hover { background: var(--surface-raised); border-color: var(--accent); }

/* Privacy notice / legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin: 32px 0 10px; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.65; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--accent); }
.legal-block { padding: 13px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 9px 9px 0; }

/* Privacy consent at sign-up */
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 6px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.consent-row input { margin-top: 3px; flex: none; }
.consent-row label { font-size: 14px; line-height: 1.5; }

/* Footer */
.site-foot { margin-top: auto; padding: 22px 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--accent); }

/* Credentials handed out when an admin sets a password */
.cred-box { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cred-line { display: flex; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.cred-line:last-child { border-bottom: none; }
.cred-label { flex: 0 0 130px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.cred-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }

/* Confirmation modal (used for deleting a person) */
.modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(4,26,34,0.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: min(460px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 22px 18px; }
.modal h3 { font-size: 19px; margin-bottom: 8px; }
.modal p { font-size: 14.5px; line-height: 1.55; margin: 0 0 10px; }
.modal .text-input { width: 100%; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); border-radius: 9px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* Delete action sitting under the person's name in the roster */
.row-delete { display: inline-block; margin-top: 4px; background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: var(--danger); }
.row-delete:hover { text-decoration: underline; }

/* Admin: per-person module breakdown */
.row-detail-toggle { display: block; margin-top: 5px; background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.row-detail-toggle:hover { text-decoration: underline; }
.progress-detail-row td { background: var(--surface); padding: 14px 16px; }
.progress-detail-wrap { display: flex; flex-wrap: wrap; gap: 22px; }
.progress-course { min-width: 260px; }
.progress-course-title { font-family: Poppins, system-ui, sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 7px; }
.progress-module { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 4px 0; font-size: 13px; }
.progress-module-name { flex: 1 1 auto; min-width: 140px; color: var(--ink); }
.progress-module-score { font-size: 11.5px; color: var(--ink-soft); }
.mod-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mod-status.mod-passed { color: var(--success); background: var(--success-surface); }
.mod-status.mod-progress { color: var(--gold); background: var(--gold-surface); }
.mod-status.mod-none { color: var(--ink-soft); background: var(--surface-raised); border: 1px solid var(--line); }
