/* PeluangGo discovery, destination photography and application planning.
   Supplemental stylesheet: load after styles.css. */

:root {
  --surface: #fff;
  --quiet-surface: #f3f0f7;
  --field-line: #8c8099;
  --soft-shadow: 0 12px 36px #30213f0d;
}

button, input, select, textarea { font-family: inherit; }
textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 4px;
}
.wrap, .hero-copy, .hero-art, .search-input-wrap,
.opportunity-card, .card-body, .provider-tile, .planner-card { min-width: 0; }
.button, .button-small, .text-link { font-size: 13px; }
.saved-count { font-size: 12px; min-width: 22px; height: 22px; }
.eyebrow, .small { font-size: 12px; line-height: 1.5; letter-spacing: 1.05px; }
.hero { min-height: 460px; padding-top: 28px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(44px, 4.4vw, 61px); margin-top: 20px; }
.hero-art { height: 360px; }
.hero-emblem { width: 350px; height: 350px; max-width: 100%; }
.hero-notes, .floating-note strong, .floating-note div > span { font-size: 12px; }
.art-caption { font-size: 12px; letter-spacing: 1.2px; }
.note-top { top: 12px; }
.note-bottom { bottom: 20px; }
.verification-link {
  color: var(--plum); font-size: 13px; font-weight: 600;
  text-underline-offset: 4px; padding: 8px 0;
}
.verification-link:hover { text-decoration: underline; }

/* Destination and eligibility filters */
.region-tabs {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 5px; background: #ebe6f2; border: 1px solid #e4dced;
  border-radius: 14px; max-width: 100%;
}
.region-tabs button {
  min-height: 46px; padding: 12px 24px; border-radius: 10px;
  background: transparent; color: #5b4e6c; font-size: 14px;
  font-weight: 600; transition: background .18s, color .18s;
}
.region-tabs button:hover { background: #ffffffb0; }
.region-tabs button.selected, .region-tabs button[aria-pressed="true"] {
  background: var(--plum); color: #fff; box-shadow: 0 3px 9px #5936a21a;
}
.region-note { font-size: 13px; color: var(--muted); margin: 11px 0 21px; }
.search-bar { min-width: 0; }
.search-input-wrap { flex: 1 1 0; }
.search-input-wrap input[type="search"] { font-size: 14px; }
.search-button { flex-shrink: 0; }
.filter-row { align-items: flex-start; margin: 18px 0 8px; }
.category-filters { flex: 1; min-width: 0; gap: 6px; }
.filter { font-size: 13px; padding: 10px 14px; }
.category-filters .filter { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; }
.category-filters .filter > span:first-child { min-width: 0; }
.category-count { flex: 0 0 auto; min-width: 22px; padding: 1px 5px; border-radius: 6px; font-size: 11px; line-height: 1.5; background: #211d2910; font-variant-numeric: tabular-nums; }
.category-filters .filter.active .category-count { background: #ffffff26; }
.filter-toggle { white-space: nowrap; gap: 7px; color: var(--plum); flex-shrink: 0; }
#filter-badge:not(:empty) {
  min-width: 23px; min-height: 23px; border-radius: 50%;
  background: var(--lilac); color: var(--plum); display: grid;
  place-items: center; font-size: 12px; padding: 2px 5px;
}
.advanced-filters {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; background: #f0ecf6; border: 1px solid #e3dceb;
  border-radius: 16px; padding: 22px; margin-bottom: 20px;
}
.advanced-filters label, .plan-fields label {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  font-size: 14px; font-weight: 600; color: #544961;
}
.provider-refinements { grid-column: 1 / -1; min-width: 0; border-top: 1px solid #d8cfe2; }
.provider-refinements > summary { min-height: 44px; padding: 12px 0 4px; color: var(--plum); font-size: 14px; font-weight: 600; cursor: pointer; }
.provider-refinements[open] > summary { margin-bottom: 14px; }
.refinement-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.advanced-filters select, .plan-fields select, .plan-fields input,
.plain-input, input[type="search"].plain-input {
  display: block; width: 100%; min-width: 0; min-height: 46px;
  padding: 11px 13px; border: 1px solid var(--field-line);
  border-radius: 9px; background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 400; line-height: 1.5;
}
.results-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin: 22px 0 12px; min-width: 0;
}
.results-toolbar > div { min-width: 0; }
#result-count { margin: 0; font-size: 14px; font-weight: 600; }
#result-count .result-summary, #result-count .result-context { display: block; }
#result-count .result-context { margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
#fit-summary {
  display: inline-block; margin-top: 6px; padding: 4px 8px;
  background: var(--lilac); color: var(--plum); border-radius: 5px;
  font-size: 12px;
}
.results-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sort-label {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 12px; white-space: nowrap;
}
.sort-label select {
  min-height: 44px; font-size: 13px; color: var(--ink);
  border: 1px solid var(--field-line); border-radius: 9px;
  padding: 9px 12px; background: #fff; width: auto; max-width: 210px;
}
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.active-filters:empty { display: none; }
.active-filters > button, .active-filters > span {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%;
  padding: 9px 12px; min-height: 44px; background: #eae3f4;
  color: var(--plum-dark); border: 1px solid #dfd5ed;
  border-radius: 30px; font-size: 12px; overflow-wrap: anywhere;
}
.active-filters button:hover { background: #dfd4ef; }

/* Real destination photography: metadata and actions sit above the overlay. */
.opportunity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.opportunity-card { border-radius: 18px; box-shadow: 0 2px 5px #211d2903; }
.opportunity-card:hover { box-shadow: var(--soft-shadow); }
.card-photo {
  position: relative; height: 160px; flex-shrink: 0;
  background: #d4cadf; overflow: hidden; isolation: isolate;
}
.card-programme-visual { display: block; position: absolute; inset: 0; color: inherit; }
.card-programme-visual:focus-visible { outline: 3px solid var(--orange); outline-offset: -4px; }
.card-programme-visual:focus-visible::after { content: ""; position: absolute; inset: 4px; border: 3px solid var(--orange); border-radius: 10px; z-index: 4; pointer-events: none; }
.card-photo > img, .card-programme-visual > img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  object-position: center; transition: transform .35s ease;
}
.card-photo > img[src*="/uk.jpg"], .card-programme-visual > img[src*="/uk.jpg"] { object-position: left center; }
.card-photo > img[src*="/france.jpg"], .card-programme-visual > img[src*="/france.jpg"] { object-position: center 30%; }
.card-photo > img[src*="/global.jpg"], .card-programme-visual > img[src*="/global.jpg"] { object-position: center; }
.card-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, #170f2929 0%, transparent 38%, #160d2966 70%, #130b24d1 100%);
}
.opportunity-card:hover .card-photo > img, .opportunity-card:hover .card-programme-visual > img { transform: scale(1.025); }
.card-photo .card-category {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  max-width: calc(100% - 82px); padding: 5px 9px;
  font-size: 12px; line-height: 1.4; letter-spacing: .15px;
  text-transform: none; color: var(--ink); background: #ffffffee;
  border-radius: 6px; overflow-wrap: anywhere;
}
.card-photo .bookmark {
  top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px;
  background: #fffffff2; border-color: #fff; box-shadow: 0 2px 8px #140e291a;
}
.card-photo .bookmark:hover { background: #fff; color: var(--plum); }
.card-photo .card-location {
  z-index: 2; left: 15px; bottom: 13px; color: #fff;
  max-width: calc(100% - 113px); font-size: 13px; line-height: 1.45;
  font-weight: 600; text-shadow: 0 1px 3px #0005;
}
.card-photo .card-location svg { width: 15px; height: 15px; }
.card-photo.has-provider-identity { height: 194px; }
.provider-logo-panel {
  position: absolute; z-index: 2; top: 58px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  width: calc(100% - 32px); max-width: 210px; height: 76px; padding: 10px 14px;
  border-radius: 10px; background: rgb(255 255 255 / 76%); color: #25202d; box-shadow: 0 3px 14px #17102120;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none; overflow: hidden;
}
.provider-logo-panel img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.provider-logo-panel img[hidden] { display: none; }
.provider-logo-name { display: none; font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.provider-logo-fallback .provider-logo-name { display: block; }
.provider-logo-dark { background: rgb(48 33 63 / 84%); color: #fff; }
.detail-photo .provider-logo-panel, .document-photo .provider-logo-panel { top: 50%; transform: translate(-50%,-50%); max-width: 240px; height: 84px; }
.document-hero { margin-inline: 0; }
.document-photo { position: relative; overflow: hidden; border-radius: 12px; }
.document-content .document-photo > img { display: block; width: 100%; height: clamp(180px,32vw,340px); object-fit: cover; }
.provider-credit-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 20px; }
.provider-logo-credit { min-width: 0; }
.provider-logo-credit h3 { font-size: 16px; }
.provider-credit-image { display: flex; align-items: center; justify-content: center; height: 100px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background-color: #fff; }
.provider-credit-image.provider-logo-dark { background-color: #30213f; }
.provider-credit-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.photo-credit {
  position: absolute; right: 11px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; max-width: 94px; padding: 5px 8px; border-radius: 6px;
  background: #17131fe6; color: #fff; font-size: 10px;
  font-weight: 400; line-height: 1.35; text-decoration: none;
}
.photo-credit:hover { background: #100b18; text-decoration: underline; }
.card-body { padding: 19px 20px 0; }
.provider { margin-bottom: 9px; color: #6a6076; font-size: 12px; line-height: 1.6; }
.card-body h3 {
  font-size: 18px; line-height: 1.45; letter-spacing: -.4px;
  min-height: 0; max-width: none; margin-bottom: 13px; overflow-wrap: anywhere;
}
.card-funding { font-size: 13px; line-height: 1.55; align-items: flex-start; }
.card-funding svg { margin-top: 3px; }
.status-chip { font-size: 12px; padding: 5px 8px; max-width: 100%; }
.status-chip.open { background: #e8f1e2; color: #375b2c; }
.status-chip.upcoming { background: #eee8f8; color: #5936a2; }
.status-chip.closed { background: #f7eae3; color: #824b31; }
.card-footer { margin: 16px 20px 0; gap: 12px; padding: 10px 0 12px; }
.compare-select {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 12px; color: var(--muted); cursor: pointer; background: transparent;
  padding: 0; line-height: 1.4;
}
.compare-select input { accent-color: var(--plum); width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.compare-select:has(input:checked) { color: var(--plum); font-weight: 600; }
.compare-select.selected, .compare-select[aria-pressed="true"] { color: var(--plum); font-weight: 600; }
.compare-select > span { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #c8bdd7; border-radius: 5px; font-size: 15px; line-height: 1; }
.compare-select[aria-pressed="true"] > span { background: var(--plum); border-color: var(--plum); color: #fff; }
.card-link { font-size: 13px; white-space: nowrap; padding-left: 4px; }
.load-more-row {
  display: flex; flex-direction: column; align-items: center;
  gap: 11px; padding: 30px 0 8px;
}
.load-more-row:has(button[hidden]) { padding-top: 18px; }
#shown-count { font-size: 12px; color: var(--muted); }
.catalogue-note, .catalogue-note .text-link { font-size: 12px; }
.notice { padding: 18px; background: var(--lilac); border-radius: 12px; font-size: 14px; }
.notice a { text-decoration: underline; color: var(--plum); }

/* Persistent comparison selection; overlay dialogs remain in the top layer. */
.compare-bar {
  position: fixed; z-index: 40; left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  width: min(560px, calc(100% - 32px)); padding: 12px 14px 12px 22px;
  background: #fff; border: 1px solid #d8cce7; border-radius: 16px;
  box-shadow: 0 12px 50px #21112f2b;
}
.compare-bar > span { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.compare-bar .button { flex-shrink: 0; }
.compare-bar .icon-button { font-size: 24px; border-radius: 50%; }
.compare-bar .icon-button:hover { background: var(--quiet-surface); }
body:has(.compare-bar:not([hidden])) { padding-bottom: 100px; }
body:has(.compare-bar:not([hidden])) .toast { bottom: 108px; }
.wide-dialog { width: 960px; max-width: 90vw; }
.dialog-shell { min-width: 0; }
.dialog-shell .muted, .detail-description, .detail-section ul,
.dialog-shell .source-note { font-size: 14px; }
.dialog-kicker { font-size: 12px; letter-spacing: 1px; }
.dialog-shell h2 { overflow-wrap: anywhere; }
.dialog-close { width: 44px; height: 44px; }
.plain-input { margin: 20px 0 8px; }
.provider-tools { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 18px; }
.providers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.provider-tile {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 21px; border: 1px solid var(--line); border-radius: 14px;
  background: #fcfbfd; text-align: left; gap: 8px;
}
.provider-tile h3, .provider-tile strong {
  font-size: 17px; font-weight: 800; line-height: 1.45; margin: 0;
  color: var(--ink); overflow-wrap: anywhere;
}
.provider-tile p { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.provider-tile > span { font-size: 12px; color: var(--muted); }
.provider-tile .text-link, .provider-tile .button { margin-top: auto; }
.provider-tile .provider-type {
  color: var(--plum); background: var(--lilac); border-radius: 5px; padding: 4px 8px;
}

/* Application planner */
.planner-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 22px 0; }
.planner-tools .danger, .danger { color: #923d32; }
.planner-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.planner-stats > * {
  background: var(--quiet-surface); border-radius: 10px; padding: 10px 14px;
  color: #5b4a70; font-size: 13px; line-height: 1.5;
}
.planner-stats strong { color: var(--plum); font-size: 17px; margin-right: 5px; }
.planner-card { border: 1px solid var(--line); border-radius: 15px; margin: 13px 0; overflow: hidden; background: #fff; }
.planner-card > summary, .planner-card details > summary {
  display: flex; align-items: center; gap: 16px; cursor: pointer;
  min-height: 82px; padding: 20px; list-style: none; background: #faf8fc;
}
.planner-card summary::-webkit-details-marker { display: none; }
.planner-card summary::after { content: "+"; color: var(--plum); font-size: 25px; line-height: 1; margin-left: auto; flex-shrink: 0; }
.planner-card[open] > summary::after, .planner-card details[open] > summary::after { content: "−"; }
.planner-card[open] > summary, .planner-card details[open] > summary { border-bottom: 1px solid var(--line); }
.planner-card summary > div, .planner-card summary > span:first-child { min-width: 0; }
.planner-card summary > span:first-child { flex: 1; }
.planner-card summary h3, .planner-card summary strong { font-size: 16px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.planner-card summary p, .planner-card summary small { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.planner-card summary small { display: block; }
.plan-stage-label { flex-shrink: 0; padding: 5px 9px; background: var(--lilac); color: var(--plum); border-radius: 6px; font-size: 12px; }
.planner-card summary .status-chip { flex-shrink: 0; }
.planner-card > .planner-card-body, .planner-card > .plan-body,
.planner-card > .planner-body { padding: 20px; }
.planner-card > .plan-fields, .planner-card > .plan-checklist,
.planner-card > .plan-actions, .planner-card > label,
.planner-card > p, .planner-card > .detail-actions { margin-left: 20px; margin-right: 20px; }
.plan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; margin-bottom: 20px; }
.planner-body > .plan-fields:first-child { margin-top: 0; }
.plan-notes, textarea.plan-notes, .plan-notes textarea {
  display: block; width: 100%; min-width: 0; border: 1px solid var(--field-line);
  border-radius: 10px; padding: 12px 14px; min-height: 105px;
  resize: vertical; font-size: 14px; color: var(--ink); background: #fff; line-height: 1.7;
}
label.plan-notes { padding: 0; border: 0; min-height: auto; font-size: 13px; font-weight: 600; }
.plan-notes textarea { margin-top: 8px; font-weight: 400; }
.planner-card > textarea.plan-notes { width: calc(100% - 40px); margin: 12px 20px; }
.planner-card > label { display: block; font-size: 13px; font-weight: 600; }
.planner-card > label textarea { margin-top: 8px; }
.plan-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding: 16px 0; }
.plan-checklist > legend, .plan-checklist > h4, .plan-checklist > p { grid-column: 1 / -1; font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.plan-checklist label { display: flex; align-items: flex-start; gap: 9px; min-height: 32px; font-size: 13px; line-height: 1.6; cursor: pointer; }
.plan-checklist input { accent-color: var(--plum); width: 17px; height: 17px; margin: 3px 0 0; flex-shrink: 0; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding-bottom: 18px; }
.planner-card-actions, .detail-utilities { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 19px; margin-top: 16px; }
.planner-card .detail-actions { margin-top: 8px; margin-bottom: 20px; }
.plan-deadline-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Comparisons and opportunity facts */
.compare-table-wrap, .comparison-scroll, .table-scroll {
  width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  margin-top: 22px; border: 1px solid var(--line); border-radius: 13px;
}
.compare-table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.7; text-align: left; }
.compare-table th, .compare-table td { min-width: 220px; max-width: 300px; vertical-align: top; padding: 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.compare-table th { color: var(--plum-dark); background: #f3edf9; font-weight: 800; }
.compare-table th:first-child, .compare-table td:first-child { min-width: 145px; max-width: 170px; font-weight: 600; background: #faf8fc; }
.compare-table tr:last-child > * { border-bottom: 0; }
.compare-table tr > :last-child { border-right: 0; }
.compare-table h3 { font-size: 16px; line-height: 1.5; margin: 0 0 8px; }
.compare-table th small { display: block; margin-top: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.compare-table p { margin: 0 0 9px; }
.compare-table a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.compare-table ul { padding-left: 18px; margin: 0; }
.compare-table .status-chip { white-space: normal; }
#compare-content { min-width: 0; }
#compare-content > .compare-table { display: block; overflow-x: auto; margin-top: 22px; }
.detail-photo {
  display: block; position: relative; width: 100%; height: 205px;
  object-fit: cover; overflow: hidden; border-radius: 13px; margin: 19px 0 22px;
  background: var(--quiet-surface);
}
.detail-photo > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-photo > img[src*="/uk.jpg"], img.detail-photo[src*="/uk.jpg"] { object-position: left center; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.detail-tags > span { padding: 5px 9px; background: var(--lilac); color: var(--plum); border-radius: 6px; font-size: 12px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 20px 0; }
.detail-facts > div { min-width: 0; border-radius: 10px; background: #f5f2f8; padding: 13px 15px; font-size: 14px; overflow-wrap: anywhere; }
.detail-facts dt, .detail-facts small, .detail-facts span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.detail-facts dd { margin: 0; }
.detail-section h3 { font-size: 15px; }
.detail-primary-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; margin: 22px 0; }
.detail-primary-actions .button-programme { min-height: 56px; font-size: 16px; padding: 17px 22px; }
@media(max-width:620px) { .detail-primary-actions { grid-template-columns: 1fr; } }
.source-note { overflow-wrap: anywhere; }
.source-note a, .info-body a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }

/* Readable static information, directory and credit pages. */
.document-page { width: min(880px, calc(100% - 48px)); max-width: 100%; margin: 60px auto 75px; }
.document-page h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.2; letter-spacing: -1.5px; margin: 18px 0 22px; overflow-wrap: anywhere; }
.document-page > p, .document-content { font-size: 15px; line-height: 1.85; color: #514959; }
.document-content h2 { color: var(--ink); font-size: 25px; line-height: 1.4; margin: 36px 0 14px; letter-spacing: -.65px; }
.document-content h3 { color: var(--ink); font-size: 19px; margin: 26px 0 10px; line-height: 1.5; }
.document-content p { margin: 12px 0; }
.document-content ul, .document-content ol { padding-left: 24px; margin: 14px 0 22px; }
.document-content li + li { margin-top: 8px; }
.document-content a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.document-content strong { color: var(--ink); }
.document-content hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.document-content table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13px; }
.document-content th, .document-content td { vertical-align: top; text-align: left; padding: 13px 16px; border: 1px solid var(--line); min-width: 140px; overflow-wrap: anywhere; }
.document-content th { background: var(--lilac); color: var(--plum-dark); }
.document-content img { max-width: 100%; height: auto; border-radius: 12px; }
.document-content details { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 17px 20px; margin: 12px 0; }
.document-content summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 16px; }
.document-content blockquote { border-left: 3px solid var(--orange); margin: 22px 0; padding: 3px 0 3px 20px; }
.document-content .source-note { font-size: 13px; }

/* Override the original footer's generic direct-child div flex rule. */
.site-footer {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start; gap: 24px 44px; padding: 32px 0 36px; margin-top: 48px;
}
.site-footer > .footer-brand {
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start; gap: 6px; margin: 0; width: auto;
}
.site-footer .footer-brand p { margin: 3px 0 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 20px; min-width: 0; }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #61566d; }
.footer-links a:hover, .footer-contact a:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
.site-footer > .footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 20px; margin: 0; width: auto; grid-column: 1 / -1; }
.footer-contact p { margin: 0; }
.site-footer .footer-note { grid-column: 1 / -1; font-size: 12px; line-height: 1.8; margin: 0; max-width: 820px; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.site-footer .footer-powered, .site-footer .powered-by { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.site-footer .footer-powered a, .site-footer .powered-by a { color: var(--plum); font-weight: 600; }

@media (max-width: 1100px) {
  .hero { min-height: 460px; gap: 24px; }
  .hero-art { height: 350px; }
  .hero-emblem { width: 320px; height: 320px; }
  .art-orbit { max-width: 100%; }
  .art-caption { font-size: 12px; letter-spacing: .6px; }
  .floating-note { padding: 9px 11px; gap: 7px; }
  .filter-row { flex-wrap: wrap; }
  .filter-toggle { margin-left: auto; }
  .opportunity-grid { gap: 18px; }
  .card-body { padding-inline: 17px; }
  .card-footer { margin-inline: 17px; }
}

@media (max-width: 850px) {
  .header-inner { gap: 18px; }
  .main-nav { gap: 16px; }
  .main-nav > a, .main-nav > .nav-link { font-size: 13px; }
  .hero { grid-template-columns: 1.08fr 1fr; gap: 12px; padding-top: 28px; }
  .hero h1 { font-size: 43px; letter-spacing: -2px; }
  .hero-art { height: 330px; }
  .hero-emblem { width: 280px; height: 280px; }
  .hero .eyebrow { font-size: 12px; letter-spacing: .5px; }
  .hero-notes { flex-wrap: wrap; gap: 6px 14px; }
  .hero-actions { flex-wrap: wrap; gap: 6px 16px; }
  .hero-actions .button, .hero-actions .text-link { font-size: 13px; }
  .floating-note strong, .floating-note div > span { font-size: 12px; }
  .floating-note { max-width: 215px; }
  .note-top { left: 0; top: 0; }
  .note-bottom { right: 0; bottom: 18px; }
  .category-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opportunity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-toolbar { align-items: flex-start; }
  .results-actions { gap: 6px 12px; justify-content: flex-end; }
  .card-photo { height: 170px; }
  .site-footer { gap: 20px 26px; }
  .footer-links { gap: 0 14px; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 74px; gap: 6px; }
  .header-actions { gap: 2px; }
  .brand { font-size: 23px; }
  .main-nav { display: none; top: 73px; gap: 0; }
  .main-nav.is-open { display: flex; }
  .main-nav > a, .main-nav > .nav-link { font-size: 14px; }
  .menu-toggle { display: grid; flex-shrink: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 0; padding-top: 30px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(39px, 11vw, 51px); line-height: 1.13; letter-spacing: -2px; margin: 19px 0; }
  .hero .eyebrow { font-size: 12px; line-height: 1.6; letter-spacing: .35px; }
  .hero-description { font-size: 14px; margin-bottom: 21px; }
  .hero-actions { flex-wrap: wrap; gap: 5px 17px; }
  .hero-actions .button { font-size: 13px; padding: 14px 17px; }
  .hero-actions .text-link { font-size: 13px; }
  .hero-notes { font-size: 12px; gap: 4px 15px; margin-top: 15px; }
  .hero-art { height: 250px; max-width: 360px; margin-top: 23px; }
  .hero-emblem { width: 240px; height: 240px; }
  .art-orbit { width: 285px; height: 190px; }
  .orbit-two { width: 225px; height: 235px; }
  .art-caption { font-size: 12px; letter-spacing: .65px; bottom: -4px; }
  .floating-note { padding: 8px 10px; gap: 7px; border-radius: 11px; max-width: 200px; }
  .floating-note strong, .floating-note div > span { font-size: 12px; }
  .note-top { top: 5px; left: 0; }
  .note-bottom { bottom: 20px; right: 0; }
  .note-icon { width: 27px; height: 27px; }
  .star-one { font-size: 36px; top: 6px; right: 8px; }
  .star-two { bottom: 35px; left: 12px; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h2 { font-size: 27px; line-height: 1.3; }
  .section-heading .small { font-size: 12px; letter-spacing: .7px; }
  .verification-link { display: inline-block; margin-top: 8px; font-size: 12px; }
  .region-tabs { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; }
  .region-tabs button { padding: 10px 5px; min-height: 47px; font-size: 13px; }
  .region-note { font-size: 13px; margin-bottom: 18px; }
  .search-bar { flex-wrap: nowrap; gap: 5px; padding: 6px; }
  .search-input-wrap { flex: 1 1 0; border-bottom: 0; padding-left: 7px; gap: 7px; }
  .search-input-wrap svg { width: 18px; }
  .search-input-wrap input[type="search"] { font-size: 16px; padding: 12px 0; }
  .search-button { min-height: 46px; font-size: 13px; padding: 12px; }
  .filter-row { gap: 8px; margin: 15px 0; }
  .category-filters { gap: 6px; flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter { font-size: 12px; padding: 9px 11px; min-height: 44px; }
  .filter-toggle { margin-left: 0; }
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; border-radius: 13px; }
  .refinement-fields { gap: 14px; }
  .refinement-fields label:nth-child(-n+2) { grid-column: 1 / -1; }
  .advanced-filters select, .plan-fields select, .plan-fields input, .plain-input, input[type="search"].plain-input, textarea.plan-notes, .plan-notes textarea { font-size: 16px; }
  .results-toolbar { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 20px; }
  .results-actions { justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
  .sort-label { margin-left: auto; font-size: 12px; }
  .sort-label select { max-width: 200px; font-size: 13px; }
  .active-filters { margin-bottom: 15px; }
  .active-filters > button { min-height: 44px; }
  .opportunity-grid { grid-template-columns: minmax(0, 1fr); gap: 19px; }
  .card-photo { height: 175px; }
  .card-body { padding: 19px 19px 0; }
  .card-body h3 { font-size: 19px; max-width: none; }
  .provider, .card-category, .card-location, .status-chip { font-size: 12px; }
  .card-funding, .card-link { font-size: 13px; }
  .card-footer { margin-inline: 19px; }
  .compare-select { font-size: 13px; }
  .photo-credit { min-height: 44px; font-size: 10px; }
  .catalogue-note { font-size: 12px; }
  .catalogue-note .text-link { font-size: 12px; margin-left: 25px; }
  .empty-state { padding: 35px 18px; }
  .empty-state .text-link { display: flex; margin: 10px auto 0; }
  .compare-bar { width: calc(100% - 24px); gap: 8px; padding: 10px 9px 10px 14px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .compare-bar > span { font-size: 13px; }
  .compare-bar .button { font-size: 13px; padding-inline: 13px; }
  .compare-bar .icon-button { min-width: 40px; }
  .wide-dialog, .detail-dialog, .fit-dialog, .info-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); border-radius: 17px; }
  .dialog-shell { padding: 30px 18px 24px; }
  .dialog-shell h2 { font-size: 27px; letter-spacing: -.75px; padding-right: 20px; }
  .dialog-kicker { font-size: 12px; letter-spacing: .55px; margin-top: 13px; }
  .dialog-shell .muted, .dialog-shell .source-note { font-size: 13px; }
  .dialog-shell .source-note { line-height: 1.8; }
  .providers-grid { grid-template-columns: minmax(0, 1fr); }
  .provider-tile { padding: 19px; }
  .provider-tools { gap: 2px 14px; }
  .planner-tools { gap: 8px 12px; }
  .planner-tools .button { flex: 1; min-width: 110px; font-size: 13px; padding-inline: 10px; }
  .planner-stats { gap: 7px; }
  .planner-stats > * { font-size: 12px; padding: 8px 10px; }
  .planner-card > summary, .planner-card details > summary { flex-wrap: wrap; padding: 17px 15px; gap: 8px 10px; }
  .planner-card summary > div { flex-basis: calc(100% - 32px); }
  .planner-card summary > span:first-child { flex-basis: 100%; }
  .planner-card summary::after { position: static; }
  .planner-card summary h3, .planner-card summary strong { font-size: 16px; }
  .planner-card > .planner-card-body, .planner-card > .plan-body, .planner-card > .planner-body { padding: 16px; }
  .planner-card > .plan-fields, .planner-card > .plan-checklist, .planner-card > .plan-actions, .planner-card > label, .planner-card > p, .planner-card > .detail-actions { margin-left: 15px; margin-right: 15px; }
  .planner-card > textarea.plan-notes { margin-inline: 15px; width: calc(100% - 30px); }
  .plan-fields, .plan-checklist { grid-template-columns: minmax(0, 1fr); }
  .plan-checklist label { min-height: 37px; }
  .compare-table th, .compare-table td { padding: 14px; min-width: 220px; }
  .compare-table th:first-child, .compare-table td:first-child { min-width: 125px; }
  .detail-photo { height: 170px; }
  .detail-facts { grid-template-columns: minmax(0, 1fr); }
  .detail-actions .button { min-width: 0; }
  .choice-grid label { font-size: 13px; }
  .field-label, legend, .form-note { font-size: 13px; }
  .fit-dialog select { font-size: 16px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 32px; padding-top: 27px; }
  .site-footer > .footer-brand { width: auto; margin: 0; gap: 4px; }
  .site-footer .footer-brand p { font-size: 13px; }
  .footer-links { justify-content: flex-start; gap: 0 21px; }
  .site-footer > .footer-contact { justify-content: flex-start; gap: 0 17px; margin: 0; }
  .site-footer .footer-note, .site-footer .footer-powered, .site-footer .powered-by { font-size: 12px; }
  .document-page { width: calc(100% - 36px); margin-top: 35px; margin-bottom: 50px; }
  .document-page h1 { font-size: 34px; letter-spacing: -1px; }
  .document-content { font-size: 15px; }
  .document-content h2 { font-size: 24px; margin-top: 30px; }
  .document-content details { padding: 15px; }
}

@media (max-width: 360px) {
  .brand { font-size: 21px; gap: 5px; }
  .brand img { width: 28px; height: 33px; }
  .saved-nav { padding-inline: 3px; }
  .hero .eyebrow { font-size: 12px; }
  .hero h1 { font-size: 39px; letter-spacing: -1.9px; }
  .hero-actions { gap: 4px 12px; }
  .hero-actions .button { font-size: 12px; padding-inline: 13px; }
  .hero-actions .text-link { font-size: 12px; }
  .hero-notes { gap: 4px 10px; font-size: 12px; }
  .hero-art { height: 235px; }
  .hero-emblem { width: 225px; height: 225px; }
  .art-orbit { width: 245px; height: 175px; }
  .orbit-two { width: 205px; height: 220px; }
  .floating-note { max-width: 184px; }
  .note-top { top: 1px; }
  .note-bottom { bottom: 17px; }
  .art-caption { letter-spacing: .1px; }
  .region-tabs button { font-size: 12px; padding-inline: 3px; }
  .card-photo .card-location { font-size: 12px; }
  .card-body { padding-inline: 16px; }
  .card-footer { margin-inline: 16px; }
  .compare-select { font-size: 12px; }
  .card-link { font-size: 13px; }
  .sort-label select { max-width: 192px; }
  .planner-tools .button { min-width: 100px; font-size: 12px; }
  .compare-bar { gap: 5px; padding-left: 11px; }
  .compare-bar > span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .opportunity-card:hover .card-photo > img, .opportunity-card:hover .card-programme-visual > img { transform: none; }
  .card-photo > img, .card-programme-visual > img, .region-tabs button { transition: none; }
}

/* Searchable study routes use the same quiet navigation as the directory. */
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.study-routes { margin-top: 12px; margin-bottom: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.study-routes h2 { font-size: 24px; margin-bottom: 16px; }
.study-route-links { display: flex; flex-wrap: wrap; gap: 10px; }
.study-route-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; background: #fff; }
.study-route-links a:hover { border-color: var(--plum); color: var(--plum); }
@media (max-width:620px) { .study-routes h2 { font-size: 22px; } .study-route-links { gap: 8px; } .study-route-links a { font-size: 13px; padding: 9px 12px; } }

.hero-picture { display: contents; }

/* Give document navigation separate, comfortable targets at narrow widths. */
.document-nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; margin-left:auto; font-size:14px; }
.document-nav a { display:inline-flex; align-items:center; min-height:44px; color:var(--ink); text-decoration:none; }
.document-nav a:hover { color:var(--plum); text-decoration:underline; text-underline-offset:4px; }
@media(max-width:620px) {
 .header-inner:has(>.document-nav) { height:auto; min-height:74px; flex-wrap:wrap; gap:0; padding-block:12px 4px; }
 .document-nav { flex-basis:100%; justify-content:space-between; margin-left:0; gap:4px 16px; font-size:13px; }
}

/* Two short callouts balance the portal without covering the artwork. */
.hero-callout { position:absolute; z-index:3; display:block; max-width:45%; padding:11px 14px; border:1px solid #e6ddee; border-radius:12px; background:#fffdf8; color:#5936a2; font-size:14px; font-weight:700; line-height:1.2; white-space:nowrap; box-shadow:0 7px 22px #3723410b; }
.hero-callout-local { top:12%; left:0; transform:rotate(-5deg); }
.hero-callout-global { right:0; bottom:12%; transform:rotate(5deg); color:#854009; background:#ffead8; border-color:#f7d9bf; }
@media(max-width:950px) { .hero-callout { font-size:12px; padding:10px 12px; } }
@media(max-width:620px) { .hero-callout { font-size:12px; padding:9px 11px; border-radius:10px; } .hero-callout-local { top:7%; } .hero-callout-global { bottom:8%; } }

/* Footer: practical links first, reference and policies second. */
.footer-links { display:flex; flex-direction:column; align-items:flex-end; gap:0; }
.footer-link-group { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:0 22px; }
@media(max-width:620px) { .footer-links { align-items:flex-start; } .footer-link-group { justify-content:flex-start; gap:0 20px; } }

.site-footer > .footer-links:first-child { grid-column:1 / -1; align-items:flex-start; }

/* Consistent reading sizes and control boundaries across the public app. */
.region-note, .provider, .card-funding, .status-chip,
.sort-label, #shown-count, .catalogue-note, .catalogue-note .text-link,
.how-intro p, .step p, .institution-banner p,
.dialog-shell .muted, .dialog-shell .source-note,
.field-label, legend, .form-note,
.plan-deadline-note, .planner-stats > *, .planner-card summary small,
.detail-facts dt, .detail-facts small, .detail-facts span,
.site-footer .footer-note, .footer-links a { font-size: 14px; }
.step h3 { font-size: 16px; }
.institution-banner .button { font-size: 14px; min-height: 48px; }
.plan-checklist label { min-height: 44px; font-size: 14px; align-items: center; }
.plan-checklist input { margin-top: 0; }
.fit-dialog select { border: 1px solid var(--field-line); }
input[type="search"].plain-input:focus-visible { outline: 3px solid var(--plum) !important; outline-offset: 4px; }

/* Preserve the small visible credit while giving its link a full touch target. */
.photo-credit { bottom: 4px; background: transparent; isolation: isolate; }
.photo-credit::before { content: ""; position: absolute; inset: 6px 0; z-index: -1; border-radius: 6px; background: #17131fe6; }
.photo-credit:hover { background: transparent; }
.photo-credit:hover::before { background: #100b18; }

@media (max-width: 379px) {
  .advanced-filters, .refinement-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Touch input should show only the chosen category, not a lingering hover. */
@media (hover: none), (pointer: coarse) {
  .filter:not(.active):hover { background: transparent; }
}

/* The original full-canvas artwork stays intact; its transparent area provides
   space around the portal while the students sit in the lower-left foreground. */
.hero-students {
  position: absolute; z-index: 1; left: -160px; bottom: -10px;
  width: 330px; height: 330px; pointer-events: none;
}
.hero-students img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1100px) {
  .hero-students { width: 240px; height: 240px; left: -115px; bottom: -8px; }
}
@media (max-width: 850px) {
  .hero-students { width: 190px; height: 190px; left: -90px; }
}
@media (max-width: 620px) {
  .hero-students { width: min(230px, calc(100% - 120px)); height: auto; aspect-ratio: 1; left: -4px; bottom: -8px; z-index: 3; }
  .hero-art:has(.hero-students) .hero-callout,
  .hero-art:has(.hero-students) .art-star { z-index: 4; }
  .hero-art:has(.hero-students) .star-two { top: 82px; bottom: auto; left: 8px; }
}
