/* Courses page (Courses.qmd): the banner hero, then one card per level
   (undergraduate, master's, doctoral), each a grid of course tiles.
   Builds on home/home.css (fonts, colours, cards) and
   people-page/people.css (banner hero, level tags). */

.home .stats-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  flex-basis: 100%;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.home .stats-line b {
  color: var(--ink);
  font-weight: 500;
}

.home .courses .card {
  margin-bottom: 20px;
}

.home a.pchip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: #f7f7f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.home .pchip::before {
  content: "[ ";
  color: var(--faint);
}

.home .pchip::after {
  content: " ]";
  color: var(--faint);
}

.home .pchip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.home .oer {
  font-family: var(--mono);
  font-size: 11px;
  color: #1f7a55;
  background: #e3f7ed;
  border-radius: 4px;
  padding: 0 6px;
}

.home .tcode {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.home .tdesc,
.home .ddesc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.home .tdesc a,
.home .ddesc a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.home .ttags,
.home .dtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* course-code tile, used where a course has no image */
.home .code-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #15161b;
  color: #e9e9ec;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.3;
  border-radius: inherit;
}

.home .code-tile span:first-child {
  color: #8a8f99;
  font-size: 11px;
  text-transform: uppercase;
}

/* ---- level cards and course tiles ---- */

.home .tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home .tile {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcfd;
}

.home .tile-thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.home .tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home .ttitle {
  font-weight: 600;
  line-height: 1.3;
  margin: 2px 0;
}

.home .ttitle a:hover {
  color: var(--accent);
}

.home .tmode {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.home .tile .tdesc {
  margin-top: 6px;
}

@media (max-width: 1100px) {
  .home .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .home .tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
