/* Course overviews. */
body.course-overview #view-overview, body.course-overview #view-shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 32px; }
.hero { margin-bottom: 20px; }
.hero h1 { font-size: clamp(28px, 3.2vw, 38px); }
.hero-text { margin: 10px 0 16px; max-width: 76ch; font-size: 17px; line-height: 1.5; color: #cddbf8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; }
.hero-progress { display: grid; gap: 4px; width: 200px; font-size: 13px; color: var(--muted); }
.course-prerequisites { margin: 12px 0; max-width: 76ch; }
.course-prerequisites summary { color: var(--muted); cursor: pointer; }
.course-prerequisites p { margin: 8px 0; }
.all-done { margin: 0; color: var(--green); font-weight: 600; }
.chapter-list { display: grid; gap: 8px; margin: 20px 0; }
.chapter-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.chapter-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 12px; gap: 12px; align-items: center; padding: 13px 16px; cursor: pointer; list-style: none; }
.chapter-head::-webkit-details-marker { display: none; }
.chapter-card .chapter-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.chapter-number { color: var(--muted); font-size: 14px; }
.chapter-arrow { color: var(--muted); font-size: 22px; line-height: 1; }
.chapter-card[open] .chapter-arrow { transform: rotate(90deg); }
.chapter-card[open] > .chapter-head { border-bottom: 1px solid var(--border); }
.lesson-list { margin: 0; padding: 0; list-style: none; }
.lesson-row + .lesson-row { border-top: 1px solid var(--border); }
.lesson-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 11px 16px 11px 56px; color: var(--text); font-size: 15px; text-decoration: none; overflow-wrap: anywhere; }
.lesson-title:hover { background: var(--raised); color: var(--green); }
.lesson-count { flex: none; color: var(--muted); font-size: 13px; }
.lesson-row.unavailable { padding: 12px 16px 12px 56px; color: var(--muted); }
@media (max-width: 520px) { .chapter-head { grid-template-columns: 20px minmax(0, 1fr) 10px; gap: 8px; padding: 12px; } .chapter-card .chapter-head h2 { font-size: 15px; } .lesson-title { padding: 12px 12px 12px 40px; font-size: 14px; } }
.course-heading { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 288px); align-items: center; gap: 32px; }
.course-heading > div { min-width: 0; }
.course-emblem { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
/* Empty slot for the course image. It keeps the heading layout until the owner adds the image. */
.course-badge { display: block; }
/* Facts sit under the description as one line of figures. Prerequisites and the credential are visible sections, not a collapsible. */
.course-facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 14px 0 0; }
.course-facts > div { display: flex; align-items: baseline; gap: 6px; }
.course-facts dt { order: 2; color: var(--muted); font-size: 14px; }
.course-facts dd { order: 1; margin: 0; font-weight: 650; font-size: 18px; font-variant-numeric: tabular-nums; }
.course-prerequisites-block, .course-exam { margin: 24px 0 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.course-prerequisites-block h2, .course-exam h2 { margin: 0 0 8px; font-size: 17px; }
.course-prerequisites-block p, .course-exam p { margin: 0; max-width: 76ch; line-height: 1.55; }
.course-exam p + p { margin-top: 8px; }
.course-exam a { display: inline-block; margin-top: 10px; }
.course-framing-note { margin: 14px 0 0; max-width: 76ch; color: var(--muted); font-size: 15px; line-height: 1.55; }
.course-framing > h2 { margin: 0 0 6px; font-size: 22px; }
.course-framing > p:first-of-type { margin: 0 0 14px; max-width: 76ch; font-size: 16px; line-height: 1.5; }
.chapter-list-title { margin: 32px 0 0; font-size: 22px; }
.chapter-list { margin: 12px 0 0; }
@media (max-width: 640px) { .course-heading { grid-template-columns: minmax(0, 1fr); gap: 16px; } .course-emblem { grid-row: 1; justify-self: center; width: 192px; height: 192px; } .hero h1 { font-size: 28px; } }

.course-framing { margin-block: 1.5rem; }
.key-idea-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; }
.key-idea-card, .chapter-intro { padding: 1rem; border: 1px solid var(--border); background: var(--panel); }
.chapter-intro { margin-block: 1rem; }
.chapter-goal { padding-inline: 1.25rem; }
.chapter-minutes { color: var(--muted); font-size: 13px; white-space: nowrap; }
.lesson-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.lesson-minutes { color: var(--faint); font-size: 13px; white-space: nowrap; }
.next-step { margin: 28px 0 8px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, rgba(92, 236, 255, .07), transparent 60%), var(--panel); }
.next-step h2 { margin: 0 0 6px; font-size: 20px; }
.next-step > p { margin: 0 0 16px; color: var(--muted); }
.next-step-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.next-step-project { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--sunken); }
.next-step-project svg { width: 100%; height: auto; max-height: 180px; }
.next-step-project h3, .next-step-courses h3 { margin: 0; font-size: 16px; }
.next-step-courses { display: grid; gap: 8px; align-content: start; }
.next-step-courses a.course-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.next-step-courses a.course-line:hover { border-color: #5cecff88; color: var(--green); }
.next-step-courses .course-line span:last-child { color: var(--faint); font-size: 13px; white-space: nowrap; }
.next-step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 760px) { .next-step-grid { grid-template-columns: 1fr; } .chapter-minutes { display: none; } }

.course-framing a, .course-framing a:hover, .course-framing a:focus { text-decoration: none; }
.key-idea-card { display: block; color: var(--text); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.key-idea-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--green); }
.key-idea-card p { margin: 0; font-size: 14px; line-height: 1.5; }
@media (hover: hover) { a.key-idea-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 8px 22px #0003; } }
a.key-idea-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .key-idea-card { transition: none; } a.key-idea-card:hover { transform: none; } }
html[data-reduce-motion="1"] .key-idea-card { transition: none; transform: none; }

.lesson-name { display: inline-flex; align-items: center; min-width: 0; }
