.ja-signup-shell { max-width: 920px; margin: 2rem auto; color: #22404d; }
.ja-signup-card { background: rgba(255,255,255,.92); border: 1px solid rgba(34,64,77,.15); border-radius: 24px; box-shadow: 0 18px 45px rgba(34,64,77,.12); padding: clamp(1.25rem, 3vw, 2.5rem); }
.ja-signup-progress { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3rem); margin-bottom: 2rem; }
.ja-signup-progress::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #285f74; transform: translateY(-50%); }
.ja-signup-progress button { position: relative; z-index: 1; width: 100%; min-height: 2.75rem; border: 1px solid #285f74; border-radius: 0; padding: .55rem .75rem; background: #fff; color: #285f74; font-size: clamp(.72rem, 1.2vw, .95rem); font-weight: 700; line-height: 1.2; white-space: normal; }
.ja-signup-progress button.is-active { background: #285f74; color: #fff; }
.ja-signup-page { display: none; }
.ja-signup-page.is-active { display: block; }
.ja-signup-page h1, .ja-signup-page h2, .ja-signup-page h3, .ja-signup-page h4 { color: #285f74; font-weight: 700; }
.ja-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ja-signup-shell label, .ja-fieldset { display: block; margin: 1rem 0; font-weight: 600; }
.ja-signup-shell input[type="text"], .ja-signup-shell input[type="email"], .ja-signup-shell input[type="password"], .ja-signup-shell select { width: 100%; min-height: 44px; border: 1px solid rgba(34,64,77,.25); border-radius: 10px; padding: .65rem .8rem; background: #fff; color: #22404d; }
.ja-school-results { margin-top: -.5rem; border: 1px solid rgba(34,64,77,.22); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(34,64,77,.15); overflow: hidden; }
.ja-school-result { display: block; width: 100%; border: 0; border-bottom: 1px solid rgba(34,64,77,.1); padding: .7rem .85rem; background: #fff; color: #22404d; text-align: left; font-weight: 500; }
.ja-school-result:last-child { border-bottom: 0; }
.ja-school-result:hover, .ja-school-result:focus { background: rgba(40,95,116,.08); color: #285f74; }
.ja-fieldset { border: 0; padding: 0; }
.ja-fieldset legend { font-weight: 700; color: #285f74; margin-bottom: .5rem; }
.ja-fieldset label, .ja-check { font-weight: 500; }
.ja-checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
.ja-required-note { font-weight: 700; color: #285f74; }
.ja-signup-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 2rem; }
.ja-invalid { outline: 2px solid #b42318; outline-offset: 4px; border-radius: 8px; }
.ja-server-errors { margin: 0 0 1.25rem; border: 1px solid rgba(180,35,24,.3); border-radius: 10px; padding: .9rem 1rem; background: #fff4f2; color: #8a1f13; }
.ja-server-errors ul { margin: .5rem 0 0 1.25rem; padding: 0; }
.ja-hidden-charter { display: none !important; }
.ja-moodle-form-source { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
@media (max-width: 700px) { .ja-grid, .ja-checkbox-list { grid-template-columns: 1fr; } .ja-signup-actions { flex-direction: column-reverse; } .ja-signup-actions .btn { width: 100%; } }

/* Let the Moodle login page shell breathe for the JA multi-page form. */
.path-login .login-container,
.pagelayout-login .login-container {
  width: 90vw;
  max-width: 90vw;
}

.path-login .login-container .loginform,
.pagelayout-login .login-container .loginform,
.path-login .login-container .ja-signup-shell,
.pagelayout-login .login-container .ja-signup-shell {
  width: 100%;
  max-width: 100%;
}

.path-login .login-container .ja-signup-card,
.pagelayout-login .login-container .ja-signup-card {
  width: 100%;
  box-sizing: border-box;
}

/* Override Moodle/theme fixed-width login shell for the JA signup form. */
body.path-login .login-container,
body.pagelayout-login .login-container,
#page-login-signup .login-container {
  width: 90vw !important;
  max-width: 90vw !important;
}
