/* ==========================================================================
   SCOLA universal admissions page (OpsPilot tenant asset)
   One layout, one component set. Themes change ONLY the tokens below.
   Token values are taken from the shipped OpsPilot theme CSS
   (app/tenant-assets/scola-tenant/themes/<theme>/*.css) and
   helm.py _THEME_PRIMARY_COLORS (tests/test_admission_page.py keeps
   --brand equal to it). Approved design: scola/docs/admissions-landing-page.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 500; src: url("fonts/Poppins-Medium.ttf"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 600; src: url("fonts/Poppins-SemiBold.ttf"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 700; src: url("fonts/Poppins-Bold.ttf"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 400; src: url("fonts/DMSans-Regular.ttf"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 500; src: url("fonts/DMSans-Medium.ttf"); font-display: swap; }

/* ---------- Theme tokens ------------------------------------------------- */
/* --brand         theme primary (helm _THEME_PRIMARY_COLORS)                  */
/* --brand-ink     brand shade with >= 4.5:1 on white (text, links, focus)     */
/* --on-brand      text colour on --brand fills                                */
/* --accent        secondary theme colour                                      */
/* --hero-bg       hero band background; --hero-ink its text colour;           */
/* --hero-accent   highlight colour on --hero-bg (>= 3:1 large / 4.5:1 small)  */
/* --surface/--paper page + card backgrounds; --ink/--ink-2/--muted text       */
:root,
[data-theme="scola-default"] {
  --brand: #FEB146;  --brand-ink: #8A5A00; --on-brand: #21272A;
  --brand-tint: #FFF6E8; --accent: #0168CC; --accent-tint: #EAF4FF;
  --hero-bg: #21272A; --hero-ink: #FFFFFF; --hero-muted: #C9CFD4; --hero-accent: #FEB146;
  --hero-glow: rgba(254, 177, 70, .35);
  --paper: #FFFFFF; --surface: #F6F7F9; --line: #ECEEF1; --field: #FFFFFF;
  --ink: #21272A; --ink-2: #4A555C; --muted: #6B767E;
  --radius: 22px;
}
[data-theme="scola-engage"] {
  --brand: #EF5914;  --brand-ink: #C2410C; --on-brand: #14212B;
  --brand-tint: #FFF1EA; --accent: #FEB146; --accent-tint: #FFF6E5;
  --hero-bg: #072032; --hero-ink: #FFFFFF; --hero-muted: #B7C3CC; --hero-accent: #F98736;
  --hero-glow: rgba(239, 89, 20, .38);
  --paper: #FFFFFF; --surface: #F7F7F7; --line: #ECECEC; --field: #FFFFFF;
  --ink: #14212B; --ink-2: #47545E; --muted: #6E6E6E;
  --radius: 18px;
}
[data-theme="scola-harmony"] {
  --brand: #008060;  --brand-ink: #00573F; --on-brand: #FFFFFF;
  --brand-tint: #EEF3EF; --accent: #C1E965; --accent-tint: #F3FADF;
  --hero-bg: #00573F; --hero-ink: #FFFFFF; --hero-muted: #CFE3DA; --hero-accent: #C1E965;
  --hero-glow: rgba(193, 233, 101, .35);
  --paper: #FBFCF7; --surface: #EEF3EF; --line: #D1DBDA; --field: #FFFFFF;
  --ink: #1C2A25; --ink-2: #44544E; --muted: #5F6F69;
  --radius: 28px;
}
[data-theme="scola-nova"] {
  --brand: #009BF3;  --brand-ink: #0270B0; --on-brand: #0B1B2E;
  --brand-tint: #E9F8FF; --accent: #FEB146; --accent-tint: #FFF6E5;
  --hero-bg: #0B1B2E; --hero-ink: #FFFFFF; --hero-muted: #B4C4D4; --hero-accent: #2FC6FF;
  --hero-glow: rgba(47, 198, 255, .38);
  --paper: #FFFFFF; --surface: #F3F9FD; --line: #DCEBF5; --field: #FFFFFF;
  --ink: #0B1B2E; --ink-2: #33475B; --muted: #5E7286;
  --radius: 24px;
}
[data-theme="scola-zenith"] {
  --brand: #FEB146;  --brand-ink: #9A4A00; --on-brand: #151515;
  --brand-tint: #FBF3DE; --accent: #FD7A00; --accent-tint: #FFEFDF;
  --hero-bg: #FBF3DE; --hero-ink: #151515; --hero-muted: #4B4B48; --hero-accent: #9A4A00;
  --hero-glow: rgba(253, 122, 0, .25);
  --paper: #FFFBEF; --surface: #FBF3DE; --line: rgba(21, 21, 21, .12); --field: #FFFFFF;
  --ink: #151515; --ink-2: #4B4B48; --muted: #6E6B63;
  --radius: 20px;
}

/* ---------- Base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; transition: background .25s;
}
h1, h2, h3, h4 { font-family: "Poppins", system-ui, sans-serif; font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--brand-ink); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { font: 600 13px/1 "Poppins"; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 10px; }
.section-head p { color: var(--ink-2); margin-top: 12px; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img, .brand .initials { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.brand img { object-fit: contain; background: #fff; padding: 4px; border: 1px solid var(--line); }
.brand .initials { display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font: 600 16px "Poppins"; }
.brand-name { font: 600 16px/1.25 "Poppins"; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12.5px; color: var(--muted); display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); font: 500 14.5px "DM Sans"; padding: 0 14px; border-radius: 999px; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.menu-btn svg { margin: auto; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 "Poppins"; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 24px -10px var(--brand); }
.btn-primary:hover { box-shadow: 0 12px 30px -10px var(--brand); }
.btn-primary[disabled] { opacity: .7; cursor: progress; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.hero .btn-ghost { color: var(--hero-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hero-ink) 35%, transparent); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }

/* ---------- Hero --------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-ink); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 70%); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; padding: clamp(48px, 6vw, 88px) 0; min-height: min(74vh, 720px); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--hero-ink) 10%, transparent); font: 500 13.5px "DM Sans"; color: var(--hero-ink);
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.hero h1 { font-size: clamp(36px, 5.6vw, 66px); line-height: 1.06; margin-top: 20px; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--hero-accent); }
.hero .lede { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--hero-muted); margin-top: 18px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; padding: 0; list-style: none; }
.fact-row li {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--hero-ink) 7%, transparent); color: var(--hero-ink);
}
.fact-row svg { color: var(--hero-accent); flex: none; }
.hero-media { position: relative; display: grid; place-items: center; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14.5px; color: var(--hero-muted); }
.hero-note svg { color: var(--hero-accent); flex: none; }

/* Shared hero illustration (assets/img/admissions-hero.svg, inlined in the page).
   Its colours are these --a-* properties, derived from the theme tokens,
   so one asset serves every school and theme. */
.hero-art {
  width: min(100%, 600px); aspect-ratio: 1;
  --a-halo: color-mix(in srgb, var(--brand) 26%, var(--hero-bg));
  --a-ring: var(--hero-accent);
  --a-accent: var(--hero-accent);
  --a-brand: var(--brand);
  --a-paper: #FFFFFF;
  --a-line: color-mix(in srgb, var(--ink) 14%, #FFFFFF);
  --a-deep: var(--ink);
  --a-contrast: var(--hero-ink);
  --a-window: color-mix(in srgb, var(--brand) 34%, #FFFFFF);
  --a-leaf: color-mix(in srgb, var(--brand) 70%, var(--ink));
  --a-shadow: rgba(0, 0, 0, .22);
}
[data-theme="scola-default"] .hero-art { --a-halo: color-mix(in srgb, var(--brand) 34%, var(--hero-bg)); --a-leaf: #2E8F60; }
[data-theme="scola-harmony"] .hero-art { --a-leaf: #C1E965; --a-halo: color-mix(in srgb, var(--brand) 60%, var(--hero-bg)); }
[data-theme="scola-nova"] .hero-art { --a-leaf: #2FC6FF; --a-halo: color-mix(in srgb, var(--brand) 30%, var(--hero-bg)); }
[data-theme="scola-engage"] .hero-art { --a-halo: color-mix(in srgb, var(--brand) 38%, var(--hero-bg)); --a-leaf: #F98736; --a-accent: #FEB146; --a-ring: #FEB146; }
[data-theme="scola-zenith"] .hero-art { --a-accent: var(--accent); --a-ring: var(--accent); --a-halo: color-mix(in srgb, var(--brand) 38%, var(--hero-bg)); --a-leaf: #FD7A00; --a-shadow: rgba(80, 50, 0, .14); }
.hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .18)); }
@media (prefers-reduced-motion: no-preference) {
  /* Motion only, never opacity: the artwork must be fully visible even when the
     animation timeline is paused (background tabs, off-screen iframes, captures). */
  .hero-art svg { animation: art-in .9s cubic-bezier(.2, .7, .2, 1); }
  @keyframes art-in { from { transform: translateY(14px) scale(.98); } to { transform: none; } }
}

/* ---------- Overview ----------------------------------------------------- */
.overview-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.surface-band { background: var(--surface); }
.surface-band .card { border-color: transparent; box-shadow: 0 1px 0 var(--line); }
.ov-about { grid-column: span 7; }
.ov-about p { color: var(--ink-2); margin-top: 12px; }
.ov-classes { grid-column: span 5; background: var(--hero-bg); color: var(--hero-ink); }
.ov-classes .eyebrow { color: var(--hero-accent); }
.ov-classes .big { font: 600 clamp(24px, 3vw, 32px)/1.15 "Poppins"; margin-top: 12px; }
.ov-classes .sub { color: var(--hero-muted); margin-top: 8px; font-size: 15px; }
.ov-small { grid-column: span 4; }
.ov-small h3 { font-size: 17px; margin-top: 10px; }
.ov-small p { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-ink); font: 500 14px "DM Sans"; }

/* ---------- Process ------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { position: relative; padding: 28px 26px 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.steps li::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  font: 600 14px "Poppins"; color: var(--brand-ink); background: var(--brand-tint); border-radius: 10px; padding: 6px 10px; display: inline-block;
}
.steps h3 { font-size: 18px; margin-top: 18px; }
.steps p { color: var(--ink-2); font-size: 15px; margin-top: 8px; }
.need-list { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; padding: 22px 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); list-style: none; }
.need-list li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-2); }
.need-list svg { color: var(--brand-ink); flex: none; margin-top: 4px; }
.need-title { grid-column: 1 / -1; font: 600 15px "Poppins"; color: var(--ink) !important; }

/* ---------- Apply (form) ------------------------------------------------- */
.apply { background: var(--surface); }
.apply-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.form-card { background: var(--paper); border-radius: calc(var(--radius) + 4px); box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .35), 0 0 0 1px var(--line); overflow: hidden; overflow: clip; min-width: 0; /* clip, not hidden: keeps the phone step footer sticky; min-width 0 keeps the grid item inside narrow screens */ }
.stepper { display: flex; gap: 0; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper button {
  flex: 1 0 auto; display: flex; align-items: center; gap: 10px; padding: 18px 16px; border: 0; background: none; cursor: pointer;
  font: 500 14.5px "DM Sans"; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.stepper .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12.5px "Poppins"; background: var(--surface); color: var(--muted); }
.stepper [aria-current="step"] { color: var(--ink); border-bottom-color: var(--brand); }
.stepper [aria-current="step"] .n { background: var(--brand); color: var(--on-brand); }
.stepper .done .n { background: var(--brand-tint); color: var(--brand-ink); }
.stepper button[disabled] { cursor: not-allowed; }
.panel { padding: clamp(22px, 4vw, 36px); }
.panel[hidden] { display: none; }
.panel-head h3 { font-size: 21px; }
.panel-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 18px; margin-top: 24px; }
.fields .full { grid-column: 1 / -1; }
.field label, .field legend { display: block; font: 500 14.5px "DM Sans"; color: var(--ink); margin-bottom: 7px; padding: 0; }
.field .req { color: #B42318; margin-left: 2px; }
.field .opt { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--field); font-size: 16px; /* >=16px prevents iOS zoom */
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 104px; resize: vertical; }
/* Class select: the native arrow sits flush against the border, so draw the
   chevron at the same 14px inset as the date field's calendar icon. */
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; text-overflow: ellipsis; cursor: pointer;
  background-image: url("images/select-chevron.svg");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px 18px; }
.field select:disabled { cursor: default; color: var(--muted); }
/* Group (XI/XII streams): only for classes that offer groups (admissions.js).
   From two columns up it sits under "Class applying for". */
.field[hidden] { display: none; }
@media (min-width: 641px) { .fields .group-field { grid-column: 2; } }
/* Date of birth: the whole field opens the calendar (admissions.js), so the
   pointer says so over the text as well as the icon. Its height equals the
   text fields' (line + 2 x 12px padding + 2 x 1.5px border): Chrome's date
   editor otherwise adds 2px and the row's bottom edges don't line up. */
.field input[type="date"] { cursor: pointer; height: calc(1.6em + 27px); }
.field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; }
.field input::placeholder, .field textarea::placeholder { color: #9AA3AB; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field .err { display: none; align-items: center; gap: 6px; font-size: 13.5px; color: #B42318; margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #D92D20; background-color: #FFFBFA; }
.field.invalid .err { display: flex; }
.field.invalid .hint { display: none; }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 14px 0 0 14px; background: var(--surface); color: var(--ink-2); font-size: 15px; }
.prefix-input input { border-radius: 0 14px 14px 0; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; border: 0; margin: 0; padding: 0; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer; font-size: 15px; background: var(--field); }
.seg input:checked + span { border-color: var(--brand-ink); background: var(--brand-tint); color: var(--brand-ink); font-weight: 500; }
.seg input:focus-visible + span { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.contact-group { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.contact-group h4 { grid-column: 1 / -1; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.contact-group h4 small { font: 400 13px "DM Sans"; color: var(--muted); }
.group-note { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
.group-err { grid-column: 1 / -1; display: none; font-size: 13.5px; color: #B42318; padding: 10px 12px; border-radius: 10px; background: #FEF3F2; }
.group-err.show { display: block; }

.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(22px, 4vw, 36px); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 50%, var(--paper)); }
.panel-foot .meta { font-size: 13.5px; color: var(--muted); }
.panel-foot .actions { display: flex; gap: 10px; margin-left: auto; }

.review dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 20px 0 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.review .grp { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--surface); font: 600 14.5px "Poppins"; }
.review .grp button { border: 0; background: none; color: var(--brand-ink); font: 500 14px "DM Sans"; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.review .row { padding: 12px 18px; border-top: 1px solid var(--line); }
.review dt { font-size: 12.5px; color: var(--muted); }
.review dd { margin: 2px 0 0; font-size: 15px; word-break: break-word; }
.review dd.empty { color: var(--muted); font-style: italic; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px; border-radius: 16px; background: var(--brand-tint); font-size: 14.5px; color: var(--ink-2); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand-ink); flex: none; }
.consent.invalid { box-shadow: inset 0 0 0 1.5px #D92D20; }

.alert { display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-top: 20px; font-size: 14.5px; }
.alert.show { display: flex; }
.alert-error { background: #FEF3F2; color: #912018; box-shadow: inset 0 0 0 1px #FECDCA; }
.alert-info { background: var(--accent-tint); color: var(--ink); }
.alert strong { display: block; margin-bottom: 2px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--on-brand) 35%, transparent); border-top-color: var(--on-brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success { padding: clamp(28px, 5vw, 48px); text-align: center; }
.success[hidden] { display: none; }
.success .tick { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); }
.success h3 { font-size: clamp(22px, 3vw, 28px); margin-top: 20px; }
.success > p { color: var(--ink-2); margin: 10px auto 0; max-width: 460px; }
.ref-box { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 24px; padding: 16px 26px; border-radius: 18px; border: 1.5px dashed var(--brand-ink); background: var(--brand-tint); }
.ref-box span { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.ref-box strong { font: 600 24px "Poppins"; letter-spacing: .04em; color: var(--ink); }
.next-steps { text-align: left; max-width: 460px; margin: 28px auto 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.next-steps li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); }
.next-steps li b { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface); font: 600 12.5px "Poppins"; color: var(--ink); }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }

/* Aside */
.aside { display: grid; gap: 16px; position: sticky; top: 96px; }
.aside .card h3 { font-size: 17px; }
.aside .card p { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; }
.contact-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.contact-list a, .contact-list div { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 15px; word-break: break-word; }
.contact-list a:hover { background: var(--surface); }
.contact-list .ci { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); flex: none; }
.contact-list small { display: block; color: var(--muted); font-size: 12.5px; }
.privacy { background: transparent; border-style: dashed; }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: var(--hero-bg); color: var(--hero-muted); padding: 40px 0; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--hero-ink); }
.socials { display: flex; gap: 8px; }
.socials a { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--hero-ink) 10%, transparent); color: var(--hero-ink); }

/* ---------- Mobile sticky CTA ------------------------------------------- */
.m-cta { display: none; }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1024px) {
  .apply-grid { grid-template-columns: 1fr; }
  .aside { position: static; grid-template-columns: 1fr 1fr; }
  .ov-about, .ov-classes { grid-column: span 12; }
  .ov-small { grid-column: span 6; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25); }
  .nav.open a { padding: 14px 12px; font-size: 16px; }
  .menu-btn { display: grid; }
  .site-header .hdr-cta { display: none; }
  .hero .wrap { grid-template-columns: 1fr; padding-bottom: 56px; }
  .hero .wrap { min-height: 0; }
  /* Mobile order: headline + primary CTA, then the illustration, then note and facts. */
  .hero .wrap { row-gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > .status-pill { justify-self: start; }
  .hero-media { order: 1; margin-top: 28px; }
  .hero-note, .fact-row { order: 2; }
  .hero-art { width: min(100%, 380px); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .fields, .contact-group, .review dl { grid-template-columns: 1fr; }
  .ov-small { grid-column: span 12; }
  .aside { grid-template-columns: 1fr; }
  .stepper .lbl { display: none; }
  .stepper [aria-current="step"] .lbl { display: inline; }
  .panel-foot { position: sticky; bottom: 0; z-index: 5; flex-wrap: wrap; }
  .panel-foot .meta { width: 100%; }
  .panel-foot .actions { width: 100%; }
  .panel-foot .actions .btn { flex: 1; }
  .m-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; transition: transform .25s, opacity .25s; }
  .m-cta .btn { width: 100%; box-shadow: 0 16px 30px -12px rgba(0,0,0,.45); }
  .m-cta.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Production additions ------------------------------------------ */
/* Focus on the dark hero/footer bands: --brand-ink can equal the band colour
   (e.g. Harmony), so focus there uses the band's accent (>= 3:1 on it). */
.hero :focus-visible, .ov-classes :focus-visible, .site-footer :focus-visible { outline-color: var(--hero-accent); }
.skip-link { position: absolute; left: 16px; top: -120px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--paper); color: var(--ink); font: 600 15px "DM Sans", sans-serif; box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); }
.skip-link:focus { top: 12px; }
/* Without JavaScript the form cannot submit: show the notice, not a dead form. */
.no-js #formWrap, .no-js .m-cta { display: none !important; }
/* ...and the phone menu cannot open, so its links are shown inline. */
@media (max-width: 860px) {
  .no-js .menu-btn { display: none; }
  .no-js .site-header .wrap { flex-wrap: wrap; row-gap: 0; }
  .no-js .nav { display: flex; flex-wrap: wrap; width: 100%; margin: 0 -14px; padding-bottom: 6px; }
}
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.class-load { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.class-load button { background: none; border: 0; padding: 0; color: var(--brand-ink); font: 600 13.5px "DM Sans"; text-decoration: underline; cursor: pointer; }

/* Step indicator: only the current step's label below 720px, so all four
   steps fit without scrolling. */
@media (max-width: 720px) {
  .stepper .lbl { display: none; }
  .stepper [aria-current="step"] .lbl { display: inline; }
}
/* Narrow phones (320-360px): keep the headline and CTA on the first screen. */
@media (max-width: 360px) {
  .hero h1 { font-size: 30px; }
  .hero .lede { font-size: 15.5px; }
  .stepper button { padding-left: 10px; padding-right: 10px; }
}
/* Phones in landscape and other short screens: compact header and hero, two
   columns from 640px, and the sticky CTA so "Start application" is always
   reachable without scrolling back. */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header .wrap { min-height: 56px; }
  html { scroll-padding-top: 68px; }
  .aside { position: static; }
  .hero .wrap { min-height: 0; padding: 20px 0 32px; }
  .hero h1 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 10px; }
  .hero .lede { font-size: 15px; margin-top: 10px; }
  .hero-cta { margin-top: 16px; }
  .m-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; transition: transform .25s, opacity .25s; }
  .m-cta .btn { width: 100%; box-shadow: 0 16px 30px -12px rgba(0,0,0,.45); }
  .m-cta.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: 96px; }
}
@media (max-height: 500px) and (orientation: landscape) and (min-width: 640px) {
  .hero .wrap { grid-template-columns: 1.4fr .6fr; column-gap: 24px; }
  .hero-copy { display: block; }
  .hero-media { order: 0; margin-top: 0; }
  .hero-art { width: min(100%, 300px); }
  .m-cta { left: auto; right: 16px; width: 280px; }
}
