.funding-directory-page {
  --match-blue: #155eef;
  --match-blue-soft: #edf4ff;
  --match-green: #087a55;
  --match-green-soft: #eaf7f1;
  --match-red: #b13b3b;
  --match-red-soft: #fff0ef;
  --match-amber: #9a5a00;
  --match-amber-soft: #fff6df;
  --match-ink: #172033;
  --match-muted: #606d80;
  --match-line: #dbe1e8;
  background: #f4f6f8;
}

.funding-directory-page [hidden] {
  display: none !important;
}

.funding-directory-page .nav a.active {
  color: var(--accent);
  border-color: var(--accent);
}

.funding-directory-page .language-switch a.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

.directory-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.matcher-intro {
  padding: 46px 0 38px;
  background: #ffffff;
  border-bottom: 1px solid var(--match-line);
}

.matcher-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.72fr);
  gap: 64px;
  align-items: end;
}

.matcher-intro h1 {
  max-width: 720px;
  margin: 6px 0 10px;
  color: var(--match-ink);
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: 0;
}

.matcher-intro p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--match-muted);
  font-size: 16px;
}

.programme-source-strip {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  align-items: stretch;
  border: 1px solid var(--match-line);
  border-radius: 8px;
  overflow: hidden;
}

.programme-source-strip > span {
  display: grid;
  place-items: center;
  padding: 14px;
  color: #5d6879;
  background: #f1f3f6;
  font-size: 11px;
  font-weight: 850;
  writing-mode: vertical-rl;
}

.programme-source-strip > div {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border-left: 1px solid var(--match-line);
}

.programme-source-strip img {
  width: 92px;
  height: 36px;
  object-fit: contain;
}

.programme-source-strip strong {
  margin-top: 2px;
  color: #354156;
  font-size: 11px;
}

.matcher-workspace {
  padding: 34px 0 46px;
  background: #f4f6f8;
}

.matcher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.eligibility-form,
.programme-reference {
  background: #ffffff;
  border: 1px solid var(--match-line);
  border-radius: 8px;
}

.eligibility-form {
  overflow: hidden;
}

.form-header,
.reference-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--match-line);
}

.form-header h2,
.reference-heading h2,
.results-heading h2,
.next-step-layout h2 {
  margin: 3px 0 0;
  color: var(--match-ink);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.step-label {
  margin: 0;
  color: #6e7888;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.form-progress {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #536174;
  background: #eef1f5;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.form-progress.is-complete {
  color: var(--match-green);
  background: var(--match-green-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  padding: 6px 24px 10px;
}

.field-group {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid #e9edf1;
}

.field-group:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-number {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #46617f;
  background: #edf1f6;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
}

.field-label {
  color: #27344a;
  font-size: 13px;
  font-weight: 820;
}

.field-group select,
.field-group input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  color: #243149;
  background: #ffffff;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  outline: none;
}

.field-group select:focus,
.field-group input:focus {
  border-color: var(--match-blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}

.field-group select:disabled,
.field-group input:disabled {
  color: #8b95a4;
  background: #f3f5f7;
  border-color: #dde2e8;
  cursor: not-allowed;
}

.field-group small {
  grid-column: 2;
  margin-top: 5px;
  color: #7b8492;
  font-size: 11px;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: #f7f9fb;
  border-top: 1px solid var(--match-line);
}

.form-actions p {
  max-width: 520px;
  margin: 0;
  color: #697586;
  font-size: 11px;
  line-height: 1.55;
}

.form-actions p strong {
  color: #425168;
}

.form-actions > div:last-child {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.form-note-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.form-message {
  min-height: 17px;
  color: var(--match-red);
  font-size: 11px;
  font-weight: 750;
}

.reset-button,
.match-button {
  min-height: 44px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 800;
}

.reset-button {
  width: 44px;
  color: #425168;
  background: #ffffff;
  border: 1px solid #cbd4df;
  font-size: 20px;
}

.reset-button:hover {
  color: var(--match-blue);
  border-color: var(--match-blue);
}

.match-button {
  padding: 0 22px;
  color: #ffffff;
  background: var(--match-blue);
  border: 1px solid var(--match-blue);
}

.match-button:hover {
  background: #0d4fce;
}

.follow-up-section {
  scroll-margin-top: 100px;
  background: #fbfcfe;
  border-top: 5px solid #26344c;
}

.follow-up-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--match-line);
}

.follow-up-header h3 {
  margin: 3px 0 0;
  color: var(--match-ink);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.shortlist-summary {
  border-bottom: 1px solid var(--match-line);
}

.shortlist-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 24px;
  color: #ffffff;
  background: #26344c;
}

.shortlist-intro strong {
  font-size: 13px;
}

.shortlist-intro span {
  color: #cbd5e3;
  font-size: 11px;
}

.shortlist-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 520px;
  overflow-y: auto;
  background: #ffffff;
}

.shortlist-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 15px 20px;
  border-right: 1px solid var(--match-line);
  border-bottom: 1px solid var(--match-line);
}

.shortlist-item:nth-child(2n) {
  border-right: 0;
}

.shortlist-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.shortlist-item img {
  width: 86px;
  height: 34px;
  object-fit: contain;
}

.shortlist-item div {
  min-width: 0;
}

.shortlist-item strong,
.shortlist-item span {
  display: block;
}

.shortlist-item strong {
  overflow: hidden;
  color: #26344a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortlist-item span {
  margin-top: 2px;
  color: #778293;
  font-size: 10px;
}

.shortlist-item em {
  color: var(--match-green);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.shortlist-item.needs-review em {
  color: var(--match-amber);
}

.shortlist-item.is-excluded {
  background: #f7f8fa;
}

.shortlist-item.is-excluded img,
.shortlist-item.is-excluded div {
  opacity: 0.55;
}

.shortlist-item.is-excluded em {
  color: var(--match-red);
}

.shortlist-excluded {
  padding: 0 24px;
  color: #667386;
  background: #f7f9fb;
  border-top: 1px solid var(--match-line);
}

.shortlist-excluded summary {
  padding: 13px 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.shortlist-excluded > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  max-height: 220px;
  padding: 0 0 16px;
  overflow-y: auto;
}

.shortlist-excluded span {
  overflow: hidden;
  color: #758093;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-up-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  padding: 6px 24px 10px;
}

.follow-up-grid .field-group {
  border-bottom: 1px solid #e9edf1;
}

.follow-up-grid .field-wide,
.follow-up-grid .field-group:last-child {
  border-bottom: 0;
}

.follow-up-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: #f1f4f8;
  border-top: 1px solid var(--match-line);
}

.follow-up-actions p {
  margin: 0;
  color: #647185;
  font-size: 11px;
  line-height: 1.5;
}

.programme-reference {
  position: sticky;
  top: 104px;
  overflow: hidden;
}

.reference-heading {
  align-items: start;
  flex-direction: column;
  gap: 0;
  padding: 20px;
}

.reference-heading h2 {
  font-size: 20px;
}

.programme-mini-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.programme-mini-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 45px;
  padding: 9px 16px;
  border-bottom: 1px solid #e7ebf0;
}

.programme-mini-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 2px 5px;
  color: #536176;
  background: #edf1f6;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.programme-mini-list strong {
  min-width: 0;
  color: #26334a;
  font-size: 11px;
  line-height: 1.35;
}

.programme-mini-list b {
  color: var(--match-blue);
  font-size: 15px;
}

.reference-note {
  margin: 0;
  padding: 16px 20px 19px;
  color: #697587;
  background: #f7f9fb;
  font-size: 11px;
  line-height: 1.6;
}

.match-results-section {
  scroll-margin-top: 100px;
  padding: 46px 0 64px;
  background: #ffffff;
  border-top: 1px solid var(--match-line);
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.results-heading h2 {
  font-size: 28px;
}

.results-heading > p {
  margin: 0;
  color: #687486;
  font-size: 13px;
  text-align: right;
}

.result-placeholder,
.result-empty {
  padding: 54px 24px;
  color: #6c7788;
  background: #f5f7f9;
  border: 1px dashed #cbd3dd;
  text-align: center;
}

.result-placeholder strong,
.result-empty strong {
  display: block;
  color: #2e3a4e;
  font-size: 17px;
}

.result-placeholder p,
.result-empty p {
  margin: 4px 0 0;
  font-size: 13px;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--match-line);
  border-radius: 6px;
  overflow: hidden;
}

.result-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  color: #526074;
  background: #f7f9fb;
  border: 0;
  border-right: 1px solid var(--match-line);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.result-tab:last-child {
  border-right: 0;
}

.result-tab strong {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  color: #4b596d;
  background: #e7ebf0;
  border-radius: 4px;
  font-size: 12px;
}

.result-tab.is-active {
  color: #ffffff;
  background: #253149;
}

.result-tab.is-active strong {
  color: #253149;
  background: #ffffff;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-list.is-compact-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-card {
  --status-color: var(--match-blue);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--match-line);
  border-top: 4px solid var(--status-color);
  border-radius: 8px;
}

.result-card.result-eligible { --status-color: var(--match-green); }
.result-card.result-ineligible { --status-color: var(--match-red); }
.result-card.result-review { --status-color: var(--match-amber); }

.result-card.is-compact {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 210px;
}

.result-card.is-compact > header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e4e8ed;
}

.result-card.is-compact > header img {
  width: 72px;
  height: 34px;
  object-fit: contain;
}

.result-card.is-compact > header span {
  color: var(--match-red);
  font-size: 9px;
  font-weight: 850;
}

.result-card.is-compact > header h3 {
  margin: 2px 0 0;
  color: var(--match-ink);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

.result-card.is-compact > header p {
  margin: 2px 0 0;
  color: #788394;
  font-size: 9px;
}

.compact-gap {
  padding: 14px 18px;
}

.compact-gap strong {
  color: var(--match-red);
  font-size: 11px;
}

.compact-gap p {
  margin: 3px 0 0;
  color: #657184;
  font-size: 10px;
  line-height: 1.5;
}

.result-card.is-compact > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  background: #f7f9fb;
  border-top: 1px solid #e4e8ed;
}

.result-card.is-compact > footer span {
  overflow: hidden;
  color: #778293;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card.is-compact > footer a {
  flex: 0 0 auto;
  color: var(--match-blue);
  font-size: 10px;
  font-weight: 850;
}

.load-more-results {
  grid-column: 1 / -1;
  min-height: 48px;
  color: #334158;
  background: #f1f4f8;
  border: 1px solid #cfd7e2;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.load-more-results span {
  margin-left: 6px;
  color: #748094;
  font-size: 10px;
  font-weight: 700;
}

.load-more-results:hover {
  color: var(--match-blue);
  border-color: var(--match-blue);
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 24px;
  border-bottom: 1px solid #e4e8ed;
}

.programme-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.programme-identity img {
  width: 112px;
  height: 46px;
  object-fit: contain;
}

.programme-identity p {
  margin: 0 0 3px;
  color: #738093;
  font-size: 11px;
  font-weight: 700;
}

.programme-identity h3 {
  margin: 0;
  color: var(--match-ink);
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.result-status {
  flex: 0 0 auto;
  min-width: 150px;
  padding-left: 18px;
  border-left: 1px solid #dce2e9;
  text-align: right;
}

.result-status span,
.result-status strong {
  display: block;
}

.result-status span {
  color: #788394;
  font-size: 10px;
}

.result-status strong {
  margin-top: 2px;
  color: var(--status-color);
  font-size: 17px;
}

.programme-facts {
  display: grid;
  grid-template-columns: 0.65fr 1.15fr 0.9fr 1.3fr;
  margin: 0;
  background: #f7f9fb;
  border-bottom: 1px solid #e4e8ed;
}

.programme-facts div {
  padding: 15px 20px;
  border-right: 1px solid #e0e5eb;
}

.programme-facts div:last-child {
  border-right: 0;
}

.programme-facts dt {
  color: #788394;
  font-size: 10px;
  font-weight: 800;
}

.programme-facts dd {
  margin: 3px 0 0;
  color: #29364c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.programme-window-note {
  margin: 0;
  padding: 13px 24px;
  color: #5f6d80;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ed;
  font-size: 12px;
}

.result-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.result-detail {
  padding: 20px 24px;
  border-right: 1px solid #e4e8ed;
  border-bottom: 1px solid #e4e8ed;
}

.result-detail:nth-child(2n),
.result-detail:last-child {
  border-right: 0;
}

.result-detail h4 {
  margin: 0 0 12px;
  color: #3a475b;
  font-size: 12px;
}

.result-detail-pass h4 { color: var(--match-green); }
.result-detail-fail h4 { color: var(--match-red); }
.result-detail-unknown h4 { color: var(--match-amber); }

.result-detail ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-detail li {
  position: relative;
  padding-left: 16px;
}

.result-detail li::before {
  position: absolute;
  top: 8px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.result-detail-pass li { color: var(--match-green); }
.result-detail-fail li { color: var(--match-red); }
.result-detail-unknown li { color: var(--match-amber); }

.result-detail li strong {
  display: block;
  color: #2c394e;
  font-size: 12px;
}

.result-detail li p {
  margin: 2px 0 0;
  color: #657184;
  font-size: 11px;
  line-height: 1.55;
}

.result-detail li span {
  display: block;
  margin-top: 4px;
  color: #435167;
  font-size: 11px;
  line-height: 1.55;
}

.result-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 24px;
  background: #fafbfc;
}

.result-card-footer p {
  margin: 0;
  color: #7a8493;
  font-size: 10px;
}

.result-card-footer a {
  flex: 0 0 auto;
  color: var(--match-blue);
  font-size: 12px;
  font-weight: 850;
}

.result-card-footer a:hover {
  text-decoration: underline;
}

.next-step-band {
  padding: 34px 0;
  color: #ffffff;
  background: #223048;
  border-top: 1px solid #172238;
}

.next-step-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
}

.next-step-layout h2 {
  color: #ffffff;
  font-size: 22px;
}

.next-step-layout p:not(.eyebrow) {
  max-width: 720px;
  margin: 6px 0 0;
  color: #c7d1de;
  font-size: 13px;
}

.next-step-layout .eyebrow {
  color: #91b8ff;
}

.next-step-layout .button {
  flex: 0 0 auto;
  color: #172033;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: none;
}

.next-step-layout .button:hover {
  color: #ffffff;
  background: var(--match-blue);
  border-color: var(--match-blue);
}

@media (max-width: 1180px) and (min-width: 981px) {
  .funding-directory-page .site-header {
    gap: 18px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .funding-directory-page .brand {
    min-width: 210px;
  }

  .funding-directory-page .brand-logo {
    width: 200px;
  }

  .funding-directory-page .nav {
    gap: 9px;
    font-size: 13px;
  }

  .funding-directory-page .nav a,
  .funding-directory-page .header-actions .button {
    white-space: nowrap;
  }

  .funding-directory-page .header-actions {
    gap: 8px;
  }

  .funding-directory-page .language-switch a {
    min-width: 32px;
    padding: 0 8px;
  }
}

@media (max-width: 1060px) {
  .matcher-intro-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .programme-source-strip {
    width: min(100%, 680px);
  }

  .matcher-layout {
    grid-template-columns: 1fr;
  }

  .programme-reference {
    position: static;
    display: block;
  }

  .programme-reference .reference-heading {
    border-bottom: 1px solid #e7ebf0;
  }

  .programme-mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-mini-list li:nth-child(odd) {
    border-right: 1px solid #e7ebf0;
  }
}

@media (max-width: 760px) {
  .directory-shell {
    width: min(100% - 32px, 1180px);
  }

  .matcher-intro {
    padding: 34px 0 30px;
  }

  .matcher-intro h1 {
    font-size: 32px;
  }

  .matcher-intro p:not(.eyebrow) {
    font-size: 14px;
  }

  .matcher-workspace {
    padding: 24px 0 34px;
  }

  .form-header,
  .form-actions,
  .follow-up-header,
  .follow-up-actions,
  .results-heading,
  .result-card-header,
  .result-card-footer,
  .next-step-layout {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .follow-up-grid {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .field-wide {
    grid-column: 1;
  }

  .field-group,
  .field-group:nth-last-child(-n + 2) {
    border-bottom: 1px solid #e9edf1;
  }

  .field-group:last-child {
    border-bottom: 0;
  }

  .form-actions {
    padding: 16px 18px 18px;
  }

  .form-actions > div:last-child,
  .follow-up-actions .match-button,
  .match-button {
    width: 100%;
  }

  .match-button {
    flex: 1;
  }

  .shortlist-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 14px 18px;
  }

  .shortlist-list {
    grid-template-columns: 1fr;
  }

  .shortlist-excluded {
    padding-right: 18px;
    padding-left: 18px;
  }

  .shortlist-excluded > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shortlist-item {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--match-line);
  }

  .shortlist-item:last-child {
    border-bottom: 0;
  }

  .shortlist-item:nth-last-child(2) {
    border-bottom: 1px solid var(--match-line);
  }

  .shortlist-item img {
    width: 74px;
  }

  .programme-reference {
    display: block;
  }

  .programme-reference .reference-heading {
    border-right: 0;
    border-bottom: 1px solid #e7ebf0;
  }

  .programme-mini-list {
    grid-template-columns: 1fr;
  }

  .programme-mini-list li:nth-child(odd) {
    border-right: 0;
  }

  .match-results-section {
    padding: 36px 0 48px;
  }

  .results-heading > p {
    text-align: left;
  }

  .result-tabs {
    grid-template-columns: 1fr;
  }

  .result-list.is-compact-list {
    grid-template-columns: 1fr;
  }

  .result-tab {
    justify-content: space-between;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--match-line);
  }

  .result-tab:last-child {
    border-bottom: 0;
  }

  .result-card-header {
    gap: 16px;
    padding: 20px;
  }

  .programme-identity {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 13px;
  }

  .programme-identity img {
    width: 88px;
  }

  .programme-identity h3 {
    font-size: 16px;
  }

  .result-status {
    width: 100%;
    min-width: 0;
    padding: 10px 0 0;
    border-top: 1px solid #dce2e9;
    border-left: 0;
    text-align: left;
  }

  .programme-facts,
  .result-details-grid {
    grid-template-columns: 1fr;
  }

  .programme-facts div {
    border-right: 0;
    border-bottom: 1px solid #e0e5eb;
  }

  .programme-facts div:last-child {
    border-bottom: 0;
  }

  .programme-window-note,
  .result-detail,
  .result-detail:nth-child(2n),
  .result-detail:last-child {
    padding-right: 20px;
    padding-left: 20px;
    border-right: 0;
  }

  .result-card-footer {
    gap: 9px;
    padding: 15px 20px 18px;
  }

  .next-step-layout .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .matcher-intro h1 {
    font-size: 28px;
  }

  .programme-source-strip {
    grid-template-columns: 1fr 1fr;
  }

  .programme-source-strip > span {
    grid-column: 1 / -1;
    padding: 7px 12px;
    writing-mode: horizontal-tb;
  }

  .programme-source-strip > div:first-of-type {
    border-left: 0;
  }

  .programme-source-strip > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--match-line);
    border-left: 0;
  }

  .form-header,
  .follow-up-header,
  .reference-heading {
    padding: 18px;
  }

  .form-header h2,
  .results-heading h2 {
    font-size: 21px;
  }

  .field-group {
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
  }

  .field-number {
    width: 25px;
    height: 25px;
  }

  .programme-identity {
    grid-template-columns: 1fr;
  }

  .programme-identity img {
    width: 104px;
  }
}

/* V2 programme search and single-programme entry */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.programme-finder {
  padding: 34px 0 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--match-line);
}

.finder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  align-items: start;
}

.finder-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.finder-heading h2,
.finder-callout h2 {
  margin: 4px 0 0;
  color: var(--match-ink);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.view-all-programmes {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  color: #34445b;
  background: #ffffff;
  border: 1px solid #cfd7e2;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.view-all-programmes:hover {
  color: var(--match-blue);
  border-color: var(--match-blue);
}

.programme-search-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  margin-top: 18px;
  background: #ffffff;
  border: 2px solid #aeb9c8;
  border-radius: 6px;
}

.programme-search-box:focus-within {
  border-color: var(--match-blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  margin-left: 17px;
  border: 2px solid #607087;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  content: "";
  background: #607087;
  transform: rotate(45deg);
}

.programme-search-box input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  color: var(--match-ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.clear-search {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 0;
  color: #59687c;
  background: #edf1f5;
  border: 0;
  border-radius: 4px;
  font-size: 20px;
  cursor: pointer;
}

.finder-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.finder-filters button {
  min-height: 34px;
  padding: 0 11px;
  color: #4c5a6f;
  background: #f1f4f7;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.finder-filters button:hover,
.finder-filters button.is-active {
  color: var(--match-blue);
  background: var(--match-blue-soft);
  border-color: #bcd0f6;
}

.programme-search-results {
  margin-top: 18px;
}

.finder-result-count {
  margin: 0 0 10px;
  color: #6a7585;
  font-size: 11px;
}

.finder-result-count strong {
  color: var(--match-ink);
}

.finder-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.finder-result-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--match-line);
  border-radius: 6px;
}

.finder-result-card:hover {
  border-color: #acbad0;
  box-shadow: 0 6px 18px rgba(32, 50, 78, 0.07);
}

.finder-result-identity {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
}

.finder-result-identity img {
  width: 42px;
  height: 42px;
  padding: 4px;
  object-fit: contain;
  background: #f6f8fa;
  border: 1px solid #e2e7ed;
  border-radius: 5px;
}

.finder-result-identity span {
  color: #667589;
  font-size: 10px;
  font-weight: 800;
}

.finder-result-identity h3 {
  margin: 2px 0 0;
  color: #1e2c42;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
}

.finder-result-identity p {
  margin: 2px 0 0;
  color: #7a8595;
  font-size: 10px;
}

.finder-result-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #e7ebf0;
}

.finder-result-facts strong {
  color: #25354d;
  font-size: 12px;
}

.finder-result-facts span {
  color: #6f7b8c;
  font-size: 10px;
  text-align: right;
}

.finder-result-summary {
  margin: 9px 0 0;
  color: #657184;
  font-size: 11px;
  line-height: 1.55;
}

.finder-result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.finder-result-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--match-blue);
  border: 1px solid var(--match-blue);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.finder-result-actions a {
  color: #52647a;
  font-size: 11px;
  font-weight: 750;
}

.finder-empty {
  padding: 24px;
  background: #f7f9fb;
  border: 1px dashed #cbd3de;
  border-radius: 6px;
  text-align: center;
}

.finder-empty strong {
  color: #26364e;
}

.finder-empty p {
  margin: 6px 0 0;
  color: #6e7a8c;
  font-size: 12px;
}

.finder-callout {
  padding: 22px;
  color: #ffffff;
  background: #243550;
  border-radius: 6px;
}

.finder-callout .step-label {
  color: #b9c7db;
}

.finder-callout h2 {
  color: #ffffff;
}

.finder-callout p:not(.step-label) {
  margin: 10px 0 18px;
  color: #d8e0eb;
  font-size: 12px;
  line-height: 1.65;
}

.finder-callout .match-button {
  width: 100%;
  background: #ffffff;
  color: #18365d;
  border-color: #ffffff;
}

.screening-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 54px;
  padding: 10px 24px;
  background: #edf4ff;
  border-bottom: 1px solid #cfddf4;
}

.screening-mode div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.screening-mode span {
  color: #65758b;
  font-size: 10px;
  font-weight: 800;
}

.screening-mode strong {
  overflow: hidden;
  color: #164f9f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screening-mode button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  color: #2c4e7c;
  background: #ffffff;
  border: 1px solid #b9ccec;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

/* V2 lead gate and case-matching results */
.result-card-footer > div:first-child {
  min-width: 0;
}

.case-lock-note {
  display: block;
  margin-top: 4px;
  color: #52637a;
  font-size: 10px;
}

.result-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.case-unlock-button {
  min-height: 38px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--match-blue);
  border: 1px solid var(--match-blue);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.case-unlock-button:hover {
  background: #0f4dcb;
}

.case-unlock-dialog {
  width: min(980px, calc(100% - 32px));
  max-width: 980px;
  max-height: min(880px, calc(100vh - 34px));
  margin: auto;
  padding: 0;
  color: var(--match-ink);
  background: #ffffff;
  border: 1px solid #cbd4df;
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(18, 31, 51, 0.28);
}

.case-unlock-dialog::backdrop {
  background: rgba(18, 28, 43, 0.64);
}

.unlock-dialog-shell {
  min-height: 100%;
}

.unlock-dialog-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--match-line);
}

.unlock-dialog-header h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.unlock-dialog-header > div > p:last-child {
  margin: 5px 0 0;
  color: #627086;
  font-size: 12px;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #46556b;
  background: #edf1f5;
  border: 0;
  border-radius: 4px;
  font-size: 24px;
  cursor: pointer;
}

.unlock-value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 24px;
  background: #f5f8fb;
  border-bottom: 1px solid var(--match-line);
}

.unlock-value-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 16px;
  border-right: 1px solid #dfe5ec;
}

.unlock-value-strip div:first-child {
  padding-left: 0;
}

.unlock-value-strip div:last-child {
  padding-right: 0;
  border-right: 0;
}

.unlock-value-strip strong {
  color: var(--match-blue);
  font-size: 11px;
}

.unlock-value-strip span {
  color: #425169;
  font-size: 11px;
  font-weight: 750;
}

.unlock-form-section {
  padding: 22px 24px 24px;
  border-bottom: 1px solid var(--match-line);
}

.unlock-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.unlock-section-heading h3 {
  margin: 0;
  color: #233149;
  font-size: 15px;
  letter-spacing: 0;
}

.unlock-section-heading > span {
  min-height: 29px;
  padding: 6px 9px;
  color: #58677a;
  background: #edf1f5;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.unlock-section-heading > span.is-ready {
  color: var(--match-green);
  background: var(--match-green-soft);
}

.unlock-section-heading p {
  margin: 4px 0 0;
  color: #6c7889;
  font-size: 11px;
}

.unlock-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.unlock-field {
  display: grid;
  min-width: 0;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.unlock-field > span {
  color: #344258;
  font-size: 11px;
  font-weight: 800;
}

.unlock-field small {
  color: #7e8998;
  font-weight: 600;
}

.unlock-field input,
.unlock-field select,
.unlock-field textarea {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 0 11px;
  color: #243249;
  background: #ffffff;
  border: 1px solid #c8d1dd;
  border-radius: 4px;
  outline: 0;
  font-size: 12px;
}

.unlock-field input,
.unlock-field select {
  height: 42px;
}

.unlock-field textarea {
  min-height: 78px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
  line-height: 1.55;
}

.unlock-field input:focus,
.unlock-field select:focus,
.unlock-field textarea:focus {
  border-color: var(--match-blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

.contact-unlock-section {
  background: #f8fafc;
}

.contact-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.privacy-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-top: 15px;
  color: #59687c;
  font-size: 10px;
  line-height: 1.6;
}

.privacy-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}

.privacy-consent a {
  margin: 0 2px;
  color: var(--match-blue);
  text-decoration: underline;
}

.unlock-form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--match-red);
  font-size: 11px;
}

.unlock-submit {
  width: 100%;
  margin-top: 4px;
}

.unlock-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.case-match-results {
  padding: 22px 24px 26px;
}

.case-result-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.case-result-heading h3 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.case-result-heading p:last-child {
  margin: 5px 0 0;
  color: #69768a;
  font-size: 11px;
}

.case-result-heading > span {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--match-green);
  background: var(--match-green-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 850;
}

.case-result-notice {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  margin-top: 17px;
  padding: 13px 15px;
  background: #edf4ff;
  border-left: 3px solid var(--match-blue);
}

.case-result-notice strong {
  color: #184d94;
  font-size: 11px;
}

.case-result-notice p {
  margin: 0;
  color: #4e6079;
  font-size: 10px;
  line-height: 1.55;
}

.similar-case-list {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.similar-case-card {
  padding: 17px;
  background: #ffffff;
  border: 1px solid #d8dfe8;
  border-radius: 6px;
}

.similar-case-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.similar-case-card header span:not(.case-score) {
  color: #718096;
  font-size: 9px;
  font-weight: 750;
}

.similar-case-card h4 {
  margin: 3px 0 0;
  color: #223149;
  font-size: 15px;
  letter-spacing: 0;
}

.similar-case-card h5 {
  margin: 13px 0 0;
  color: #35445a;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
}

.similar-case-card > p {
  margin: 6px 0 0;
  color: #687589;
  font-size: 11px;
  line-height: 1.6;
}

.case-public-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.case-public-summary strong {
  color: #46556b;
}

.case-score {
  display: grid;
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 48px;
  place-items: center;
  padding: 6px 9px;
  color: #ffffff;
  background: var(--match-green);
  border-radius: 5px;
  font-size: 16px;
  font-weight: 900;
}

.case-score small {
  font-size: 8px;
}

.case-score.is-unclear {
  min-width: 82px;
  color: #7a5600;
  background: var(--match-amber-soft);
  font-size: 10px;
}

.case-reason {
  color: var(--match-green) !important;
  font-weight: 750;
}

.case-difference {
  color: var(--match-amber) !important;
}

.dimension-score-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 13px 0 0;
  padding: 1px;
  list-style: none;
  background: #dfe5ec;
}

.dimension-score-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  background: #f7f9fb;
}

.dimension-score-list span {
  overflow: hidden;
  color: #627086;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dimension-score-list strong {
  color: #263750;
  font-size: 9px;
  text-align: right;
}

.similar-case-card > a {
  display: inline-block;
  margin-top: 12px;
  color: var(--match-blue);
  font-size: 10px;
  font-weight: 800;
}

.case-empty {
  padding: 24px;
  background: #f7f9fb;
  border: 1px dashed #cbd4df;
  text-align: center;
}

.case-empty p {
  margin: 5px 0 0;
  color: #69768a;
  font-size: 11px;
}

.case-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.case-result-footer span {
  color: #788494;
  font-size: 9px;
}

.case-result-footer button {
  min-height: 36px;
  padding: 0 12px;
  color: #34475f;
  background: #ffffff;
  border: 1px solid #c7d0dc;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .finder-layout {
    grid-template-columns: 1fr;
  }

  .finder-callout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 22px;
  }

  .finder-callout .step-label,
  .finder-callout h2,
  .finder-callout p {
    grid-column: 1;
  }

  .finder-callout .match-button {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: auto;
  }
}

@media (max-width: 760px) {
  .programme-finder {
    padding: 26px 0;
  }

  .finder-heading {
    align-items: start;
  }

  .finder-heading h2 {
    font-size: 19px;
  }

  .finder-result-list {
    grid-template-columns: 1fr;
  }

  .finder-callout {
    display: block;
  }

  .finder-callout .match-button {
    width: 100%;
  }

  .screening-mode {
    align-items: start;
    padding: 10px 16px;
  }

  .screening-mode div {
    display: grid;
    gap: 2px;
  }

  .screening-mode strong {
    white-space: normal;
  }

  .result-card-footer,
  .result-card-actions {
    align-items: stretch;
  }

  .result-card-actions {
    width: 100%;
  }

  .case-unlock-button,
  .result-card-actions a {
    flex: 1;
    display: grid;
    min-height: 40px;
    place-items: center;
    text-align: center;
  }

  .case-unlock-dialog {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .unlock-dialog-header,
  .unlock-form-section,
  .case-match-results {
    padding-right: 16px;
    padding-left: 16px;
  }

  .unlock-value-strip {
    grid-template-columns: 1fr;
    padding: 8px 16px;
  }

  .unlock-value-strip div,
  .unlock-value-strip div:first-child,
  .unlock-value-strip div:last-child {
    min-height: 38px;
    padding: 6px 0;
    border-right: 0;
    border-bottom: 1px solid #dfe5ec;
  }

  .unlock-value-strip div:last-child {
    border-bottom: 0;
  }

  .unlock-form-grid,
  .contact-row {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .case-result-heading,
  .case-result-footer {
    align-items: start;
    flex-direction: column;
  }

  .case-result-notice {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .dimension-score-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .finder-heading {
    display: grid;
  }

  .view-all-programmes {
    width: 100%;
  }

  .programme-search-box input {
    padding-right: 8px;
    padding-left: 12px;
    font-size: 13px;
  }

  .finder-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .finder-result-actions button,
  .finder-result-actions a {
    display: grid;
    min-height: 38px;
    place-items: center;
    text-align: center;
  }

  .dimension-score-list {
    grid-template-columns: 1fr;
  }

  .funding-directory-page .nav {
    padding-right: 18px;
    scrollbar-width: none;
  }

  .funding-directory-page .nav::-webkit-scrollbar {
    display: none;
  }
}
