:root {
  /* Programme-specific MSc identity colours.
     Pastel and subtle, but distinct from the UG / PG / Executive route colours. */
  --msc-da: #f0e9ff;
  --msc-da-line: #c7adff;
  --msc-de: #e5f7ec;
  --msc-de-line: #9edeb8;
  --msc-ds: #fff1df;
  --msc-ds-line: #f2b36f;
  --msc-cyber: #e8f0ff;
  --msc-cyber-line: #9bbcf0;
}

html {
  scroll-padding-top: calc(var(--topbar) + 18px);
}

.msc-choose-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(108,198,208,.18), transparent 28rem),
    radial-gradient(circle at 92% 2%, rgba(145,0,72,.12), transparent 30rem),
    linear-gradient(180deg, #f7fbfc 0%, #fff 40%, #f4f8f9 100%);
}

.msc-choose-subnav .programme-label strong {
  color: var(--magenta);
}

.msc-hero {
  min-height: calc(100svh - var(--topbar));
  display: grid;
  align-items: center;
  padding: clamp(46px, 6vw, 92px) 0;
  border-top: 1px solid rgba(219,229,232,.75);
}

.msc-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .48fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
}

.msc-hero-copy {
  min-width: 0;
}

.msc-hero h1 {
  max-width: 1040px;
}

.msc-hero .lede {
  max-width: 860px;
}

.msc-hero-card {
  border: 1px solid rgba(219,229,232,.90);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(108,198,208,.22), transparent 22rem),
    rgba(255,255,255,.92);
  box-shadow: 0 22px 54px rgba(6,31,42,.14);
  padding: clamp(16px, 1.55vw, 24px);
}

.msc-mini-routes {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.msc-mini-routes a {
  display: grid;
  gap: 4px;
  text-decoration: none;
  border: 1px solid rgba(219,229,232,.90);
  background: #fff;
  border-radius: 18px;
  padding: 13px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.msc-mini-routes a:hover,
.msc-mini-routes a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(145,0,72,.28);
  box-shadow: 0 12px 26px rgba(6,31,42,.10);
  outline: none;
}

.msc-mini-routes strong {
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.msc-mini-routes span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 730;
  line-height: 1.22;
}

.msc-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.msc-choice-card,
.msc-route-card {
  border: 1px solid rgba(219,229,232,.9);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  border-radius: 26px;
  padding: clamp(16px, 1.5vw, 22px);
  min-width: 0;
}

.msc-choice-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msc-choice-card span,
.msc-route-label {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(219,229,232,.9);
  background: var(--soft-2);
}

.msc-choice-card h3 {
  font-size: clamp(1.25rem, 1.65vw, 1.68rem);
  line-height: 1.06;
}

.msc-choice-card a,
.msc-card-link {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  font-size: .90rem;
}

.msc-choice-card.da,
.msc-route-card.da { background: linear-gradient(180deg, var(--msc-da), rgba(255,255,255,.94)); border-color: var(--msc-da-line); }
.msc-choice-card.de,
.msc-route-card.de { background: linear-gradient(180deg, var(--msc-de), rgba(255,255,255,.94)); border-color: var(--msc-de-line); }
.msc-choice-card.ds,
.msc-route-card.ds { background: linear-gradient(180deg, var(--msc-ds), rgba(255,255,255,.94)); border-color: var(--msc-ds-line); }
.msc-choice-card.cyber,
.msc-route-card.cyber { background: linear-gradient(180deg, var(--msc-cyber), rgba(255,255,255,.94)); border-color: var(--msc-cyber-line); }

.msc-choice-card.da span,
.msc-route-card.da .msc-route-label { background: #fff; color: #6236b3; border-color: var(--msc-da-line); }
.msc-choice-card.de span,
.msc-route-card.de .msc-route-label { background: #fff; color: #16824a; border-color: var(--msc-de-line); }
.msc-choice-card.ds span,
.msc-route-card.ds .msc-route-label { background: #fff; color: #b85b12; border-color: var(--msc-ds-line); }
.msc-choice-card.cyber span,
.msc-route-card.cyber .msc-route-label { background: #fff; color: #235aa6; border-color: var(--msc-cyber-line); }

.msc-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.msc-route-card {
  scroll-margin-top: calc(var(--topbar) + 18px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msc-route-card h3 {
  font-size: clamp(1.55rem, 2.35vw, 2.55rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.msc-route-card p {
  color: var(--muted);
  margin: 0;
  font-size: clamp(.98rem, 1.05vw, 1.12rem);
}

.msc-route-card dl {
  margin: 2px 0 6px;
  display: grid;
  gap: 9px;
}

.msc-route-card dl div {
  border: 1px solid rgba(219,229,232,.75);
  background: rgba(255,255,255,.66);
  border-radius: 16px;
  padding: 12px;
}

.msc-route-card dt {
  font-weight: 950;
  color: var(--ink);
  letter-spacing: -.025em;
}

.msc-route-card dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.26;
}

.msc-matrix-wrap {
  overflow-x: auto;
  border: 1px solid rgba(219,229,232,.90);
  border-radius: 26px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.msc-matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.msc-matrix th,
.msc-matrix td {
  padding: 16px;
  border-bottom: 1px solid rgba(219,229,232,.90);
  border-right: 1px solid rgba(219,229,232,.90);
  vertical-align: top;
  text-align: left;
  line-height: 1.28;
}

.msc-matrix tr:last-child th,
.msc-matrix tr:last-child td {
  border-bottom: 0;
}

.msc-matrix th:last-child,
.msc-matrix td:last-child {
  border-right: 0;
}

.msc-matrix thead th {
  background: rgba(145,0,72,.08);
  color: var(--ink);
  font-weight: 950;
}

.msc-matrix tbody th {
  width: 20%;
  color: var(--magenta);
  font-weight: 950;
}

.msc-matrix td {
  color: var(--muted);
  font-weight: 720;
}

.msc-common-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.msc-common-grid .compact-card {
  display: grid;
  align-content: start;
}

.msc-common-grid .compact-card strong {
  color: var(--magenta);
  font-size: clamp(1.8rem, 2.9vw, 3rem);
  line-height: .9;
  letter-spacing: -.055em;
}

.msc-common-grid .compact-card h3 {
  margin-top: 12px;
}

.msc-common-grid .compact-card p {
  margin-top: 8px;
}

#meet .cta-band {
  background:
    radial-gradient(circle at 100% 0%, rgba(108,198,208,.24), transparent 30rem),
    linear-gradient(135deg, var(--ink), #0d4654);
}

#meet .cta-band h2,
#meet .cta-band p {
  color: #fff;
}

#meet .cta-band p {
  color: rgba(255,255,255,.80);
}

@media (min-width: 1180px) and (min-height: 700px) {
  .msc-choose-page .viewport-section {
    min-height: calc(100svh - var(--topbar));
    display: grid;
    align-items: center;
  }

  .msc-choose-page .viewport-section > .site-shell {
    width: 100%;
  }
}

@media (min-width: 1600px) and (min-height: 760px) {
  .msc-hero,
  .msc-choose-page .section.viewport-section {
    padding-top: clamp(62px, 6.2vh, 104px);
    padding-bottom: clamp(62px, 6.2vh, 104px);
  }
}

@media (max-width: 1180px) {
  .msc-choice-grid,
  .msc-common-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .msc-hero-grid {
    grid-template-columns: 1fr;
  }

  .msc-hero-card {
    max-width: none;
  }

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

@media (max-width: 760px) {
  .msc-hero {
    min-height: auto;
    padding: 30px 0;
  }

  .msc-hero-grid,
  .msc-choice-grid,
  .msc-route-grid,
  .msc-common-grid,
  .msc-mini-routes {
    grid-template-columns: 1fr;
  }

  .msc-hero h1 {
    font-size: clamp(2.25rem, 9.3vw, 3.4rem);
  }

  .msc-choice-card {
    min-height: 0;
  }

  .msc-route-card {
    border-radius: 22px;
  }

  .msc-route-card h3 {
    font-size: clamp(1.45rem, 7vw, 2.15rem);
  }

  .msc-matrix th,
  .msc-matrix td {
    padding: 13px;
  }
}
