/* =========================================================
   LLM 101 互動教學｜PART 02 · 跑起 AI
   閱讀路徑與 Capstone 的少量版面（learning.css）
   - 只服務 #learning-paths 與 #capstone；不改既有 class 的全域規則。
   - 顏色、字型、陰影一律使用 main.css 的 tokens；不新增 :root。
   - 斷點沿用 859px／460px；390px 為單欄。
   ========================================================= */

/* ---------- 1. 三條閱讀路徑 ---------- */
.learning-paths .section-lead {
  max-width: 66ch;
}

.learning-path-grid {
  align-items: stretch;
}

.learning-path-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  scroll-margin-top: 96px;
}

.learning-path-card .learning-path-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--primary);
}

.learning-path-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.4;
}

.learning-path-card .learning-path-question {
  margin: 0;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.7;
}

.learning-path-steps {
  display: grid;
  gap: 0;
  margin: 2px 0 6px;
  padding: 0;
  list-style: none;
  font-size: .85rem;
  line-height: 1.55;
}

.learning-path-steps a {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.learning-path-steps li:last-child a {
  border-bottom: 0;
}

.learning-path-steps a:hover {
  color: var(--primary);
  text-decoration: none;
}

.learning-path-steps a:focus-visible {
  border-radius: 4px;
}

.learning-path-num {
  flex: 0 0 3.2em;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.learning-path-card .learning-path-cta {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- 2. Capstone ---------- */
.capstone .section-lead {
  max-width: 66ch;
}

.capstone-steps {
  display: grid;
  gap: 14px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.capstone-step {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  border-left: 4px solid var(--primary);
}

.capstone-step .capstone-step-num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.5;
  color: var(--primary);
}

.capstone-step h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.capstone-step p {
  margin: 0;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.75;
}

.capstone-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
  line-height: 1.6;
}

.capstone-links li {
  min-width: 0;
}

.capstone-done {
  margin: 26px 0 24px;
}

.capstone-done h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.capstone-done p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.7;
}

.capstone-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  line-height: 1.7;
}

.capstone-checklist li {
  display: grid;
  grid-template-columns: 1.2em max-content minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.capstone-checklist li::before {
  content: "□";
  font-family: var(--font-mono);
  line-height: 1.65;
  color: var(--primary);
}

.capstone-check-label {
  font-weight: 800;
  color: var(--text);
}

.capstone-check-text {
  min-width: 0;
}

.capstone-cta {
  margin: 22px 0 0;
}

/* ---------- 3. 斷點 ---------- */
@media (max-width: 859px) {
  .learning-path-grid {
    grid-template-columns: 1fr;
  }

  .learning-path-card {
    scroll-margin-top: 78px;
  }

  .learning-path-card .learning-path-cta {
    align-self: stretch;
  }

  .capstone-step {
    padding: 16px 16px 16px 18px;
  }
}

@media (max-width: 460px) {
  .learning-path-steps {
    font-size: .84rem;
  }

  .learning-path-num {
    flex-basis: 2.9em;
  }

  .capstone-links {
    display: grid;
    gap: 4px;
  }

  .capstone-checklist li {
    grid-template-columns: 1.2em minmax(0, 1fr);
  }

  .capstone-checklist li::before {
    grid-row: 1 / span 2;
  }

  .capstone-check-label,
  .capstone-check-text {
    grid-column: 2;
  }
}
