/* Sanabil Institute - public website
   Brand colours come from Site settings and are set on :root in the layout. */
:root {
  --blue: #1b4f9c;
  --green: #1e8c4e;
  --red: #c8282e;
  --navy: #0f2f63;
  --ink: #17202e;
  --muted: #4f5b6b;
  --line: #d5dce6;
  --mist: #eef2f7;
  --paper: #ffffff;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, sans-serif;
  --urdu: "Noto Nastaliq Urdu", serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--paper); padding: 10px 16px; z-index: 50; }
.skip:focus { left: 16px; top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale (1.25 ratio) */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

/* Buttons */
.btn { display: inline-block; padding: .7em 1.3em; border-radius: 4px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; border: 2px solid var(--blue); line-height: 1.2; }
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn.ghost:hover { background: #fff; color: var(--navy); }
.btn.line { background: transparent; color: var(--blue); }
.btn.line:hover { background: var(--blue); color: #fff; }

/* Utility bar */
.utility { background: var(--navy); color: #c9d4e6; font-size: .82rem; }
.utility .wrap { display: flex; gap: 22px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.utility a { color: #e7edf6; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: #fff; }
.utility .push { margin-left: auto; display: flex; gap: 18px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.identity { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.identity img, .identity svg { width: 56px; height: 56px; object-fit: contain; }
.identity .name { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.1; display: block; }
.identity .ur { font-family: var(--urdu); font-size: .95rem; color: var(--green); line-height: 2; display: block; }

.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav li { position: relative; }
.nav a, .nav button.sub-toggle { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--green); }
.nav .has-sub > a { padding-right: 4px; }
.nav .has-sub { display: flex; align-items: center; }
.nav button.sub-toggle { padding: 10px 8px 10px 2px; }
.nav button.sub-toggle::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--blue); list-style: none; margin: 0; padding: 6px 0; box-shadow: 0 12px 28px rgba(15,47,99,.12); }
.nav .sub a { padding: 9px 16px; font-weight: 400; }
.nav .sub a:hover { box-shadow: none; background: var(--mist); }
.nav li:hover > .sub, .nav li.is-open > .sub, .nav li:focus-within > .sub { display: block; }
.nav-apply { margin-left: 10px; }
.menu-button { display: none; }

/* Hero */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
/* All slides share one grid cell, so the hero grows to fit the tallest slide
   instead of cutting long titles off under the sticky header. */
.hero-slides { position: relative; display: grid; }
.slide { position: relative; grid-area: 1 / 1; min-height: clamp(460px, 72vh, 640px); opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; display: flex; align-items: flex-end; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .9s ease; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,28,60,.86) 0%, rgba(10,28,60,.55) 48%, rgba(10,28,60,.15) 100%); }
.slide .wrap { width: 100%; padding-top: clamp(40px, 6vw, 72px); padding-bottom: 120px; }
.slide h1 { color: #fff; max-width: 15ch; }
.slide p { font-size: 1.15rem; max-width: 46ch; color: #e1e8f3; }
.slide .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* The ring: the logo's three-colour circle, drawn large and cropped by the hero edge */
.ring { position: absolute; z-index: 2; pointer-events: none; right: -9vw; top: 50%; width: min(720px, 62vw); aspect-ratio: 1; transform: translateY(-46%); }
.ring circle { fill: none; stroke-width: 26; }
.hero.plain .slide { opacity: 1; }
.hero.plain .slide::before { background: radial-gradient(circle at 20% 80%, rgba(30,140,78,.25), transparent 60%); }

.slide-dots { position: absolute; z-index: 3; right: var(--gutter); bottom: 130px; display: flex; gap: 8px; }
.slide-dots button { width: 34px; height: 4px; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.slide-dots button[aria-current="true"] { background: #fff; }

.deadline { position: relative; z-index: 3; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #fff; color: var(--ink); border-left: 6px solid var(--red); padding: 14px 20px; max-width: 640px; margin-top: 28px; }
.deadline strong { font-family: var(--serif); font-size: 1.2rem; display: block; }
.deadline .date { color: var(--red); font-weight: 700; }
.deadline .btn { margin-left: auto; background: var(--red); border-color: var(--red); }
.deadline .btn:hover { background: #9e1c21; border-color: #9e1c21; }

/* Program finder (overlaps the hero) */
.finder { position: relative; z-index: 5; margin-top: -72px; }
.finder form { background: var(--paper); border: 1px solid var(--line); padding: 26px 28px; display: grid; grid-template-columns: 1fr auto; gap: 14px 18px; align-items: end; box-shadow: 0 18px 40px rgba(15,47,99,.12); }
.finder h2 { grid-column: 1 / -1; font-size: 1.6rem; margin: 0; }
.finder .levels { grid-column: 1 / -1; display: flex; gap: 18px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.finder label.level { display: flex; gap: 6px; align-items: center; font-size: .95rem; }
.finder input[type=search] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #aeb9c8; border-radius: 4px; }
.finder button { padding: 12px 26px; }

/* Shortcuts */
.shortcuts { padding: 34px 0 10px; }
.shortcuts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.shortcuts li { border-bottom: 1px solid var(--line); }
.shortcuts a { display: block; padding: 18px 4px; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.shortcuts a:hover { color: var(--blue); box-shadow: inset 0 -3px 0 var(--green); }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.tint { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }

.welcome { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.welcome img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.welcome.no-image { grid-template-columns: 1fr; max-width: 760px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.facts b { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; color: var(--blue); line-height: 1.1; }
.facts span { color: var(--muted); font-size: .92rem; }

/* Programme rows */
.level-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.level-tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 600; margin-bottom: -1px; border-bottom: 3px solid transparent; }
.level-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.programs { list-style: none; margin: 0; padding: 0; }
.program { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.program h3 { margin: 0; font-size: 1.25rem; }
.program h3 a { color: var(--ink); text-decoration: none; }
.program h3 a:hover { color: var(--blue); text-decoration: underline; }
.program p { margin: 0; color: var(--muted); grid-column: 1; max-width: 70ch; }
.program .meta { grid-row: 1 / span 2; grid-column: 2; text-align: right; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.program .meta b { display: block; color: var(--ink); font-weight: 600; }

/* News and events */
.news-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 4vw, 56px); }
.lead-story img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 16px; }
.lead-story h3 { font-size: 1.6rem; }
.lead-story h3 a, .story h3 a { color: var(--ink); text-decoration: none; }
.lead-story h3 a:hover, .story h3 a:hover { color: var(--blue); text-decoration: underline; }
.kind { font-size: .85rem; font-weight: 600; color: var(--green); }
.stories { list-style: none; margin: 0; padding: 0; }
.story { padding: 16px 0; border-bottom: 1px solid var(--line); }
.story:first-child { padding-top: 0; }
.story h3 { font-size: 1.1rem; margin: 4px 0 4px; }
.story time, .lead-story time { color: var(--muted); font-size: .88rem; }

.events { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.event .day { text-align: center; border: 1px solid var(--line); background: var(--paper); line-height: 1.1; padding: 8px 0; }
.event .day b { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--blue); }
.event .day span { font-size: .78rem; color: var(--muted); }
.event h3 { font-size: 1.05rem; margin: 0 0 2px; }
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a:hover { color: var(--blue); text-decoration: underline; }
.event p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Gallery */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.strip a { display: block; overflow: hidden; background: var(--mist); }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.album a { text-decoration: none; color: var(--ink); }
.album img, .album .blank { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mist); margin-bottom: 12px; }
.album h3 { margin: 0 0 2px; }
.album p { color: var(--muted); margin: 0; font-size: .92rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photos figcaption { font-size: .88rem; color: var(--muted); padding: 6px 0; }

/* Sub-page header */
.page-banner { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.page-banner .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(36px, 5vw, 60px); position: relative; z-index: 1; }
.page-banner h1 { color: #fff; margin-bottom: .2em; max-width: 22ch; }
.page-banner p { color: #d5deec; max-width: 60ch; margin: 0; font-size: 1.1rem; }
.page-banner .crumbs { font-size: .88rem; margin-bottom: 14px; color: #b9c6db; }
.page-banner .crumbs a { color: #e7edf6; }
.page-banner.with-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.page-banner .ring { width: 420px; right: -120px; top: 50%; opacity: .9; }

/* Long-form content */
.prose { max-width: 72ch; font-size: 1.05rem; }
.prose h2 { font-size: 1.7rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { height: auto; margin: 1.2em 0; }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 4px solid var(--green); font-family: var(--serif); font-size: 1.2rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.aside { border-top: 4px solid var(--blue); background: var(--mist); padding: 22px; }
.aside h2 { font-size: 1.25rem; }
.aside dl { margin: 0; }
.aside dt { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.aside dd { margin: 0; font-weight: 600; }
.reqs { list-style: none; margin: 0; padding: 0; }
.reqs li { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Faculty */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-bar input, .filter-bar select { font: inherit; padding: 10px 12px; border: 1px solid #aeb9c8; border-radius: 4px; min-width: 220px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 24px; }
.person a { text-decoration: none; color: var(--ink); display: block; }
.person img, .person .initials { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--mist); margin-bottom: 12px; }
.person .initials { display: grid; place-items: center; font-family: var(--serif); font-size: 3rem; color: var(--blue); }
.person h3 { margin: 0; font-size: 1.15rem; }
.person p { margin: 0; color: var(--muted); font-size: .92rem; }
.person a:hover h3 { color: var(--blue); text-decoration: underline; }
.profile { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.profile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 64px); }
.contact-grid dl dt { font-weight: 600; margin-top: 16px; }
.contact-grid dl dd { margin: 2px 0 0; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; background: var(--mist); }

.empty-note { padding: 28px; background: var(--mist); color: var(--muted); }
.pagination { display: flex; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pagination .is-current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Footer */
.site-footer { background: var(--navy); color: #c9d4e6; padding: 56px 0 24px; margin-top: 0; }
.site-footer a { color: #e7edf6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .identity { color: #fff; margin-bottom: 14px; }
.site-footer .identity .ur { color: #7fd1a1; }
.site-footer h2 { color: #fff; font-size: 1.1rem; font-family: var(--sans); font-weight: 700; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.socials { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

/* Responsive */
@media (max-width: 1020px) {
  .menu-button { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line); padding: 8px 14px; border-radius: 4px; cursor: pointer; color: var(--ink); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(15,47,99,.12); }
  .nav.is-open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 18px; gap: 0; }
  .nav li { border-bottom: 1px solid var(--mist); }
  .nav .has-sub { flex-wrap: wrap; justify-content: space-between; }
  .nav .sub { position: static; display: none; box-shadow: none; border: 0; width: 100%; padding: 0 0 8px 14px; }
  .nav li:hover > .sub, .nav li:focus-within > .sub { display: none; }
  .nav li.is-open > .sub { display: block; }
  .nav a:hover, .nav a[aria-current="page"] { box-shadow: none; }
  .nav-apply { margin: 12px 0 0; text-align: center; }
  .site-header .wrap { min-height: 72px; }
  .identity img, .identity svg { width: 46px; height: 46px; }
}
@media (max-width: 860px) {
  .welcome, .news-grid, .with-aside, .profile, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .finder form { grid-template-columns: 1fr; padding: 22px; }
  .ring { width: 90vw; right: -40vw; opacity: .7; }
  .program { grid-template-columns: 1fr; }
  .program .meta { grid-row: auto; grid-column: 1; text-align: left; }
  .program .meta b { display: inline; margin-right: 10px; }
  .utility .wrap { gap: 14px; }
  .profile img { max-width: 280px; }
}
@media (max-width: 560px) {
  html { font-size: 16px; }
  .slide .wrap { padding-bottom: 110px; }
  .deadline .btn { margin-left: 0; }
  .utility .contact-bits { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
}

/* Slide headlines are h2 (the page h1 is the institute name) but keep the display size. */
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.1; letter-spacing: -.01em; color: #fff; max-width: 15ch; margin: 0 0 .4em; }
.hero .tagline-ur { font-family: var(--urdu); font-size: 1.3rem; color: #9fe0b8; line-height: 2.2; margin: 0 0 .2em; }
.hero .tagline-ur { text-align: left; }
.nav .nav-apply a.btn { color: #fff; padding: .6em 1.1em; background: var(--blue); }
.nav .nav-apply a.btn:hover { background: var(--navy); box-shadow: none; color: #fff; }
.welcome.no-image { max-width: var(--wrap); }
.welcome.no-image > div { max-width: 760px; }
/* On narrow screens the ring sits behind the text instead of over it. */
@media (max-width: 860px) {
  .hero > .ring { z-index: 0; width: 120vw; right: -70vw; opacity: .45; }
}

/* ---- Homepage: our aims ---- */
.aims-section h2 { margin: 0 0 28px; max-width: 24ch; }
.aims { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px clamp(24px, 4vw, 48px); }
.aims li { border-top: 3px solid var(--blue); padding-top: 16px; }
.aims li:nth-child(3n + 2) { border-top-color: var(--green); }
.aims li:nth-child(3n + 3) { border-top-color: var(--red); }
.aims h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.aims p { margin: 0; color: var(--muted); max-width: 42ch; }

/* ---- Homepage: promotions (adverts) ---- */
.promos-section { padding-top: 0; }
.section.tint + .promos-section { padding-top: clamp(48px, 7vw, 88px); }
.promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.promos.count-1 { grid-template-columns: 1fr; }
.promos.count-2 { grid-template-columns: 1fr 1fr; }
.promo { --tone: var(--navy); background: var(--tone); color: #fff; display: flex; flex-direction: column; overflow: hidden; border-radius: 4px; }
.promo.tone-green { --tone: #156a3a; }
.promo.tone-red { --tone: #a3201f; }
.promo img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; }
.promo-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.promo h2 { margin: 0; color: #fff; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.promo p { margin: 0; color: rgba(255, 255, 255, .9); }
.promo-link { margin-top: auto; padding-top: 8px; align-self: flex-start; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.promo-link:hover, .promo-link:focus-visible { text-decoration-color: rgba(255, 255, 255, .6); }
.promo-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.promos.count-1 .promo.has-image { flex-direction: row; }
.promos.count-1 .promo.has-image img { width: 42%; aspect-ratio: auto; }

@media (max-width: 860px) {
  .aims { grid-template-columns: 1fr 1fr; }
  .promos, .promos.count-2 { grid-template-columns: 1fr; }
  .promos.count-1 .promo.has-image { flex-direction: column; }
  .promos.count-1 .promo.has-image img { width: 100%; aspect-ratio: 16 / 7; }
}
@media (max-width: 560px) {
  .aims { grid-template-columns: 1fr; }
}

/* Keep slide text readable where the logo ring crosses it on mid-size screens */
.slide h1, .slide p { text-shadow: 0 1px 12px rgba(10, 28, 60, .55); }
@media (max-width: 1100px) {
  .hero > .ring { opacity: .45; }
}

/* Program fee on cards */
.program .meta .fee { display: block; font-weight: 600; color: var(--ink); margin-top: 4px; }

/* Student portal sign-in on the homepage */
.portal-band { background: var(--navy); color: #e7edf6; }
.portal-band h2 { color: #fff; }
.portal-band .lede { color: #d5deeb; }
.portal-band .note { color: #b3c1d6; font-size: .9rem; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.portal-card { background: var(--paper); color: var(--ink); border-radius: 8px; padding: 26px; display: grid; gap: 8px; }
.portal-card label { font-weight: 600; font-size: .92rem; }
.portal-card input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; }
.portal-card .btn { justify-self: start; margin-top: 4px; }
@media (max-width: 760px) { .portal-grid { grid-template-columns: 1fr; } }

/* Apply online */
.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.apply-form fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 28px; padding: 20px 0 0; }
.apply-form legend { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; padding: 0 10px 0 0; display: flex; align-items: center; gap: 10px; }
.apply-form legend span { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--sans); font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; }
.apply-form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; margin-bottom: 14px; }
.apply-form .field { display: flex; flex-direction: column; gap: 4px; }
.apply-form .field.wide { grid-column: 1 / -1; }
.apply-form label { font-weight: 600; font-size: .92rem; }
.apply-form .opt { font-weight: 400; color: var(--muted); }
.apply-form .help { font-size: .82rem; color: var(--muted); }
.apply-form input:not([type=checkbox]), .apply-form select, .apply-form textarea { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid #aeb9c8; border-radius: 4px; background: #fff; width: 100%; }
.apply-form input[type=file] { padding: 8px; background: var(--mist); }
.apply-form .has-error input, .apply-form .has-error select { border-color: var(--red); }
.apply-form .error { color: #9b1d22; font-size: .85rem; font-weight: 600; }
.apply-form .edu-block { background: var(--mist); padding: 16px 18px 4px; margin-bottom: 14px; border-radius: 4px; }
.apply-form .edu-block h3 { font-size: 1.05rem; margin-bottom: 10px; }
.apply-form .confirm label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.apply-form .confirm input { margin-top: 5px; width: 18px; height: 18px; }
.apply-form > .btn { margin-top: 14px; }
.form-errors { border-left: 4px solid var(--red); background: #fdf0f0; padding: 12px 16px; margin-bottom: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.apply-aside { position: sticky; top: 110px; }
.apply-done { text-align: center; max-width: 60ch; }
.apply-done .app-no { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; color: var(--blue); letter-spacing: .02em; margin: 0 0 .4em; }
.apply-done .btn { margin: 4px; }
.status-card { border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 22px; }
.status-card.is-enrolled { border-top-color: var(--green); }
.status-card.is-rejected { border-top-color: var(--red); }
.status-card .sub { color: var(--muted); font-size: .85rem; }
.status-line { font-size: 1.1rem; }
@media (max-width: 860px) { .apply-layout { grid-template-columns: 1fr; } .apply-aside { position: static; } }
