/* ub/deadline-cards — term intake dates.
   ==========================================================================

   Loaded only on pages carrying ub/deadline-cards (see ub-elements.php).

   The design problem: graduate intake dates were living inside a paragraph of
   a numbered step. "Fall start: July 15. Spring start: December 1." is the
   single most decision-critical fact on an admissions page and it was set in
   body copy at body-copy size.

   The card marked `next` is emphasised with an accent AND carries a text flag
   from the renderer. Colour alone is not an accessible way to say "this is the
   one you are racing".
   ========================================================================== */

.ub-dl {
  padding: var(--section-pad, 72px) 0;
  background: var(--white);
}

.ub-dl--dark {
  background: var(--bg-light);
}

.ub-dl-head {
  max-width: 62rem;
  margin-bottom: 2.2rem;
}

.ub-dl-head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.16;
  margin: 0 0 0.6rem;
  color: var(--text-main);
}

.ub-dl-head .section-lede {
  color: var(--text-light);
  line-height: var(--line-height-base, 1.6);
  margin: 0;
}

/* auto-fit rather than a fixed count: three terms is the common case, but a
   program with two or four intakes must not leave an orphan cell. */
.ub-dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.ub-dl-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(44, 62, 80, 0.14);
  border-top: 4px solid rgba(89, 45, 130, 0.35);
  border-radius: 0;
  padding: 24px 24px 22px;
}

.ub-dl-card--next {
  border-top-color: var(--ub-purple);
  box-shadow: 0 10px 26px rgba(89, 45, 130, 0.13);
}

.ub-dl-flag {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ub-purple);
  border-radius: 0;
  padding: 4px 11px;
  margin: 0 0 0.7rem;
}

/* --ub-blue (#00a7e0) is a 2.5:1 contrast on white -- it is a brand accent for
   large text and fills, not a colour for a 12-13px label. --ub-purple is 9.9:1
   and is the site's primary, so small metadata text uses it instead. */
.ub-dl-term {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ub-purple);
  margin: 0 0 0.3rem;
}

.ub-dl-date {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--ub-purple-dark);
  margin: 0 0 0.5rem;
}

.ub-dl-detail {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-light);
  margin: 0;
}

.ub-dl-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 1.8rem;
}

.ub-dl-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 46rem;
}

@media (max-width: 600px) {
  .ub-dl-grid { grid-template-columns: 1fr; }
}
