@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;1,700;1,800&display=swap');
/* Capital Infusion Academy — light learning-workspace theme.
   Legacy variable names (--navy-*, --gold-*, --ink-*) are kept so existing inline styles keep working;
   they now map onto the light palette. */
:root {
  --navy-950: #f7f6f2;   /* page background */
  --navy-900: #ffffff;   /* surfaces */
  --navy-800: #f1f0ea;   /* subtle fill */
  --navy-700: #e5e7e1;   /* borders */
  --navy-600: #d4d7cf;
  --gold-500: #3159ce;   /* primary */
  --gold-400: #3159ce;
  --gold-100: #242a29;
  --ink-100: #242a29;    /* text */
  --ink-300: #4d5350;
  --ink-500: #737873;    /* muted */
  --blue: #3159ce;
  --blue-light: #ebefff;
  --green-500: #437557;
  --green-light: #eaf0e8;
  --red-500: #c4473c;
  --red-light: #fbeceb;
  --amber: #9a6a12;
  --amber-light: #fbf1dc;
  --dark: #203032;
  --radius: 10px;
  --topbar-h: 96px;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-950);
  color: var(--ink-100);
  font: 14px/1.6 var(--font-body);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 600; margin: 0 0 0.5em 0; line-height: 1.3; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { line-height: 1.6; color: var(--ink-500); margin: 0 0 14px 0; }

/* ---------- Top bar ---------- */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--topbar-h);
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--navy-700);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: var(--ink-100); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.brand .eyebrow {
  display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600; line-height: 1.2;
}

.navlinks { display: flex; align-items: center; gap: 14px; }
.navlinks a, .navlinks button {
  padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--ink-500); background: transparent; border: 1px solid var(--navy-700);
  cursor: pointer; font-family: var(--font-body);
}
.navlinks button:hover { background: var(--navy-950); color: var(--ink-100); }

.user-chip { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-100); }
.user-chip small { display: block; font-weight: 400; color: var(--ink-500); font-size: 10px; text-transform: capitalize; line-height: 1.2; }
.navlinks .user-chip { padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px; text-align: left; }
.navlinks .user-chip:hover, .navlinks .user-chip[aria-expanded="true"] { background: var(--navy-950); color: var(--ink-100); }
.user-chip .chev { font-size: 11px; color: var(--ink-500); }
.profile-menu { position: relative; }
.profile-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; z-index: 50;
  background: #fff; border: 1px solid var(--navy-700); border-radius: 8px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12); display: grid; gap: 2px;
}
.profile-dropdown[hidden] { display: none; }
.navlinks .profile-dropdown a, .navlinks .profile-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink-500); background: transparent;
}
.navlinks .profile-dropdown a:hover, .navlinks .profile-dropdown button:hover { background: var(--navy-950); color: var(--ink-100); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #edece5; color: var(--ink-100);
  display: grid; place-items: center; font-size: 11px; font-weight: 600; flex-shrink: 0;
}

/* ---------- Workspace shell ---------- */
.workspace { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  width: 224px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--navy-700);
  padding: 28px 16px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: var(--topbar-h); align-self: flex-start; height: calc(100vh - var(--topbar-h)); overflow-y: auto;
}
.sidebar .eyebrow { display: block; padding: 0 8px; font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 12px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 6px; font-size: 12px; color: var(--ink-500); }
.nav a:hover { background: var(--navy-950); }
.nav a.active { color: var(--blue); background: var(--blue-light); font-weight: 600; }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.nav-group-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 6px;
  background: transparent; font: inherit; font-size: 12px; color: var(--ink-500); cursor: pointer; text-align: left;
}
.nav-group-toggle:hover { background: var(--navy-950); }
.nav-group-toggle .chev { margin-left: auto; font-size: 11px; transition: transform .15s; }
.nav-group.open .nav-group-toggle .chev { transform: rotate(180deg); }
.nav-sub { display: none; margin: 2px 0 4px 30px; padding-left: 10px; border-left: 1px solid var(--navy-700); gap: 2px; }
.nav-group.open .nav-sub { display: grid; }
.nav-sub a { padding: 9px 12px; }
.goal { padding: 16px; background: var(--navy-950); border-radius: var(--radius); font-size: 12px; }
.goal h3 { font-size: 12px; margin: 4px 0 8px; }
.goal p { color: var(--ink-500); font-size: 11px; margin-bottom: 8px; }
.goal .progress-track { margin: 8px 0; }
.sidebar-footer { margin-top: auto; padding: 12px; color: var(--ink-500); font-size: 11px; }
.workspace > main { min-width: 0; flex: 1; padding: 36px 40px; }
.sidebar-collapse { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; padding: 10px 12px; border: 1px solid var(--navy-700); background: #fff; color: var(--ink-500); border-radius: 6px; font: inherit; font-size: 12px; cursor: pointer; }
.sidebar-collapse:hover { background: var(--navy-950); color: var(--ink-100); }
.collapse-icon { width: 18px; text-align: center; font-size: 15px; }
/* Collapsed menu: an icon rail; the page grows into the freed width. Transitions only run after load (.animate). */
.sidebar { overflow-x: hidden; }
.chev { white-space: nowrap; }
.nav-label { line-height: 1.25; }
.collapse-icon { display: inline-block; }
.workspace.animate .sidebar { transition: width .28s cubic-bezier(.4, 0, .2, 1); }
.workspace.animate > main { transition: padding .28s cubic-bezier(.4, 0, .2, 1); }
.workspace.animate .nav-label, .workspace.animate .chev, .workspace.animate .sidebar .eyebrow, .workspace.animate .goal { transition: opacity .18s ease; }
.workspace.animate .goal { transition: opacity .18s ease, max-height .28s cubic-bezier(.4, 0, .2, 1), padding .28s, margin .28s; }
.workspace.animate .collapse-icon { transition: transform .28s cubic-bezier(.4, 0, .2, 1); }
.goal { max-height: 320px; overflow: hidden; }
.workspace.collapsed .sidebar { width: 74px; }
.workspace.collapsed .nav-label, .workspace.collapsed .chev, .workspace.collapsed .sidebar .eyebrow { opacity: 0; pointer-events: none; }
.workspace.collapsed .goal { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
.workspace.collapsed .nav-sub { display: none; }
.workspace.collapsed .collapse-icon { transform: rotate(180deg); }
.workspace.collapsed > main { padding: 28px 32px; }


/* ---------- Layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 36px 40px 80px; }
.workspace .page { padding: 0 0 60px; max-width: none; }
.page-narrow { max-width: 480px; margin: 0 auto; padding: 60px 24px; }

.eyebrow-label {
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600; margin-bottom: 8px; display: block;
}
.link { color: var(--blue); font-size: 12px; font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header { margin-bottom: 28px; }
.page-header p { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--navy-900);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 24px;
}
.card.flush { padding: 0; overflow: hidden; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.course-card {
  background: var(--navy-900);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px #242a290f; }
.course-card .content { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { margin: 0; font-size: 16px; }
.course-card p { font-size: 12px; margin: 0; flex: 1; }
.course-meta { border-top: 1px solid var(--navy-700); padding-top: 12px; font-size: 11px; color: var(--ink-500); }

.tag {
  display: inline-flex; align-self: flex-start;
  font-size: 9px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600;
  padding: 4px 8px; border-radius: 4px; background: var(--blue-light); color: var(--blue);
}
.badge { display: inline-block; padding: 4px 8px; background: var(--blue-light); color: var(--blue); font-size: 9px; font-weight: 600; border-radius: 4px; letter-spacing: .04em; }

.status-pill {
  font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.status-pill.not_started { background: var(--navy-800); color: var(--ink-500); }
.status-pill.in_progress { background: var(--blue-light); color: var(--blue); }
.status-pill.completed { background: var(--green-light); color: var(--green-500); }
.status-pill.improving { background: var(--amber-light); color: var(--amber); }
.status-pill.needs { background: var(--red-light); color: var(--red-500); }

.assigned-badge { font-size: 9px; color: var(--red-500); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* ---------- Abstract course art ---------- */
.art {
  position: relative; height: 130px; overflow: hidden;
  background: linear-gradient(125deg, #ffffff66, transparent 48%), linear-gradient(20deg, #d9ceb7, #eee5d2);
}
.art::after {
  content: ""; position: absolute; left: 15%; right: 8%; bottom: 18px; height: 11px;
  background: #665c3c35; filter: blur(7px); border-radius: 50%;
}
.arch::before {
  content: ""; position: absolute; width: 100px; height: 90px; left: calc(50% - 56px); bottom: 24px;
  border: 15px solid #396c8d; border-bottom: 0; border-radius: 80px 80px 0 0;
  transform: rotate(-13deg); box-shadow: inset 7px 2px #153b57;
}
.orb {
  position: absolute; width: 38px; height: 38px; border-radius: 50%; right: 23%; bottom: 22px; z-index: 1;
  background: radial-gradient(circle at 30% 25%, #d3e6eb, #66818f 65%, #314450);
}
.stairs::before {
  content: ""; position: absolute; width: 115px; height: 85px; bottom: 22px; left: calc(50% - 58px);
  background: linear-gradient(110deg, #d4dbb7, #7e916d);
  clip-path: polygon(0 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 100% 0, 100% 100%, 0 100%);
}
.stairs .orb { width: 26px; height: 26px; right: 32%; bottom: 104px; background: radial-gradient(circle at 30% 25%, #8ca28c, #233c2b 65%); }
.bars .columns { position: absolute; bottom: 22px; left: 25%; right: 20%; height: 95px; display: flex; align-items: flex-end; gap: 9px; }
.bars i { flex: 1; background: linear-gradient(90deg, #a36516, #e9b352, #a56615); }
.bars i:nth-child(1) { height: 20%; } .bars i:nth-child(2) { height: 38%; } .bars i:nth-child(3) { height: 58%; }
.bars i:nth-child(4) { height: 78%; } .bars i:nth-child(5) { height: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px; border-radius: 5px; border: 1px solid var(--navy-700);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--ink-100); transition: filter .15s;
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink-100); border: 1px solid var(--navy-700); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label { display: block; font-size: 12px; color: var(--ink-300); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 6px; border: 1px solid var(--navy-700);
  background: #fff; color: var(--ink-100); font-family: var(--font-body); font-size: 13px; margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 89, 206, .15); }

/* ---------- Misc ---------- */
.error-box { background: var(--red-light); border: 1px solid #efc3bf; color: var(--red-500); padding: 10px 14px; border-radius: 6px; font-size: 12px; margin-bottom: 16px; }
.success-box { background: var(--green-light); border: 1px solid #c8d9c8; color: var(--green-500); padding: 10px 14px; border-radius: 6px; font-size: 12px; margin-bottom: 16px; }

.progress-track { width: 100%; height: 5px; background: var(--navy-700); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 10px; transition: width .3s; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 16px; }
.section-title:first-child { margin-top: 0; }
.section-title h2 { margin: 0; }
.section-title .count { color: var(--ink-500); font-size: 12px; }

.video-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Lesson content */
.lesson-content { font-size: 14px; line-height: 1.7; }
.lesson-content h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-top: 1.4em; color: var(--ink-100); }
.lesson-content h2:first-child { margin-top: 0; }
.lesson-content p { color: var(--ink-300); }
.lesson-content dl dt { color: var(--ink-100); font-weight: 600; margin-top: 14px; }
.lesson-content dl dd { margin: 4px 0 0; color: var(--ink-300); }
.lesson-content blockquote { margin: 16px 0; padding: 16px 20px; background: #edeae2; border-radius: var(--radius); font: 17px/1.6 var(--font-display); color: var(--ink-100); }
.lesson-content ul, .lesson-content ol, .lesson-content li { color: var(--ink-300); }
.lesson-content table { margin: 12px 0; }
.lesson-content th { color: var(--ink-500); }

.quiz-question { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--navy-700); cursor: pointer; margin-bottom: 8px; font-size: 13px; }
.quiz-option:hover { background: var(--navy-950); }
.quiz-option.selected { border-color: var(--blue); background: var(--blue-light); }
.quiz-option input { width: auto; margin: 0; accent-color: var(--blue); }

.result-banner { text-align: center; padding: 32px; border-radius: var(--radius); margin-bottom: 20px; }
.result-banner.pass { background: var(--green-light); border: 1px solid #c8d9c8; }
.result-banner.fail { background: var(--red-light); border: 1px solid #efc3bf; }
.result-score { font-family: var(--font-display); font-size: 3rem; font-weight: 500; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--navy-700); font-size: 12px; }
th { color: var(--ink-500); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
td { color: var(--ink-100); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

.cert-card { background: #fff; border: 1px solid var(--navy-700); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 24px; position: relative; }
.cert-code { font-family: monospace; letter-spacing: .05em; color: var(--blue); }

.hidden { display: none !important; }

/* ---------- Performance & tracking ---------- */
.phase-label { font-size: 11px; color: var(--ink-500); letter-spacing: .03em; }
.perf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--navy-700); flex-wrap: wrap; }
.perf-row:last-child { border-bottom: 0; }
.perf-title { font-weight: 600; font-size: 13px; }
a.perf-title:hover { color: var(--blue); }
.perf-meta { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.perf-meta a { color: var(--blue); }
.weak-chip { display: inline-block; margin: 4px 6px 0 0; padding: 4px 10px; border-radius: 999px; font-size: 11px; background: var(--red-light); color: var(--red-500); font-weight: 500; }
.gate-box { padding: 12px 16px; border-radius: var(--radius); font-size: 12px; margin-bottom: 20px; }
.gate-box.ok { background: var(--green-light); color: var(--green-500); }
.gate-box.wait { background: var(--amber-light); color: var(--amber); }
.review-item { padding: 12px 14px; border-radius: var(--radius); margin-top: 10px; background: #fff; border: 1px solid var(--navy-700); border-left: 3px solid var(--red-500); text-align: left; }
.review-item.right { border-left-color: var(--green-500); }
.review-item .q { font-weight: 600; margin-bottom: 6px; }
.review-item .a { font-size: 12px; color: var(--ink-300); }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: flex; align-items: center; gap: 18px; padding: 20px; }
.stat-icon { background: var(--navy-950); color: var(--blue); padding: 10px; border-radius: 6px; font-size: 16px; line-height: 1; }
.stat small { display: block; font-size: 10px; color: var(--ink-500); }
.stat strong { display: block; font-size: 26px; font-weight: 500; line-height: 1.4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(240px, 1fr); gap: 28px; }
.resume-body { display: flex; gap: 24px; padding: 24px; }
.resume-info { flex: 1; min-width: 0; }
.resume-info h2 { font: 400 26px/1.3 var(--font-display); margin: 10px 0; }
.resume-info p { font-size: 12px; }
.resume-art { width: 200px; flex-shrink: 0; border-radius: 6px; height: 150px; }
.resume-footer { background: var(--blue-light); padding: 18px 24px; }
.resume-footer p { margin: 0; font-size: 13px; color: var(--ink-100); }
.resume-footer .eyebrow-label { color: var(--blue); margin-bottom: 4px; }
.path-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.path-step { display: block; }
.path-step p { font-size: 12px; margin-bottom: 2px; color: var(--ink-100); font-weight: 500; }
.path-step small { font-size: 10px; color: var(--ink-500); }
.step-number { display: grid; place-items: center; width: 32px; height: 32px; background: var(--blue-light); color: var(--blue); border-radius: 50%; margin-bottom: 10px; font-size: 10px; font-weight: 600; }
.step-number.complete { background: var(--green-light); color: var(--green-500); }
.step-number.idle { background: var(--navy-800); color: var(--ink-500); }
.step-number.warn { background: var(--red-light); color: var(--red-500); }
.aside-stack { display: grid; gap: 24px; align-content: start; }
.mini-card { background: var(--green-light); padding: 22px; border-radius: var(--radius); }
.mini-card.warn { background: var(--red-light); }
.mini-card.amber { background: var(--amber-light); }
.mini-card h3 { font-size: 13px; margin-bottom: 8px; }
.mini-card .serif { font: 400 26px var(--font-display); margin-bottom: 10px; }
.mini-card small { color: var(--ink-300); font-size: 11px; display: block; }
.assign-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--navy-700); font-size: 12px; }
.assign-item:last-child { border-bottom: 0; }

/* Catalog */
.banner { background: var(--dark); color: #fff; padding: 32px; border-radius: var(--radius); margin-bottom: 28px; }
.banner h2 { font: 400 30px var(--font-display); margin-bottom: 10px; }
.banner p, .banner .eyebrow-label { color: #b9cdc5; }
.banner .link { color: #fff; }
.banner-steps { display: flex; gap: 28px; text-align: center; flex-wrap: wrap; }
.banner-steps span { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #526c62; border-radius: 50%; font: 22px var(--font-display); margin: 0 auto 10px; }
.banner-steps small { color: #d8e5df; font-size: 11px; }
.categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip { border: 1px solid var(--navy-700); background: #fff; padding: 8px 16px; border-radius: 30px; font-size: 11px; color: var(--ink-500); cursor: pointer; font-family: var(--font-body); }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Module detail + lesson player */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-500); margin-bottom: 24px; }
.breadcrumbs a:hover { color: var(--blue); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 34px; align-items: start; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 10px; background: #fff; border: 1px solid var(--navy-700); border-radius: var(--radius); transition: border-color .15s; }
a.section-row:hover { border-color: var(--blue); }
.section-row.locked { opacity: .55; }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 11px; background: var(--blue-light); color: var(--blue); flex-shrink: 0; }
.step-num.done { background: var(--green-light); color: var(--green-500); }
.includes { list-style: none; padding: 0; color: var(--ink-500); font-size: 12px; margin: 0; }
.includes li { padding: 6px 0; }

.player-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: start; }
.curriculum { position: sticky; top: calc(var(--topbar-h) + 24px); }
.curriculum h2 { font: 400 22px var(--font-display); }
.lesson-link { display: flex; align-items: center; gap: 10px; padding: 10px 8px; font-size: 12px; color: var(--ink-500); border-radius: 6px; }
a.lesson-link:hover { background: var(--navy-800); }
.lesson-link::before { content: "○"; flex-shrink: 0; }
.lesson-link.done::before { content: "✓"; color: var(--green-500); }
.lesson-link.active { color: var(--blue); background: var(--blue-light); font-weight: 600; }
.lesson-link.active::before { content: "▷"; }
.lesson-link.locked { opacity: .5; }
.lesson-link.locked::before { content: "🔒"; font-size: 10px; }
.stepper { display: flex; gap: 6px; margin: 0 0 18px; }
.stepper .step { flex: 1; height: 5px; border-radius: 3px; background: var(--navy-700); }
.stepper .step.done { background: var(--green-500); }
.stepper .step.current { background: var(--blue); }

.footer { margin-top: 32px; color: #969b93; font-size: 11px; }

@media (max-width: 1100px) {
  .topnav { padding: 0 20px; }
  .sidebar { width: 190px; }
  .workspace > main { padding: 28px 24px; }
  .dashboard-grid, .detail-grid, .player-layout { grid-template-columns: 1fr; }
  .curriculum { position: static; }
  .resume-art { width: 160px; }
}
@media (max-width: 760px) {
  .topnav { height: 64px; padding: 0 16px; }
  :root { --topbar-h: 64px; }
  .brand .eyebrow, .user-chip .who { display: none; }
  .workspace { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--navy-700); }
  .sidebar .eyebrow, .goal, .sidebar-footer { display: none; }
  .sidebar-collapse { display: none; }
  .workspace.collapsed .sidebar { width: 100%; }
  .workspace.collapsed .nav-label { opacity: 1; pointer-events: auto; }
  .workspace.collapsed > main { padding: 28px 24px; }
  .nav { display: flex; gap: 8px; overflow-x: auto; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
  .nav-icon { display: none; }
  .workspace > main { padding: 22px 16px; }
  .page { padding: 24px 16px 60px; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .resume-body { flex-direction: column; padding: 20px; }
  .resume-art { width: 100%; }
  .resume-footer.row { flex-direction: column; align-items: flex-start; }
  .path-steps { grid-template-columns: repeat(2, 1fr); }
  .row.page-header { flex-direction: column; align-items: flex-start; }
  .banner { padding: 24px; }
  .banner.row { flex-direction: column; align-items: flex-start; }
}

.video-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.cp-overlay { position: fixed; inset: 0; background: rgba(10, 14, 30, 0.8); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cp-overlay.hidden { display: none; }
.cp-card { color: #fff; width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; background: #151b36; border-radius: 14px; padding: 24px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.45); text-align: left; }
.cp-card h3 { margin: 4px 0 16px; font-size: 20px; color: #fff; }
.cp-card .eyebrow-label { color: #9db4ff; }
.cp-q { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.cp-q legend { font-weight: 600; font-size: 14.5px; line-height: 1.4; margin-bottom: 10px; padding: 0; color: #fff; }
.cp-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 7px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.4; color: #fff; text-align: left; }
.cp-opt input { flex: none; width: auto; margin: 3px 0 0; }
.cp-opt span { flex: 1; color: #fff; text-align: left; }
.cp-opt.right { border-color: #4cc38a; background: rgba(76,195,138,.18); }
.cp-opt.wrong { border-color: #ff7b7b; background: rgba(255,123,123,.18); }
.cp-why { font-size: 13px; line-height: 1.4; margin-top: 6px; }
.cp-why.ok { color: #8be6b4; } .cp-why.no { color: #ffb3b3; }
.cp-actions { display: flex; align-items: center; gap: 14px; justify-content: flex-end; }
.cp-score { font-weight: 600; }
.speed-bar { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted, #667); }
.speed-btn { border: 1px solid #d9d9d9; background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.speed-btn.active { background: #2b50c4; border-color: #2b50c4; color: #fff; }
.vc-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 14px 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); border-radius: 0 0 var(--radius) var(--radius); }
.vc-btn { border: 0; background: none; color: #fff; font-size: 16px; line-height: 1; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.vc-btn:hover { background: rgba(255,255,255,.18); }
.vc-speed { font-size: 13px; font-weight: 600; min-width: 42px; border: 1px solid rgba(255,255,255,.55); }
.vc-time { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vc-seek { flex: 1; min-width: 60px; accent-color: #2b50c4; cursor: pointer; }
.vc-vol { width: 80px; accent-color: #fff; cursor: pointer; }
.video-stage:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; }
.video-stage:fullscreen .lesson-video { display: block; height: calc(100vh - 380px); min-height: 220px; width: auto; max-width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); }
.lesson-video { display: block; width: 100%; max-height: calc(100vh - 380px); min-height: 220px; background: #000; border-radius: var(--radius); }

/* ---------- Stepped lesson flow (watch -> read -> quiz) ---------- */
.stage-tabs { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.stage-tab { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--navy-700); background: #fff; color: var(--ink-500); font: 600 12px var(--font-body); cursor: pointer; }
.stage-tab .stage-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-800); font-size: 11px; }
.stage-tab.current { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.stage-tab.current .stage-num { background: var(--blue); color: #fff; }
.stage-tab.done .stage-num { background: var(--green-light); color: var(--green-500); }
.stage-tab.done.current .stage-num { background: var(--green-500); color: #fff; }
.stage-tab.locked, .stage-tab:disabled { opacity: .55; cursor: not-allowed; }
.stage-tab .lock { font-size: 10px; }
.read-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: sticky; bottom: 12px; box-shadow: 0 6px 20px #242a2914; }
.watch-meter .progress-fill { transition: width .6s; }

/* ---------- Phase 1 guide: table of contents ---------- */
.toc { padding: 28px 32px; }
.toc-title { font-size: 22px; font-weight: 700; color: var(--blue); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 3px solid #6cbf3f; }
.toc-row { display: flex; align-items: baseline; gap: 8px; padding: 9px 4px; font-size: 14px; color: var(--blue); cursor: pointer; list-style: none; }
.toc-row::-webkit-details-marker { display: none; }
.toc-row:hover .toc-name { text-decoration: underline; }
.toc-label { display: inline-flex; gap: 10px; align-items: baseline; flex-shrink: 0; max-width: 78%; }
.toc-fp { color: #5fa93a; font-weight: 700; white-space: nowrap; }
.toc-name { font-weight: 500; }
.toc-dots { flex: 1; border-bottom: 2px dotted #9db8e8; transform: translateY(-4px); min-width: 20px; }
.toc-end { color: var(--ink-500); font-size: 12px; min-width: 44px; text-align: right; font-weight: 600; }
.toc-group[open] > summary .toc-name { font-weight: 600; }
.toc-mods { margin: 2px 0 12px 34px; padding-left: 14px; border-left: 3px solid #cfe7c2; display: grid; gap: 4px; }
.toc-mod { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; }
.toc-mod:hover { background: var(--navy-800); }
.toc-supp { margin: 22px 0 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
@media (max-width: 760px) { .toc { padding: 20px 16px; } .toc-label { max-width: 70%; flex-wrap: wrap; } .toc-mods { margin-left: 8px; } }

/* ---------- Locked modules ---------- */
.course-card.locked { opacity: .6; cursor: not-allowed; filter: grayscale(.4); }
.course-card.locked:hover { transform: none; box-shadow: none; }
.path-step.locked { opacity: .55; cursor: not-allowed; }
.toc-mod.locked { opacity: .55; cursor: not-allowed; }
.toc-mod.locked:hover { background: transparent; }

/* ---------- Logo ---------- */
.brand-logo { display: block; height: 80px; width: auto; }
.auth-logo { display: block; width: min(300px, 80%); height: auto; margin: 0 auto 12px; }
@media (max-width: 760px) { .brand-logo { height: 50px; } }

/* First-login introduction video pop-up */
.intro-modal { position: fixed; inset: 0; background: rgba(10, 14, 30, 0.78); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.intro-card { position: relative; width: 100%; max-width: 900px; max-height: 94vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 24px 26px 22px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.intro-card h2 { margin: 2px 0 14px; font-size: 24px; }
.intro-card video { display: block; width: 100%; max-height: 62vh; background: #000; border-radius: 10px; }
.intro-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 28px; line-height: 1; color: #667; cursor: pointer; }
.intro-unmute { display: none; margin-top: 10px; }
.intro-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* Video lessons: compact layout so everything fits on one screen (no scrolling up and down) */
body.lesson-video-page .workspace > main { padding: 12px 28px 8px; }
body.lesson-video-page .workspace .page { padding-bottom: 0; }
body.lesson-video-page .breadcrumbs { margin-bottom: 8px; }
body.lesson-video-page .stepper { margin-bottom: 8px; }
body.lesson-video-page #lessonHeader { margin: 0 0 8px !important; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
body.lesson-video-page #lessonHeader h1 { margin: 0 !important; font-size: 26px; line-height: 1.15; }
body.lesson-video-page .stage-tabs { margin-bottom: 8px; }
body.lesson-video-page .stage-tab { padding: 7px 14px; }
body.lesson-video-page #lessonNav { margin-top: 8px !important; }
body.lesson-video-page .video-wrap { padding-top: 0; height: calc(100vh - 425px); min-height: 240px; margin-bottom: 0; }

.q-hint { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--blue-light); color: var(--blue); font-size: 11px; font-weight: 600; vertical-align: middle; }

/* Video-module sidebar: collapsible module groups, each video followed by its quiz */
.curriculum.video-curriculum { max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; padding-right: 6px; }
.cur-mod { margin-bottom: 6px; }
.cur-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 6px; border: 0; background: none; font: 700 14px var(--font-body); color: var(--ink-100); text-align: left; cursor: pointer; }
.cur-mod-head .chev { font-size: 11px; color: var(--ink-500); transition: transform .15s; }
.cur-mod.open .cur-mod-head .chev { transform: rotate(180deg); }
.cur-mod-body { display: none; }
.cur-mod.open .cur-mod-body { display: block; }
.cur-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 13px; line-height: 1.35; color: var(--ink-500); }
a.cur-row:hover { background: var(--navy-800); }
.cur-ico { width: 18px; text-align: center; flex-shrink: 0; font-size: 13px; }
.cur-row.done { color: var(--green-500); }
.cur-row.cur { color: var(--blue); background: var(--blue-light); font-weight: 600; }
.cur-row.locked { opacity: .5; }

.resume-note { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; z-index: 5; pointer-events: none; }
.video-wrap { position: relative; }

.nav-icon-img { display: block; width: 20px; height: auto; margin: 0 auto; }

/* ======================================================================
   Champions Academy theme — navy shell, lime accents, italic sports headings.
   Overrides the light theme above; remove this block (or restore style-before-champions-theme.css.bak) to go back.
   ====================================================================== */
:root {
  --navy-950: #f2f5f9;
  --navy-700: #e1e7ef;
  --navy-600: #cfd8e4;
  --blue: #3f7d00;            /* accent used for links, tabs, focus */
  --blue-light: #eaf5d3;
  --lime: #9be21f;
  --lime-dark: #7cc000;
  --ink-navy: #0b2440;
  --topbar-h: 80px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
body { background: var(--navy-950); }

/* top bar: logo block on the left, breadcrumb, user on the right */
.topnav { gap: 0; padding: 0 28px 0 0; box-shadow: 0 1px 0 var(--navy-700); }
.brand { width: 250px; flex: none; justify-content: center; padding: 0 12px; }
.brand-logo { height: 64px; }
.crumbs { flex: 1; min-width: 0; padding-left: 30px; font-size: 15px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { margin: 0 9px; color: #b3bdca; }
.crumbs strong { color: var(--ink-navy); font-weight: 700; }
.navlinks .user-chip .avatar { background: #e6ebf2; color: var(--ink-navy); font-weight: 700; }

/* sidebar */
.sidebar { width: 250px; background: var(--ink-navy); border-right: 0; padding: 18px 12px 20px; gap: 18px; }
.nav { gap: 2px; }
.nav-section { margin: 18px 12px 8px; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 19px; letter-spacing: .02em; text-transform: uppercase; color: var(--lime); }
.nav-section:first-child { margin-top: 6px; }
.nav a, .nav-group-toggle { color: #dbe5f2; font-size: 14px; padding: 10px 12px; border-radius: 8px; border-left: 4px solid transparent; }
.nav a:hover, .nav-group-toggle:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: #3d6a14; color: #fff; font-weight: 600; border-left-color: var(--lime); }
.nav-icon { color: #fff; }
.nav-sub { border-left-color: rgba(255, 255, 255, .18); }
.nav-sub a { font-size: 13px; }
.goal { background: rgba(255, 255, 255, .07); color: #dbe5f2; }
.goal h3, .goal .eyebrow-label { color: #fff; }
.goal p { color: #b6c5da; }
.goal .progress-track { background: rgba(255, 255, 255, .18); }
.goal .progress-fill { background: var(--lime); }
.sidebar-collapse { background: transparent; border-color: rgba(255, 255, 255, .22); color: #dbe5f2; }
.sidebar-collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.workspace.collapsed .sidebar { width: 74px; }
.workspace.collapsed .nav-section { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.workspace > main { padding: 0 0 40px; }
.workspace .page > :not(.page-header) { margin-left: 32px; margin-right: 32px; }
.workspace .page > .page-header + * { margin-top: 24px; }
.workspace .page > .team-msgs { margin: 18px 32px 0; }

/* page banner: the first header on every page becomes a navy banner with the green slash */
.page-header { position: relative; margin: 0 0 8px; padding: 30px 40px 30px 78px; background: var(--ink-navy); color: #fff; overflow: hidden; }
.page-header::before { content: ''; position: absolute; left: 36px; top: 24px; bottom: 24px; width: 14px; background: var(--lime); transform: skewX(-22deg); }
.page-header .eyebrow-label { color: var(--lime); font-weight: 700; margin-bottom: 4px; }
.page-header h1 { margin: 0; color: #fff; font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: .01em; }
.page-header p { margin: 8px 0 0; color: #c7d5e8; font-style: italic; text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.page-header .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.page-header a { color: var(--lime); }

/* headings, buttons, cards, tabs */
h1 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; }
.workspace main h2 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .01em; color: var(--ink-navy); }
.btn { border-radius: 8px; font-size: 13px; }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--ink-navy); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .03em; }
.btn-primary:hover { background: var(--lime-dark); border-color: var(--lime-dark); filter: none; }
.card, .cl-bubble { border-radius: 12px; box-shadow: 0 1px 3px rgba(11, 36, 64, .06); }
.eyebrow-label { color: var(--ink-500); }
.tab.active, .tabs .active { color: var(--ink-navy); }
.progress-fill { background: var(--lime-dark); }

@media (max-width: 760px) {
  .topnav { padding: 0 12px 0 0; }
  .brand { width: auto; }
  .crumbs { display: none; }
  .nav-section { display: none; }
  .nav a, .nav-group-toggle { border-left: 0; }
  .workspace .page > :not(.page-header) { margin-left: 16px; margin-right: 16px; }
  .page-header { padding: 22px 16px 22px 50px; }
  .page-header::before { left: 20px; width: 10px; }
}
