/* Light National School: site styles. Tokens and rules follow DESIGN_PLAN.md. */

@font-face { font-family: "Arexa"; src: url("../fonts/Arexa-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("../fonts/ReadexPro-Variable.woff") format("woff"); font-weight: 300 700; font-display: swap; }

:root {
  --teal: #02A5A7; --teal-deep: #006B6D; --cream: #F7EDE3; --ink: #0E2A2B; --white: #FFFFFF;
  --lamp: #E9B44C; --whatsapp: #25D366; --ink-soft: #3D5657; --teal-wash: #E3F0EE; --line: #D9CFC4; --danger: #A8322A;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
  --r-field: 6px; --r-panel: 10px; --gutter: 20px; --max: 1200px;
  --fs-16: 1rem; --fs-20: 1.25rem; --fs-25: 1.5625rem; --fs-31: 1.9375rem; --fs-39: 2.4375rem; --fs-49: 3.0625rem; --fs-61: 3.8125rem; --fs-76: 4.75rem;
  --body: 1.0625rem; --lh: 1.6;
}
@media (min-width: 900px) { :root { --gutter: 48px; --body: 1.125rem; } }
[lang="ar"] { --body: 1.1875rem; --lh: 1.8; }
@media (min-width: 900px) { [lang="ar"] { --body: 1.25rem; } }

/* ---------- base */
[hidden] { display: none !important; } /* hidden always wins over display rules (stepper, toggles) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 var(--body)/var(--lh) "Readex Pro", system-ui, sans-serif; }
[lang="ar"], [lang="ar"] * { letter-spacing: 0 !important; font-style: normal; }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-underline-offset: 3px; }
a[href^="mailto:"], a[href^="http"] { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
main:focus { outline: none; }
bdi, .ltr { unicode-bidi: isolate; }
/* Latin runs inside Arabic stay on one line (otherwise "Pre-KG" breaks at the hyphen) */
[lang="ar"] bdi { white-space: nowrap; }
.ltr { direction: ltr; display: inline-block; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
dd, dt { min-width: 0; }
p { margin: 0 0 var(--s2); max-width: 68ch; }
.skip { position: absolute; inset-inline-start: var(--s2); top: -100px; z-index: 100; background: var(--ink); color: var(--cream); padding: var(--s1) var(--s2); border-radius: var(--r-field); }
.skip:focus { top: var(--s2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s5); }
@media (min-width: 900px) { .section { padding-block: var(--s6); } }
.display { font-family: "Arexa", "Readex Pro", sans-serif; font-weight: 400; color: var(--teal-deep); line-height: 1.05; margin: 0; }
[lang="ar"] .display { font-family: "Readex Pro", sans-serif; font-weight: 700; line-height: 1.4; }
.lede { font-size: var(--fs-20); color: var(--ink-soft); }

/* ---------- buttons (PDF p13) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 48px; padding: 0 var(--s3);
  border-radius: var(--r-field); border: 2px solid transparent; font: 600 1rem/1.2 "Readex Pro", sans-serif; text-decoration: none;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--lamp { background: var(--lamp); color: var(--ink); }
.btn--deep { background: var(--teal-deep); color: var(--cream); }
.btn--line { background: transparent; color: var(--teal-deep); border-color: var(--teal-deep); }
.btn--wa { background: var(--whatsapp); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- header */
.hdr { position: sticky; top: 0; z-index: 30; background: var(--cream); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; gap: var(--s2); min-height: 64px; }
.hdr__logo { flex: none; }
.hdr__shield { height: 40px; width: auto; }
.hdr__wordmark { display: none; height: 20px; width: auto; }
.hdr__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.hdr__portal { display: none; }
.hdr__cta { min-height: 40px; padding: 0 var(--s2); font-size: .95rem; }
.hdr__menu { min-height: 44px; padding: 0 var(--s2); border: 1px solid var(--teal-deep); border-radius: var(--r-field); background: none; color: var(--teal-deep); font: 600 .95rem "Readex Pro", sans-serif; cursor: pointer; }
.hdr__nav { display: none; }
.hdr__nav ul { list-style: none; margin: 0; padding: 0; }
.hdr__nav a, .hdr__tools a { white-space: nowrap; }
.hdr__nav a { color: var(--ink); text-decoration: none; }
.hdr__nav a[aria-current] { color: var(--teal-deep); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
/* mobile menu: a full-width panel under the bar */
.hdr.is-open .hdr__nav { display: block; position: absolute; inset-inline: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); }
.hdr.is-open .hdr__nav ul { display: grid; padding: var(--s1) var(--gutter) var(--s3); }
.hdr.is-open .hdr__nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
@media (min-width: 1200px) {
  .hdr__shield { display: none; } .hdr__wordmark { display: block; }
  .hdr__nav, .hdr.is-open .hdr__nav { display: block; position: static; border: 0; background: none; }
  .hdr__nav ul, .hdr.is-open .hdr__nav ul { display: flex; gap: 20px; padding: 0; margin-inline-start: var(--s3); font-size: .95rem; }
  .hdr.is-open .hdr__nav a { display: inline; padding: 0; border: 0; font-size: inherit; }
  .hdr__nav-portal { display: none; }
  .hdr__portal { display: inline; }
  .hdr__menu { display: none; }
}

/* ---------- floating WhatsApp (bottom-right EN, bottom-left AR via logical inset) */
.wa-float { position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 25; width: 56px; height: 56px; border-radius: 50%;
  background: var(--whatsapp); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(14, 42, 43, .25); }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }
@media print { .wa-float, .hdr__menu { display: none; } }

/* ---------- footer */
.ftr { background: var(--ink); color: var(--cream); padding-block: var(--s5) var(--s4); padding-bottom: calc(var(--s4) + 72px); }
.ftr a { color: var(--cream); }
.ftr__grid { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .ftr__grid { grid-template-columns: 1fr 1.6fr .8fr; } .ftr { padding-bottom: var(--s4); } }
.ftr__crest { width: 128px; height: auto; margin-bottom: var(--s3); }
.ftr__contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s2); margin: 0; }
.ftr__contact dt { opacity: .8; }
.ftr__contact dd { margin: 0; }
.email { overflow-wrap: normal; word-break: normal; } /* breaks only at the <wbr> before @, never mid-word */
.ftr__h { font-size: 1rem; font-weight: 600; margin: 0 0 var(--s1); }
.ftr__links { display: grid; gap: var(--s1); margin-bottom: var(--s3) !important; }
.social { display: flex; flex-wrap: wrap; gap: var(--s1); }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; }
.social svg { width: 24px; height: 24px; fill: currentColor; }
.ftr__copy { margin: var(--s4) 0 0; opacity: .85; font-size: .9rem; }

/* ---------- hero (3D stage replaced by the poster until slice H) */
.hero { background: linear-gradient(180deg, var(--cream) 0%, #EAF2EE 100%); overflow: hidden; }
.hero__in { display: grid; gap: var(--s4); padding-block: var(--s4) var(--s5); align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 7fr 5fr; padding-block: var(--s5) var(--s6); } }
.hero__title { font-size: var(--fs-49); }
@media (min-width: 900px) { .hero__title { font-size: var(--fs-76); } }
[lang="ar"] .hero__title { font-size: var(--fs-39); }
@media (min-width: 900px) { [lang="ar"] .hero__title { font-size: var(--fs-61); } }
.hero__line2 { font-size: var(--fs-25); font-weight: 600; margin: var(--s2) 0 var(--s1); }
@media (min-width: 900px) { .hero__line2 { font-size: var(--fs-31); } }
.hero__support { color: var(--ink-soft); }
.hero { position: relative; }
.hero__in { position: relative; z-index: 1; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s ease-out; pointer-events: none; }
.hero--3d .hero__canvas { opacity: 1; }
/* The stage is square; the poster and the 3D scene use the same framing, so the star buttons line up in both. */
.hero__stage { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1; margin-inline: auto; }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .4s ease-out; }
.hero--3d .hero__poster { opacity: 0; }
.hero__stars { position: absolute; inset: 0; z-index: 2; list-style: none; margin: 0; padding: 0; }
.hero-star { position: absolute; top: 86.67%; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.hero-star--0 { left: 29.33%; } .hero-star--1 { left: 50%; } .hero-star--2 { left: 70.67%; }
[dir="rtl"] .hero-star--0 { left: 70.67%; } [dir="rtl"] .hero-star--2 { left: 29.33%; }
.hero-star:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.hero-star__label { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: var(--white); color: var(--ink); font-size: .9rem; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: opacity .15s; }
.hero-star:hover .hero-star__label, .hero-star:focus-visible .hero-star__label, .hero-star.is-active .hero-star__label { opacity: 1; }
/* No 3D (reduced motion, no WebGL, Save-Data, low-power): poster with lit stars + a soft CSS glow */
.hero--static .hero-star::before { content: ""; position: absolute; inset: 10%; border-radius: 50%; box-shadow: 0 0 24px 8px rgba(233, 180, 76, .35); }
.hero-debug { position: absolute; z-index: 5; bottom: 8px; inset-inline-start: 8px; padding: 4px 8px; background: var(--ink); color: var(--lamp); font: 12px/1.4 monospace; border-radius: 4px; }

/* ---------- error page */
.error-page .lede { margin-top: var(--s2); }
.debug { white-space: pre-wrap; font-size: .8rem; background: var(--white); padding: var(--s2); border-radius: var(--r-panel); overflow: auto; direction: ltr; text-align: left; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- page heads, placeholders, shield mask */
[lang="en"] .display { text-transform: uppercase; }
.page-head { padding-block: var(--s5) var(--s3); }
.page-head__title { font-size: var(--fs-49); }
@media (min-width: 900px) { .page-head__title { font-size: var(--fs-61); } }
[lang="ar"] .page-head__title { font-size: var(--fs-39); }
.page-head .lede { margin-top: var(--s2); }
.page-head__title--album { font-size: var(--fs-39); }
.crumb { margin: 0 0 var(--s2); }
[dir="rtl"] .crumb__arrow { display: inline-block; transform: scaleX(-1); }
.section--tight { padding-top: var(--s3); }
.shield { clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.ph { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; background: #EFE2D4; color: var(--ink-soft); }
.ph--deep { background: var(--teal-deep); }
.ph img { width: 48px; height: auto; opacity: .35; }

/* ---------- gallery: album list (one lead album, then a plain list; not identical cards) */
.albums-list { display: grid; gap: var(--s4) var(--s3); }
@media (min-width: 600px) { .albums-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .albums-list { grid-template-columns: repeat(3, 1fr); } }
.albums-list a { display: grid; gap: var(--s1); color: var(--ink); text-decoration: none; }
.albums-list a:hover strong { text-decoration: underline; }
.albums-list__cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #EFE2D4; }
.albums-list__cover img { width: 100%; height: 100%; object-fit: cover; }
.albums-list__text strong { display: block; font-size: var(--fs-20); }
.albums-list__text span { color: var(--ink-soft); font-size: .95rem; }
.albums-list__item--lead { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .albums-list__item--lead a { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s3); }
  .albums-list__item--lead .albums-list__cover { aspect-ratio: 16 / 9; }
}

/* ---------- album: tight grid, featured photos span 2×2 */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; grid-auto-flow: dense; gap: 6px; }
@media (min-width: 900px) { .photo-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; } }
.photo-grid__item { overflow: hidden; background: #EFE2D4; }
.photo-grid__item--big { grid-column: span 2; grid-row: span 2; }
.photo-grid__item a, .photo-grid__item picture { display: block; width: 100%; height: 100%; }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.photo-grid__item a:hover img { transform: scale(1.02); }
.photo-grid__item--video { grid-column: span 2; }
.video-facade { all: unset; position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: var(--teal-deep); color: var(--cream); cursor: pointer; }
.video-facade:focus-visible { outline: 3px solid var(--lamp); outline-offset: -3px; }
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-facade__title { position: absolute; inset-inline: 0; bottom: 0; padding: var(--s1) var(--s2); background: rgba(14, 42, 43, .8); font-size: .95rem; }
.video-facade__play { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--cream); }
.video-facade__play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--teal-deep); transform: translateX(3px); }
.video-frame { width: 100%; height: 100%; border: 0; }

/* ---------- lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: var(--white); color: var(--ink); }
.lightbox::backdrop { background: rgba(14, 42, 43, .7); }
.lightbox__stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; height: 100%; padding: 56px 8px 16px; gap: 8px; }
.lightbox__figure { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; gap: var(--s1); }
.lightbox__img { width: 100%; height: 100%; object-fit: contain; }
.lightbox__cap { display: flex; justify-content: space-between; gap: var(--s2); font-size: .95rem; color: var(--ink-soft); }
.lightbox__btn, .lightbox__close { min-width: 48px; min-height: 48px; border-radius: var(--r-field); border: 1px solid var(--teal-deep); background: var(--white); color: var(--teal-deep); font-size: 1.6rem; line-height: 1; cursor: pointer; }
[dir="rtl"] .lightbox__btn span { display: inline-block; transform: scaleX(-1); }
.lightbox__close { position: absolute; top: 8px; inset-inline-end: 8px; }
@media (max-width: 599px) { .lightbox__stage { grid-template-columns: minmax(0, 1fr); } .lightbox__btn { position: absolute; bottom: 16px; } .lightbox__prev { inset-inline-start: 16px; } .lightbox__next { inset-inline-end: 16px; } .lightbox__figure { padding-bottom: 64px; } }
::view-transition-group(lns-photo) { animation-duration: .3s; }
/* local poster render page (/dev/hero-poster) */
.poster-render { background: transparent; margin: 0; }
.hero--poster { width: 1000px; height: 1000px; background: none; overflow: hidden; }
.hero--poster .hero__stage { position: absolute; inset: 0; width: 1000px; max-width: none; }
/* ---------- shared section bits */
.section__title { font-size: var(--fs-39); margin-bottom: var(--s3); }
@media (min-width: 900px) { .section__title { font-size: var(--fs-49); } }
[lang="ar"] .section__title { font-size: var(--fs-31); }
@media (min-width: 900px) { [lang="ar"] .section__title { font-size: var(--fs-39); } }
.section__title--small { font-size: var(--fs-31); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s2); margin-bottom: var(--s3); }
.section__head .section__title { margin: 0; }
.star { width: 1em; height: 1em; display: inline-block; fill: none; stroke: var(--teal-deep); stroke-width: 1.4; opacity: .5; }
.star--lit { fill: var(--lamp); stroke: none; opacity: 1; }

/* photo slots: real photo or brand placeholder */
.photo-slot { margin: 0; width: 100%; height: 100%; overflow: hidden; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot--empty { display: grid; place-items: center; align-content: center; gap: var(--s1); padding: var(--s3); text-align: center; }
.photo-slot--empty img { width: 40px; height: auto; opacity: .45; }
.photo-slot--cream { background: #EFE2D4; color: var(--ink-soft); }
.photo-slot--deep { background: var(--teal-deep); color: var(--cream); }
.photo-slot figcaption { font-size: .95rem; }

/* founding year */
.founding__in { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 900px) { .founding__in { grid-template-columns: 5fr 7fr; } }
.founding__photo { aspect-ratio: 5 / 6; max-width: 420px; width: 100%; }
.founding__year { font: 700 var(--fs-61)/1 "Readex Pro", sans-serif; color: var(--teal-deep); margin: 0 0 var(--s2); }
@media (min-width: 900px) { .founding__year { font-size: var(--fs-76); } }

/* three languages: ruled rows, stars light in order once */
/* The three languages: the school's signature. Three cards that build up 1 → 2 → 3 stars, then the
   "all three from Grade 4" message as a deep-teal band. Text is never hidden: the reveal only lights the stars. */
.langs { background: linear-gradient(180deg, var(--cream) 0%, var(--white) 55%); }
.lang-rows { display: grid; gap: var(--s3); }
@media (min-width: 900px) { .lang-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); } }
.lang-row { position: relative; display: grid; align-content: start; gap: var(--s1); padding: var(--s4) var(--s3) var(--s3);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: 0 1px 2px rgba(14, 42, 43, .04), 0 8px 24px rgba(14, 42, 43, .06); }
.lang-row::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; height: 4px; width: calc(100% * var(--lit) / 3);
  background: var(--lamp); border-start-start-radius: var(--r-panel); }
.lang-row:nth-child(1) { --lit: 1; } .lang-row:nth-child(2) { --lit: 2; } .lang-row:nth-child(3) { --lit: 3; border-color: var(--lamp); }
.lang-row:nth-child(3)::before { border-start-end-radius: var(--r-panel); }
.lang-row .stars { display: inline-flex; gap: 6px; font-size: 26px; }
.lang-row__name { font-size: var(--fs-39); margin: var(--s1) 0 0; line-height: 1.1; }
[lang="ar"] .lang-row__name { font-size: var(--fs-31); }
.lang-row__from { display: inline-block; justify-self: start; margin: 0 0 var(--s1); padding: 2px 12px; border-radius: 999px;
  background: var(--teal-wash); color: var(--teal-deep); font-weight: 600; font-size: .95rem; }
.lang-row__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lang-row__points li { position: relative; padding-inline-start: 26px; }
.lang-row__points li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--teal-deep); border-bottom: 2px solid var(--teal-deep); transform: rotate(-45deg); } /* a tick is not mirrored in Arabic */
.lang-rows__all { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 0;
  padding: var(--s3); border-radius: var(--r-panel); background: var(--teal-deep); color: var(--cream); font-size: var(--fs-20); font-weight: 600; max-width: none; }
@media (min-width: 900px) { .lang-rows__all { font-size: var(--fs-25); padding: var(--s3) var(--s4); } }
.lang-rows__all .stars { display: inline-flex; gap: 4px; font-size: 24px; }
.langs__more { margin-top: var(--s3); }
/* reveal: cards rise a little and the stars light up one card after another */
.js-reveal .lang-row { transform: translateY(10px); transition: transform .5s ease-out; }
.js-reveal .lang-row .star--lit { fill: none; stroke: var(--lamp); stroke-width: 1.4; transition: fill .35s ease-out; }
.js-reveal .lang-row.is-in { transform: none; }
.js-reveal .lang-row.is-in .star--lit { fill: var(--lamp); stroke: none; }

/* semi-international */
.semi__list { display: grid; gap: var(--s3); margin: 0; }
@media (min-width: 900px) { .semi__list { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
.semi__list > div { border-inline-start: 3px solid var(--teal); padding-inline-start: var(--s2); }
.semi__list dt { font-weight: 600; margin-bottom: 4px; }
.semi__list dd { margin: 0; color: var(--ink-soft); }

/* stages + life */
.stages-life { border-top: 1px solid var(--line); }
.stages-life__in { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .stages-life__in { grid-template-columns: 1fr 1fr; } }
.stage-links a { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stage-links li:last-child a { border-bottom: 1px solid var(--line); }
.stage-links strong { font-size: var(--fs-20); }
.stage-links span { grid-column: 1; color: var(--ink-soft); }
.stage-links__langs { font-size: .95rem; }
.stage-links__arrow { grid-row: 1 / span 3; grid-column: 2 !important; align-self: center; color: var(--teal-deep) !important; font-size: 1.5rem; }
[dir="rtl"] .stage-links__arrow { transform: scaleX(-1); }
.stage-links a:hover strong { text-decoration: underline; }
.life { columns: 1; }
@media (min-width: 600px) { .life { columns: 2; column-gap: var(--s4); } }
.life li { break-inside: avoid; display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.life .star { flex: none; font-size: 14px; }

/* inside LNS */
.inside__strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
.inside__item { display: block; min-height: 160px; overflow: hidden; }
.inside__item--lead { grid-column: span 2; min-height: 320px; }
.inside__item img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .inside__strip { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; }
  .inside__item--lead { grid-column: auto; grid-row: span 2; min-height: 0; }
  .inside__item { min-height: 0; }
}

/* news list */
.news-list { display: grid; gap: var(--s2); }
.news-list a { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.news-list time { color: var(--ink-soft); white-space: nowrap; }

/* admissions band */
.adm-band { background: var(--teal-deep); color: var(--cream); }
.adm-band .section__title { color: var(--cream); }
.adm-band__steps { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); counter-reset: step; }
@media (min-width: 900px) { .adm-band__steps { grid-template-columns: repeat(4, 1fr); } }
.adm-band__steps li { counter-increment: step; border-top: 2px solid rgba(247, 237, 227, .5); padding-top: var(--s2); }
.adm-band__steps li::before { content: counter(step); display: block; font: 700 var(--fs-31)/1 "Readex Pro", sans-serif; margin-bottom: var(--s1); }
.btn--on-dark { color: var(--cream); border-color: var(--cream); }

/* testimonials */
.testimonials__list { display: grid; gap: var(--s3); }
@media (min-width: 900px) { .testimonials__list { grid-template-columns: repeat(2, 1fr); } }
.testimonials figure { margin: 0; border-inline-start: 3px solid var(--lamp); padding-inline-start: var(--s3); }
.testimonials blockquote { margin: 0 0 var(--s1); font-size: var(--fs-20); }
.testimonials figcaption { color: var(--ink-soft); }

/* visit us + map */
.visit-us__in { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .visit-us__in { grid-template-columns: 5fr 7fr; } }
.contact-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0 0 var(--s3); }
.contact-list dt { color: var(--ink-soft); }
.contact-list dd { margin: 0; }
.map { width: 100%; min-height: 320px; border: 0; border-radius: var(--r-panel); }
.map--empty { display: grid; place-items: center; background: #EFE2D4; color: var(--ink-soft); }
.inside__item .photo-slot--empty img, .founding__photo .photo-slot--empty img { width: 40px; height: auto; object-fit: contain; }

/* ---------- about: vision & mission */
.vm__in { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .vm__in { grid-template-columns: 5fr 7fr; } }
.vm__text { font-size: var(--fs-25); font-weight: 600; line-height: 1.4; color: var(--teal-deep); }
.vm__item { border-top: 2px solid var(--teal); padding-top: var(--s3); }

/* ---------- leadership tree: nested lists; desktop draws an org chart, phones an indented list */
.tree ul { list-style: none; margin: 0; padding: 0; }
.person { display: inline-flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-panel); text-align: start; }
.person__photo { flex: none; width: 48px; height: 56px; object-fit: cover; }
.person__photo--initials { display: grid; place-items: center; padding-bottom: 8px; background: var(--teal-deep); color: var(--cream); font-weight: 700; font-size: .95rem; }
.person__text { display: grid; }
.person__name { font-size: 1rem; }
.person__title { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 899px) {
  .tree ul ul { margin-inline-start: 22px; padding-inline-start: 18px; border-inline-start: 2px solid var(--teal); }
  .tree li { padding-top: 12px; }
  .person { width: 100%; }
}
@media (min-width: 900px) {
  .tree { overflow-x: auto; padding-bottom: var(--s2); }
  .tree ul { display: flex; justify-content: center; gap: 12px; }
  .tree li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .tree ul ul { position: relative; padding-top: 24px; }
  .tree ul ul::before { content: ""; position: absolute; top: 0; inset-inline-start: 50%; height: 24px; border-inline-start: 2px solid var(--teal); transform-origin: top; }
  .tree ul ul > li { padding-top: 24px; }
  .tree ul ul > li::before, .tree ul ul > li::after { content: ""; position: absolute; top: 0; width: 50%; height: 24px; border-top: 2px solid var(--teal); transform-origin: top; }
  .tree ul ul > li::before { inset-inline-end: 50%; }
  .tree ul ul > li::after { inset-inline-start: 50%; border-inline-start: 2px solid var(--teal); }
  .tree ul ul > li:first-child::before, .tree ul ul > li:last-child::after { border-top: 0; }
  .tree ul ul > li:only-child { padding-top: 0; }
  .tree ul ul > li:only-child::before, .tree ul ul > li:only-child::after { display: none; }
  /* many people under one person: a grid under one line (as in the brand guide) */
  .tree .tree__level--wide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 2px solid var(--teal); }
  .tree .tree__level--wide::before { top: -26px; }
  .tree .tree__level--wide > li { padding-top: 0; }
  .tree .tree__level--wide > li::before, .tree .tree__level--wide > li::after { display: none; }
  .tree .tree__level--wide .person { width: 100%; height: 100%; }
}
/* lines draw from the top down, once (600 ms); reduced motion: drawn */
.tree.js-draw ul ul::before, .tree.js-draw ul ul > li::after, .tree.js-draw ul ul > li::before { transform: scaleY(0); transition: transform .6s ease-out; }
.tree.js-draw .tree__level--wide { border-top-color: transparent; transition: border-color .6s ease-out .3s; }
.tree.js-draw.is-in ul ul::before, .tree.js-draw.is-in ul ul > li::after, .tree.js-draw.is-in ul ul > li::before { transform: none; }
.tree.js-draw.is-in .tree__level--wide { border-top-color: var(--teal); }

/* ---------- languages page */
.photo-row { display: grid; gap: var(--s2); margin-top: var(--s4); }
@media (min-width: 900px) { .photo-row { grid-template-columns: repeat(3, 1fr); } }
.photo-row__item { aspect-ratio: 4 / 3; }
.faq__list { display: grid; gap: 0; max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { cursor: pointer; padding: var(--s2) 0; font-weight: 600; font-size: var(--fs-20); min-height: 48px; }
.faq__item p { margin: 0 0 var(--s2); }
.tag-draft { display: inline-block; padding: 0 8px; border: 1px solid var(--lamp); border-radius: 999px; background: #FFF4DC; color: var(--ink); font-size: .8rem; vertical-align: middle; }

/* ---------- stages */
.stage-cards { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .stage-cards { grid-template-columns: repeat(3, 1fr); } }
.stage-card__photo { aspect-ratio: 4 / 3; margin-bottom: var(--s2); }
.stage-card__title { font-size: var(--fs-25); margin: 0 0 4px; }
.stage-card__title a { color: var(--ink); }
.stage-card__grades { margin: 0 0 4px; font-weight: 600; }
.stage-card__langs { color: var(--ink-soft); }
.stage-page { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .stage-page { grid-template-columns: 6fr 5fr; } }
.h3 { font-size: var(--fs-20); margin: var(--s4) 0 var(--s1); }
.h3:first-child { margin-top: 0; }
.ages { border-collapse: collapse; width: 100%; max-width: 480px; margin-bottom: var(--s1); }
.ages th, .ages td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ages thead th { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.stage-page__photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); align-content: start; }
.stage-page__photo { aspect-ratio: 1; }
.stage-page__photo--lead { grid-column: span 2; aspect-ratio: 5 / 4; }
/* ---------- forms (public) */
.h2 { font-size: var(--fs-25); margin: 0 0 var(--s2); }
.form-section { background: var(--white); }
.form-wrap { max-width: 760px; }
.form { display: grid; gap: var(--s3); }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s3); }
.form legend { padding: 0; }
.grid2 { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field__opt { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #8FA3A1; border-radius: var(--r-field);
  background: var(--white); color: var(--ink); font: inherit; }
.field input[type=file] { padding: 8px; }
.field--error input, .field--error select, .field--error textarea { border: 2px solid var(--danger); }
.field__help { margin: 6px 0 0; font-size: .9rem; color: var(--teal-deep); }
.field__error { margin: 6px 0 0; font-size: .95rem; font-weight: 600; color: var(--danger); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.check input { width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--teal-deep); }
.check .field__error { grid-column: 2; }
.notice { padding: 14px 18px; border-radius: var(--r-field); border-inline-start: 4px solid var(--teal-deep); background: var(--teal-wash); margin: 0; }
.notice p { margin: 0 0 4px; }
.notice--ok { border-color: var(--teal-deep); }
.notice--error { border-color: var(--danger); background: #FBEAE8; }
.notice:focus { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
/* honeypot: off-screen for people, still in the form for bots */
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* admissions page */
.steps-list { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); max-width: 760px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: var(--s2); align-items: baseline; }
.steps-list li::before { content: counter(s); font: 700 var(--fs-25)/1 "Readex Pro", sans-serif; color: var(--teal-deep); }
.docs__in { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .docs__in { grid-template-columns: 1fr 1fr; } }
.checklist { margin: 0 0 var(--s3); padding: 0; list-style: none; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: baseline; }
.checklist li::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid var(--teal-deep); border-radius: 4px; transform: translateY(3px); }

/* visit slots: a plain list of days with time buttons; works on a phone and in RTL */
.slots__day { padding: 12px 0; border-top: 1px solid var(--line); }
.slots__date { font-size: 1.05rem; margin: 0 0 var(--s1); }
/* an even grid of times: 3 across on a phone; on wider screens the day sits beside its times, one row per day */
.slots__times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) {
  .slots__day { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: var(--s2); align-items: center; }
  .slots__date { margin: 0; }
  .slots__times { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .slots__times .slot { padding: 0 4px; font-size: .9rem; white-space: nowrap; }
}
.slots__times .slot { justify-content: center; width: 100%; }
.slot__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--teal-deep); border-radius: var(--r-field);
  background: var(--white); color: var(--teal-deep); font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.slot__radio:checked + .slot { background: var(--teal-deep); color: var(--cream); }
.slot__radio:focus-visible + .slot { outline: 3px solid var(--lamp); outline-offset: 2px; }
.done { text-align: center; display: grid; justify-items: center; }
.done .lede, .done p { margin-inline: auto; }
.done__check { width: 64px; height: 64px; margin-bottom: var(--s2); fill: none; stroke: var(--teal-deep); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done__check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: lns-check .25s ease-out .1s forwards; }
@keyframes lns-check { to { stroke-dashoffset: 0; } }

/* careers */
.jobs { display: grid; gap: var(--s3); }
.job { border-top: 1px solid var(--line); padding-top: var(--s2); }
.job__title { font-size: var(--fs-20); margin: 0 0 4px; }
.social--dark { margin-top: var(--s3); color: var(--teal-deep); }

/* print: the documents checklist only */
@media print {
  body { background: #fff; }
  .hdr, .ftr, .wa-float, .no-print, .form-section, .page-head .btn-row { display: none !important; }
  .checklist li::before { border-color: #000; }
}
.stage-page > *, .docs__in > *, .visit-us__in > * { min-width: 0; }

/* news */
.news-cards { display: grid; gap: var(--s4) var(--s3); }
@media (min-width: 900px) { .news-cards { grid-template-columns: repeat(3, 1fr); } }
.news-card a { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.news-card a:hover strong { text-decoration: underline; }
.news-card__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card time { color: var(--ink-soft); font-size: .9rem; }
.news-card strong { font-size: var(--fs-20); }
.post { max-width: 820px; padding-block: var(--s5); }
.post__title { font-size: var(--fs-39); line-height: 1.25; margin: 0 0 var(--s1); color: var(--teal-deep); }
.post__cover { margin: var(--s3) 0; }
.post__cover img { width: 100%; height: auto; }
.post__body ul { padding-inline-start: 1.2em; }
.preview-bar { background: var(--lamp); color: var(--ink); text-align: center; padding: 8px; margin: 0; font-weight: 600; }
/* ---------- application form (§6A.1) */
.grid3 { display: grid; gap: var(--s2); }
@media (min-width: 760px) { .grid3 { grid-template-columns: 2fr 1fr 1.4fr; } }
.radios { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radios legend { font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; }
.radios--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400 !important; }
.radio input, .check--plain input { width: 22px; height: 22px; accent-color: var(--teal-deep); }
.check--plain { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 400; }
.field__warn { margin: 6px 0 0; padding: 8px 12px; border-inline-start: 4px solid var(--lamp); background: #FFF4DC; border-radius: 4px; font-size: .95rem; }
.age-note { margin: -8px 0 0; color: var(--teal-deep); }
.age-note--warn { color: var(--ink); background: #FFF4DC; border-inline-start: 4px solid var(--lamp); padding: 8px 12px; border-radius: 4px; }
/* 200 ms step slide, mirrored in Arabic; off with reduced motion */
.slide-next { animation: lns-in-next .2s ease-out; }
.slide-back { animation: lns-in-back .2s ease-out; }
@keyframes lns-in-next { from { opacity: 0; transform: translateX(24px); } }
@keyframes lns-in-back { from { opacity: 0; transform: translateX(-24px); } }
[dir="rtl"] .slide-next { animation-name: lns-in-back; }
[dir="rtl"] .slide-back { animation-name: lns-in-next; }
.summary section { border-top: 1px solid var(--line); padding-top: var(--s2); margin-bottom: var(--s2); }
.summary dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
@media (min-width: 700px) { .summary dl { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px var(--s2); } }
.summary dt { font-size: .9rem; }
.summary dd + dt { margin-top: 8px; }
@media (min-width: 700px) { .summary dd + dt { margin-top: 0; } }
.apply-step > legend:focus { outline: none; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.linklike { background: none; border: 0; padding: 0; color: var(--teal-deep); font: inherit; font-size: .95rem; text-decoration: underline; cursor: pointer; }
.app-number { font: 700 var(--fs-31)/1.2 "Readex Pro", sans-serif; color: var(--teal-deep); letter-spacing: .04em; margin: var(--s1) 0; }
.track-status { font-size: var(--fs-25); }
.track-result .h2 { margin-top: var(--s4); }
.checklist--received li::before { background: var(--teal-deep); box-shadow: inset 0 0 0 3px var(--white); }
@media print { .apply-done .done__check { display: none; } }
.field input[type=radio], .field input[type=checkbox] { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; }

/* ---------- "coming soon" while the site is closed before launch */
.closed { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.closed__box { display: grid; justify-items: center; gap: 12px; max-width: 480px; }
.closed__name { margin: 8px 0 4px; color: var(--teal-deep); font-size: 1.75rem; line-height: 1.2; }
.closed__line { margin: 0; color: var(--ink-soft); font-size: 1.125rem; }

/* file inputs (CV upload): brand button instead of the browser's grey default */
input[type="file"] { padding: 6px; font: inherit; }
input[type="file"]::file-selector-button { margin-inline-end: 12px; min-height: 40px; padding: 0 16px; border: 1px solid var(--teal-deep);
  border-radius: var(--r-field); background: var(--teal-wash); color: var(--teal-deep); font: 600 .95rem "Readex Pro", sans-serif; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: #CFE6E2; }

/* ---------- Application form (Apple HIG pass): content in grouped cards, clear progress, large touch targets,
   errors in words, translucent action bar. Everything degrades to a plain long form without JS or :has(). */

.apply-form { gap: var(--s3); }
.apply-form .apply-step { border: 0; margin: 0; min-width: 0; display: grid; gap: var(--s3); padding: var(--s3) var(--s2) var(--s4);
  background: var(--white); border-radius: 16px; box-shadow: 0 1px 2px rgba(14, 42, 43, .05), 0 10px 30px rgba(14, 42, 43, .06); }
@media (min-width: 700px) { .apply-form .apply-step { padding: var(--s4); } }
/* float takes the legend out of the border so it sits inside the card like any heading */
.apply-step > legend { float: left; width: 100%; padding: 0; margin: 0; font-size: var(--fs-25); font-weight: 700; line-height: 1.3; color: var(--teal-deep); }
.apply-step > legend:focus { outline: none; }
.apply-step__lead { margin: -16px 0 0; color: var(--ink-soft); }
.apply-form .h3 { margin: var(--s1) 0 -8px; font-size: 1.1rem; }

.apply-form .field label, .apply-form .radios legend { font-size: .95rem; }
.apply-form .field input:not([type=radio]):not([type=checkbox]), .apply-form .field select, .apply-form .field textarea {
  min-height: 52px; padding: 12px 14px; background: #FBF8F4; border: 1px solid #8FA3A1; border-radius: 10px; font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.apply-form .field :is(input, select, textarea):focus { outline: none; border-color: var(--teal-deep); background: var(--white); box-shadow: 0 0 0 3px rgba(0, 107, 109, .2); }
.apply-form .field--error :is(input, select, textarea) { border: 1px solid var(--danger); box-shadow: 0 0 0 3px rgba(168, 50, 42, .14); }

/* choices as large tiles (boy/girl, new/transfer, yes/no, contact, how did you hear) */
.apply-form .radios:not(.radios--grid) { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.apply-form .radios--grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.apply-form .radio { position: relative; min-height: 52px; padding: 10px 14px; border: 1px solid #8FA3A1; border-radius: 12px; background: #FBF8F4;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
@supports selector(:has(*)) {
  .apply-form .radio { justify-content: center; text-align: center; font-weight: 600 !important; }
  .apply-form .radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
  .apply-form .radio:has(input:checked) { background: var(--teal-wash); border-color: var(--teal-deep); color: var(--teal-deep); box-shadow: inset 0 0 0 1px var(--teal-deep); }
  .apply-form .radio:has(input:checked)::after { content: "✓"; margin-inline-start: 6px; }
  .apply-form .radio:has(input:focus-visible) { outline: 3px solid var(--lamp); outline-offset: 2px; }
  .apply-form .field--error .radio { border-color: var(--danger); }
}

/* yes/no settings as switches (not available, WhatsApp same as mobile, guardian is not a parent) */
.apply-form .check--plain { flex-direction: row-reverse; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #FBF8F4; cursor: pointer; }
.apply-form .check--plain input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0;
  border-radius: 999px; background: #8FA3A1; cursor: pointer; transition: background-color .2s ease; }
.apply-form .check--plain input::before { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--white); box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.apply-form .check--plain input:checked { background: var(--teal-deep); }
.apply-form .check--plain input:checked::before { transform: translateX(20px); }
[dir="rtl"] .apply-form .check--plain input:checked::before { transform: translateX(-20px); }
.apply-form .check--plain input:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }

/* optional repeating rows */
.more-rows { display: grid; gap: var(--s2); }
.add-row { justify-self: start; min-height: 44px; padding: 0 18px; border: 1px dashed var(--teal-deep); border-radius: 999px; background: none;
  color: var(--teal-deep); font: 600 .95rem "Readex Pro", sans-serif; cursor: pointer; }
.add-row:hover { background: var(--teal-wash); }

/* review */
.apply-submit { min-height: 56px; font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce) { .apply-form *, .apply-form *::before, .stepper button::before { transition: none !important; } }
/* groups that show/hide together (parent details, guardian, WhatsApp) keep the card's spacing */
.apply-form :is(.when-available, .when-na, [data-when], [data-unless]):not([hidden]) { display: grid; gap: var(--s3); }.apply-form .transfer-only:not([hidden]) { display: grid; gap: var(--s3); }.age-note:empty { display: none; }


/* ---------- One-sheet application form: white sheet, light green (mint) accents (owner, 2026-10-21).
   Mint #02A5A7 is for lines, frames and selections only: on white it is 2.9:1, too light for text.
   Text and headings use mint-ink #007C7E (5:1 on white); field borders #6B9A9B (3.1:1, WCAG 1.4.11). */
:root { --mint: #02A5A7; --mint-ink: #007C7E; --mint-wash: #E8F6F6; --mint-line: #D3EAEA; }
body:has(.apply-sheet) { background: #F3FAFA; }
.apply-sheet { gap: 0; padding: 0; counter-reset: sec; background: var(--white); border: 1px solid var(--mint-line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(2, 165, 167, .06), 0 18px 44px rgba(2, 165, 167, .12); }
.apply-sheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 18px var(--s2);
  border-top: 6px solid var(--mint); border-bottom: 1px solid var(--mint-line); background: linear-gradient(180deg, var(--mint-wash), var(--white)); }
.apply-sheet__title { margin: 0; font-size: var(--fs-25); font-weight: 700; color: var(--mint-ink); }
.apply-sheet__year { margin: 0; padding: 4px 16px; border: 1.5px solid var(--mint); border-radius: 999px; background: var(--white); color: var(--mint-ink); font-weight: 700; }
.apply-sheet .apply-step { counter-increment: sec; padding: var(--s3) var(--s2) var(--s4); border-radius: 0; background: none; box-shadow: none; }
.apply-sheet .apply-step + .apply-step { border-top: 1px solid var(--mint-line); }
@media (min-width: 700px) { .apply-sheet__head { padding: 22px var(--s4); } .apply-sheet .apply-step { padding: var(--s4); } }
.apply-sheet .apply-step > legend { display: flex; align-items: center; gap: 12px; color: var(--mint-ink); }
.apply-sheet .apply-step > legend::before { content: counter(sec); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--mint); background: var(--mint-wash); color: var(--mint-ink); font-size: 1rem; line-height: 1; }
.apply-sheet .apply-step__lead { margin-top: -14px; padding-inline-start: 46px; }
.apply-sheet .field__help { color: var(--mint-ink); }

.apply-sheet .field input:not([type=radio]):not([type=checkbox]), .apply-sheet .field select, .apply-sheet .field textarea { background: var(--white); border-color: #6B9A9B; }
.apply-sheet .field :is(input, select, textarea):focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(2, 165, 167, .25); }
.apply-sheet .radio { background: var(--white); border-color: #6B9A9B; }
.apply-sheet .radio:hover { border-color: var(--mint); }
@supports selector(:has(*)) {
  .apply-sheet .radio:has(input:checked) { background: var(--mint-wash); border-color: var(--mint); color: var(--mint-ink); box-shadow: inset 0 0 0 1px var(--mint); }
  .apply-sheet .radio:has(input:focus-visible) { outline-color: var(--mint-ink); }
}
.apply-sheet .check--plain { background: #F7FBFB; border-color: var(--mint-line); }
.apply-sheet .check--plain input:checked { background: var(--mint-ink); }
.apply-sheet .add-row { border-color: var(--mint-ink); color: var(--mint-ink); }
.apply-sheet .add-row:hover { background: var(--mint-wash); }
.apply-sheet .notice:not(.notice--error) { background: var(--mint-wash); border-color: var(--mint); }
.apply-sheet .age-note { color: var(--mint-ink); }
.apply-sheet .apply-submit { min-height: 60px; font-size: 1.15rem; }
.apply-sheet .apply-fix { margin: 0; }
.apply-sheet :is(input, select, textarea, .radio) { scroll-margin: 120px 0; }

/* home: the main "Apply now" button */
.btn--mint { background: var(--mint-ink); color: var(--white); }
.btn--mint:hover { background: var(--teal-deep); }
.btn--big { min-height: 56px; padding: 0 28px; font-size: 1.1rem; }
/* date of birth: day / month / year dropdowns, day first (Egyptian order); RTL puts the day on the right */
.date-parts fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.date-parts legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.date-parts__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.15fr); gap: 8px; }
.date-parts select { width: 100%; min-height: 48px; padding: 10px 6px; border: 1px solid #8FA3A1; border-radius: var(--r-field); background: var(--white); color: var(--ink); font: inherit; }
.date-parts.field--error select { border: 2px solid var(--danger); }
.apply-sheet .date-parts select { min-height: 52px; border-radius: 10px; border-color: #6B9A9B; }
.apply-sheet .date-parts select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(2, 165, 167, .25); }
.apply-sheet .date-parts.field--error select { border: 1px solid var(--danger); box-shadow: 0 0 0 3px rgba(168, 50, 42, .14); }