/* ================================================================
   assets/css/ai-ml-roadmap.css
   AI & Machine Learning Roadmap — purple/violet theme
   Loaded via  custom_css: ai-ml-roadmap  in front matter
   ================================================================ */

/* ── CSS custom props (scoped accents) ────────────────────────── */
:root {
  --aiml-1: #a78bfa;   /* violet */
  --aiml-2: #ec4899;   /* pink   */
  --aiml-grad: linear-gradient(135deg, var(--aiml-1), var(--aiml-2));
}

/* ── Hero ─────────────────────────────────────────────────────── */
.aiml-hero {
  background: linear-gradient(135deg, #1a1230 0%, #2d1b4e 50%, #1e1035 100%);
  color: white;
  padding: 3.5rem 2rem 3rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.aiml-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(167,139,250,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(236,72,153,0.14) 0%, transparent 50%);
  pointer-events: none;
}
.aiml-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
  background: var(--aiml-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.aiml-hero p {
  color: rgba(255,255,255,0.72);
  margin: 0 auto 0;
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}
.aiml-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.aiml-stat { text-align: center; }
.aiml-stat-val { font-size: 1.7rem; font-weight: 800; color: var(--aiml-1); display: block; }
.aiml-stat-lbl { font-size: 0.78rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.05em; }

/* breadcrumb */
.aiml-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}
.aiml-breadcrumb a { color: var(--aiml-1); text-decoration: none; }
.aiml-breadcrumb a:hover { text-decoration: underline; }
.aiml-breadcrumb span { opacity: 0.5; }

/* ── Overall progress bar ─────────────────────────────────────── */
.aiml-overall-progress {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.aiml-op-label { font-size: 0.9rem; font-weight: 700; color: var(--text-color); white-space: nowrap; }
.aiml-op-bar-wrap { flex: 1; min-width: 150px; background: var(--border-color); border-radius: 99px; height: 8px; }
.aiml-op-bar { height: 8px; border-radius: 99px; background: var(--aiml-grad); width: 0%; transition: width 0.5s ease; }
.aiml-op-pct { font-size: 0.9rem; font-weight: 700; color: var(--aiml-1); min-width: 40px; text-align: right; }
.aiml-op-count { font-size: 0.8rem; color: var(--light-text); }

/* ── Career path selector ─────────────────────────────────────── */
.aiml-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.career-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) { .career-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .career-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; } }

.career-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
  user-select: none;
}
.career-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.career-card.active {
  border-color: var(--aiml-1);
  background: rgba(167,139,250,0.08);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.2);
}
.career-card-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.career-card-title { font-size: 0.85rem; font-weight: 700; color: var(--text-color); line-height: 1.3; margin-bottom: 0.3rem; }
.career-card-salary { font-size: 0.72rem; color: var(--light-text); margin-bottom: 0.4rem; }
.career-card-modules { font-size: 0.7rem; font-weight: 600; color: var(--aiml-1); background: rgba(167,139,250,0.12); border-radius: 12px; padding: 0.15rem 0.5rem; display: inline-block; }

/* ── Prerequisites accordion ──────────────────────────────────── */
.prereq-accordion {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 3rem;
  overflow: hidden;
}
.prereq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.prereq-header:hover { background: var(--bg-color); }
.prereq-header-left { display: flex; align-items: center; gap: 0.75rem; }
.prereq-header-left h3 { font-size: 1rem; font-weight: 700; color: var(--text-color); margin: 0; }
.prereq-badge { padding: 0.15rem 0.55rem; border-radius: 12px; font-size: 0.72rem; font-weight: 700; background: rgba(167,139,250,0.15); color: var(--aiml-1); }
.prereq-chevron { font-size: 1rem; color: var(--light-text); transition: transform 0.3s; }
.prereq-accordion.open .prereq-chevron { transform: rotate(180deg); }
.prereq-body { display: none; padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border-color); }
.prereq-accordion.open .prereq-body { display: block; }

.prereq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 700px) { .prereq-grid { grid-template-columns: 1fr; } }

.prereq-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}
.prereq-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--text-color); margin: 0 0 0.5rem; }
.prereq-card ul { margin: 0; padding-left: 1.2rem; }
.prereq-card li { font-size: 0.82rem; color: var(--light-text); margin-bottom: 0.3rem; }
.prereq-card li strong { color: var(--text-color); }

.prereq-resources { margin-top: 1rem; }
.prereq-resources h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-color); margin-bottom: 0.5rem; }
.prereq-link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.prereq-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--aiml-1);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}
.prereq-link:hover { background: rgba(167,139,250,0.18); }

/* ── Module cards (old-style .module-card) ────────────────────── */
.modules-list { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 3rem; }

.module-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, opacity 0.3s;
  position: relative;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mod-accent, var(--aiml-grad));
}
/* Career-filter state */
.module-card.career-dimmed { opacity: 0.38; }
.module-card.career-highlighted {
  border-color: rgba(167,139,250,0.5);
  box-shadow: 0 0 0 2px rgba(167,139,250,0.15);
}

.module-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
  cursor: pointer;
  user-select: none;
}
.module-num-badge {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 10px;
  background: var(--mod-accent, var(--aiml-grad));
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}
.module-title-block { flex: 1; }
.module-title-block h2 { font-size: 1.15rem; font-weight: 800; color: var(--text-color); margin: 0 0 0.35rem; }
.module-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mod-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--light-text);
}
.mod-badge.beginner { background: rgba(16,185,129,0.12); color: #10b981; border-color: transparent; }
.mod-badge.intermediate { background: rgba(245,158,11,0.12); color: #f59e0b; border-color: transparent; }
.mod-badge.advanced { background: rgba(239,68,68,0.12); color: #ef4444; border-color: transparent; }
.mod-badge.bonus { background: rgba(167,139,250,0.12); color: var(--aiml-1); border-color: transparent; }
.mod-badge.added { background: rgba(236,72,153,0.12); color: var(--aiml-2); border-color: transparent; }

.module-chevron { font-size: 1.1rem; color: var(--light-text); transition: transform 0.3s; margin-top: 0.5rem; flex-shrink: 0; }
.module-card.open .module-chevron { transform: rotate(180deg); }

/* progress bar row */
.module-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
}
.mod-prog-bar-wrap { flex: 1; background: var(--border-color); border-radius: 99px; height: 5px; }
.mod-prog-bar { height: 5px; border-radius: 99px; background: var(--mod-accent, var(--aiml-grad)); width: 0%; transition: width 0.4s ease; }
.mod-prog-text { font-size: 0.75rem; color: var(--light-text); white-space: nowrap; }
.mod-prog-pct { font-size: 0.75rem; font-weight: 700; color: var(--aiml-1); min-width: 34px; text-align: right; }

/* collapsible body */
.module-body { display: none; padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--border-color); margin-top: 0.25rem; }
.module-card.open .module-body { display: block; }

.module-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.25rem 0 0.6rem;
}

/* what you'll learn */
.learn-list { list-style: none; padding: 0; margin: 0 0 0.25rem; }
.learn-list li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}
.learn-list li:last-child { border-bottom: none; }
.learn-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--aiml-1);
  font-size: 0.75rem;
  top: 0.35rem;
}

/* Week progress checklist */
.week-list { list-style: none; padding: 0; margin: 0; }
.week-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}
.week-item:last-child { border-bottom: none; }
.week-item input[type="checkbox"] { display: none; }
.week-check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.week-item.checked .week-check-box {
  background: var(--aiml-1);
  border-color: var(--aiml-1);
}
.week-item.checked .week-check-box::after { content: '✓'; color: #fff; font-size: 0.7rem; font-weight: 800; }
.week-item.checked .week-label { text-decoration: line-through; color: var(--light-text); }
.week-badge { font-size: 0.7rem; font-weight: 700; color: var(--aiml-1); background: rgba(167,139,250,0.12); border-radius: 4px; padding: 0.1rem 0.4rem; white-space: nowrap; flex-shrink: 0; }
.week-label { font-size: 0.85rem; color: var(--text-color); line-height: 1.45; }
.week-tasks { font-size: 0.78rem; color: var(--light-text); margin-top: 0.2rem; }

/* Milestone project box */
.milestone-box {
  background: linear-gradient(135deg, rgba(167,139,250,0.06), rgba(236,72,153,0.06));
  border: 1px solid rgba(167,139,250,0.3);
  border-left: 4px solid var(--aiml-1);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.1rem;
  margin: 0.75rem 0;
}
.milestone-box h4 { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 800; color: var(--text-color); }
.milestone-box p { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--light-text); line-height: 1.6; }
.milestone-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.milestone-tag { font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.45rem; border-radius: 4px; background: var(--bg-color); border: 1px solid var(--border-color); color: var(--light-text); }

/* Resource links */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.resource-link {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  color: inherit;
}
.resource-link:hover { border-color: var(--aiml-1); background: rgba(167,139,250,0.05); }
.resource-icon { font-size: 1rem; flex-shrink: 0; }
.resource-info { display: flex; flex-direction: column; }
.resource-name { font-size: 0.8rem; font-weight: 700; color: var(--text-color); }
.resource-cat { font-size: 0.7rem; color: var(--light-text); }

/* ── Timeline strip ───────────────────────────────────────────── */
.timeline-section { margin-bottom: 3rem; }
.timeline-table-wrap { overflow-x: auto; }
.timeline-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.timeline-table th {
  background: var(--bg-color);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 700;
  color: var(--light-text);
  border-bottom: 2px solid var(--border-color);
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.timeline-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.timeline-table tr:hover td { background: var(--bg-color); }
.timeline-module-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(167,139,250,0.12);
  color: var(--aiml-1);
}
.timeline-unlock { font-size: 0.78rem; color: #10b981; font-weight: 600; }

/* ── Portfolio checklist (old-style) ──────────────────────────── */
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 3rem; }
@media (max-width: 700px) { .checklist-grid { grid-template-columns: 1fr; } }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}
.check-item:hover { border-color: var(--aiml-1); }
.check-item input[type="checkbox"] { display: none; }
.check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
  transition: background 0.15s, border-color 0.15s;
}
.check-item.checked .check-box { background: var(--aiml-1); border-color: var(--aiml-1); }
.check-item.checked .check-box::after { content: '✓'; color: #fff; font-size: 0.7rem; font-weight: 800; }
.check-item.checked .check-label { text-decoration: line-through; color: var(--light-text); }
.check-label-wrap { display: flex; flex-direction: column; gap: 0.15rem; }
.check-label { font-size: 0.85rem; font-weight: 600; color: var(--text-color); }
.check-sub { font-size: 0.75rem; color: var(--light-text); }

/* ── Job readiness ────────────────────────────────────────────── */
.readiness-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 3rem; }
@media (max-width: 600px) { .readiness-grid { grid-template-columns: 1fr; } }
.readiness-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.readiness-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--text-color); margin: 0 0 0.6rem; }
.readiness-card ul { margin: 0; padding-left: 1.2rem; }
.readiness-card li { font-size: 0.82rem; color: var(--light-text); margin-bottom: 0.3rem; line-height: 1.5; }

/* ================================================================
   NEW COMPONENTS — from AIML_Roadmap.html — re-themed violet/pink
   ================================================================ */

/* ── Scroll progress bar ──────────────────────────────────────── */
#pb {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--aiml-grad);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s;
}

/* ── Main content wrapper ─────────────────────────────────────── */
.mc { padding: 40px 0 72px; }

/* ── Page footer ──────────────────────────────────────────────── */
.aiml-footer {
  text-align: center;
  padding: 32px 24px 48px;
  font-size: 0.88rem;
  color: var(--light-text);
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
}
.aiml-footer strong { color: var(--text-color); }
.aiml-footer a {
  color: var(--aiml-1);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-top: 10px;
}
.aiml-footer a:hover { text-decoration: underline; }

/* ── Path selector ────────────────────────────────────────────── */
.ps {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}
.psh {
  background: #1a1f36;
  color: #fff;
  padding: 18px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.psh h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.pt {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0 8px;
  overflow-x: auto;
  background: var(--bg-color);
}
.ptb {
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.86rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  color: var(--light-text);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.ptb:hover { color: var(--aiml-1); }
.ptb.active { color: var(--aiml-1); border-bottom-color: var(--aiml-1); background: var(--card-bg); }
.pc { padding: 24px 28px; display: none; }
.pc.active { display: block; }
.pi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 600px) { .pi { grid-template-columns: 1fr; } }
.pii {
  background: var(--bg-color);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
}
.pii .lbl {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-text);
  margin-bottom: 3px;
}
.pii .val {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
}
.pp { display: flex; flex-wrap: wrap; gap: 8px; }
.ch {
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}
.ch.req {
  background: rgba(167,139,250,0.08);
  color: var(--aiml-1);
  border: 1px solid rgba(167,139,250,0.3);
}
.ch.opt {
  background: rgba(236,72,153,0.08);
  color: var(--aiml-2);
  border: 1px dashed var(--aiml-2);
}
.ch.par {
  background: rgba(167,139,250,0.08);
  color: var(--aiml-1);
  border: 1px dashed var(--aiml-1);
}

/* ── Parallel banner ──────────────────────────────────────────── */
.pb2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .pb2 { grid-template-columns: 1fr; } }
.pl {
  border-radius: 14px;
  padding: 22px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pl::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.pl.ai { background: linear-gradient(135deg, var(--aiml-1), #7c3aed); }
.pl.ml { background: linear-gradient(135deg, var(--aiml-2), #9d174d); }
.pl h3 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: #fff; }
.pl .st {
  font-size: 0.8rem;
  opacity: 0.88;
  line-height: 1.8;
}
.sz {
  grid-column: 1 / -1;
  background: rgba(236,72,153,0.08);
  border: 1px solid rgba(236,72,153,0.3);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 0.86rem;
  color: var(--text-color);
}
.sz strong { color: var(--aiml-2); }

/* ── Part nav ─────────────────────────────────────────────────── */
.pnav {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 6px;
  margin-bottom: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  position: sticky;
  top: 8px;
  z-index: 100;
  border: 1px solid var(--border-color);
}
.pnb {
  padding: 8px 13px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  background: transparent;
  color: var(--light-text);
  transition: all 0.2s;
}
.pnb:hover { background: var(--bg-color); color: var(--text-color); }
.pnb.active { background: var(--aiml-grad); color: #fff; }

/* ── Part sections ────────────────────────────────────────────── */
.psec { display: none; }
.psec.active { display: block; }

/* ── Part headers ─────────────────────────────────────────────── */
.ph {
  border-radius: 14px;
  padding: 26px 30px;
  margin-bottom: 28px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}
.ph.teal { background: linear-gradient(135deg, var(--aiml-1), #7c3aed); }
.ph.navy { background: linear-gradient(135deg, #1a1f36, #0f172a); }
.ph.purple { background: linear-gradient(135deg, var(--aiml-2), #9d174d); }
.ph.amber { background: linear-gradient(135deg, var(--aiml-2), #be185d); }
.pbdg {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.ph h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #fff;
}
.ph .meta {
  font-size: 0.82rem;
  opacity: 0.8;
  color: #fff;
}

/* ── Module cards (new-style .mc2) ───────────────────────────── */
.mc2 {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.mh {
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.mh:hover { background: var(--bg-color); }
.mh h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 3px;
}
.mh .mm {
  font-size: 0.76rem;
  color: var(--light-text);
}
.mt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--light-text);
  transition: all 0.2s;
  flex-shrink: 0;
}
.mc2.open .mt {
  background: var(--aiml-grad);
  color: #fff;
  border-color: transparent;
  transform: rotate(45deg);
}
.mb { display: none; padding: 0 22px 22px; }
.mc2.open .mb { display: block; }

/* ── Callout boxes ────────────────────────────────────────────── */
.skip {
  background: rgba(167,139,250,0.08);
  border-left: 4px solid var(--aiml-1);
  border-radius: 0 8px 8px 0;
  padding: 11px 15px;
  margin: 14px 0;
  font-size: 0.86rem;
  color: var(--text-color);
}
.skip strong { color: var(--aiml-1); }
.note {
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: 11px 15px;
  margin: 14px 0;
  font-size: 0.86rem;
  color: var(--text-color);
}
.note.purple {
  background: rgba(167,139,250,0.08);
  border-color: var(--aiml-1);
}
.note.amber {
  background: rgba(236,72,153,0.08);
  border-color: var(--aiml-2);
}
.note.red {
  background: rgba(239,68,68,0.08);
  border-color: #ef4444;
}

/* ── Tables ───────────────────────────────────────────────────── */
.wt, .rt, .rolt {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.83rem;
}
.wt th, .rt th, .rolt th {
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}
.wt th { background: #1a1f36; }
.rt th { background: var(--light-text, #6b7280); }
.rolt th { background: var(--aiml-1); }
.wt td, .rt td, .rolt td {
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  vertical-align: top;
  color: var(--text-color);
}
.wt tr:nth-child(even) td,
.rt tr:nth-child(even) td,
.rolt tr:nth-child(even) td { background: var(--bg-color); }
.wn { font-weight: 600; color: var(--aiml-1); white-space: nowrap; }
.rl { color: var(--aiml-1); font-weight: 500; text-decoration: none; }
.rl:hover { text-decoration: underline; }
.rt2 { font-size: 0.74rem; font-weight: 600; color: var(--light-text); }
.rc { font-size: 0.76rem; color: var(--light-text); }
.rn { font-weight: 700; color: var(--text-color); }
.sal { font-size: 0.78rem; }

/* ── Project box ──────────────────────────────────────────────── */
.pbox {
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
}
.pbh {
  background: linear-gradient(135deg, var(--aiml-1), #7c3aed);
  color: #fff;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pbt { font-weight: 600; font-size: 0.92rem; }
.pbd2 {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-left: auto;
}
.pbb { padding: 14px 16px; font-size: 0.86rem; color: var(--text-color); }
.pbb .sk { margin-top: 8px; }
.pbb .sk strong { color: var(--aiml-1); }

/* ── Milestone box (new-style .mb2) ──────────────────────────── */
.mb2 {
  background: rgba(236,72,153,0.06);
  border: 1px solid rgba(236,72,153,0.3);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}
.mbh {
  background: linear-gradient(135deg, var(--aiml-2), #be185d);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.92rem;
}
.mb2 ul { padding: 14px 16px 14px 34px; margin: 0; }
.mb2 li { margin-bottom: 7px; font-size: 0.88rem; color: var(--text-color); }

/* ── List ─────────────────────────────────────────────────────── */
.cl { padding-left: 20px; margin: 10px 0; }
.cl li { margin-bottom: 6px; font-size: 0.9rem; line-height: 1.6; color: var(--text-color); }

/* ── Checklist (new-style .ck) ────────────────────────────────── */
.ck { list-style: none; padding: 0; }
.ck li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text-color);
}
.ck li:last-child { border-bottom: none; }
.cb {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck li.chk .cb {
  background: var(--aiml-1);
  border-color: var(--aiml-1);
  color: #fff;
  font-size: 12px;
}
.ck li.chk .cb::after { content: '✓'; }
.ck li.chk span { text-decoration: line-through; color: var(--light-text); }

/* ── Track grid ───────────────────────────────────────────────── */
.tg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .tg { grid-template-columns: 1fr; } }
.tc {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tc:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.1); }
.tch { padding: 18px 20px; color: #fff; }
.tch.teal { background: linear-gradient(135deg, var(--aiml-1), #7c3aed); }
.tch.purple { background: linear-gradient(135deg, var(--aiml-2), #9d174d); }
.tch.green { background: linear-gradient(135deg, #10b981, #065f46); }
.tch.amber { background: linear-gradient(135deg, var(--aiml-2), #be185d); }
.tch h3 { font-size: 0.97rem; font-weight: 700; margin-bottom: 3px; color: #fff; }
.tch .td { font-size: 0.78rem; opacity: 0.85; color: #fff; }
.tcb {
  background: var(--card-bg);
  padding: 14px 20px;
  font-size: 0.83rem;
  color: var(--light-text);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 14px 14px;
}

/* ── Section heading ──────────────────────────────────────────── */
.st {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.st::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--aiml-grad);
  border-radius: 2px;
}

/* ── Description ──────────────────────────────────────────────── */
p.desc {
  margin: 10px 0 18px;
  font-size: 0.91rem;
  line-height: 1.7;
  color: var(--light-text);
}

/* ── Metro Map ────────────────────────────────────────────────── */
.metro-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  overflow-y: visible;
}
.metro-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light-text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.metro-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.metro-map {
  position: relative;
  height: 220px;
  width: 100%;
  min-width: 580px;
}
.metro-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Station base */
.ms {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  text-decoration: none !important;
  color: inherit;
  gap: 5px;
  cursor: pointer;
  top: 53px;
  z-index: 2;
}
.ms-branch { top: 143px; }
.ms:hover .ms-dot  { transform: scale(1.35); }
.ms:hover .ms-name { color: var(--text-color); }
/* Dot */
.ms-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--aiml-1);
  border: 2.5px solid var(--card-bg);
  box-shadow: 0 0 0 2.5px var(--aiml-1);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.ms-ai .ms-dot         { background: var(--aiml-1); box-shadow: 0 0 0 2.5px var(--aiml-1); }
.ms-ml .ms-dot         { background: var(--aiml-2); box-shadow: 0 0 0 2.5px var(--aiml-2); }
.ms-interchange .ms-dot {
  width: 18px;
  height: 18px;
  background: var(--card-bg);
  border: 3px solid var(--aiml-1);
  box-shadow: 0 0 0 3px var(--aiml-2);
}
/* Badge (P0, P1 …) */
.ms-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.ms-ai .ms-badge          { background: rgba(167,139,250,0.15); color: var(--aiml-1); }
.ms-ml .ms-badge          { background: rgba(236,72,153,0.15);  color: var(--aiml-2); }
.ms-interchange .ms-badge { background: var(--aiml-grad); color: #fff; }
/* Name */
.ms-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--light-text);
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
  max-width: 76px;
  transition: color 0.15s;
}
/* Legend */
.metro-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  align-items: center;
}
.mleg-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--light-text);
  font-weight: 500;
}
.mleg-line        { width: 22px; height: 3.5px; border-radius: 2px; flex-shrink: 0; }
.mleg-line.v      { background: var(--aiml-grad); }
.mleg-line.p      { background: var(--aiml-2); }
.mleg-dot-ic {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--aiml-1);
  box-shadow: 0 0 0 2px var(--aiml-2);
  flex-shrink: 0;
}

/* ── Scroll-to-top ────────────────────────────────────────────── */
#sct {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--aiml-grad);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(167,139,250,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  z-index: 999;
}
#sct:hover { transform: translateY(-3px); }
#sct.vis { display: flex; }

/* ── Responsive tweaks ────────────────────────────────────────── */
@media (max-width: 640px) {
  .aiml-hero h1 { font-size: 1.9rem; }
  .module-header { padding: 1rem 1rem 0; }
  .module-body { padding: 0 1rem 1rem; }
  .module-progress-row { padding: 0.65rem 1rem; }
  .ph { padding: 18px 18px; }
  .ph h2 { font-size: 1.3rem; }
  .pnav { top: 0; border-radius: 0; }
  .mh { padding: 12px 16px; }
  .mb { padding: 0 16px 16px; }
}
