/* The courses page: wide tiles down the page, numbered in the order the
 * courses are taken. Each tile has room for what the front page's square
 * card has not — what the course is about — because that is what somebody
 * choosing between six courses reads. */

.courses-page { padding-bottom: clamp(32px, 5vw, 64px); }
.courses-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.courses-page .shelf h2 { font-size: 1.3rem; font-weight: 800; }
.courses-page .shelf .count {
  margin-inline-start: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.course-list > li { min-width: 0; }

.course-tile {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 12px;
  height: 100%;
  box-sizing: border-box;
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.course-tile:hover { border-color: var(--brass); transform: translateY(-2px); }
.course-tile:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* The number: a small game piece, like a node on the course's own map. */
.course-n {
  grid-row: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

.course-main { grid-row: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.course-title { font-size: 1.15rem; font-weight: 800; line-height: 1.4; }
.course-about {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* The foot runs under both columns: what it costs, and the way in. */
.course-foot {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.course-access {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 209, 102, 0.12);
}
.course-access.is-free { color: var(--good); background: rgba(47, 214, 122, 0.14); }
.course-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.course-tile:hover .course-go { color: var(--accent); }

@media (max-width: 480px) {
  .course-tile { padding: 14px 14px 12px; column-gap: 12px; grid-template-columns: 36px minmax(0, 1fr); }
  .course-n { width: 36px; height: 36px; font-size: 1rem; }
  .course-title { font-size: 1.08rem; }
}
