/* KE-24 homepage date cues. Tokens follow ke-home. No new plugins. */
#courseGrid .card,
#dates.ke-up .card,
#courseSlider .hs-slide {
  --ke-dates-navy: var(--navy, #0B1F3A);
  --ke-dates-gold: var(--gold, #C9A227);
  --ke-dates-gold-soft: #F7F0D8;
  --ke-dates-blue: var(--blue, #1565C0);
  --ke-dates-muted: var(--muted, #5b6b7c);
}

.ke-dates-badge {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ke-dates-gold);
  color: var(--ke-dates-navy);
  font-family: Inter, system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(11, 31, 58, .18);
  pointer-events: none;
}
#courseGrid .card .media,
#dates.ke-up .card .media {
  position: relative;
}

.ke-dates-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 0;
}
.ke-dates-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ke-date-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--ke-dates-gold) 65%, #d6c98a);
  border-radius: 999px;
  background: var(--ke-dates-gold-soft);
  color: var(--ke-dates-navy);
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
.ke-dates-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}
.ke-dates-more {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ke-dates-navy);
  color: #fff;
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.3;
}
.ke-dates-all {
  font-size: .74rem;
  font-weight: 650;
  color: var(--ke-dates-blue);
  white-space: nowrap;
}
.ke-dates-all::after {
  content: " →";
  font-weight: 700;
}
.rtl .ke-dates-all::after,
html[dir="rtl"] .ke-dates-all::after {
  content: " ←";
}

#courseGrid .card .when {
  margin-bottom: 0;
}

/* Upcoming: make the existing +N line a chip; keep Next start. */
#dates.ke-up .card .ke-up-more {
  display: none;
}
#dates.ke-up .card .ke-dates-block {
  margin-top: 2px;
}
#dates.ke-up .card .body {
  gap: 6px;
}

/* Hero slider */
#courseSlider .hs-slide .hs-dates {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
#courseSlider .hs-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
#courseSlider .hs-more-wrap .ke-dates-more,
#courseSlider .hs-more-wrap .ke-dates-all {
  font-size: .72rem;
}
.rtl #courseSlider .hs-more-wrap,
html[dir="rtl"] #courseSlider .hs-more-wrap {
  align-items: flex-end;
}

@media (max-width: 640px) {
  .ke-date-pill { font-size: .66rem; padding: 3px 7px; }
  .ke-dates-badge { font-size: .62rem; padding: 3px 7px; }
  #dates.ke-up .ke-date-pill:nth-child(n+3) { display: none; }
}

a.card .ke-dates-all,
#courseGrid .ke-dates-all,
#dates.ke-up .ke-dates-all {
  color: #1565C0 !important;
}
/* Hero sits on navy — invert the chip so +N stays readable */
#courseSlider .hs-more-wrap .ke-dates-more {
  background: var(--ke-dates-gold);
  color: var(--ke-dates-navy);
}
#courseSlider .hs-more-wrap .ke-dates-all {
  color: var(--ke-dates-gold) !important;
}
.ke-more-until { white-space: nowrap; }
#dates.ke-up .ke-more-until { display: none; }
@media (max-width: 640px) {
  #courseGrid .ke-more-until { display: none; }
}
