:root {
  --navy: #071b33;
  --navy-2: #0d2947;
  --blue: #00a7d8;
  --lime: #b7d532;
  --ink: #172534;
  --muted: #657583;
  --line: #d7e1e8;
  --page: #edf3f6;
  --surface: #ffffff;
  --danger: #b42318;
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--page); line-height: 1.5; }
button, input { font: inherit; }
input:focus-visible, button:focus-visible, .consent-text:focus-visible { outline: 3px solid rgba(0, 167, 216, .3); outline-offset: 2px; }

.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(18px, 5vw, 64px); color: white; background: linear-gradient(90deg, var(--lime) 0 7px, var(--navy) 7px); box-shadow: 0 8px 25px rgba(7,27,51,.18); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { letter-spacing: .04em; }
.brand small { margin-top: 4px; color: #adbdc9; font-size: .76rem; }
.brand-mark { display: grid; width: 43px; height: 43px; place-items: center; color: var(--navy); background: linear-gradient(135deg, var(--lime) 0 48%, var(--blue) 48%); border-radius: 12px 12px 4px 12px; font-weight: 900; letter-spacing: -.06em; }
.secure-chip { padding: 6px 10px; color: var(--lime); background: rgba(183,213,50,.08); border: 1px solid rgba(183,213,50,.28); border-radius: 999px; font-size: .74rem; font-weight: 800; text-transform: uppercase; }

.auth-shell { width: min(830px, calc(100% - 28px)); margin: 34px auto 70px; }
.form-intro, .form-card, .state-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 15px 45px rgba(7,27,51,.07); }
.form-intro { padding: clamp(24px, 5vw, 42px); background: radial-gradient(circle at 95% 0, rgba(0,167,216,.12), transparent 34%), white; }
.eyebrow { margin: 0 0 5px; color: #007fa6; font-size: .75rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.form-intro h1, .state-card h1 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.08; letter-spacing: -.04em; }
.form-intro > p:not(.eyebrow) { max-width: 650px; margin: 14px 0 0; color: var(--muted); }
.event-meta { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1px; margin: 26px 0 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.event-meta div { padding: 12px 15px; background: #f7f9fa; }
.event-meta dt { color: var(--muted); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.event-meta dd { margin: 3px 0 0; color: var(--navy); font-weight: 800; }

.authorization-form { display: grid; gap: 16px; margin-top: 18px; }
.form-card { padding: clamp(20px, 4vw, 30px); }
.section-title { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.section-title > span { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; color: var(--navy); background: var(--lime); border-radius: 9px; font-weight: 900; }
.section-title h2 { margin: 0; color: var(--navy); font-size: 1.16rem; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: .85rem; font-weight: 750; }
.field-full { grid-column: 1 / -1; }
.field input { width: 100%; min-height: 47px; padding: 10px 12px; color: var(--ink); background: #f3f8df; border: 1px solid #cbd7b4; border-radius: 9px; }
.field input:focus { background: white; border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(0,167,216,.12); }
.guardian-card { border-color: #b9dce7; background: #f8fcfd; }
.consent-card { border-top: 5px solid var(--blue); }
.consent-text { max-height: 310px; overflow: auto; padding: 18px; color: #40505e; background: #f5f8fa; border: 1px solid var(--line); border-radius: 11px; font-size: .86rem; }
.consent-text p { margin: 0 0 13px; }
.consent-text p:last-child { margin-bottom: 0; }
.check-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding: 14px; background: #f8fbec; border: 1px solid #d7e4a4; border-radius: 10px; cursor: pointer; font-size: .88rem; font-weight: 700; }
.check-row input { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 1px; accent-color: var(--navy); }
.signature-note { margin: 10px 0 0; color: var(--muted); font-size: .78rem; }
.submit-area { display: flex; flex-direction: column; align-items: center; padding: 8px 0 0; text-align: center; }
.submit-area p { min-height: 24px; margin: 0 0 8px; color: var(--danger); font-size: .85rem; font-weight: 700; }
.submit-button { width: min(440px, 100%); min-height: 54px; padding: 0 22px; color: var(--navy); background: var(--lime); border: 1px solid #a4c31e; border-radius: 12px; font-weight: 900; cursor: pointer; box-shadow: 0 12px 28px rgba(183,213,50,.24); }
.submit-button:hover { background: #c4df49; transform: translateY(-1px); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-area small { margin-top: 10px; color: var(--muted); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.state-card { padding: 42px; text-align: center; }
.state-card > p { color: var(--muted); }
.loader { display: block; width: 38px; height: 38px; margin: 0 auto 14px; border: 4px solid #d7e5eb; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 17px; place-items: center; color: white; background: var(--danger); border-radius: 50%; font-size: 1.5rem; font-weight: 900; }
.state-icon.is-success { background: #2b8a57; }
.success-card { padding: clamp(30px, 6vw, 55px); }
.confirmation-box { display: grid; gap: 0; margin: 28px auto 18px; overflow: hidden; text-align: left; border: 1px solid var(--line); border-radius: 12px; }
.confirmation-box div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.confirmation-box div:last-child { border-bottom: 0; }
.confirmation-box dt { color: var(--muted); font-size: .78rem; font-weight: 800; }
.confirmation-box dd { margin: 0; color: var(--navy); font-weight: 850; }
.screenshot-hint { font-size: .82rem; }
.auth-footer { padding: 22px; color: #72818d; text-align: center; font-size: .75rem; }

[hidden] { display: none !important; }
@media (max-width: 620px) {
  .auth-topbar { padding: 13px 16px; }
  .secure-chip { display: none; }
  .auth-shell { margin-top: 18px; }
  .form-grid, .event-meta { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .confirmation-box div { grid-template-columns: 1fr; gap: 2px; }
  .state-card { padding: 28px 20px; }
}
