:root {
  --ink: #17243a;
  --navy: #101b2d;
  --navy-2: #17263d;
  --blue: #4361ee;
  --cyan: #45d6c5;
  --gold: #f5b94c;
  --paper: #f5f7fb;
  --white: #fff;
  --muted: #758198;
  --line: #e6eaf1;
  --success: #16876b;
  --radius: 18px;
  --sidebar: 268px;
  --shadow: 0 12px 40px rgba(16,27,45,.06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: -100px;
  left: 12px;
  padding: 12px;
  background: white;
  color: var(--ink);
}
.skip-link:focus { top: 12px; }

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  overflow-y: auto;
  padding: 24px 17px;
  background: var(--navy);
  color: #dce5f4;
  transition: transform .25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 27px;
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--cyan), #8ef1d7);
  color: var(--navy);
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -2px;
}

.brand-name {
  color: white;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.3;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: #93a5c2;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.program-label {
  margin: 0 10px 9px;
  color: #8596b3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #bdc9dd;
  text-align: left;
  transition: .2s ease;
}

.nav button:hover {
  background: #1c2c45;
  color: white;
}

.nav button.active {
  border-color: rgba(69,214,197,.18);
  background: #20364a;
  color: white;
}

.nav-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  font-size: 14px;
}

.nav button.active .nav-icon {
  background: var(--cyan);
  color: var(--navy);
}

.nav-text {
  flex: 1;
  font-size: 13px;
  font-weight: 650;
}

.nav-check {
  color: var(--cyan);
  font-size: 13px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}

.mentor-card {
  padding: 17px;
  border: 1px solid #34435a;
  border-radius: 15px;
  background: #17263d;
}

.mentor-card strong {
  display: block;
  color: white;
  font-size: 13px;
}

.mentor-card p {
  margin: 6px 0 14px;
  color: #a8b7ce;
  font-size: 12px;
}

.sidebar-link {
  display: block;
  padding: 9px 0;
  color: #9fddda;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.main {
  min-width: 0;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 35px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}

.topbar-left, .topbar-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.topbar-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.topbar-title {
  margin-top: 1px;
  font-size: 14px;
  font-weight: 800;
}

.eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
}

.menu-toggle { display: none; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #e5eaff;
  color: var(--blue);
  font-weight: 850;
}

.user-name {
  font-size: 12px;
  font-weight: 800;
}

.user-role {
  color: var(--muted);
  font-size: 10px;
}

.content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 35px 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb strong { color: var(--ink); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4vw, 47px);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 95% 0%, rgba(69,214,197,.2), transparent 38%),
    linear-gradient(120deg, #111d31, #203651);
  color: white;
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -160px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(69,214,197,.17);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(190px, .65fr);
  align-items: center;
  gap: 35px;
}

.hero .eyebrow { color: var(--cyan); }

.hero h1 {
  max-width: 700px;
  margin: 10px 0 15px;
  font-size: clamp(29px, 3.4vw, 47px);
  line-height: 1.15;
  letter-spacing: -1.8px;
}

.hero p {
  max-width: 650px;
  margin: 0;
  color: #c2cfe0;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.btn {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform .2s, background .2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-light {
  background: var(--cyan);
  color: var(--navy);
}

.btn-outline {
  border-color: #485b75;
  background: transparent;
  color: white;
}

.btn-dark {
  background: var(--navy);
  color: white;
}

.btn-secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.hero-stat {
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(8px);
}

.hero-stat .number {
  margin: 6px 0;
  color: var(--cyan);
  font-size: 42px;
  font-weight: 850;
  letter-spacing: -2px;
  line-height: 1.2;
}

.hero-stat p {
  font-size: 12px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-top: 16px;
  border-radius: 99px;
  background: rgba(255,255,255,.13);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
  transition: width .35s ease;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin: 23px 0 34px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.stat-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 13px;
  background: #edf0ff;
  font-size: 21px;
}

.stat-card:nth-child(2) .stat-icon { background: #e5faf5; }
.stat-card:nth-child(3) .stat-icon { background: #fff3dc; }

.stat-value {
  font-size: 23px;
  font-weight: 850;
  line-height: 1.3;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 17px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -.6px;
  line-height: 1.3;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.muted { color: var(--muted); }

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.learning-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.learning-card:hover {
  transform: translateY(-3px);
  border-color: #cdd5ff;
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: #edf0ff;
  font-size: 22px;
}

.learning-card:nth-child(3n+2) .card-icon { background: #e5faf5; }
.learning-card:nth-child(3n+3) .card-icon { background: #fff3dc; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 99px;
  background: #edf0ff;
  color: #465bd0;
  font-size: 10px;
  font-weight: 800;
}

.pill.complete {
  background: #e4f8f0;
  color: #16795d;
}

.learning-card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.learning-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 17px 0;
  color: var(--muted);
  font-size: 11px;
}

.card-progress {
  height: 5px;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 99px;
  background: #edf0f5;
}

.card-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.card-button {
  width: 100%;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid #cdeee7;
  border-radius: 16px;
  background: #edfaf7;
}

.info-banner .banner-icon { font-size: 24px; }

.info-banner h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.info-banner p {
  margin: 0;
  color: #536e71;
  font-size: 12px;
}

.module-header {
  margin-bottom: 25px;
}

.module-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.2;
  letter-spacing: -1.3px;
}

.module-header p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  align-items: start;
  gap: 22px;
}

.lesson-main { min-width: 0; }

.panel {
  min-width: 0;
  margin-bottom: 19px;
  padding: clamp(19px, 3vw, 29px);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.panel h2 {
  margin: 0 0 13px;
  font-size: 20px;
  line-height: 1.35;
}

.panel h3 {
  margin: 22px 0 8px;
  font-size: 15px;
}

.panel p {
  color: #536176;
  font-size: 13px;
}

.panel ul, .panel ol {
  padding-left: 21px;
  color: #536176;
  font-size: 13px;
}

.panel li { margin: 8px 0; }

.callout {
  padding: 18px;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: #f0f3ff;
  color: #35456c;
  font-size: 13px;
}

.callout.success {
  border-color: var(--success);
  background: #eaf9f3;
  color: #245a4c;
}

.callout.warning {
  border-color: var(--gold);
  background: #fff8e9;
  color: #765a21;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.outcome {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fcfdff;
}

.outcome-icon { font-size: 22px; }

.outcome strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.outcome p {
  margin: 5px 0 0;
  font-size: 11px;
}

.lesson-sidebar {
  position: sticky;
  top: 98px;
}

.lesson-sidebar .panel { padding: 19px; }

.lesson-sidebar h3 {
  margin: 0 0 13px;
  font-size: 14px;
}

.lesson-link {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  margin: 3px 0;
  padding: 11px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #59677d;
  text-align: left;
}

.lesson-link:hover { background: #f5f7fb; }

.lesson-link.active {
  border-color: #e0e5ff;
  background: #eff1ff;
  color: #3049ce;
}

.lesson-number {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 8px;
  background: #edf0f5;
  font-size: 10px;
  font-weight: 800;
}

.lesson-link.active .lesson-number {
  background: var(--blue);
  color: white;
}

.lesson-link strong {
  display: block;
  font-size: 11px;
  line-height: 1.5;
}

.lesson-link small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.lesson-actions .btn { flex: 1; }

.task-list {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.task {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdff;
}

.task input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 3px;
  accent-color: var(--blue);
}

.task label {
  flex: 1;
  font-size: 12px;
}

.task label strong { display: block; }

.task label span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.task-list .task:has(input:checked) {
  border-color: #cdeee7;
  background: #f0fbf7;
}

.form-field {
  display: grid;
  gap: 6px;
  margin: 15px 0;
}

.form-field label {
  font-size: 12px;
  font-weight: 750;
}

.form-field input, .form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce2eb;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  outline: 2px solid #e3e8ff;
}

.lesson-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 13px;
  background: #f5f7fb;
}

.lesson-status p {
  margin: 0;
  font-size: 12px;
}

.empty-message {
  padding: 25px;
  border: 1px dashed #cbd3e1;
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 45px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.overlay {
  display: none;
}

@media (min-width: 1500px) {
  .content { padding-right: 48px; padding-left: 48px; }
}

@media (max-width: 1200px) {
  :root { --sidebar: 235px; }
  .content { padding: 27px 24px 45px; }
  .topbar { padding: 13px 24px; }
  .learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-layout { grid-template-columns: minmax(0, 1fr) 245px; }
}

@media (max-width: 900px) {
  :root { --sidebar: 268px; }

  .sidebar {
    transform: translateX(-102%);
    box-shadow: 15px 0 40px rgba(0,0,0,.15);
  }

  .sidebar.open { transform: translateX(0); }

  .overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(9,18,32,.48);
  }

  .overlay.visible { display: block; }

  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 200px; }
  .module-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-sidebar { position: static; }
  .lesson-sidebar .lesson-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar { min-height: 67px; padding: 10px 14px; gap: 8px; }
  .topbar-title { font-size: 12px; }
  .topbar-label { font-size: 9px; }
  .user-name, .user-role { display: none; }
  .user-chip { gap: 0; }
  .user-avatar { width: 34px; height: 34px; }
  .content { padding: 20px 14px 35px; }
  .breadcrumb { margin-bottom: 15px; font-size: 11px; }
  .hero { padding: 24px 20px; border-radius: 18px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero h1 { font-size: 32px; letter-spacing: -1.2px; }
  .hero p { font-size: 13px; }
  .hero-stat { padding: 16px; }
  .hero-stat .number { font-size: 34px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; margin: 15px 0 27px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 20px; }
  .learning-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .learning-card { padding: 19px; }
  .section-heading { margin-top: 27px; }
  .module-header h1 { font-size: 29px; }
  .panel { padding: 18px; }
  .outcome-grid { grid-template-columns: 1fr; }
  .lesson-sidebar .lesson-index { grid-template-columns: 1fr; }
  .lesson-actions { flex-direction: column; }
  .lesson-actions .btn { width: 100%; }
  .info-banner { padding: 16px; }
  .footer { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}