@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  color-scheme: light;
  --green: #00ff6e;
  --lightblue: #22d2fe;
  --blue: #8557ff;
  --bluesec: #cba8ff;
  --black: #121613;
  --white: #fff;
  --canvas: #f8f6ff;
  --lightgrey: #e4e4e4;
  --muted: #625d6d;
  --font-funnel: "Funnel Display", sans-serif;
  --font-montserrat: "Montserrat", sans-serif;
  font-family: var(--font-montserrat);
  color: var(--black);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--black); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: clamp(16px, 4vw, 48px); }
.auth-card { width: min(100%, 680px); overflow: hidden; background: var(--white); border: 1px solid var(--lightgrey); border-radius: 15px; box-shadow: 0 18px 55px rgba(68, 40, 110, .12); }
.brand-header { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 22px clamp(22px, 5vw, 42px); background: var(--white); }
.brand-logo-link { display: inline-flex; flex: 0 1 250px; }
.brand-logo { display: block; width: min(250px, 100%); aspect-ratio: 1526 / 465; background: url('https://www.cadgi.org/images/CADGI_CADGI_HORIZONTAL_COLOR_BLACK.png') left center / contain no-repeat; }
.brand-school { display: none; max-width: 250px; margin: 0; color: var(--black); font-family: var(--font-funnel); font-size: .78rem; font-weight: 650; line-height: 1.25; text-align: right; }
.brand-school span { display: block; margin-top: 3px; color: #6840d8; font-family: var(--font-montserrat); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.brand-page-content { padding: clamp(26px, 6vw, 48px); align-items: center; display: flex; flex-direction: column;}
.brand-eyebrow { display: none; margin: 0 0 10px; color: #6840d8; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand-footer { text-align: center; padding: 18px clamp(22px, 5vw, 42px); color: var(--white); font-size: .72rem; line-height: 1.45; background: linear-gradient(120deg, #00ff6e, #22d2fe); font-weight: 600;}
.brand-footer span { display: none; color: #6840d8; font-weight: 800; }
h1, h2, h3 { font-family: var(--font-funnel); color: var(--black); }
h1 { margin: 0 0 14px; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; }
h2 { margin: 28px 0 8px; font-size: 1.25rem; }
p, label, li { line-height: 1.6; }
hr { margin: 30px 0; border: 0; border-top: 1px solid var(--lightgrey); }
form { display: grid; gap: 18px; margin-top: 24px; }
fieldset { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--lightgrey); border-radius: 15px; }
legend { padding: 0 8px; font-family: var(--font-funnel); font-weight: 700; }
.auth-field { display: grid; gap: 7px; font-weight: 700; }
.auth-help { margin: -12px 0 0; color: var(--muted); font-size: .925rem; }
.auth-check { display: flex; gap: 10px; align-items: flex-start; }
input[type="text"], input[type="date"] { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #bcb8c5; border-radius: 12px; color: var(--black); background: var(--white); font: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--lightblue); outline-offset: 3px; }
button, .auth-actions a { display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; padding: 12px 22px; border: 1px solid var(--blue); border-radius: 15px; background: var(--blue); color: var(--white); font: inherit; font-weight: 750; text-align: center; text-decoration: none; cursor: pointer; transition: transform .17s ease, box-shadow .17s ease, background .17s ease; }
button:hover, .auth-actions a:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(133, 87, 255, .22); background: #00ff6e; border-color: #00e519;}
.field-why { position: relative; display: inline-flex; margin-left: 6px; font-weight: 400; }
.field-why__trigger { width: auto; min-height: 0; padding: 1px 5px; border: 0; border-radius: 4px; background: transparent; color: #6840d8; font-size: .82rem; font-weight: 750; text-decoration: underline; }
.field-why__trigger:hover { transform: none; box-shadow: none; background: transparent; color: var(--black); }
.field-why__content { position: absolute; z-index: 10; left: 0; top: calc(100% + 7px); display: none; width: min(280px, 75vw); padding: 10px 12px; border-radius: 9px; background: var(--black); color: var(--white); font-size: .82rem; font-weight: 500; line-height: 1.4; box-shadow: 0 8px 24px rgba(18, 22, 19, .2); }
.field-why:hover .field-why__content, .field-why:focus-within .field-why__content { display: block; }
button[name="decision"][value="not_me"], .auth-actions a.secondary { background: var(--white); color: var(--blue); }
.secondary:hover { background: var(--bluesec); color: var(--white); border-color: var(--blue); }
.auth-actions { display: flex; flex-direction: column; flex-wrap: wrap; gap: 12px; padding: 0; margin: 24px 0; list-style: none; border-color: var(--blue);}
.auth-actions li { display: flex; }
.auth-support { color: var(--muted); }
code { padding: 2px 6px; border-radius: 6px; background: var(--canvas); color: var(--black); }
a { color: #6840d8; font-weight: 650; text-underline-offset: 3px; }

.auth-required-details-dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--lightgrey);
  border-radius: 15px;
  color: var(--black);
  background: var(--white);
  box-shadow: 0 22px 70px rgba(18, 22, 19, .28);
}
.auth-required-details-dialog::backdrop {
  background: rgba(27, 20, 48, .68);
  backdrop-filter: blur(3px);
}
.auth-required-details-dialog__body {
  max-height: calc(100vh - 24px);
  padding: clamp(22px, 5vw, 40px);
  overflow: auto;
}
.auth-required-details-dialog__body h2,
.auth-required-details-dialog__body p {
  margin-top: 0;
}
.auth-required-details-dialog__eyebrow {
  margin-bottom: 8px;
  color: #6840d8;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-required-details-dialog__body form {
  margin-top: 22px;
}
.auth-required-details-dialog__support {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  margin: 22px 0 0;
  font-size: .9rem;
}

@media (max-width: 560px) {
  .auth-shell { place-items: start center; padding: 10px; }
  .auth-card { border-radius: 12px; }
  .brand-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .brand-logo-link { flex-basis: auto; }
  .brand-logo { max-width: 220px; }
  .brand-school { max-width: none; text-align: left; }
  .brand-school span { display: inline; margin-left: 5px; }
  .auth-actions, .auth-actions li, .auth-actions a, button { width: 100%; }
  .auth-required-details-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 12px;
  }
  .auth-required-details-dialog__body {
    max-height: calc(100vh - 12px);
    padding: 20px 18px;
  }
}
