/* Shared alignment refinements. Keep names, photographs and factual content intact. */
.brand { align-items: center; }
.brand > span { display: grid; gap: 4px; text-align: left; }
.brand strong, .brand small { display: block; margin: 0; }
.brand img, .social-link img, .utility-inner img { flex-shrink: 0; }
.header .nav { gap: 24px; }
.nav-links { align-items: center; }
.nav-links > a, .nav-links > button { min-height: 44px; }
.nav-plan { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.utility-inner > div { align-items: center; }
.utility-inner > div > a { display: inline-flex; align-items: center; }
.brand img { object-fit: contain; object-position: center; }
.university-logo { object-position: left center; }
.university-logo[data-logo-shape="seal"] { width: 56px !important; height: 56px !important; padding: 4px; border-radius: 50%; object-position: center; }
.university-logo[data-logo-shape="seal"][data-logo-tone="light"] { padding: 0; background: transparent; }
.programme-result .university-logo[data-logo-shape="seal"] { width: 52px !important; height: 52px !important; }
.button > span[aria-hidden="true"], .hero-support-link > span, .campus-scene-copy > a > span { display: inline-flex; align-items: center; justify-content: center; width: 1em; flex-shrink: 0; line-height: 1; }
.social-link img { width: 20px; height: 20px; object-fit: contain; }
.hero-view-controls button { justify-content: center; }
.hero-view-controls button > span { min-width: 1.5em; text-align: center; }
.card-tools .save-control, .card-tools .compare-control { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.card-details { align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 11px; line-height: 1.4; }
.immersive-hero .hero-finder button { gap: 8px; justify-content: center; }

/* One left edge and bottom edge for the opening's interactive scene. */
.immersive-stage { padding: 0; justify-content: flex-start; }
.hero-view-controls { align-self: flex-start; margin-bottom: 24px; }
.hero-scene { max-height: none; }
.campus-scene-copy { bottom: 138px; }
.immersive-hero .hero-student-preview { left: 0; right: auto; width: 100%; }
.immersive-hero .hero-evidence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.immersive-hero .hero-evidence a { display: grid; gap: 5px; }
.immersive-hero .hero-evidence strong { display: flex; align-items: flex-end; min-height: 32px; line-height: 1.2; }
.hero-people-copy > a { align-self: flex-start; }
.hero-people-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-people-copy h2, .hero-people-copy p { width: 100%; }

/* Equal rows retain the existing bottom-aligned university fees and controls. */
@media (min-width: 761px) {
  .card-top h3 { min-height: 2.56em; margin-top: 0; }
}
.student-story-grid > .student-story { display: flex; flex-direction: column; }
.student-story-grid .portrait-player { flex-shrink: 0; }
.student-story-grid .student-story-copy { display: flex; flex-direction: column; flex: 1; align-self: stretch; }
.student-story-grid .student-story-copy > a:last-child { margin-top: auto; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }

/* Actual grid rows align programme names, tuition and actions without guessed offsets. */
@media (min-width: 1051px) {
  .programme-result { grid-template-columns: minmax(0, 1.8fr) minmax(180px, .65fr) minmax(230px, .85fr); gap: 10px 25px; }
  .programme-identity { display: contents; }
  .programme-result .programme-logo { grid-column: 1; grid-row: 1; margin: 0; }
  .programme-university { grid-column: 1; grid-row: 2; }
  .programme-identity h3 { grid-column: 1; grid-row: 3; margin: 0; }
  .programme-facts { grid-column: 1; grid-row: 4; margin: 0; }
  .programme-result .programme-price { grid-column: 2; grid-row: 3 / span 2; align-self: start; padding-top: 0; }
  .programme-actions { grid-column: 3; grid-row: 3 / span 2; align-self: start; justify-self: start; margin: 0; }
  .programme-actions .text-link { flex-basis: 100%; }
  .programme-result > details { grid-column: 1 / -1; grid-row: 5; margin-top: 6px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .programme-result { grid-template-columns: minmax(0, 1.5fr) minmax(180px, .7fr); gap: 10px 25px; }
  .programme-identity { display: contents; }
  .programme-result .programme-logo { grid-column: 1; grid-row: 1; margin: 0; }
  .programme-university { grid-column: 1; grid-row: 2; }
  .programme-identity h3 { grid-column: 1; grid-row: 3; margin: 0; }
  .programme-facts { grid-column: 1; grid-row: 4; margin: 0; }
  .programme-result .programme-price { grid-column: 2; grid-row: 3 / span 2; align-self: start; padding-top: 0; }
  .programme-actions { grid-column: 1 / -1; grid-row: 5; align-self: start; justify-self: start; max-width: none; }
  .programme-result > details { grid-column: 1 / -1; grid-row: 6; margin-top: 6px; }
}

.footer-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; width: 100%; max-width: none; align-items: start; }
.footer-links a { min-height: 44px; display: flex; align-items: center; }
.footer-bottom { align-items: baseline; gap: 20px; }
.social-links { align-items: center; }
.social-link { align-items: center; min-height: 44px; }

@media (max-width: 760px) {
  .header .nav { gap: 16px; }
  .hero-view-controls { margin-bottom: 18px; }
  .hero-view-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 360px); gap: 2px; }
  .hero-view-controls button { min-width: 0; padding-inline: 8px; }
  .utility-inner > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .immersive-hero .hero-evidence { display: none; }
  .hero-campus-scene { min-height: 300px; padding: 0; }
  .campus-scene-copy { bottom: 134px; left: 0; right: 0; }
  .immersive-hero .hero-student-preview { left: 0; right: auto; width: 100%; padding: 12px; }
  .campus-location { top: 0; left: 0; right: auto; }
  .programme-result .programme-price { padding-top: 0; }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-links { gap: 8px 20px; }
  .footer-bottom { align-items: flex-start; }
}
@media (max-width: 360px) {
  .hero-view-controls button > span { display: none; }
  .hero-view-controls button { font-size: 13px; }
  .immersive-hero .hero-actions { gap: 10px; }
}
