:root {
  color-scheme: light;
  --navy: #102a43;
  --navy-2: #173f5f;
  --gold: #e6ad32;
  --ink: #243b53;
  --muted: #627d98;
  --line: #d9e2ec;
  --paper: #ffffff;
  --wash: #f2f7fb;
  --danger: #b42318;
  --success: #18794e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(230, 173, 50, .2), transparent 24rem),
    linear-gradient(160deg, #eaf2f8, #f8fbfd 55%, #edf4f8);
}
button, input { font: inherit; }
[hidden] { display: none !important; }

.shell { width: min(100% - 28px, 680px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom)); }
.hero { display: flex; align-items: center; gap: 18px; padding: 10px 8px 22px; }
.school-logo { width: 92px; height: 92px; object-fit: contain; border-radius: 20px; background: #fff; box-shadow: 0 8px 30px rgba(16,42,67,.13); }
.eyebrow { margin: 0 0 5px; color: var(--navy-2); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1; letter-spacing: -.04em; }
.subtitle { margin: 9px 0 0; color: var(--muted); line-height: 1.45; }

.card { background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.8); border-radius: 24px; box-shadow: 0 20px 55px rgba(16,42,67,.14); overflow: hidden; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.steps li { display: flex; align-items: center; justify-content: center; gap: 7px; color: #829ab1; font-size: .82rem; font-weight: 700; }
.steps span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #bcccdc; border-radius: 50%; }
.steps li.active { color: var(--navy); }
.steps li.active span { color: white; background: var(--navy); border-color: var(--navy); }

.panel { padding: 28px; }
h2 { margin: 0 0 18px; color: var(--navy); font-size: 1.3rem; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0 0 22px; padding: 0; border: 0; }
.roles label { cursor: pointer; }
.roles input { position: absolute; opacity: 0; pointer-events: none; }
.roles span { display: grid; min-height: 58px; place-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: .86rem; font-weight: 700; transition: .18s ease; }
.roles input:checked + span { color: var(--navy); border-color: var(--navy); background: #edf4f8; box-shadow: inset 0 0 0 1px var(--navy); }
.roles input:focus-visible + span { outline: 3px solid rgba(230,173,50,.45); outline-offset: 2px; }

.field { display: grid; gap: 8px; margin-top: 16px; color: var(--navy); font-size: .9rem; font-weight: 750; }
.field > input, .phone-input { width: 100%; min-height: 54px; border: 1px solid #bcccdc; border-radius: 12px; background: white; transition: .18s ease; }
.field > input { padding: 0 16px; }
.phone-input { display: flex; align-items: center; overflow: hidden; }
.phone-input b { display: grid; align-self: stretch; place-items: center; padding: 0 14px; color: var(--navy); background: var(--wash); border-right: 1px solid var(--line); }
.phone-input input { flex: 1; min-width: 0; align-self: stretch; padding: 0 14px; border: 0; outline: 0; }
.field > input:focus, .phone-input:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23,63,95,.12); outline: 0; }
.code-input { font-size: 1.35rem !important; letter-spacing: .28em; text-align: center; font-weight: 800; }
.hint, .copy { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.hint { margin: 9px 0 0; }
.copy { margin: -8px 0 18px; }

.button { width: 100%; min-height: 54px; margin-top: 22px; padding: 12px 18px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2)); box-shadow: 0 9px 20px rgba(16,42,67,.2); cursor: pointer; font-weight: 800; }
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.text-button { display: block; margin: 17px auto 0; padding: 7px; border: 0; color: var(--navy-2); background: transparent; cursor: pointer; font-weight: 750; }
.status { margin: 18px 28px 0; padding: 12px 14px; border-radius: 10px; color: var(--danger); background: #fff0ee; border: 1px solid #ffd2cc; font-size: .88rem; line-height: 1.4; }
.status.ok { color: var(--success); background: #eaf8f1; border-color: #b7e4cd; }
.success { text-align: center; }
.success-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 2px auto 17px; border-radius: 50%; color: white; background: var(--success); font-size: 2rem; font-weight: 900; }
.success p { color: var(--muted); line-height: 1.55; }
.help { margin-top: 17px; padding: 16px 18px; border: 1px solid rgba(23,63,95,.12); border-radius: 16px; color: #486581; background: rgba(255,255,255,.72); font-size: .84rem; line-height: 1.55; }
.help strong { color: var(--navy); }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 18px 5px 0; color: #829ab1; font-size: .75rem; }
footer a { color: var(--navy-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 540px) {
  .shell { width: min(100% - 18px, 680px); padding-top: 14px; }
  .hero { align-items: flex-start; gap: 13px; padding: 8px 7px 17px; }
  .school-logo { width: 72px; height: 72px; border-radius: 16px; }
  .subtitle { font-size: .88rem; }
  .card { border-radius: 19px; }
  .steps { padding: 15px 8px; }
  .steps li { font-size: .72rem; }
  .steps span { width: 22px; height: 22px; }
  .panel { padding: 23px 18px; }
  .roles { grid-template-columns: 1fr; gap: 7px; }
  .roles span { min-height: 46px; }
  .status { margin: 15px 18px 0; }
  footer { flex-direction: column; align-items: center; gap: 5px; }
}

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