/* =====================================================================
 * Just Little Kidz — Staff Portal styles
 *
 * Cream / teal / sunny — light, warm, rounded. Mobile-first.
 * NOTE: --gold is aliased to --primary so the onboarding engine's
 * inline styles (which reference var(--gold)) pick up the JLK teal.
 * =================================================================== */

:root {
  --bg: #fbf7f0;            /* cream */
  --surface: #fff;
  --surface-soft: #fdf9f1;
  --primary: #2fa39a;        /* teal */
  --primary-deep: #1f7a73;
  --primary-soft: rgba(47, 163, 154, 0.10);
  --accent: #ffb443;         /* sunny */
  --accent-soft: rgba(255, 180, 67, 0.14);
  --green: #46c08a;
  --green-soft: rgba(70, 192, 138, 0.12);
  --text: #2c3340;
  --text-dim: #6b7480;
  --border: #e7e2d8;
  --border-strong: #c8b896;
  --shadow-soft: 0 4px 20px rgba(31, 122, 115, 0.06), 0 1px 3px rgba(31, 122, 115, 0.04);
  --shadow-lift: 0 10px 32px rgba(31, 122, 115, 0.10), 0 2px 6px rgba(31, 122, 115, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Alias so the engine's inline styles (which reference --gold) pick up teal */
  --gold: var(--primary);
}

/* H5 dark mode was removed 2026-07-10 — fought the warm-cream JLK brand. */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-deep); }
a:hover { color: var(--primary); }

/* ==================================================================
 * Header / hero
 * ================================================================== */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}
.site-header-inner {
  max-width: 920px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
}
.site-header-inner img.logo {
  /* JLK Academy uses the same site logo, but crops the "CHILDCARE" word
     off the bottom of the image via object-fit cover + top alignment.
     Image natural ratio ≈ 2.71:1 (with CHILDCARE); visible-portion ratio
     ≈ 4.75:1 (without). Box at 200×42 = 4.76:1 → CHILDCARE is fully clipped. */
  width: 200px; height: 42px;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  display: block;
}
@media (max-width: 540px) {
  .site-header-inner img.logo { width: 160px; height: 34px; }
}
.site-header-inner .brand {
  font-weight: 800; font-size: 17px; color: var(--text);
  line-height: 1.2;
}
.site-header-inner .brand small {
  display: block; font-weight: 600; font-size: 12px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em;
}

/* Sub-header portal nav: lets staff jump between Induction / Training. */
.portal-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.portal-nav-inner {
  max-width: 920px; margin: 0 auto;
  padding: 6px 16px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.portal-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px; font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background 0.12s ease, color 0.12s ease;
}
.portal-nav a:hover { background: var(--bg); color: var(--text); }
.portal-nav a.is-active {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.hero {
  padding: 28px 16px 16px;
  background: linear-gradient(160deg, var(--bg) 0%, #fff5e3 60%, var(--bg) 100%);
}
.hero-inner {
  max-width: 720px; margin: 0 auto;
}
.hero-inner h1 {
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.hero-inner p.lede {
  font-size: 17px; line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 6px;
}

/* ==================================================================
 * Main container
 * ================================================================== */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* ==================================================================
 * Buttons
 * ================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0; border-radius: var(--radius-pill);
  font: 700 15px/1 'Nunito', 'Inter', sans-serif;
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 163, 154, 0.28);
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-soft); }
.btn-accent {
  background: var(--accent);
  color: #4a3504;
  box-shadow: 0 4px 14px rgba(255, 180, 67, 0.32);
}
.btn-accent:hover { filter: brightness(0.96); }

/* ==================================================================
 * Access key form (injected by access.js)
 * ================================================================== */

.access-key-form {
  margin-top: 24px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
}
.access-banner {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; margin-bottom: 14px;
  font-size: 14px; color: #6a4d04; line-height: 1.55;
}
.key-form label {
  display: block; font-weight: 700; font-size: 14px;
  color: var(--text); margin-bottom: 6px;
}
.key-optional { color: var(--text-dim); font-weight: 400; font-size: 13px; }
.key-name-input,
.key-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 600 16px 'Nunito', 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.key-row input { text-transform: uppercase; letter-spacing: 0.06em; }
.key-name-input:focus,
.key-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.key-row {
  display: flex; gap: 10px;
  margin-bottom: 12px;
}
.key-row input { flex: 1; min-width: 0; }
.key-row .btn { flex-shrink: 0; }
.key-bad {
  border-color: #d44a4a !important;
  background: #fff1f1;
}
.key-help {
  font-size: 13.5px; color: var(--text-dim); margin: 8px 0 0;
  line-height: 1.55;
}
.key-help a { color: var(--primary-deep); font-weight: 700; }

/* ==================================================================
 * Progress card
 * ================================================================== */

.progress-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 12px;
  z-index: 10;
}
.progress-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.progress-label {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.progress-numbers {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.progress-numbers .progress-pct {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  margin-left: 4px;
}
.progress-bar {
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 12px 0 10px;
}
.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--green));
  width: 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-pill);
}
.progress-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 6px;
}
.progress-reset {
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-dim);
  padding: 6px 14px; border-radius: var(--radius-pill);
  font: 600 13px 'Nunito', sans-serif; cursor: pointer;
}
.progress-reset:hover { background: var(--bg); }
.progress-print {
  background: var(--accent);
  color: #4a3504;
  border: 0;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font: 700 13px 'Nunito', sans-serif; cursor: pointer;
}

/* ==================================================================
 * Step cards (<details>)
 * ================================================================== */

.step-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.step-card[open] { box-shadow: var(--shadow-lift); }
.step-card.step-complete {
  border-color: var(--green);
  background: var(--green-soft);
}
.step-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  user-select: none;
}
.step-card > summary::-webkit-details-marker { display: none; }
.step-card > summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--text-dim);
  font-size: 14px;
  transition: transform 0.2s ease;
}
.step-card[open] > summary::after { transform: rotate(180deg); }

.step-badge {
  background: var(--primary);
  color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap;
}
.step-card.step-complete .step-badge {
  background: var(--green);
}
.step-card > summary h3 {
  margin: 0; font-size: 16.5px; font-weight: 800; color: var(--text);
  line-height: 1.3;
}
.step-day {
  font-size: 12px; color: var(--text-dim); font-weight: 600;
  white-space: nowrap;
}

.step-body {
  padding: 4px 18px 20px;
  border-top: 1px dashed var(--border);
  background: var(--surface);
}
.step-card.step-complete .step-body { background: rgba(255, 255, 255, 0.6); }
.step-body p { margin: 12px 0; line-height: 1.65; }
.step-body ul, .step-body ol { margin: 10px 0 14px; padding-left: 22px; line-height: 1.7; }

/* Quick-start summary (injected by engine) */
.step-quickstart {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 4px;
}
.qs-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12.5px; color: var(--text-dim); font-weight: 600;
}
.qs-pill strong { color: var(--text); font-weight: 800; }
.qs-pill.qs-save {
  background: var(--primary-soft);
  border-color: rgba(47, 163, 154, 0.3);
  color: var(--primary-deep);
}

/* Task list checkboxes */
.task-list {
  list-style: none; margin: 16px 0 12px; padding: 0;
}
.task-list li {
  margin: 0;
}
.task-list label {
  display: block;
  position: relative;
  padding: 10px 12px 10px 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  cursor: pointer;
  margin-bottom: 8px;
  line-height: 1.55;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.task-list label:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.task-list input[type="checkbox"] {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px; height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
}
.task-list input[type="checkbox"]:checked + span,
.task-list label:has(input:checked) {
  text-decoration: none;
}
.task-list label:has(input:checked) {
  background: var(--green-soft);
  border-color: var(--green);
}

/* Notify-manager button per step */
.notify-manager {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  padding: 10px 18px;
  background: var(--accent);
  color: #4a3504;
  border: 0; border-radius: var(--radius-pill);
  font: 700 14px 'Nunito', sans-serif; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 180, 67, 0.28);
}
.notify-manager:hover { filter: brightness(0.96); }

/* ==================================================================
 * Glossary tooltips
 * ================================================================== */

.gloss {
  position: relative;
  border-bottom: 1.5px dotted var(--primary);
  cursor: help;
}
.gloss-pop {
  /* position:fixed escapes any overflow:hidden ancestors (e.g. .step-card)
     and uses the viewport as its containing block. gloss.js calculates the
     top/left on hover/focus so the tooltip clamps inside the viewport and
     flips above/below the term as needed. */
  position: fixed;
  left: -9999px;            /* off-screen until JS positions it */
  top: -9999px;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  background: var(--text);
  color: #fff;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  z-index: 200;
}
.gloss-pop strong {
  display: block; color: var(--accent);
  font-size: 12px; font-weight: 800;
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em;
}
.gloss:hover .gloss-pop,
.gloss:focus .gloss-pop,
.gloss:focus-within .gloss-pop {
  opacity: 1;
}

/* ==================================================================
 * Toast notifications
 * ================================================================== */

.toast-container {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-lift);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast-show { opacity: 1; transform: translateY(0); }
.toast.toast-hide { opacity: 0; transform: translateY(-12px); }
.toast-milestone { border-left-color: var(--accent); }
.toast-finale { border-left-color: var(--green); background: linear-gradient(160deg, var(--surface), var(--green-soft)); }
.toast-icon { font-size: 22px; flex-shrink: 0; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 800; font-size: 14.5px; color: var(--text); margin-bottom: 2px; }
.toast-message { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.toast-cta {
  display: inline-block; margin-top: 6px;
  background: var(--primary); color: #fff;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.toast-cta:hover { background: var(--primary-deep); color: #fff; }
.toast-close {
  background: transparent; border: 0; color: var(--text-dim);
  font-size: 22px; cursor: pointer; padding: 0 4px;
  line-height: 1;
}

/* ==================================================================
 * Resume banner
 * ================================================================== */

.resume-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 480px; margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 16px 40px rgba(31, 122, 115, 0.16);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.resume-banner.resume-show { opacity: 1; transform: translateY(0); }
.resume-banner.resume-hide { opacity: 0; transform: translateY(20px); }
.resume-icon { font-size: 28px; flex-shrink: 0; }
.resume-body { flex: 1; min-width: 0; }
.resume-title { font-weight: 800; font-size: 15px; color: var(--text); }
.resume-message { font-size: 13px; color: var(--text-dim); line-height: 1.4; }
.resume-cta {
  background: var(--primary); color: #fff;
  border: 0; border-radius: var(--radius-pill);
  padding: 8px 14px; font: 700 13px 'Nunito', sans-serif;
  cursor: pointer; white-space: nowrap;
}
.resume-cta:hover { background: var(--primary-deep); }
.resume-close {
  background: transparent; border: 0; color: var(--text-dim);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px;
}

/* ==================================================================
 * Bookmark CTA
 * ================================================================== */

.bookmark-cta {
  background: var(--accent-soft);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 24px 0 16px;
  font-size: 14px;
  color: #5a3f02;
}
.bookmark-cta strong { color: #4a3504; }
.bookmark-cta-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
.bookmark-cta-actions button {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font: 700 13px 'Nunito', sans-serif;
  cursor: pointer; color: var(--text);
}
.bookmark-cta-actions button:hover { background: var(--surface-soft); }
#bookmarkInstall { background: var(--primary); color: #fff; border-color: var(--primary); }
#bookmarkInstall:hover { background: var(--primary-deep); }
.bookmark-cta-instructions {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ==================================================================
 * Footer
 * ================================================================== */

.site-footer {
  max-width: 720px; margin: 40px auto 24px;
  padding: 0 16px;
  font-size: 13px; color: var(--text-dim);
  text-align: center;
  line-height: 1.55;
}

/* ==================================================================
 * Small-screen tweaks
 * ================================================================== */

@media (max-width: 540px) {
  .progress-card { position: relative; top: 0; }
  .step-card > summary { padding: 14px 14px; gap: 10px; }
  .step-card > summary h3 { font-size: 15.5px; }
  .step-body { padding: 4px 14px 18px; }
  .toast-container { left: 12px; right: 12px; top: 12px; max-width: none; }
}

/* ==================================================================
 * Training hub — course cards
 * ================================================================== */

.hub-stats {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 16px 0 4px;
}
.hub-stat {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.hub-stat strong { color: var(--text); font-weight: 800; font-size: 14.5px; }
.hub-stat-ok    { background: var(--green-soft);   border-color: rgba(70,192,138,0.45); color: #1d6c4b; }
.hub-stat-ok strong    { color: #15553a; }
.hub-stat-warn  { background: var(--accent-soft);  border-color: rgba(255,180,67,0.5);  color: #6a4d04; }
.hub-stat-warn strong  { color: #4a3504; }
.hub-stat-over  { background: rgba(212,74,74,0.10); border-color: rgba(212,74,74,0.55); color: #8a2929; }
.hub-stat-over strong  { color: #5a1818; }
.hub-stat-todo  { background: var(--bg);           border-color: var(--border-strong); color: var(--text-dim); }
.hub-stat-total { background: var(--primary-soft); border-color: rgba(47,163,154,0.4); color: var(--primary-deep); }

.courses-list {
  display: flex; flex-direction: column; gap: 12px;
  margin: 12px 0 24px;
}
.course-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  color: inherit;
}
.course-card-ok    { border-left-color: var(--green); }
.course-card-warn  { border-left-color: var(--accent); }
.course-card-over  { border-left-color: #d44a4a; background: linear-gradient(120deg, var(--surface), rgba(212,74,74,0.04)); }
.course-card-todo  { border-left-color: var(--border-strong); }

.course-card-icon {
  font-size: 30px; line-height: 1;
  width: 48px; flex-shrink: 0;
  text-align: center;
}
.course-card-body { flex: 1; min-width: 0; }
.course-card-title {
  margin: 0 0 4px;
  font-size: 16.5px; font-weight: 800; color: var(--text);
  line-height: 1.3;
}
.course-card-summary {
  margin: 0 0 8px;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.55;
}
.course-card-category {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* Tint the category pill by category — subtle, never shouty. */
.course-card-category[data-cat="Safeguarding"]            { background: rgba(212,74,74,0.10); color: #8a2929; border-color: rgba(212,74,74,0.30); }
.course-card-category[data-cat="Health & Safety"]         { background: var(--accent-soft); color: #6a4d04; border-color: rgba(255,180,67,0.40); }
.course-card-category[data-cat="EYFS Practice"]           { background: var(--green-soft); color: #15553a; border-color: rgba(70,192,138,0.40); }
.course-card-category[data-cat="SEND & Inclusion"]        { background: var(--primary-soft); color: var(--primary-deep); border-color: rgba(47,163,154,0.35); }
.course-card-category[data-cat="Behaviour & Development"] { background: #fff3e0; color: #8a4500; border-color: #ffd9a8; }
.course-card-category[data-cat="Compliance"]              { background: #f0eef8; color: #4a3a8f; border-color: #d3cef0; }

.course-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12.5px;
}
.course-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 12px;
}
.course-pill-ok       { background: var(--green-soft); color: #15553a; }
.course-pill-warn     { background: var(--accent-soft); color: #6a4d04; }
.course-pill-over     { background: rgba(212,74,74,0.12); color: #8a2929; }
.course-pill-todo     { background: var(--bg); color: var(--text-dim); border: 1px solid var(--border); }
.course-pill-progress { background: var(--primary-soft); color: var(--primary-deep); }
.course-card-renewal {
  color: var(--text-dim); font-weight: 600;
}
.course-card-level {
  color: var(--primary-deep); font-weight: 700;
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.course-card-arrow {
  flex-shrink: 0;
  font-size: 22px; color: var(--text-dim);
  margin-left: auto;
}

/* ==================================================================
 * Manager records dashboard — staff × courses grid
 * ================================================================== */

.rec-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 13px;
}
.rec-grid th, .rec-grid td {
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.rec-grid thead th {
  background: var(--bg);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-dim);
}
.rec-grid .rec-staff-col {
  text-align: left;
  font-weight: 800; color: var(--text);
  white-space: nowrap;
  background: var(--surface-soft);
  position: sticky; left: 0;
  z-index: 1;
  min-width: 180px;
}
.rec-staff-name { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.rec-print-file {
  background: transparent; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; font-size: 12px; cursor: pointer; color: #8A5A11;
  transition: background 0.15s;
}
.rec-print-file:hover { background: var(--accent-soft); }

/* In-flight progress cell — yellow tint, subtle */
.rec-cell.rec-cell-progress {
  background: #FCEEDA; color: #8A5A11; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; display: inline-block; font-size: 11.5px;
}
/* Induction progress badge in staff meta row */
.rec-staff-induction {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #FCEEDA; color: #8A5A11; font-size: 10.5px; font-weight: 700;
}
.rec-staff-induction.rec-staff-induction-done {
  background: #E7F3EA; color: #276438;
}
.rec-staff-meta {
  display: flex; flex-wrap: wrap; gap: 4px 6px;
  margin-top: 4px;
}
.rec-staff-meta > span {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-dim);
  white-space: nowrap;
}
.rec-staff-role { background: var(--accent-soft) !important; color: #6a4d04 !important; }
.rec-staff-site { background: var(--green-soft) !important; color: #15553a !important; }
.rec-staff-cpd  { background: var(--surface-soft) !important; color: var(--text) !important; }
.rec-grid .rec-icon { display: block; font-size: 18px; margin-bottom: 2px; }
.rec-grid .rec-course-short {
  display: block; font-size: 11px; line-height: 1.25;
  max-width: 80px; margin: 0 auto;
}
.rec-cell {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 12px;
  white-space: nowrap;
}
.rec-cell-ok    { background: var(--green-soft); color: #15553a; }
.rec-cell-warn  { background: var(--accent-soft); color: #6a4d04; }
.rec-cell-over  { background: rgba(212,74,74,0.15); color: #8a2929; }
.rec-cell-never { color: var(--text-dim); font-weight: 400; font-size: 16px; }

.rec-raw {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rec-raw th, .rec-raw td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.rec-raw thead th {
  background: var(--bg);
  font-weight: 700; font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.rec-raw tbody tr:hover { background: var(--surface-soft); }

/* ==================================================================
 * End-of-course quiz (Knowledge check)
 * ================================================================== */

.step-quiz {
  border-left: 5px solid var(--accent);
  background: linear-gradient(160deg, var(--surface), rgba(255,180,67,0.04));
}
.step-quiz > summary .step-badge { background: var(--accent); color: #4a3504; }
.step-quiz.step-complete { border-left-color: var(--green); background: var(--green-soft); }
.step-quiz.step-complete > summary .step-badge { background: var(--green); color: #fff; }

.quiz-list {
  list-style: none;
  counter-reset: quiz-counter;
  margin: 12px 0 16px;
  padding: 0;
}
.quiz-q {
  counter-increment: quiz-counter;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
.quiz-q::before {
  content: 'Q' counter(quiz-counter);
  display: inline-block;
  margin-right: 10px;
  padding: 2px 9px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: var(--radius-pill);
  font-weight: 800; font-size: 12px;
  vertical-align: middle;
}
.quiz-stem {
  display: inline;
  font-weight: 700; font-size: 15px;
  color: var(--text);
  margin: 0;
}
.quiz-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.quiz-opt:hover { background: var(--primary-soft); border-color: var(--primary); }
.quiz-opt input[type="radio"] {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.quiz-opt:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Submit + reset buttons row */
.quiz-submit, .quiz-reset { margin: 6px 8px 0 0; }

/* Per-question feedback states */
.quiz-q-correct {
  border-color: var(--green);
  background: var(--green-soft);
}
.quiz-q-correct::before { background: var(--green); color: #fff; }
.quiz-q-wrong {
  border-color: #d44a4a;
  background: rgba(212,74,74,0.06);
}
.quiz-q-wrong::before { background: #d44a4a; color: #fff; }
.quiz-q-wrong .quiz-opt:has(input:checked) {
  background: rgba(212,74,74,0.12);
  border-color: #d44a4a;
}
.quiz-q-unanswered {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Result message */
.quiz-result-msg {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.6;
}
.quiz-result-msg strong { display: block; font-size: 16px; margin-bottom: 4px; }
.quiz-result-msg p { margin: 0; font-size: 14px; }
.quiz-result-pass {
  background: var(--green-soft);
  border: 1.5px solid var(--green);
  color: #15553a;
}
.quiz-result-fail {
  background: rgba(212,74,74,0.08);
  border: 1.5px solid #d44a4a;
  color: #8a2929;
}
.quiz-result-warn {
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  color: #6a4d04;
  padding: 12px 16px;
}

.quiz-pass-task { display: none; } /* hidden checkbox the engine watches */

/* ==================================================================
 * JLK Academy — landing + pathway
 * ================================================================== */

.academy-section { margin: 0 0 28px; }
.academy-section-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  margin: 0 0 6px;
}
.academy-section-lede {
  font-size: 14.5px; color: var(--text-dim); line-height: 1.6;
  margin: 0 0 16px;
}

/* Recommended-for-your-role panel */
.academy-reco-title {
  font-size: 17px; font-weight: 800; color: var(--text);
  margin: 0 0 10px;
}
.academy-reco-list {
  display: flex; flex-direction: column; gap: 10px;
}
.academy-reco-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.academy-reco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  color: inherit;
}
.academy-reco-icon { font-size: 26px; line-height: 1; flex-shrink: 0; width: 40px; text-align: center; }
.academy-reco-body { flex: 1; min-width: 0; }
.academy-reco-title-row { font-weight: 800; font-size: 15.5px; color: var(--text); }
.academy-reco-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.academy-reco-arrow { font-size: 20px; color: var(--text-dim); flex-shrink: 0; }

/* The 6 academy area cards */
.academy-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.academy-area-card {
  display: flex; flex-direction: column;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: 5px solid var(--area-accent, var(--primary));
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  min-height: 200px;
}
.academy-area-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  color: inherit;
}
.academy-area-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.academy-area-icon {
  font-size: 32px; line-height: 1;
  margin-bottom: 8px;
}
.academy-area-title {
  margin: 0 0 6px;
  font-size: 17px; font-weight: 800; color: var(--text);
  line-height: 1.25;
}
.academy-area-summary {
  margin: 0 0 8px;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.55;
  flex: 1;
}
.academy-area-audience {
  margin: 0 0 10px;
  font-size: 12px; color: var(--text-dim);
  font-style: italic;
}
.academy-area-meta { margin-top: auto; }
.academy-area-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
}
.academy-area-status-done     { background: var(--green-soft); color: #15553a; }
.academy-area-status-progress { background: var(--primary-soft); color: var(--primary-deep); }
.academy-area-status-todo     { background: var(--bg); color: var(--text-dim); border: 1px solid var(--border); }
.academy-area-status-soon     { background: var(--accent-soft); color: #6a4d04; }

/* Pathway teaser strip */
.academy-pathway-teaser {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.academy-pathway-teaser > div { flex: 1; min-width: 220px; }

/* Pathway list (pathway.html) */
.pathway-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.pathway-step {
  display: flex; gap: 16px; align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.pathway-step.is-current {
  border-color: var(--primary);
  background: linear-gradient(120deg, var(--surface), var(--primary-soft));
  box-shadow: var(--shadow-lift);
}
.pathway-step-num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--text-dim);
}
.pathway-step.is-current .pathway-step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pathway-step-body { flex: 1; min-width: 0; }
.pathway-step-title {
  font-weight: 800; font-size: 15.5px; color: var(--text);
  margin-bottom: 4px;
}
.pathway-step-you {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pathway-step-focus { display: flex; flex-wrap: wrap; gap: 6px; }
.pathway-focus-badge {
  display: inline-block;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--area-accent, var(--primary)) 12%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--area-accent, var(--primary)) 40%, transparent);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
}

/* Certification level grid */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.level-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-bottom: 4px solid var(--level-colour, var(--primary));
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--level-colour, var(--primary));
  color: #fff;
  font-weight: 800; font-size: 16px;
  margin-bottom: 8px;
}
.level-label {
  font-weight: 800; font-size: 14.5px; color: var(--text);
}

/* Hub area heading (when training.html groups by academy) */
.hub-area-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 10px;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--border);
}
.hub-area-heading .icon { font-size: 22px; }
.hub-area-heading h2 {
  margin: 0; font-size: 18px; font-weight: 800; color: var(--text);
}
.hub-area-heading .count {
  font-size: 12px; font-weight: 700; color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 3px 10px;
  margin-left: auto;
}

.hub-level-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 8px;
}
.hub-level-badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: var(--lvl-colour, #9DA3AB); color: white;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hub-level-count {
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  margin-left: auto;
}

@media (max-width: 540px) {
  .academy-areas { grid-template-columns: 1fr; }
  .academy-pathway-teaser { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Training hub v2 — collapsible academies + jump nav + tick badges
   Added 2026-07-12
   ============================================================ */

/* Sticky jump-nav row above the academy list */
.hub-jump-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px; margin: 12px 0 14px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(31, 122, 115, 0.06);
}
.hub-jump-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 700;
  color: var(--text); text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  cursor: pointer;
}
.hub-jump-pill:hover { transform: translateY(-1px); background: var(--primary-soft); border-color: var(--primary); }
.hub-jump-pill .pct {
  font-size: 11px; font-weight: 800;
  color: var(--primary-deep);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
}

/* Collapsible academy heading — override the base .hub-area-heading */
.hub-area-heading {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  border-radius: 10px 10px 0 0;
  padding: 10px 12px;
  margin: 24px 0 10px;
}
.hub-area-heading:hover { background: var(--primary-soft); }
.hub-area-heading .chev {
  display: inline-block; margin-left: 6px;
  color: var(--text-dim); font-size: 14px;
  transition: transform 0.2s ease;
}
.hub-area-heading.hub-collapsed .chev { transform: rotate(-90deg); }
.hub-area-heading .progress-mini {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px;
  font-size: 11.5px; font-weight: 700;
  color: var(--primary-deep);
}
.hub-area-heading .progress-mini-bar {
  width: 60px; height: 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.hub-area-heading .progress-mini-bar-fill {
  height: 100%; background: linear-gradient(90deg, #46c08a, #2fa39a);
  border-radius: 999px;
}
.hub-area-body {
  transition: max-height 0.25s ease;
  overflow: hidden;
}
.hub-area-heading.hub-collapsed + .hub-area-body {
  max-height: 0 !important;
  margin: 0 !important;
}

/* Big green tick badge on completed course cards */
.course-card { position: relative; }
.course-card-tick {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(70, 192, 138, 0.4);
  z-index: 2;
}
.course-card-tick.warn { background: #ffb443; box-shadow: 0 3px 10px rgba(255, 180, 67, 0.4); }
.course-card-tick.over { background: #d44a4a; box-shadow: 0 3px 10px rgba(212, 74, 74, 0.4); }

/* Soft "completed" treatment — greens up the left border but keeps it visible */
.course-card.completed-visible {
  background: linear-gradient(90deg, rgba(70, 192, 138, 0.05), var(--surface) 30%);
}

/* Hide-completed toggle button */
.hub-completed-toggle {
  padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; background: #fff;
  font: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--text); cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.hub-completed-toggle:hover { background: var(--primary-soft); border-color: var(--primary); }
.hub-completed-toggle.active { background: var(--green-soft); border-color: var(--green); color: #15553a; }

/* My Completed section on my-cpd */
.my-completed-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.my-completed-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  text-decoration: none; color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.my-completed-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.my-completed-item .icon { font-size: 22px; flex-shrink: 0; }
.my-completed-item .body { flex: 1; min-width: 0; }
.my-completed-item .title {
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 14px;
  color: var(--text); margin: 0 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.my-completed-item .meta {
  font-size: 12px; color: var(--text-dim); line-height: 1.5;
}
.my-completed-item .meta .date { font-weight: 700; color: var(--primary-deep); }

/* ============================================================
   Tour Excellence pathway — tour-excellence.html
   ============================================================ */

.tour-resource-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tour-resource-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.tour-resource-pill:hover {
  background: var(--accent-soft); transform: translateY(-1px);
}

.tour-section {
  margin: 28px 0 0;
}
.tour-section-title {
  font-size: 22px; margin: 0 0 6px;
}
.tour-section-lede {
  margin: 0 0 18px; color: var(--text-dim);
  font-size: 14.5px; line-height: 1.6; max-width: 720px;
}

.tour-levels-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.tour-level-card {
  position: relative;
  padding: 14px 16px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 4px solid var(--lvl-accent, var(--accent));
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.tour-level-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--lvl-accent, var(--accent)); color: white;
  font-weight: 800; font-size: 14px; margin-bottom: 8px;
}
.tour-level-title {
  margin: 0 0 6px; font-size: 16px; font-weight: 800;
  color: var(--text);
}
.tour-level-req {
  margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}

.tour-module-group {
  margin: 18px 0 22px;
}
.tour-module-group-heading {
  font-size: 15px; font-weight: 800; margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.tour-module-group-badge {
  display: inline-block;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: #6a4d04;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.tour-module-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tour-module-card {
  position: relative; display: block;
  padding: 14px 16px 16px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.tour-module-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tour-module-card.is-complete {
  border-color: var(--green); background: var(--green-soft);
}
.tour-module-icon {
  font-size: 24px; line-height: 1; margin-bottom: 4px;
}
.tour-module-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 4px;
}
.tour-module-title {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 800;
  line-height: 1.35; color: var(--text);
}
.tour-module-summary {
  margin: 0 0 10px; font-size: 12.5px; line-height: 1.5;
  color: var(--text-dim);
}
.tour-module-state {
  display: inline-block;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--text-dim);
  font-size: 11px; font-weight: 700;
}
.tour-module-state-done {
  background: var(--green); color: white;
}

.tour-signoff-section {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 28px;
}
.tour-signoff-steps {
  margin: 0; padding-left: 22px;
  font-size: 14.5px; line-height: 1.65;
}
.tour-signoff-steps li {
  margin-bottom: 6px;
}

@media (max-width: 540px) {
  .tour-levels-grid { grid-template-columns: 1fr; }
  .tour-module-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CPD Readiness Dashboard — cpd-dashboard.html
   ============================================================ */

.cpd-due-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cpd-due-card {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: #FFF7E6;
  border: 1px solid #f0d68a;
  border-left: 4px solid #E8C040;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.cpd-due-card:hover { background: #FFEFCC; }
.cpd-due-icon { font-size: 24px; line-height: 1; }
.cpd-due-body h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 800; color: var(--text); }
.cpd-due-body p { margin: 0 0 6px; font-size: 12.5px; color: #6a4d04; }
.cpd-due-status {
  display: inline-block;
  padding: 2px 8px; border-radius: var(--radius-pill);
  color: white; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
}

table.cpd-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
  margin: 0 0 24px;
}
.cpd-table th, .cpd-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cpd-table th {
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.cpd-table td a { color: var(--text); text-decoration: none; font-weight: 600; }
.cpd-table td a:hover { color: var(--accent); text-decoration: underline; }

.cpd-status-pill {
  display: inline-block;
  padding: 2px 8px; border-radius: var(--radius-pill);
  color: white; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}

.cpd-pct {
  display: inline-block;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 12.5px;
  cursor: help;
}
.cpd-pct-full { background: var(--green-soft); color: #15553a; }
.cpd-pct-good { background: rgba(46,192,138,0.12); color: #15553a; }
.cpd-pct-mid  { background: var(--accent-soft); color: #6a4d04; }
.cpd-pct-low  { background: rgba(212,74,74,0.12); color: #8a2929; }

ul.cpd-checklist-ref {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  font-size: 13.5px;
}
ul.cpd-checklist-ref li {
  padding: 6px 10px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  color: var(--text);
}
.cpd-ref-num {
  font-weight: 800; color: var(--accent);
  margin-right: 4px;
}

pre.cpd-template-code {
  background: #1f2933;
  color: #e6e8eb;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 12.5px;
  line-height: 1.55;
}
pre.cpd-template-code code { background: transparent; color: inherit; padding: 0; }

@media (max-width: 720px) {
  table.cpd-table { font-size: 12.5px; }
  .cpd-table th, .cpd-table td { padding: 6px 6px; }
}

/* ============================================================
   Personal CPD dashboard — my-cpd.html
   ============================================================ */

.my-cpd-stat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 8px;
}
@media (max-width: 1000px) {
  .my-cpd-stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .my-cpd-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.cpd-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 18px 20px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.cpd-stat-num {
  font-size: 32px; font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.1;
}
.cpd-stat-num-small { font-size: 22px; }
.cpd-stat-of {
  font-size: 18px; color: var(--text-dim); font-weight: 700;
}
.cpd-stat-label {
  font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 700;
}
.cpd-stat-sub {
  font-size: 12px; color: var(--text-dim); margin-top: 2px;
}
.cpd-stat-hours { border-left: 4px solid var(--primary-deep); }
.cpd-stat-badges { border-left: 4px solid var(--accent); }
.cpd-stat-complete { border-left: 4px solid var(--green); }
.cpd-stat-status { border-left: 4px solid var(--text-dim); }

.my-cpd-badges {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.cpd-badge {
  position: relative;
  padding: 16px 14px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  opacity: 0.55;
  filter: grayscale(0.4);
  transition: opacity 0.2s, filter 0.2s;
}
.cpd-badge.is-earned {
  opacity: 1; filter: none;
  border-color: var(--badge-accent, var(--accent));
  border-top-width: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.cpd-badge-emoji {
  font-size: 38px; line-height: 1;
  margin-bottom: 6px;
}
.cpd-badge-level {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--badge-accent, var(--accent));
  margin-bottom: 2px;
}
.cpd-badge-academy {
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  min-height: 32px;
}
.cpd-badge-progress {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

.my-cpd-academy-hours { display: grid; gap: 8px; }
.cpd-area-row {
  display: grid;
  grid-template-columns: 220px 1fr 70px;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
}
.cpd-area-label { color: var(--text); font-weight: 600; }
.cpd-area-bar {
  background: var(--bg);
  border-radius: var(--radius-pill);
  height: 12px;
  overflow: hidden;
}
.cpd-area-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.cpd-area-hours {
  text-align: right;
  font-weight: 700;
  color: var(--text);
}
@media (max-width: 540px) {
  .cpd-area-row { grid-template-columns: 1fr; gap: 4px; }
  .cpd-area-hours { text-align: left; }
}

.cpd-renewal-list, .cpd-cert-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cpd-renewal-card, .cpd-cert-card {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
}
.cpd-renewal-card:hover, .cpd-cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.cpd-renewal-icon, .cpd-cert-icon { font-size: 24px; line-height: 1; }
.cpd-renewal-body h4, .cpd-cert-body h4 {
  margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--text);
}
.cpd-renewal-body p, .cpd-cert-body p {
  margin: 0; font-size: 12.5px; color: var(--text-dim);
}
.cpd-renewal-status {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
}
.cpd-renewal-warn { background: var(--accent-soft); color: #6a4d04; }
.cpd-renewal-over { background: rgba(212,74,74,0.12); color: #8a2929; }
.cpd-cert-no {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10.5px; font-weight: 700;
  background: var(--surface-soft); color: var(--text-dim);
}

/* Print: just the steps */
@media print {
  .progress-card, .toast-container, .resume-banner, .bookmark-cta,
  .access-key-form, .notify-manager, .site-header, .site-footer { display: none !important; }
  .step-card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .step-card[open] .step-body { display: block; }
  body { background: #fff; }
}
