.page {
  --page: #f4efff;
  --page-spot: rgba(154, 91, 245, .16);
  --ink: #241a33;
  --muted: #655879;
  --card: #fffaf2;
  --field: #fff;
  --purple: #9a5bf5;
  --purple-dark: #6f34cf;
  --yellow: #ffd44d;
  --pink: #ff7ab8;
  --green: #7ee787;
  --line: #241a33;
  --soft-line: rgba(36, 26, 51, .17);
  --shadow: #241a33;
  --focus: rgba(154, 91, 245, .28);
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, var(--page-spot) 0 9%, transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(255, 122, 184, .12) 0 8%, transparent 25%),
    var(--page);
  font-family: Nunito, sans-serif;
  overflow-x: hidden;
}

.page *, .page *::before, .page *::after { box-sizing: border-box; }
.page button, .page input { font: inherit; }

.shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  padding: 26px clamp(20px, 4vw, 64px) 22px;
  isolation: isolate;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  letter-spacing: .2px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(2px 2px 0 rgba(36, 26, 51, .16));
}

.stage { display: grid; place-items: center; padding: clamp(34px, 6vh, 70px) 0; }

.card {
  position: relative;
  display: grid;
  width: min(100%, 1000px);
  grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 13px 13px 0 var(--shadow);
  transform: rotate(-.25deg);
}

.intro {
  position: relative;
  display: flex;
  min-height: 540px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  color: #fff;
  background: #2d1f50;
  border-right: 4px solid var(--line);
}

.intro::before, .intro::after {
  position: absolute;
  content: '';
  border: 3px solid var(--line);
  border-radius: 999px;
  transform: rotate(-12deg);
}

.intro::before { width: 210px; height: 210px; top: -86px; right: -74px; background: var(--purple); }
.intro::after { width: 126px; height: 126px; right: -32px; bottom: -42px; background: var(--pink); }

.eyebrow, .accessPill {
  position: relative;
  z-index: 1;
  width: fit-content;
  border: 3px solid var(--line);
  border-radius: 999px;
  color: #241a33;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  line-height: 1;
  box-shadow: 4px 4px 0 var(--line);
}

.eyebrow { padding: 10px 17px; background: var(--yellow); font-size: 13px; letter-spacing: 1.1px; transform: rotate(-2deg); }
.accessPill { padding: 10px 16px; background: var(--green); font-size: 13px; transform: rotate(1.5deg); }
.introCopy { position: relative; z-index: 1; margin: auto 0; padding: 48px 0; }

.intro h1 {
  max-width: 390px;
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(52px, 6vw, 78px);
  font-weight: 800;
  letter-spacing: -2.7px;
  line-height: .88;
}

.intro h1 span { display: inline-block; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink); transform: rotate(-1.5deg); }
.intro p { max-width: 360px; margin: 24px 0 0; color: #d8ccee; font-size: 16px; font-weight: 700; line-height: 1.55; }
.formPanel { display: flex; min-height: 540px; align-items: center; padding: clamp(38px, 6vw, 70px); }
.form { width: 100%; max-width: 430px; margin: auto; }
.form h2 { margin: 0; font-family: 'Baloo 2', sans-serif; font-size: clamp(35px, 4vw, 47px); font-weight: 800; letter-spacing: -1px; line-height: 1; }
.formLede { margin: 12px 0 32px; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.5; }
.field { margin-top: 20px; }
.field label { display: block; margin: 0 0 8px 2px; font-family: 'Baloo 2', sans-serif; font-size: 16px; font-weight: 800; }
.inputWrap { position: relative; }

.inputWrap input {
  width: 100%;
  min-height: 56px;
  border: 3px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--field);
  padding: 13px 16px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--soft-line);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.inputWrap input::placeholder { color: #9b90aa; font-weight: 700; }
.inputWrap input:focus { border-color: var(--purple); box-shadow: 0 0 0 5px var(--focus), 4px 4px 0 var(--line); transform: translate(-1px, -1px); }
.inputWrap input[type='password'], .inputWrap input[type='text'] { padding-right: 80px; }

.showPassword {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 62px;
  border: 0;
  border-radius: 9px;
  color: var(--purple-dark);
  background: transparent;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.showPassword:hover { background: rgba(154, 91, 245, .12); }
.showPassword:focus-visible, .loginButton:focus-visible, .brand:focus-visible, .helpLink:focus-visible { outline: 4px solid var(--focus); outline-offset: 4px; }
.message { min-height: 22px; margin: 16px 2px 0; color: #8c315f; font-size: 13px; font-weight: 800; line-height: 1.4; }

.loginButton {
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  border: 3px solid var(--line);
  border-radius: 14px;
  color: #241a33;
  background: var(--yellow);
  padding: 12px 20px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--line);
  transition: transform .14s ease, box-shadow .14s ease;
}

.loginButton:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 9px 9px 0 var(--line); }
.loginButton:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }

.securityNote {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 30px 0 0;
  border-top: 2px dashed var(--soft-line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.securityNote img { width: 25px; height: 25px; flex: 0 0 auto; object-fit: contain; }
.helpLink { color: var(--purple-dark); font-weight: 800; text-underline-offset: 3px; }
.footer { display: flex; justify-content: center; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; letter-spacing: .2px; }

.spark { position: fixed; z-index: -1; color: var(--purple); font-family: 'Baloo 2', sans-serif; font-size: clamp(36px, 6vw, 70px); font-weight: 800; line-height: 1; text-shadow: 3px 3px 0 rgba(36, 26, 51, .13); pointer-events: none; }
.sparkOne { top: 18%; right: 4vw; transform: rotate(17deg); }
.sparkTwo { bottom: 12%; left: 3vw; color: var(--pink); font-size: clamp(26px, 4vw, 50px); transform: rotate(-13deg); }

@media (prefers-color-scheme: dark) {
  .page {
    --page: #201636;
    --page-spot: rgba(154, 91, 245, .20);
    --ink: #fff8ee;
    --muted: #c9bfe0;
    --card: #2b2044;
    --field: #1b142c;
    --line: #0d0a14;
    --soft-line: rgba(255, 255, 255, .18);
    --shadow: #0d0a14;
    --focus: rgba(201, 167, 255, .30);
  }
  .brand img, .securityNote img { filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .35)); }
  .showPassword, .helpLink { color: #c9a7ff; }
  .message { color: #ff9bc8; }
}

@media (max-width: 790px) {
  .shell { padding: 20px 16px 18px; }
  .stage { padding: 28px 0 36px; }
  .card { grid-template-columns: 1fr; border-radius: 24px; box-shadow: 9px 9px 0 var(--shadow); transform: none; }
  .intro { min-height: 0; border-right: 0; border-bottom: 4px solid var(--line); padding: 30px; }
  .introCopy { padding: 42px 0 34px; }
  .intro h1 { max-width: 460px; font-size: clamp(48px, 14vw, 68px); }
  .formPanel { min-height: 0; padding: 38px 26px 42px; }
  .spark { display: none; }
}

@media (max-width: 430px) {
  .brand img { width: 36px; height: 36px; }
  .intro, .formPanel { padding-left: 22px; padding-right: 22px; }
  .intro p { font-size: 14px; }
}

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

/* The login page has no shared stylesheet, so the body reset lives here. */
body { margin: 0; }
