.kv {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.kv .k {
  white-space: nowrap;
  font-weight: 600;
  color: #374151;
}

.kv .v {
  color: #374151;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* keep dot at end of previous item and wrap only when needed */
.kv.location-meta {
  flex-wrap: wrap;
  align-items: center;
}

.kv.location-meta .loc-item {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.kv.location-meta .loc-item > span {
  white-space: nowrap;
}

.kv.location-meta .v {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

/* Prevent mid-chip wrapping for inline separators */
.inline-chip {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.inline-chip > * {
  white-space: nowrap;
}

/* Title wrapping helpers to avoid overflow on mobile */
.program-title > span {
  min-width: 0;
}

.program-title .title-text {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Enforce consistent gap between university and first location line */
header .uni-line + .location-lines {
  margin-top: 0.25rem !important;
}

/* Keep university cap icon from shrinking when the name wraps */
.uni-line i[data-lucide],
.uni-line svg.lucide {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  flex: none;
}

.uni-line .v {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 640px) {
  .inline-chip {
    white-space: normal;
  }

  .inline-chip > * {
    white-space: normal;
  }

  .inline-chip .sep {
    white-space: nowrap;
  }

  .kv.location-meta .loc-item,
  .kv.location-meta .loc-item > span,
  .kv.location-meta .v {
    white-space: normal;
  }

  /* keep separators intact */
  .kv.location-meta .sep {
    white-space: nowrap;
  }

  .location-lines .kv i[data-lucide],
  .location-lines .kv svg.lucide {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex: none;
  }

  .location-lines .kv .v {
    font-size: 1rem;
    line-height: 1.5;
  }
}

.location-lines .kv.country-line {
  align-items: center;
}

.location-lines .kv.country-line i[data-lucide],
.location-lines .kv.country-line svg.lucide {
  flex: none;
}

.location-lines .kv.country-line .v {
  font-weight: inherit;
}

@media (max-width: 640px) {
  .location-lines .kv.country-line {
    align-items: center;
  }
}

.kv-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

a.link {
  color: rgb(37, 99, 235);
}

a.link:hover {
  text-decoration: underline;
}

body > header img {
  width: auto !important;
  height: auto !important;
  max-height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  body > header img {
    max-height: 64px;
  }
}
