/* Per-course mirror page styles. Loads alongside styles.css/home.css. */

.course-hero .hero-runline {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-cover {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.course-cover img {
  max-width: 220px;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
}

/* Textbook pages give the cover more presence than a course thumbnail. */
.textbook-cover img {
  max-width: 300px;
  max-height: 400px;
}

/* Textbook action buttons (Read online / Download PDF) — reuses the
   sitewide .btn + .hero-actions styles; just ensures comfortable spacing. */
.course-actions .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.course-description p {
  font-size: 1.05rem;
  line-height: 1.55;
}

.course-description p + p {
  margin-top: 0.75rem;
}

.course-keywords {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.course-keywords .kw {
  font-size: 0.78rem;
  text-transform: lowercase;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  opacity: 0.85;
}

.course-attribution {
  font-size: 0.95rem;
  line-height: 1.5;
}

.course-attribution p {
  margin: 0.25rem 0;
}

.course-attribution .license-badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  margin-left: 0.4rem;
  text-transform: none;
}

.course-syllabus .offerings-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Long flat session lists (Yale-style) flow into columns on wider screens. */
@media (min-width: 720px) {
  .course-syllabus .offerings-grid:has(> .offering-group:only-child) .offering-list {
    columns: 2;
    column-gap: 2.5rem;
  }
  .course-syllabus .offering-list li {
    break-inside: avoid;
  }
}

/* Rich free-text course-detail sections (Course Structure, Texts, etc.). */
.course-section-block + .course-section-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.course-section-block p {
  line-height: 1.55;
}

.course-section-block p + p {
  margin-top: 0.6rem;
}

.course-books ul,
.course-downloads ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.course-books li,
.course-downloads li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.course-books li:last-child,
.course-downloads li:last-child {
  border-bottom: none;
}

.course-footer {
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.85;
}

.course-footer p + p {
  margin-top: 0.5rem;
}

.course-footer .back-link {
  display: inline-block;
  margin-top: 0.6rem;
}
