/* Homepage catalogue. Keep detail pages and their data presentation independent. */
.hero .search-box {
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 7px 8px 7px 18px;
}
.hero .search-box > [data-lucide] { color: #61796e; }
.hero .search-box input { min-width: 0; min-height: 42px; }
.hero .search-box input:focus { outline: none; }
.hero .search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hero #clearSearch { grid-column: 3; width: 40px; min-height: 44px; }
.hero .search-submit {
  grid-column: 4;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid #116149;
  border-radius: 8px;
  background: #116149;
  color: white;
  font-size: 14px;
  font-weight: 650;
}
.hero .search-submit:hover { background: #073f33; border-color: #073f33; }
.hero .search-suggestions { padding: 8px; border-radius: 14px; background: #fff; }
.hero .suggestion-button { min-height: 65px; padding: 11px 12px; border-radius: 8px; gap: 16px; }
.hero .suggestion-button > span:first-child { min-width: 0; }
.hero .suggestion-button strong { font-size: 14px; line-height: 1.5; font-weight: 600; white-space: normal; }
.hero .suggestion-button small { margin-top: 4px; font-size: 12px; }
.hero .suggestion-button:hover, .hero .suggestion-button.is-active { background: #edf5f0; }
.hero .suggestion-kind { border-radius: 5px; font-size: 11px; font-weight: 500; }

#programs { scroll-margin-top: 88px; outline: none; }
#programs .workspace-head { display: block; margin-bottom: 22px; }
#programs .workspace-heading { min-width: 0; }
#programs .workspace-heading h2 { font-size: 28px; font-weight: 650; }
#programs .workspace-heading .section-kicker { color: #6d8277; font-size: 11px; font-weight: 600; letter-spacing: .12em; }
#programs .catalogue-filters {
  padding: 20px 22px 0;
  border: 1px solid #dae4de;
  border-radius: 16px;
  background: #fff;
  margin-bottom: 26px;
}
#programs .head-primary-filters { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#programs .head-primary-filters label { padding: 0; gap: 8px; color: #607168; font-size: 12px; font-weight: 500; }
#programs select { font-size: 13px; min-height: 44px; border-color: #dde5df; border-radius: 8px; padding-left: 12px; }
#programs select:hover { border-color: #9bb2a5; }
#programs .catalogue-filter-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 0; margin-top: 10px; border-top: 1px solid #edf0ed; }
#programs .filters-extra-toggle { display: inline-flex; gap: 8px; min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 600; }
#programs .filters-extra-toggle:hover { color: #073f33; text-decoration: underline; text-underline-offset: 4px; }
#programs .filter-extra-hint { font-size: 12px; color: #63756a; }
#programs #resetFilters { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-height: 44px; flex: 0 0 auto; padding: 0 8px; margin-left: auto; font-size: 12px; }
#programs #resetFilters span { display: inline; }
#programs #resetFilters [data-lucide] { width: 14px; height: 14px; }
#programs .filters { display: block; position: static; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; overflow: visible; }
#programs .filters:has(.filters-extra[hidden]) { display: none; }
#programs .filters-extra[hidden] { display: none !important; }
#programs .filters-extra:not([hidden]) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; padding: 18px 0; border: 0; border-top: 1px solid #edf0ed; border-radius: 0; box-shadow: none; }
#programs .filters label { display: grid; gap: 8px; font-size: 12px; font-weight: 500; white-space: normal; }
#programs .filters label select { width: 100%; }
#programs .filters .check-row { display: flex; gap: 8px; width: fit-content; min-height: 44px !important; border: 0; padding: 0; font-size: 12px !important; font-weight: 500 !important; }
#programs .filters .check-row input { width: 18px; height: 18px; }
#programs .app-grid { display: block; }
#programs .results-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 8px; }
#programs .result-counts { flex: 1 1 350px; }
#programs #resultSummary { color: #35483e; font-size: 15px; line-height: 1.5; white-space: normal; overflow: visible; }
#programs #resultSummary strong { font-size: 25px; font-weight: 650; color: #193e30; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#programs .result-visible { color: #63756a; font-size: 12px; }
#programs .degree-summary { white-space: normal; font-size: 12px; line-height: 1.7; margin-top: 5px; }
#programs .head-actions { align-items: center; margin: 0; gap: 10px; }
#programs .sort-label { font-size: 12px; color: #607168; white-space: nowrap; }
#programs #sortSelect { width: 185px; background: transparent; }
#programs .catalogue-share { width: fit-content; max-width: 100%; margin: 2px 0 18px; }
#programs .catalogue-share summary { display: flex; align-items: center; gap: 7px; width: fit-content; min-height: 44px; color: #66766b; font-size: 12px; cursor: pointer; list-style: none; }
#programs .catalogue-share summary::-webkit-details-marker { display: none; }
#programs .catalogue-share summary [data-lucide] { width: 14px; height: 14px; }
#programs .catalogue-share[open] summary > :last-child { transform: rotate(180deg); }
#programs .catalogue-share-content { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; border: 1px solid #dae4de; border-radius: 10px; background: #fff; }
#programs .decision-share-actions { margin: 0; gap: 8px; flex-wrap: wrap; }
#programs .catalogue-share-content button { min-height: 44px; font-size: 12px; color: #116149; }
#programs .catalogue-share .storage-note { flex-basis: 100%; text-align: left; margin: 2px 12px 8px; font-size: 12px; line-height: 1.6; }
#programs .active-filters { gap: 8px; margin: 0 0 20px; }
#programs .filter-chip { padding: 0 6px 0 12px; min-height: 40px; border-radius: 8px; font-size: 12px; font-weight: 500; }
#programs .filter-chip button { width: 32px; height: 32px; background: transparent; }

#programs .program-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#programs .program-card { min-height: 0; padding: 12px 18px 8px; border-color: #dde5df; border-radius: 12px; box-shadow: 0 3px 12px #223c2b03; overflow: visible; }
#programs .program-card:hover { border-color: #96b5a2; box-shadow: 0 10px 26px #223c2b0d; transform: translateY(-2px); }
#programs .card-top { gap: 10px; margin: -4px -6px 6px 0; align-items: center; }
#programs .card-school { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; color: #5b7567; font-size: 12px; line-height: 1.6; }
#programs .card-school [data-lucide] { width: 16px; height: 16px; flex: 0 0 auto; color: #759585; }
#programs .program-title { min-height: 0; font-size: 19px; font-weight: 650; line-height: 1.45; overflow: visible; }
#programs .program-title a, #programs .program-title button { display: block; -webkit-line-clamp: unset; overflow: visible; line-height: inherit; font-weight: inherit; text-spacing-trim: space-all; }
#programs .program-en { display: block; min-height: 0; margin: 5px 0 8px; font-size: 12px; line-height: 1.5; color: #64736a; overflow: visible; overflow-wrap: anywhere; -webkit-line-clamp: unset; }
#programs .pill-row { gap: 6px; margin: 0 0 12px; }
#programs .pill-row > .tag { display: inline-flex; min-height: 24px; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; }
#programs .pill-row > .tag:not(.intake-tag) { color: #617366; background: #f0f4f1; }
#programs .compact-meta { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid #edf0ed; }
#programs .meta-item { align-content: start; gap: 4px; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; }
#programs .meta-item-language { padding-left: 14px; border-left: 1px solid #edf0ed; }
#programs .meta-label { color: #617166; font-size: 11px; font-weight: 400; white-space: normal; line-height: 1.5; overflow: visible; }
#programs .meta-item strong { color: #234d3b; font-size: 18px; font-weight: 600; line-height: 1.4; white-space: normal; overflow: visible; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; text-spacing-trim: space-all; }
#programs .card-deadline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; background: #f6f8f5; }
#programs .card-deadline .meta-item-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; min-width: 0; }
#programs .card-deadline .deadline-row { margin: 0; }
#programs .card-deadline strong { font-size: 13px; font-weight: 600; white-space: normal; }
#programs .card-deadline.is-nonlocal-closed { background: #fff5f0; }
#programs .status-pill { padding: 2px 7px; min-height: 24px; font-size: 11px; font-weight: 500; border-radius: 5px; flex: 0 0 auto; }
#programs .status-closing { color: #925700; }
#programs .card-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#programs .card-actions button { min-height: 36px; font-weight: 500; }
#programs .card-save button { width: 36px; min-width: 36px; border: 0; background: transparent; color: #77887d; }
#programs .card-save button [data-lucide] { width: 18px; height: 18px; }
#programs .card-save button:hover { background: #f0f5f1; color: #116149; }
#programs .card-save .is-favorite { background: #fff3ee; color: #b7523d; }
#programs .card-save .is-favorite [data-lucide] { fill: #b7523d; }
#programs .card-compare button { width: auto; min-width: 72px; padding: 0 9px; gap: 7px; border-radius: 8px; border-color: #dce5de; font-size: 12px; }
#programs .card-compare button span { display: inline; }
#programs .card-compare [data-lucide] { width: 14px; height: 14px; }
#programs .card-official-link { min-height: 36px; gap: 4px; padding: 0 6px; margin: 0 0 0 auto; border: 0; background: transparent; color: #718277; font-size: 12px; font-weight: 400; }
#programs .card-official-link:hover { color: #116149; background: transparent; }
#programs .card-official-link [data-lucide] { width: 12px; height: 12px; }
#programs .card-details-link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 0 0 8px; border: 0; background: transparent; color: #116149; font-size: 12px; font-weight: 600; white-space: nowrap; }
#programs .card-details-link [data-lucide] { width: 17px; height: 17px; }
#programs .card-details-link:hover { color: #073f33; text-decoration: underline; text-underline-offset: 4px; }
#programs .load-more { padding: 26px 0; }
#programs .load-more button { min-height: 46px; border-radius: 10px; }
#programs .empty-state { padding: 46px 20px; border: 1px dashed #cadbd0; border-radius: 16px; background: #fff; }

@media (max-width: 1040px) {
  #programs .program-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #programs .catalogue-filters { padding: 18px 18px 0; }
  #programs .head-primary-filters { gap: 12px; }
}
@media (max-width: 720px) {
  .hero .search-box { grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px; padding-left: 12px; }
  .hero .search-box > [data-lucide] { display: none; }
  .hero .search-box input { font-size: 16px; }
  .hero #clearSearch { grid-column: 2; width: 32px; }
  .hero .search-submit { grid-column: 3; padding: 0 15px; }
  #programs { scroll-margin-top: 76px; }
  #programs .workspace-head { margin-bottom: 18px; }
  #programs .workspace-heading { gap: 10px; }
  #programs .workspace-heading h2 { font-size: 25px; }
  #programs .workspace-heading .section-kicker { display: none; }
  #programs .workspace-updated { font-size: 11px; }
  #programs .catalogue-filters { padding: 16px 14px 0; margin-bottom: 22px; border-radius: 12px; }
  #programs .head-primary-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  #programs .head-primary-filters label { font-size: 11px; gap: 5px; }
  #programs select { padding-left: 9px; font-size: 12px; }
  #programs .filter-extra-hint { display: none; }
  #programs .filters-extra:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  #programs .results-summary { gap: 12px; }
  #programs .result-counts { flex-basis: 100%; }
  #programs .head-actions { width: 100%; justify-content: space-between; }
  #programs #sortSelect { width: 188px; flex: 0 1 auto; }
  #programs .catalogue-share { margin-bottom: 12px; }
  #programs .degree-summary { font-size: 11px; }
  #programs .program-card { padding: 12px 16px 8px; border-radius: 12px; }
  #programs .program-title { font-size: 19px; }
}
@media (max-width: 720px) {
  #programs .program-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #programs .program-title, #programs .program-en { min-height: 0; }
  #programs .program-en { margin-bottom: 8px; }
  #programs .pill-row { margin-bottom: 10px; }
  #programs .compact-meta { padding: 10px 0; }
  #programs .card-actions button, #programs .card-official-link, #programs .card-details-link { min-height: 44px; }
  #programs .card-save button { width: 44px; min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #programs .program-card { transition: none; transform: none; }
}

#programs .condition-hint { margin: 0 0 20px; padding: 12px 15px; border: 1px solid #d9e6dc; border-radius: 8px; color: #4c6957; background: #edf5ef; font-size: 12px; line-height: 1.7; }
#programs .condition-hint .text-button { min-height: 32px; color: #116149; }
@media (max-width: 430px) {
  .top-nav { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .top-nav a, .top-nav .nav-button { padding: 0 2px; gap: 4px; font-size: 12px; }
  .top-nav .nav-button [data-lucide] { width: 16px; height: 16px; }
  .top-nav .nav-button strong { min-width: 20px; height: 20px; font-size: 11px; }
}
@media (max-width: 360px) {
  #programs .meta-item-tuition strong { font-size: 18px; }
}

/* Written language requirements retain the compact metadata footprint. */
#programs .meta-item-language.is-text-value strong { font-size: 14px; line-height: 1.5; }
