/* Spring 2027 list. Builds on style.css tokens. */

/* ---- Toolbar: search, category chips, compact selects ------------------ */
.toolbar { display: flex; flex-direction: column; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--border-strong); background: var(--subtle); }
.chip[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-text); }
.chip .count { margin-left: 6px; color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .count { color: inherit; opacity: .7; }

.chips.sub { gap: 4px; }
.chips.sub .chip { height: 26px; font-size: 12.5px; padding: 0 10px; border-color: transparent; background: transparent; color: var(--muted); }
.chips.sub .chip:hover { background: var(--subtle); color: var(--text); }
.chips.sub .chip[aria-pressed="true"] { background: var(--subtle); border-color: var(--border-strong); color: var(--text); }

.req { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.req small { color: var(--faint); font-size: 12px; margin-left: 4px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.controls label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.controls select { height: 30px; font-size: 13px; }
.controls label.check { color: var(--text); font-weight: 400; margin-left: auto; }

/* ---- Course cards ------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-strong); }
.card.muted { background: transparent; }
.card.muted h3 { color: var(--muted); }

.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.card-head h3 small { font-weight: 500; color: var(--text); font-size: 15px; margin-left: 8px; letter-spacing: 0; }
.card .en { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .rank { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; margin-bottom: -4px; }
.tag.warn { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--amber-text); }

/* Format / term badges: plain text with separators, not colored capsules. */
.badges { display: flex; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.badges .pill + .pill::before { content: "·"; margin: 0 7px; color: var(--faint); }

.pill { white-space: nowrap; }
.pill.part-A, .pill.part-B { color: var(--amber-text); font-weight: 500; }

/* Key numbers: size and weight do the work. */
.big { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 10px; }
.big > div { padding: 10px 14px; min-width: 0; }
.big > div + div { border-left: 1px solid var(--border); }
.big b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.big span { font-size: 11.5px; color: var(--muted); }
.big + .meta { margin-top: -6px; }

.meta { font-size: 12px; color: var(--faint); }

/* Instructors */
.teachers { width: 100%; border-collapse: collapse; font-size: 13px; }
.teachers th { font-size: 11.5px; font-weight: 500; color: var(--faint); position: static; padding: 0 6px 6px; border-bottom: 1px solid var(--border); }
.teachers th:first-child, .teachers td:first-child { padding-left: 0; }
.teachers th:last-child, .teachers td:last-child { padding-right: 0; }
.teachers td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid var(--border); }
.teachers tr.head td { border-bottom: 0; padding-bottom: 0; }
.teachers tr.sched td { padding-top: 2px; }
.teachers tbody tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.teachers td.num { font-variant-numeric: tabular-nums; }
.teachers .who { font-weight: 600; }
.teachers .note { color: var(--amber-text); font-size: 12px; }
.teachers tr.ta .who { font-weight: 500; color: var(--muted); }
.role { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); margin-left: 6px; font-weight: 400; }
.nodata { color: var(--faint); font-size: 12.5px; }

.slot { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 1px 0; }
.slot .pill + .pill::before { content: "·"; margin: 0 6px; color: var(--faint); }
.slot .when { color: var(--text); margin-left: 10px; font-variant-numeric: tabular-nums; }
.slot .kind { color: var(--faint); margin-left: 10px; }
.slot .kind + .when { margin-left: 4px; }

/* Card title and footer link to the course page. */
.card-link { color: inherit; }
.card-link:hover { text-decoration: none; color: var(--blue-text); }
.card-link:hover small { color: inherit; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.card-foot a { color: var(--text); font-weight: 500; white-space: nowrap; }
.card-foot a:hover { color: var(--blue-text); text-decoration: none; }

#not-offered h2 { font-size: 14px; font-weight: 600; margin: 40px 0 12px; color: var(--muted); }

@media (max-width: 640px) {
  .controls label.check { margin-left: 0; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .teachers .hide-xs { display: none; }
  .big b { font-size: 20px; }
}

/* Live section status: a colored dot + word (green open, amber restricted, red full). */
.av-open { --av: var(--green); }
.av-restricted { --av: var(--amber); }
.av-closed { --av: var(--red); }
.pill.av, .av-dot { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--text); }
.pill.av i, .av-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--av); flex: none; }
.slot .av-dot { margin-left: 10px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.avail-note { font-size: 12px; color: var(--faint); margin: -6px 0 14px; line-height: 1.6; }
.avail-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.avail-note:empty { display: none; }
