/* ==========================================================================
   Admission forms — /admission/apply and /admission/status
   (app/views/pages/admission/apply.php, status.php; behaviour in
   js/pages/admission-apply.js and admission-status.js).
   Prefixes: .adm- shared by both pages, .apply- the application form,
   .status- the lookup. Mobile first; breakpoints 30 / 48 / 64 / 80rem.
   ========================================================================== */

/* Without JavaScript --------------------------------------------------------
   head.js swaps html.no-js for html.js before the page paints (and takes
   html.js away again if site.js never runs), so the notice and the form
   never show together. */
.adm-nojs {
  display: none;
}
html:not(.js) .adm-nojs {
  display: flex;
}
html:not(.js) .adm-needs-js {
  display: none;
}
.adm-nojs {
  flex-direction: column;
  gap: 1.25rem;
  max-width: 50rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid rgb(240 180 0 / 0.45);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.adm-nojs__body > * + * {
  margin-top: 0.75rem;
}
.adm-nojs__title {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  font-weight: 540;
}
.adm-nojs__body p {
  color: var(--ink-soft);
}
.adm-nojs__body a:not(.btn) {
  color: var(--navy-700);
  font-weight: 700;
}
.adm-nojs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.5rem;
}
@media (min-width: 48rem) {
  .adm-nojs {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Shared bits ------------------------------------------------------------- */
.adm-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold-700);
}

.adm-help {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 50rem;
  margin: 2.5rem auto 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-mute);
}
.adm-help .icon {
  margin-top: 0.2rem;
  color: var(--gold-600);
}
.adm-help a {
  color: var(--navy-700);
  font-weight: 700;
}
/* Phone numbers stay on one line. */
.adm-help a[href^="tel:"],
.adm-nojs a[href^="tel:"],
.apply-closed a[href^="tel:"],
.status-closed a[href^="tel:"] {
  white-space: nowrap;
}

.adm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.adm-paper {
  margin: 0;
}

.adm-spin {
  animation: spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .adm-spin {
    animation: none;
  }
}

.adm-badge {
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.68rem;
}
.adm-badge .icon {
  width: 0.9rem;
  height: 0.9rem;
}

/* Headings that receive focus from the scripts (tabindex="-1"). */
.adm-success__title:focus,
.status-record__name:focus {
  outline: none;
}

/* Pay online (built by admission-status.js) ------------------------------- */
.adm-pay {
  display: grid;
  gap: 1rem;
}
.adm-pay__fields {
  display: grid;
  gap: 1rem 1.15rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--paper);
}
@media (min-width: 48rem) {
  .adm-pay__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.adm-pay__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.adm-pay__change {
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgb(13 26 54 / 0.25);
  text-underline-offset: 0.22em;
  transition: color 0.2s;
}
.adm-pay__change:hover {
  color: var(--navy-700);
  text-decoration-color: var(--gold-500);
}
.adm-pay__error {
  color: var(--red-600);
  font-size: 0.9rem;
  font-weight: 650;
}
.adm-pay__error:empty {
  display: none;
}
.adm-pay__note {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-mute);
}
.adm-pay__hint {
  grid-column: 1 / -1;
}
.adm-pay__using {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.adm-pay__using-label {
  font-weight: 700;
  color: var(--ink);
}

/* Pay at the school office (built by admission-status.js) ------------------ */
.adm-office {
  display: flex;
  flex-direction: column;
  gap: 0.9rem 1.1rem;
  padding: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  background: var(--navy-50);
  animation: adm-rise 0.5s var(--ease-out) both;
}
@media (min-width: 30rem) {
  .adm-office {
    flex-direction: row;
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .adm-office {
    animation: none;
  }
}
.adm-office__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-700);
  box-shadow: var(--shadow-soft);
}
.adm-office__icon .icon {
  width: 1.3rem;
  height: 1.3rem;
}
.adm-office__body {
  min-width: 0;
}
.adm-office__title {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  line-height: 1.3;
}
.adm-office__title:focus {
  outline: none;
}
.adm-office__text {
  margin-top: 0.4rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.adm-office__facts {
  display: grid;
  gap: 0.85rem 1.5rem;
  margin-top: 1.1rem;
}
@media (min-width: 48rem) {
  .adm-office__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adm-office__fact--wide {
    grid-column: 1 / -1;
  }
}
.adm-office__fact dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.adm-office__fact dd {
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.adm-office__fact a {
  color: var(--navy-700);
  white-space: nowrap;
  text-decoration-color: var(--gold-500);
  text-underline-offset: 0.2em;
}
.adm-office__no {
  letter-spacing: 0.03em;
}

/* Success panel (apply page) ---------------------------------------------- */
.adm-success {
  display: grid;
  gap: 1.5rem;
  max-width: 50rem;
  margin-inline: auto;
  animation: adm-rise 0.7s var(--ease-out) both;
}
@keyframes adm-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .adm-success {
    animation: none;
  }
}
.adm-success__hero {
  --ring: var(--focus-ring-on-dark); /* navy surface: gold focus ring */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 1.6rem + 4vw, 4rem) clamp(1.25rem, 0.4rem + 4vw, 3.5rem);
  border-radius: var(--radius-2xl);
  background: radial-gradient(120% 120% at 50% 0%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: var(--white);
  text-align: center;
  box-shadow: 0 30px 80px -34px rgb(5 15 42 / 0.65);
}
.adm-success__rays {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 56rem;
  height: 56rem;
  color: var(--gold-500);
  opacity: 0.13;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(circle closest-side, black 10%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 10%, transparent 100%);
  animation: turn 160s linear infinite;
}
.adm-success__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-inline: auto;
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy-700);
  box-shadow:
    0 0 0 6px rgb(240 180 0 / 0.28),
    var(--shadow-lift);
}
.adm-success__icon .icon {
  width: 1.9rem;
  height: 1.9rem;
}
.adm-success__title {
  margin-top: 1.5rem;
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  font-weight: 520;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
}
.adm-success__title em {
  font-style: italic;
  font-weight: 480;
  color: var(--gold-400);
}
.adm-success__lede {
  max-width: 32rem;
  margin: 0.9rem auto 0;
  color: rgb(255 255 255 / 0.8);
  text-wrap: pretty;
}
.adm-success__number {
  max-width: 26rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.09);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.adm-success__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.adm-success__number-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  margin-top: 0.5rem;
}
.adm-success__no {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  user-select: all;
}
.adm-success__dob {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: rgb(255 255 255 / 0.74);
}
.adm-success__note {
  max-width: 32rem;
  margin: 1.4rem auto 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.74);
}
.adm-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.adm-copy:hover {
  background: rgb(255 255 255 / 0.2);
}
.adm-copy.is-copied {
  border-color: var(--gold-400);
  color: var(--gold-300);
}
.adm-success__next {
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.adm-success__done {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  font-weight: 540;
  line-height: 1.3;
  color: var(--ink);
}
.adm-success__done .icon {
  flex: none;
  margin-top: 0.2em;
  color: var(--green-700);
}
.adm-success__pay {
  margin-top: 1rem;
}

/* Next steps: numbered by a counter, so a hidden step leaves no gap. */
.adm-steps {
  counter-reset: adm-step;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}
/* Phones: only the title sits beside the number; the step's content uses the
   full width below it. From 48rem the whole body is indented. */
.adm-step {
  counter-increment: adm-step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0 0.85rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--sand);
}
.adm-steps > .adm-step:first-child,
.adm-steps > [hidden] + .adm-step {
  border-top: 0;
}
.adm-step:last-child {
  padding-bottom: 0;
}
.adm-step__num {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--navy-100);
  color: var(--navy-700);
  font-family: var(--font-display);
  font-weight: 600;
}
.adm-step__num::before {
  content: counter(adm-step);
}
.adm-step__body {
  display: contents;
}
.adm-step__body > :not(.adm-step__title) {
  grid-column: 1 / -1;
}
.adm-step__title {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  line-height: 1.3;
}
@media (min-width: 48rem) {
  .adm-step {
    align-items: start;
    gap: 0 1rem;
  }
  .adm-step__body {
    display: block;
    grid-column: 2;
    min-width: 0;
  }
  .adm-step__title {
    padding-top: 0.25rem;
  }
}
.adm-step__text {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.adm-step .adm-actions {
  margin-top: 1rem;
}

/* Apply: page hero ---------------------------------------------------------- */
.apply-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.8);
  box-shadow: var(--shadow-soft);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.apply-deadline .icon {
  width: 1rem;
  height: 1rem;
  color: var(--gold-600);
}
.apply-hero-link {
  align-self: center;
}

/* Apply: layout and section index ----------------------------------------- */
.apply-layout {
  display: grid;
  gap: 2.5rem;
}
.apply-index {
  display: none;
}
.apply-form {
  min-width: 0;
}
@media (min-width: 64rem) {
  .apply-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    align-items: start;
    gap: 3rem;
  }
  .apply-index {
    display: block;
    position: sticky;
    top: 6.5rem;
  }
}
@media (min-width: 80rem) {
  .apply-layout {
    gap: 3.5rem;
  }
}
.apply-index__nav {
  padding: 1.25rem 1rem;
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: rgb(255 255 255 / 0.72);
  box-shadow: var(--shadow-soft);
}
.apply-index__label {
  padding-inline: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-700);
}
.apply-index__list {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.75rem;
}
.apply-index__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 1rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.apply-index__link:hover {
  background: var(--paper);
  color: var(--ink);
}
.apply-index__badge {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 800;
  transition:
    background-color 0.3s,
    color 0.3s;
}
.apply-index__check {
  display: none;
  width: 0.85rem;
  height: 0.85rem;
  stroke-width: 3;
}
.apply-index__link.is-done .apply-index__badge {
  background: var(--gold-400);
  color: var(--navy-950);
}
.apply-index__link.is-done .apply-index__num {
  display: none;
}
.apply-index__link.is-done .apply-index__check {
  display: block;
}

/* Apply: which form ------------------------------------------------------- */
.apply-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  padding: 0.3rem;
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: 1.6rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.apply-switch__btn {
  min-height: 2.6rem;
  padding: 0.5rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    background-color 0.25s,
    color 0.25s;
}
.apply-switch__btn:hover {
  color: var(--ink);
}
.apply-switch__btn[aria-pressed="true"] {
  background: var(--navy-800);
  color: var(--white);
}

/* Apply: sections ------------------------------------------------------------ */
.apply-sections {
  display: grid;
  gap: 1.5rem;
}
.apply-section {
  min-width: 0;
  margin: 0;
  padding: clamp(1.35rem, 0.9rem + 1.8vw, 2.25rem);
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
/* A floated full-width legend behaves like an ordinary heading row. */
.apply-section__legend {
  float: left;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  width: 100%;
  padding: 0;
}
.apply-section__legend + * {
  clear: both;
}
.apply-section__num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.5rem + 0.8vw, 2.1rem);
  font-style: italic;
  font-weight: 460;
  line-height: 1;
  color: var(--gold-600);
}
.apply-section__title {
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  font-weight: 540;
  line-height: 1.2;
}
.apply-section__grid {
  padding-top: 1.5rem;
}
.apply-declaration {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}
.apply-declaration + .apply-section__grid {
  padding-top: 1.25rem;
}

/* Apply: fields --------------------------------------------------------------- */
.apply-field {
  min-width: 0;
}
.apply-field--full {
  grid-column: 1 / -1;
}
.apply-optional {
  margin-left: 0.15rem; /* plus the space before "(optional)" */
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-mute);
}
.apply-field[data-required] .apply-optional,
.apply-field:not([data-required]) .req {
  display: none;
}
.apply-field.is-invalid .field__hint {
  display: none;
}
.apply-field .field__error .icon {
  width: 0.95rem;
  height: 0.95rem;
}
.apply-field__textarea {
  min-height: 5.75rem;
}
.apply-field .select:has(> option[value=""]:checked) {
  color: var(--ink-mute);
}
.apply-field .select option {
  color: var(--ink);
}

/* Checkbox (declaration) */
.apply-check {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.apply-check:hover {
  border-color: rgb(240 180 0 / 0.6);
}
.apply-check:has(input:checked) {
  border-color: rgb(29 71 168 / 0.45);
  background: var(--navy-50);
}
.apply-check input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--navy-700);
}
.apply-field.is-invalid .apply-check {
  border-color: var(--red-600);
}

/* Radio choices (pills) */
.apply-choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.apply-choice__legend {
  margin-bottom: 0.55rem;
  padding: 0;
}
.apply-choice__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.apply-choice__option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.15rem 0.55rem 0.95rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}
.apply-choice__option:hover {
  border-color: rgb(240 180 0 / 0.6);
}
.apply-choice__option:has(input:checked) {
  border-color: rgb(29 71 168 / 0.45);
  background: var(--navy-50);
  color: var(--navy-800);
}
.apply-choice__option input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--navy-700);
}
.apply-field.is-invalid .apply-choice__option {
  border-color: rgb(196 32 47 / 0.55);
}
.apply-choice .field__hint,
.apply-choice .field__error {
  margin-top: 0.5rem;
}

/* File upload */
.apply-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 4.6rem;
  padding: 0.65rem 0.85rem 0.65rem 0.65rem;
  border: 1.5px dashed var(--field-border);
  border-radius: var(--radius);
  background: var(--white);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}
.apply-file:hover {
  border-color: rgb(240 180 0 / 0.75);
  background: var(--paper);
}
.apply-file:focus-within {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgb(29 71 168 / 0.15);
}
.apply-file.is-filled {
  border-style: solid;
  border-color: var(--field-border);
}
.apply-field.is-invalid .apply-file {
  border-color: var(--red-600);
  box-shadow: 0 0 0 4px rgb(196 32 47 / 0.1);
}
/* The site's 3px focus ring (the file input itself is invisible). An outline,
   so it shows on an invalid field too, whose red border it doesn't touch. */
.apply-file:focus-within {
  outline: 3px solid var(--ring, var(--focus-ring));
  outline-offset: 2px;
}
.apply-file__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  flex: none;
  overflow: hidden;
  border-radius: 0.8rem;
  background: var(--paper-2);
  color: var(--gold-700);
}
.apply-file__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.apply-file__text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.apply-file__name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.apply-file__meta {
  color: var(--ink-mute);
  font-size: 0.76rem;
}
.apply-file__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.apply-file__remove {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  transition:
    background-color 0.2s,
    color 0.2s;
}
.apply-file__remove:hover {
  background: var(--red-600);
  color: var(--white);
}

/* Apply: notes, summary and submit ---------------------------------------- */
.apply-skipped {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--gold-100);
  color: var(--gold-700);
  font-size: 0.9rem;
  line-height: 1.55;
}
.apply-skipped .icon {
  margin-top: 0.2rem;
}

.apply-summary {
  --ring: var(--focus-ring-on-dark); /* navy surface: gold focus ring */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 2rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 140% at 100% 0%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: var(--white);
  box-shadow: 0 30px 70px -34px rgb(5 15 42 / 0.6);
}
.apply-summary__rays {
  position: absolute;
  top: 50%;
  right: -12rem;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  color: var(--gold-500);
  opacity: 0.14;
  transform: translateY(-50%);
  -webkit-mask-image: radial-gradient(circle closest-side, black 12%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 12%, transparent 100%);
  animation: turn 140s linear infinite;
}
.apply-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.apply-summary__text {
  min-width: 0;
}
.apply-summary__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold-400);
}
.apply-summary__fee {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  font-weight: 520;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--white);
}
.apply-summary__detail {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: rgb(255 255 255 / 0.72);
}
.apply-summary__submit {
  width: 100%;
}
.apply-summary__note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.66);
}
@media (min-width: 30rem) {
  .apply-summary__submit {
    width: auto;
  }
}

/* "Fields marked with an asterisk (*) are required." — at the top of the form. */
.apply-required-note {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Date of birth outside the chosen class's age rule: a warning, not an error. */
.apply-age-warning {
  margin-top: 0.45rem;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
}

.apply-form-error:not(:empty) {
  margin-top: 1.25rem;
}
.apply-form-error__title {
  font-weight: 700;
}
.apply-form-error__list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

/* Apply: closed / unavailable ------------------------------------------------- */
.apply-closed,
.status-closed {
  max-width: 46rem;
  margin-inline: auto;
}
.apply-closed .empty-state__body a,
.status-closed .empty-state__body a,
.apply-closed__more a {
  color: var(--navy-700);
  font-weight: 700;
}
.apply-closed__actions,
.status-closed__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}
.apply-closed__more {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
}

/* Status: lookup ----------------------------------------------------------- */
.status__inner {
  max-width: 52rem;
}
.status-paid {
  margin-bottom: 1.5rem;
}
.status-paid__title {
  font-weight: 800;
}
.status-paid__actions {
  margin-top: 0.75rem;
}
/* No (valid) payment result in the link: a plain line instead of a banner. */
.status-neutral {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}
.status-neutral .icon {
  flex: none;
  margin-top: 0.2rem;
}
.status-lookup {
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.status-lookup__title {
  font-size: clamp(1.45rem, 1.25rem + 0.8vw, 1.85rem);
  font-weight: 540;
}
.status-lookup__title em {
  font-style: italic;
  font-weight: 480;
  color: var(--navy-700);
}
.status-lookup__grid {
  display: grid;
  gap: 1.15rem 1.25rem;
  margin-top: 1.4rem;
}
@media (min-width: 48rem) {
  .status-lookup__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}
.status-lookup__app {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-lookup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}
.status-lookup__error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--red-600);
  font-size: 0.9rem;
  font-weight: 650;
}
.status-lookup__error:empty {
  display: none;
}
.status-sample {
  margin-top: 1.5rem;
  scroll-margin-top: 7rem;
}
.status-sample .sample-banner {
  margin-bottom: 0;
}
.status-result:not(:empty) {
  margin-top: 1.5rem;
}

/* Status: the application record -------------------------------------------- */
.status-record {
  overflow: hidden;
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 7rem;
  animation: adm-rise 0.6s var(--ease-out) both;
}
@media (prefers-reduced-motion: reduce) {
  .status-record {
    animation: none;
  }
}
.status-record__head {
  --ring: var(--focus-ring-on-dark); /* navy surface: gold focus ring */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  background: radial-gradient(120% 160% at 100% 0%, var(--navy-700) 0%, var(--navy-900) 60%, var(--navy-950) 100%);
  color: var(--white);
}
.status-record__rays {
  position: absolute;
  top: 50%;
  right: -10rem;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  color: var(--gold-500);
  opacity: 0.14;
  transform: translateY(-50%);
  -webkit-mask-image: radial-gradient(circle closest-side, black 12%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 12%, transparent 100%);
}
.status-record__who {
  min-width: 0;
}
.status-record__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: var(--gold-400);
}
.status-record__name {
  margin-top: 0.35rem;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 540;
  color: var(--white);
  overflow-wrap: anywhere;
}
.status-record__facts {
  display: grid;
  gap: 1.1rem 2rem;
  margin: 0;
  padding: 1.5rem clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
}
@media (min-width: 48rem) {
  .status-record__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.status-record__fact dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.status-record__fact dd {
  margin: 0.3rem 0 0;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.status-record__pay,
.status-record__papers {
  padding: 1.5rem clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border-top: 1px solid var(--sand);
}
.status-record__pay-lede {
  margin-bottom: 1rem;
  color: var(--ink-soft);
}
.status-record__papers {
  background: var(--paper);
}
.status-record__papers .adm-actions {
  margin-top: 0.85rem;
}

/* Printing the status page keeps the record: no lookup form, payment
   controls, links or decorations. */
@media print {
  .adm-pay,
  .adm-help,
  .adm-nojs,
  .apply-index,
  .status-lookup,
  .status-neutral,
  .status-paid__actions,
  .status-record__pay,
  .status-record__papers,
  .status-record__rays {
    display: none !important;
  }
  .status-record {
    box-shadow: none;
    border: 1px solid var(--ink);
  }
  .status-record__head {
    background: none !important;
    color: var(--ink) !important;
  }
  .status-record__head * {
    color: var(--ink) !important;
  }
}
