/* HelpLearnAI per-course progress dashboard (progress.html).
   Uses the site's own design tokens so it blends with every page. */

/* ---- course picker (no ?course= given) ---- */
.cp-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.cp-pick-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #eadfce);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 10px 30px rgba(33, 49, 47, 0.08));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cp-pick-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.cp-pick-body { padding: 16px 18px 18px; }
.cp-pick-body h3 {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--ink, #21312f);
}
.cp-pick-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--cream-deep, #fdf3e3);
  border: 1px solid var(--line, #eadfce);
  overflow: hidden;
  margin: 10px 0 6px;
}
.cp-pick-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal, #0f766e), var(--teal-deep, #115e59));
  border-radius: 999px;
}
.cp-pick-meta {
  font-size: 0.88rem;
  color: var(--ink-soft, #4a5d5a);
  font-variant-numeric: tabular-nums;
}

/* ---- course header ---- */
.cp-head {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--card, #fff);
  border: 1px solid var(--line, #eadfce);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 10px 30px rgba(33, 49, 47, 0.08));
  padding: 22px;
  margin-bottom: 22px;
}
.cp-head img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
  flex: none;
}
.cp-head-info { min-width: 0; flex: 1; }
.cp-head-info h1 {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--ink, #21312f);
}
.cp-head-info .cp-sub {
  color: var(--ink-soft, #4a5d5a);
  font-size: 0.95rem;
  margin: 0 0 12px;
  font-variant-numeric: tabular-nums;
}
.cp-bigbar {
  height: 12px;
  border-radius: 999px;
  background: var(--cream-deep, #fdf3e3);
  border: 1px solid var(--line, #eadfce);
  overflow: hidden;
  margin-bottom: 14px;
}
.cp-bigbar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber, #f59e0b), var(--teal, #0f766e));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.cp-resume-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---- certificate card ---- */
.cp-cert {
  background: var(--card, #fff);
  border: 1px solid var(--line, #eadfce);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 10px 30px rgba(33, 49, 47, 0.08));
  padding: 20px 22px;
  margin-bottom: 26px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.cp-cert .cp-cert-badge {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--cream-deep, #fdf3e3);
  border: 1px solid var(--line, #eadfce);
}
.cp-cert.ready .cp-cert-badge {
  background: #d7efe9;
  border-color: var(--teal, #0f766e);
}
.cp-cert h3 {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--ink, #21312f);
}
.cp-cert p { margin: 0; font-size: 0.92rem; color: var(--ink-soft, #4a5d5a); }

/* ---- module checklist ---- */
.cp-module { margin-bottom: 18px; }
.cp-module > h2 {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.12rem;
  color: var(--ink, #21312f);
  margin: 0 0 4px;
}
.cp-module .cp-mod-meta {
  font-size: 0.85rem;
  color: var(--ink-faint, #7a8b88);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.cp-lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card, #fff);
  border: 1px solid var(--line, #eadfce);
  border-radius: var(--radius-sm, 12px);
  overflow: hidden;
}
.cp-lessons li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #eadfce);
}
.cp-lessons li:last-child { border-bottom: none; }
.cp-lessons li.next { background: #fffdf7; }
.cp-status {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.cp-status.done { background: var(--teal, #0f766e); color: #fff; }
.cp-status.next { background: var(--amber, #f59e0b); color: #fff; }
.cp-status.todo { background: var(--cream-deep, #fdf3e3); color: var(--ink-faint, #7a8b88); border: 1px solid var(--line, #eadfce); }
.cp-status.locked { background: transparent; color: var(--ink-faint, #7a8b88); border: 1px dashed var(--ink-faint, #7a8b88); }
.cp-lesson-info { flex: 1; min-width: 0; }
.cp-lesson-info a {
  color: var(--ink, #21312f);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
}
.cp-lesson-info a:hover { color: var(--teal-deep, #115e59); text-decoration: underline; }
.cp-lesson-info .cp-locked-note { color: var(--ink-faint, #7a8b88); font-size: 0.96rem; }
.cp-lesson-min {
  flex: none;
  font-size: 0.82rem;
  color: var(--ink-faint, #7a8b88);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- locked course notice ---- */
.cp-lockbox {
  background: var(--card, #fff);
  border: 1px dashed var(--amber, #f59e0b);
  border-radius: var(--radius, 16px);
  padding: 20px 22px;
  margin-bottom: 22px;
  font-size: 0.95rem;
  color: var(--ink-soft, #4a5d5a);
}

.cp-loading, .cp-error {
  padding: 40px 0;
  text-align: center;
  color: var(--ink-soft, #4a5d5a);
}

@media (max-width: 640px) {
  .cp-head { flex-direction: column; align-items: flex-start; }
  .cp-head img { width: 100%; height: 140px; }
  .cp-lesson-min { display: none; }
}
