/* log in / sign up / forgot / reset — premium layer matching /pricing and /schools: dark grid + glow background,
   a brand panel with a tiny Speaklit preview, the form in a white card, Google button, gold submit. */
.ap { --gold: #fbbf24; --gold-2: #f59e0b; --deep: #120b1f; --edge: rgba(255, 255, 255, .12);
  position: relative; overflow: hidden; min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: 56px; align-items: center; place-items: center stretch; padding: 36px max(24px, calc((100vw - 1080px) / 2)) 48px;
  background: linear-gradient(165deg, var(--deep) 0%, #1d1235 55%, #2a1950 100%); }
.ap::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 30%, #000 10%, transparent 72%); }
.ap::after { content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -220px; border-radius: 50%; filter: blur(90px); background: rgba(139, 92, 246, .42); pointer-events: none; }

/* brand panel */
.ap-side { position: relative; z-index: 1; color: #ece6fa; max-width: 520px; }
.ap-glow { position: absolute; width: 420px; height: 420px; left: -200px; bottom: -180px; border-radius: 50%; filter: blur(80px); background: rgba(245, 158, 11, .14); pointer-events: none; }
.ap-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.ap-brand:hover { color: #fff; }
.ap-side h2 { color: #fff; font-size: clamp(2rem, 3.3vw, 2.85rem); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 14px; }
.ap-side h2 span { background: linear-gradient(92deg, #c4b5fd 0%, #e9d5ff 35%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-side > p { color: #c9bfe0; font-size: 1.1rem; line-height: 1.6; margin: 0 0 22px; max-width: 30em; }
.ap-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; }
.ap-list li { display: flex; align-items: center; gap: 11px; color: #ece6fa; font-weight: 500; }
.ap-list li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: rgba(251, 191, 36, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fbbf24' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ap-demo { position: relative; padding: 18px 20px 20px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); max-width: 440px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.ap-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.ap-tile { display: grid; place-items: center; width: 40px; height: 34px; border-radius: 8px; background: #a78bfa; color: #1e1530; font-weight: 700; font-size: .85rem; }
.ap-tile.ghost { background: transparent; border: 1.5px dashed rgba(196, 181, 253, .5); color: #c4b5fd; }
.ap-status { margin-left: 8px; font-size: .8rem; color: #b3a7cf; }
.ap-demo p { margin: 0; color: #ece6fa; font-size: 1.02rem; line-height: 1.7; }
.ap-demo mark { background: rgba(167, 139, 250, .28); color: inherit; border-radius: 3px; }
.ap-demo mark b { background: #f59e0b; color: #1e1530; border-radius: 3px; padding: 0 3px; font-weight: 600; }

/* the form card */
.ap .auth-card { position: relative; z-index: 1; max-width: 430px; justify-self: end; padding: 32px 32px 26px; border: 0; border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 40px 90px rgba(0, 0, 0, .45), 0 0 90px rgba(139, 92, 246, .25); }
.ap .auth-card::before { content: ""; position: absolute; inset: 0; border-radius: 26px; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, rgba(251, 191, 36, .85), rgba(167, 139, 250, .45) 45%, rgba(255, 255, 255, 0) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ap .auth-card h1 { font-size: 1.75rem; letter-spacing: -.02em; margin-bottom: 4px; }
.ap .auth-card .sub { margin-bottom: 22px; font-size: .97rem; }
.ap .field { margin-bottom: 14px; }
.ap .field label, .ap .role-set legend { font-size: .9rem; margin-bottom: 6px; }
.ap .field input { padding: 11px 14px; }
.ap .field input::placeholder { color: #a99fbd; }
.ap .auth-foot { margin-top: 18px; }
.ap .btn-primary[type=submit] { background: linear-gradient(180deg, #fcd34d 0%, var(--gold-2) 100%); color: #2a1a03; border: 0; font-weight: 700; padding-top: 13px; padding-bottom: 13px; margin-top: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 26px rgba(245, 158, 11, .32); }
.ap .btn-primary[type=submit]:hover { color: #2a1a03; filter: brightness(1.05); }
.ap .field input { border-radius: 12px; }

/* Google */
.ap-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 11px 18px; border-radius: 12px; background: #fff; color: #1f1f1f;
  border: 1.5px solid #dadce0; font-weight: 600; font-size: 1rem; text-decoration: none; transition: background .15s, box-shadow .15s; }
.ap-google:hover { background: #f8f9fa; color: #1f1f1f; box-shadow: 0 2px 10px rgba(36, 27, 51, .12); }
.ap-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; color: var(--ink-soft); font-size: .88rem; }
.ap-or::before, .ap-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#signupForm .role-set { margin-bottom: 16px; }

/* sign up: kicker, one-row role picker, legal line */
.ap-kicker { display: inline-block; margin: 0 0 18px; padding: 6px 13px; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #fde68a; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3); }
.roles-row { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; border-radius: 13px; background: #f4f0fb; }
.roles-row label { position: relative; justify-content: center; padding: 9px 4px; border: 0; border-radius: 9px; font-size: .9rem; font-weight: 600; color: #5b4f73;
  transition: background .15s, color .15s, box-shadow .15s; }
.roles-row label:hover { color: var(--violet-strong); }
.roles-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.roles-row label:has(input:checked) { background: #fff; color: var(--violet-strong); box-shadow: 0 1px 2px rgba(36, 27, 51, .1), 0 4px 12px rgba(109, 40, 217, .14); }
.roles-row label:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 1px; }
.ap-legal { margin: 12px 0 0; text-align: center; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.ap-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* sign up: "What happens next" steps (in place of the preview) */
.ap-next { max-width: 440px; padding: 18px 20px 8px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--edge);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3); backdrop-filter: blur(6px); }
.ap-next-title { margin: 0 0 12px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b3a7cf; }
.ap-next ol { list-style: none; margin: 0; padding: 0; }
.ap-next li { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.ap-next li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 1.5px; background: rgba(196, 181, 253, .22); }
.ap-next li > span { flex: none; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; font-size: .85rem; font-weight: 700;
  color: #c4b5fd; border: 1.5px solid rgba(196, 181, 253, .4); }
.ap-next li.now > span { color: #2a1a03; border: 0; background: linear-gradient(180deg, #fcd34d, var(--gold-2)); box-shadow: 0 0 0 4px rgba(251, 191, 36, .15); }
.ap-next b { display: block; color: #fff; font-weight: 600; line-height: 1.3; padding-top: 4px; }
.ap-next small { display: block; color: #b3a7cf; font-size: .88rem; margin-top: 2px; }

@media (max-width: 960px) {
  .ap { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px 16px 48px; place-items: start center; align-content: start; }
  .ap-side { text-align: center; }
  .ap-side h2 { margin-top: 18px; font-size: 2rem; }
  .ap-side > p, .ap-list, .ap-demo, .ap-next { display: none; }
  .ap-side h2 { margin-top: 0; }
  .ap-kicker { margin-bottom: 12px; }
  .ap .auth-card { justify-self: center; }
}
@media (max-width: 640px) { .ap .auth-card { padding: 26px 18px 22px; } }
@media (max-width: 440px) { .roles-row label { font-size: .84rem; padding: 9px 2px; } }
@media (max-width: 350px) { .roles-row { grid-template-columns: repeat(2, 1fr); } }
/* short laptop screens: keep the whole form above the fold */
@media (min-width: 961px) and (max-height: 820px) {
  .ap { padding-top: 20px; padding-bottom: 24px; }
  .ap .auth-card { padding: 22px 28px 18px; }
  .ap .auth-card h1 { font-size: 1.55rem; }
  .ap .auth-card .sub { margin-bottom: 14px; }
  .ap .field { margin-bottom: 10px; }
  .ap .field input { padding: 9px 13px; }
  .ap-google { padding: 9px 18px; }
  .ap-or { margin: 11px 0 10px; }
  #signupForm .role-set { margin-bottom: 12px; }
  .roles-row label { padding: 7px 4px; }
  .ap .btn-primary[type=submit] { padding-top: 11px; padding-bottom: 11px; }
  .ap-legal { margin-top: 8px; }
  .ap .auth-foot { margin-top: 10px; }
  .ap-side h2 { font-size: 2.3rem; }
  .ap-list { margin-bottom: 20px; }
}

/* ---------- forgot / change password ---------- */
.ap .forgot-link { display: flex; justify-content: flex-end; gap: 8px; color: #b3a8c8; }
.fg-note { margin: 16px 0 0; padding: 11px 14px; border-radius: 12px; background: #f6f2fd; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.fg-note b { color: var(--ink); font-weight: 600; }
.fg-sent { text-align: center; }
.fg-sent .sub b { color: var(--ink); overflow-wrap: anywhere; }
.fg-icon { width: 50px; height: 50px; margin: 0 auto 8px; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 10px 26px rgba(124, 58, 237, .35); }
.fg-spam { display: grid; gap: 4px; text-align: left; margin: 0 0 14px; padding: 12px 15px; border-radius: 14px; background: #fff7e6; border: 1px solid #f5d79e; color: #6b4a06; font-size: .9rem; line-height: 1.5; }
.fg-spam > b { font-size: .95rem; color: #5a3d00; }
.fg-inbox { display: grid; gap: 8px; margin-bottom: 12px; }
.fg-inbox:empty { display: none; }
.fg-again { margin: 4px 0 0; color: #b3a8c8; font-size: .92rem; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--violet-strong); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: #b3a8c8; cursor: default; text-decoration: none; }
.fg-sent .sub { margin-bottom: 14px; }
.fg-icon svg { width: 26px; height: 26px; }

/* step 2 of sign-up / new-device log-in: the 6-digit code from the email */
.code-input { text-align: center; font-size: 1.9rem; font-weight: 700; letter-spacing: .45em; padding: 12px 10px 12px calc(10px + .45em) !important; font-variant-numeric: tabular-nums; }
.code-input::placeholder { color: #d9d1e8; letter-spacing: .45em; }
#codeForm { margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
