/* Immersive sign-in gateway. Authentication IDs and request handling stay unchanged. */
:root {
  --gateway-card: rgba(255, 255, 255, .965);
  --gateway-card-soft: #f5f7fa;
  --gateway-card-line: #d9e1eb;
  --gateway-ink: #14243a;
  --gateway-muted: #4d6179;
  --gateway-blue: #2459d3;
  --gateway-blue-deep: #173f9f;
  --gateway-gold: #e4b548;
  --gateway-page-overlay: linear-gradient(90deg, rgba(255, 251, 242, .08), rgba(235, 245, 252, .06) 58%, rgba(222, 238, 249, .16));
  --gateway-header: rgba(255, 255, 255, .82);
  --gateway-control: rgba(255, 255, 255, .9);
  --gateway-map: rgba(255, 255, 255, .82);
  --gateway-intro-ink: #142b46;
}

html[data-theme="warm"] {
  --gateway-card: rgba(255, 252, 245, .97);
  --gateway-card-soft: #f7f2e8;
  --gateway-card-line: #e4d8c4;
  --gateway-ink: #353a39;
  --gateway-muted: #5b615b;
  --gateway-blue: #486965;
  --gateway-blue-deep: #36534f;
  --gateway-gold: #c89a3d;
  --gateway-page-overlay: linear-gradient(90deg, rgba(255, 246, 224, .18), rgba(244, 232, 208, .14) 58%, rgba(221, 209, 184, .24));
  --gateway-header: rgba(255, 250, 240, .9);
  --gateway-control: rgba(255, 253, 247, .94);
  --gateway-map: rgba(255, 250, 240, .9);
  --gateway-intro-ink: #293b3a;
}

html[data-theme="dark"] {
  --gateway-card: rgba(20, 31, 42, .97);
  --gateway-card-soft: #1c2b38;
  --gateway-card-line: #354656;
  --gateway-ink: #edf3f8;
  --gateway-muted: #c0ccd6;
  --gateway-blue: #78a5ff;
  --gateway-blue-deep: #a8c5ff;
  --gateway-gold: #e1bd70;
  --gateway-page-overlay: linear-gradient(90deg, rgba(5, 12, 21, .52), rgba(8, 18, 30, .48) 58%, rgba(11, 23, 36, .62));
  --gateway-header: rgba(17, 29, 42, .92);
  --gateway-control: rgba(29, 45, 59, .96);
  --gateway-map: rgba(17, 29, 42, .94);
  --gateway-intro-ink: #f4f7fa;
}

html { min-width: 320px; background: #0a1523; }

body {
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--gateway-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background: #edf5fb url("/auth-media/german-study-gateway-v2.webp") 44% center / cover fixed no-repeat;
}

body::before {
  display: block;
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background: var(--gateway-page-overlay);
  mask-image: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1360px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(18px, 3vh, 34px) clamp(20px, 4vw, 56px) 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1260px, 100%);
  min-height: 58px;
  height: auto;
  margin: 0 auto 22px;
  padding: 7px 8px 7px 9px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 18px;
  background: var(--gateway-header);
  box-shadow: 0 14px 38px rgba(54, 76, 94, .14), inset 0 1px rgba(255, 255, 255, .82);
  backdrop-filter: blur(15px);
}

.mark { display: flex; align-items: center; min-width: 0; gap: 11px; color: var(--gateway-intro-ink); font-size: 14px; letter-spacing: .01em; text-transform: none; }
.mark img { width: 43px; height: 43px; border-radius: 13px; background: rgba(255, 255, 255, .94); filter: none; }
.mark span { display: grid; line-height: 1.15; }
.mark span::after { content: "TELC B2 Trainer"; margin-top: 3px; color: var(--gateway-muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.language-area { display: flex; flex: 0 0 auto; align-items: center; flex-direction: row; flex-wrap: nowrap; gap: 9px; }
.language-select { position: relative; flex: 0 0 auto; }
.language-select select,
#loginTheme {
  display: block;
  flex: 0 0 auto;
  height: 40px;
  border: 1px solid rgba(55, 82, 109, .18);
  border-radius: 12px;
  color: #243b56;
  background: var(--gateway-control);
  font-size: 12px;
  font-weight: 750;
}
.language-select select { width: 154px; min-width: 154px; padding-right: 30px; }
#loginTheme { width: 98px; min-width: 98px; }
.language-select select option,
#loginTheme option { color: #17273a; background: #fff; }
.language-select::after { color: #38516d; }

.auth-grid {
  width: min(1260px, 100%);
  min-height: calc(100svh - 146px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 480px);
  grid-template-areas: "welcome auth";
  gap: clamp(46px, 7vw, 104px);
  align-items: center;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.login-introduction {
  grid-area: welcome;
  align-self: end;
  position: relative;
  isolation: isolate;
  max-width: 640px;
  min-height: 0;
  margin-bottom: clamp(38px, 8vh, 82px);
  padding: clamp(148px, 18vh, 178px) clamp(24px, 3vw, 38px) clamp(25px, 3vw, 36px);
  border: 0;
  border-radius: 0;
  color: var(--gateway-intro-ink);
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: none;
}

.login-introduction::before { display: none; }
.login-learning-visual {
  position: absolute;
  top: 0;
  left: clamp(28px, 5vw, 72px);
  width: 164px;
  height: 138px;
  perspective: 700px;
  filter: drop-shadow(0 18px 25px rgba(34, 63, 85, .2));
  pointer-events: none;
}
.login-visual-orbit {
  position: absolute;
  inset: 2px 14px 0 0;
  border: 1px solid rgba(37, 89, 211, .2);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, rgba(255, 255, 255, .98), rgba(249, 241, 225, .88) 63%, rgba(255, 255, 255, .2) 64%);
  transform: rotateX(58deg) rotateZ(-10deg);
  animation: gateway-orbit 12s linear infinite;
}
.login-visual-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f65d8;
  box-shadow: 0 0 0 5px rgba(47, 101, 216, .12);
}
.login-visual-orbit i:nth-child(1) { top: 9px; left: 44px; }
.login-visual-orbit i:nth-child(2) { right: 10px; bottom: 33px; background: #d33d4e; }
.login-visual-orbit i:nth-child(3) { bottom: 7px; left: 23px; background: #d9a72d; }
.login-visual-logo {
  position: absolute;
  top: 24px;
  left: 38px;
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  background: rgba(255, 253, 247, .95);
  box-shadow: 0 17px 34px rgba(41, 66, 84, .2), inset 0 1px #fff;
  transform: rotateY(-10deg) rotateX(6deg);
  animation: gateway-book-float 4.6s ease-in-out infinite;
}
.login-visual-logo img { width: 66px; height: 66px; object-fit: contain; }
.login-level-chip {
  position: absolute;
  display: grid;
  min-width: 38px;
  height: 28px;
  padding-inline: 9px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  color: #17314d;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 18px rgba(39, 63, 82, .16);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}
.chip-a1 { top: 7px; left: 6px; animation: gateway-chip-float 4s ease-in-out infinite; }
.chip-b2 { top: 17px; right: 0; animation: gateway-chip-float 4.5s .5s ease-in-out infinite; }
.chip-telc { right: 5px; bottom: 2px; animation: gateway-chip-float 5s 1s ease-in-out infinite; }
@keyframes gateway-book-float { 50% { translate: 0 -7px; transform: rotateY(-5deg) rotateX(3deg); } }
@keyframes gateway-chip-float { 50% { translate: 0 -5px; } }
@keyframes gateway-orbit { to { transform: rotateX(58deg) rotateZ(350deg); } }
.login-overline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: #85500d;
  background: rgba(255, 252, 245, .94);
  box-shadow: 0 7px 18px rgba(45, 66, 80, .1);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
}
.login-overline::before {
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: #c38a26;
  content: "";
}

.login-introduction h1 {
  width: min(430px, 100%);
  max-width: 430px;
  margin: 12px 0 0;
  padding: 18px 20px 10px;
  border-radius: 18px 18px 0 0;
  color: #142b46;
  background: rgba(255, 252, 245, .96);
  box-shadow: 0 18px 42px rgba(39, 62, 80, .15);
  font: 800 clamp(40px, 4vw, 60px) / 1.04 "Segoe UI", Arial, sans-serif;
  letter-spacing: -.045em;
  text-shadow: none;
}

.login-introduction > p {
  width: min(430px, 100%);
  max-width: 430px;
  margin: 0;
  padding: 0 20px 18px;
  border-radius: 0 0 18px 18px;
  color: #263f59;
  background: rgba(255, 252, 245, .96);
  box-shadow: 0 20px 42px rgba(39, 62, 80, .15);
  font-size: clamp(15px, 1.22vw, 18px);
  font-weight: 650;
  line-height: 1.62;
  text-shadow: none;
}

.login-outline {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 12px;
  background: rgba(255, 252, 245, .92);
}

.login-outline > div {
  display: block;
  min-height: 62px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.login-outline > div:first-child { padding-left: 0; }
.login-outline > div:last-child { padding-right: 0; }
.login-outline > div + div { border-left: 1px solid rgba(20, 43, 70, .14); }

.login-outline > div > span { display: none; }
.login-outline p { display: grid; gap: 4px; }
.login-outline strong { color: #17314d; font-size: 12px; font-weight: 850; }
.login-outline small { display: block; color: #405a74; font-size: 11px; font-weight: 600; line-height: 1.45; }

.auth-side { grid-area: auth; position: static; min-width: 0; padding: 0; background: transparent; }

.card {
  position: relative;
  width: 100%;
  max-height: calc(100svh - 146px);
  overflow: auto;
  padding: 29px 32px 30px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 27px;
  color: var(--gateway-ink);
  background: var(--gateway-card);
  box-shadow: 0 32px 90px rgba(1, 9, 22, .39), inset 0 1px rgba(255, 255, 255, .38);
  scrollbar-width: thin;
  scrollbar-color: #aebed0 transparent;
  backdrop-filter: blur(25px);
  animation: gateway-card-enter .58s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes gateway-card-enter {
  from {
    opacity: 1;
    translate: 0 12px;
    clip-path: inset(0 0 7% 0 round 27px);
    box-shadow: 0 20px 54px rgba(1, 9, 22, .24), inset 0 1px rgba(255, 255, 255, .38);
  }
  to {
    opacity: 1;
    translate: 0 0;
    clip-path: inset(0 0 0 0 round 27px);
    box-shadow: 0 32px 90px rgba(1, 9, 22, .39), inset 0 1px rgba(255, 255, 255, .38);
  }
}

.card::before {
  display: block;
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border: 0;
  border-radius: 27px 27px 0 0;
  background: linear-gradient(90deg, #151515 0 33%, #c52d3b 33% 66%, #e2b43f 66%);
}

.card::after,
.passport-band { display: none; }
.passport-serial { margin: 0 0 13px; padding: 0 0 10px; border-bottom: 1px solid var(--gateway-card-line); color: #967024; }
.passport-serial b { color: var(--gateway-blue-deep); }
.card-meta { margin-bottom: 11px; }
.passport-emblem { border-color: color-mix(in srgb, var(--gateway-gold) 55%, transparent); color: #86610f; background: #fff5cf; }
.secure-status { color: #277452; }
html[data-theme="dark"] .secure-status { color: #9fd8bd; }

.card h2 { color: var(--gateway-ink); font: 750 30px/1.08 "Segoe UI", Arial, sans-serif; letter-spacing: -.035em; }
.sub { min-height: 0; margin: 8px 0 22px; color: var(--gateway-muted); font-size: 14px; font-weight: 540; line-height: 1.55; }
.message { font-size: 12px; font-weight: 600; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 20px; padding: 4px; border: 1px solid var(--gateway-card-line); border-radius: 14px; background: var(--gateway-card-soft); }
.tabs button { height: 39px; border: 0; border-radius: 10px; color: var(--gateway-muted); background: transparent; font-size: 12px; font-weight: 700; }
.tabs button.active { border: 0; color: var(--gateway-ink); background: var(--gateway-card); box-shadow: 0 5px 15px rgba(20, 36, 58, .1); }

.card form { gap: 13px; }
.card label { gap: 6px; color: var(--gateway-ink); font-size: 12px; font-weight: 650; }
.card input {
  height: 49px;
  border: 1px solid var(--gateway-card-line);
  border-radius: 13px;
  padding: 0 14px;
  color: var(--gateway-ink);
  background: var(--gateway-card-soft);
  font-size: 15px;
}
.card input:focus { border-color: var(--gateway-blue); background: var(--gateway-card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gateway-blue) 14%, transparent); }
.password-toggle { top: 6px; right: 5px; color: var(--gateway-muted); }

.primary {
  height: 49px;
  margin-top: 3px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #2e69ed, #204fc0);
  box-shadow: 0 12px 25px rgba(36, 89, 211, .28), inset 0 1px rgba(255, 255, 255, .2);
  font-size: 14px;
  font-weight: 800;
  transition: translate .16s ease, box-shadow .16s ease;
}
html[data-theme="warm"] .primary { background: linear-gradient(135deg, #527773, #3f5f5b); }
html[data-theme="dark"] .primary { color: #10233a; background: linear-gradient(135deg, #8fb3ff, #6c9bf7); }
.primary:hover { translate: 0 -1px; filter: none; box-shadow: 0 15px 30px rgba(36, 89, 211, .34); }

.links { margin-top: 9px; }
.link { color: var(--gateway-blue-deep); font-size: 11px; font-weight: 750; }
.divider { margin: 15px 0 12px; color: var(--gateway-muted); }
.divider::before,
.divider::after { background: var(--gateway-card-line); }
.legal { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--gateway-card-line); color: var(--gateway-muted); font-size: 11px; font-weight: 540; line-height: 1.55; }
.gateway-two-factor-note { color: var(--gateway-muted); background: var(--gateway-card-soft); border-color: var(--gateway-card-line); }

.gateway-flow-note {
  position: relative;
  margin: 1px 0 2px;
  padding: 12px 13px 12px 39px;
  border: 1px solid #d5e5fb;
  border-radius: 12px;
  color: #3565a8;
  background: #edf5ff;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
}
.gateway-flow-note::before {
  content: "i";
  position: absolute;
  left: 13px;
  top: 13px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f7ae5;
  font-size: 11px;
  font-weight: 900;
}

#forgotForm label,
#resetForm label { position: relative; }
#forgotForm label::after,
#resetForm label::after {
  position: absolute;
  left: 15px;
  bottom: 13px;
  color: #55708f;
  font-size: 16px;
  line-height: 1;
}
#forgotForm label::after { content: "✉"; }
#resetForm label::after { content: "◇"; }
#forgotForm input,
#resetForm input { padding-left: 45px; }

.gateway-password-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: -3px 0 0; }
.gateway-password-strength i { height: 5px; border-radius: 999px; background: #dfe6ef; }
.gateway-password-strength i:first-child { background: #86b3f4; }
.gateway-password-note { margin: -6px 0 1px; color: var(--gateway-muted); font-size: 11px; font-weight: 560; line-height: 1.5; }

html[data-auth-mode="forgot"] .passport-serial,
html[data-auth-mode="forgot"] .card-meta,
html[data-auth-mode="reset"] .passport-serial,
html[data-auth-mode="reset"] .card-meta { display: none; }
html[data-auth-mode="forgot"] .card h2,
html[data-auth-mode="forgot"] .sub,
html[data-auth-mode="reset"] .card h2,
html[data-auth-mode="reset"] .sub { text-align: center; }
html[data-auth-mode="forgot"] .card h2,
html[data-auth-mode="reset"] .card h2 { margin-top: 7px; }
html[data-auth-mode="forgot"] .links,
html[data-auth-mode="reset"] .links { justify-content: center; }
html[data-auth-mode="forgot"] #backButton::before,
html[data-auth-mode="reset"] #backButton::before { content: "← "; }

.login-map-details {
  width: min(1260px, 100%);
  margin: 21px auto 0;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 16px;
  color: var(--gateway-ink);
  background: var(--gateway-map);
  box-shadow: 0 15px 38px rgba(49, 74, 96, .14);
  backdrop-filter: blur(15px);
}
.login-map-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; color: var(--gateway-ink); font-size: 13px; font-weight: 800; }
.login-map-details > summary > span:first-child { flex: 0 0 auto; white-space: nowrap; }
.login-map-hint { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; color: var(--gateway-muted); font-size: 11px; font-weight: 650; text-align: right; }
.login-map-hint b { color: #a66a10; }
.login-map-details[open] { padding: 0 12px 12px; }
.login-map-details[open] > summary { margin-inline: -12px; }

.auth-shell button:focus-visible,
.auth-shell input:focus-visible,
.auth-shell select:focus-visible,
.auth-shell summary:focus-visible { outline: 3px solid rgba(228, 181, 72, .58); outline-offset: 3px; }

@media (max-width: 1000px) {
  .auth-shell { padding-inline: 28px; }
  .auth-grid { grid-template-columns: minmax(300px, 1fr) minmax(390px, 440px); gap: 35px; }
  .login-introduction { padding: 144px 24px 24px; }
  .login-introduction h1 { font-size: clamp(38px, 5vw, 46px); }
  .login-outline > div { padding-inline: 10px; }
  .login-outline > div:first-child { padding-left: 0; }
  .login-outline > div:last-child { padding-right: 0; }
  .login-outline strong { font-size: 11px; }
  .login-outline small { font-size: 10px; }
}

@media (max-width: 740px) {
  body { background-position: 27% center; background-attachment: fixed; }
  body::before { background: var(--gateway-page-overlay); }
  .auth-shell { max-width: 520px; padding: 13px 13px 24px; }
  .topbar { min-height: 52px; margin-bottom: 13px; padding: 5px; border-radius: 15px; }
  .mark img { width: 39px; height: 39px; border-radius: 11px; }
  .mark span { font-size: 12px; }
  .mark span::after { display: none; }
  .language-area { gap: 6px; }
  #loginTheme { width: 96px; padding-inline: 9px 24px; }
  .language-select select { width: 126px; min-width: 126px; padding-left: 8px; font-size: 10px; }
  .auth-grid { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-areas: "welcome" "auth"; gap: 14px; }
  .login-introduction {
    display: block;
    min-height: 0;
    margin-bottom: 0;
    padding: 16px 18px 17px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 18px;
    background: linear-gradient(125deg, rgba(255, 253, 248, .9), rgba(250, 241, 226, .72));
    box-shadow: 0 12px 28px rgba(34, 45, 53, .13);
  }
  .login-introduction::before { display: none; }
  .login-learning-visual {
    top: 11px;
    right: 17px;
    left: auto;
    width: 78px;
    height: 78px;
    filter: drop-shadow(0 10px 16px rgba(34, 63, 85, .15));
  }
  .login-visual-orbit { inset: 2px; }
  .login-visual-logo { top: 14px; left: 14px; width: 51px; height: 51px; border-radius: 17px; }
  .login-visual-logo img { width: 38px; height: 38px; }
  .login-level-chip { display: none; }
  .login-overline { color: #85500d; font-size: 10px; }
  .login-overline::before { background: #c38a26; }
  .login-introduction h1 {
    max-width: calc(100% - 72px);
    width: auto;
    margin: 8px 0 0;
    padding: 0;
    color: #142b46;
    background: none;
    font-size: clamp(31px, 9.6vw, 39px);
  }
  .login-introduction h1 br { display: none; }
  .login-introduction > p,
  .login-outline { display: none; }
  .auth-side { padding: 0; }
  .card { max-height: none; padding: 23px 20px 25px; border-radius: 22px; }
  .card::before { border-radius: 22px 22px 0 0; }
  .card h2 { font-size: 27px; }
  .card input { height: 49px; font-size: 16px; }
  .login-map-details { margin-top: 14px; border-radius: 14px; }
  .login-map-details > summary { gap: 12px; }
  .login-map-hint { font-size: 0; }
  .login-map-hint b { font-size: 18px; }
}

@media (max-width: 370px) {
  .auth-shell { padding-inline: 9px; }
  .mark span { display: none; }
  .login-introduction { padding: 14px 15px 15px; }
  .login-introduction h1 { font-size: 29px; }
  .card { padding-inline: 16px; }
}

html[data-theme="dark"] .topbar { border-color: rgba(126, 157, 184, .28); box-shadow: 0 16px 42px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .05); }
html[data-theme="dark"] .language-select select,
html[data-theme="dark"] #loginTheme { border-color: #405569; color: #edf3f8; }
html[data-theme="dark"] .language-select select option,
html[data-theme="dark"] #loginTheme option { color: #edf3f8; background: #1c2b38; }
html[data-theme="dark"] .login-introduction { text-shadow: 0 2px 18px rgba(0, 0, 0, .42); }
html[data-theme="dark"] .login-overline,
html[data-theme="dark"] .login-outline strong { color: #f5d58e; }
html[data-theme="dark"] .login-introduction > p,
html[data-theme="dark"] .login-outline small { color: #e4ebf1; }
html[data-theme="dark"] .login-outline > div + div { border-left-color: rgba(235, 243, 248, .24); }
html[data-theme="dark"] .login-map-details { border-color: rgba(126, 157, 184, .3); box-shadow: 0 18px 48px rgba(0, 0, 0, .28); }
html[data-theme="warm"] .topbar,
html[data-theme="warm"] .login-map-details { border-color: rgba(196, 160, 96, .26); }

@media (max-width: 740px) {
  html[data-theme="dark"] .login-introduction { border-color: rgba(126, 157, 184, .28); background: linear-gradient(125deg, rgba(17, 29, 42, .95), rgba(28, 43, 56, .86)); }
}

@media (max-width: 440px) {
  .mark span { display: none; }
}

@media (max-height: 690px) and (min-width: 741px) {
  .auth-grid { align-items: start; }
  .login-introduction { align-self: start; margin-top: 70px; margin-bottom: 0; }
  .card { max-height: none; }
}

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

/* The welcome column is an animated learning object; localized copy remains available to assistive technology. */
.login-introduction {
  align-self: center;
  min-height: 430px;
  margin: 0;
  padding: 0;
}
.login-overline,
.login-introduction h1,
.login-introduction > p {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.login-learning-visual {
  inset: 50% auto auto 50%;
  width: min(390px, 92%);
  height: 390px;
  perspective: 900px;
  filter: drop-shadow(0 28px 36px rgba(34, 63, 85, .23));
  transform: translate(-50%, -50%);
}
.login-learning-visual::before {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 270px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(31, 52, 73, .25), rgba(31, 52, 73, 0) 70%);
  content: "";
  transform: translateX(-50%);
  filter: blur(6px);
}
.login-visual-pages { position: absolute; inset: 0; transform-style: preserve-3d; }
.login-visual-pages i {
  position: absolute;
  top: 112px;
  left: 50%;
  width: 218px;
  height: 154px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 31px;
  background:
    linear-gradient(90deg, transparent 49.2%, rgba(34, 67, 100, .1) 49.5% 50.5%, transparent 50.8%),
    linear-gradient(145deg, rgba(255, 255, 255, .97), rgba(239, 246, 255, .88));
  box-shadow: 0 25px 48px rgba(34, 57, 75, .18), inset 0 1px #fff;
}
.login-visual-pages i:nth-child(1) { transform: translateX(-50%) rotate(-15deg) translateZ(-40px); opacity: .78; }
.login-visual-pages i:nth-child(2) { transform: translateX(-50%) rotate(13deg) translateZ(-20px); background-color: rgba(255, 241, 212, .9); opacity: .9; }
.login-visual-pages i:nth-child(3) { transform: translateX(-50%) rotate(-2deg); }
.login-visual-orbit { inset: 43px; border-width: 2px; }
.login-visual-orbit i { width: 12px; height: 12px; }
.login-visual-orbit i:nth-child(1) { top: 12px; left: 92px; }
.login-visual-orbit i:nth-child(2) { right: 8px; bottom: 77px; }
.login-visual-orbit i:nth-child(3) { bottom: 6px; left: 53px; }
.login-visual-logo {
  top: 122px;
  left: calc(50% - 65px);
  width: 130px;
  height: 130px;
  border-radius: 38px;
}
.login-visual-logo img { width: 92px; height: 92px; }
.login-level-chip { min-width: 54px; height: 38px; padding-inline: 12px; font-size: 12px; }
.chip-a1 { top: 72px; left: 31px; }
.chip-b2 { top: 82px; right: 22px; }
.chip-telc { right: 38px; bottom: 72px; }

@media (max-width: 1000px) {
  .login-introduction { min-height: 390px; padding: 0; }
  .login-learning-visual { width: min(340px, 96%); height: 340px; }
}

@media (max-width: 740px) {
  .login-introduction {
    display: grid;
    min-height: 132px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .login-learning-visual {
    inset: 50% auto auto 50%;
    width: 188px;
    height: 126px;
    filter: drop-shadow(0 10px 16px rgba(34, 63, 85, .15));
    transform: translate(-50%, -50%);
  }
  .login-learning-visual::before { bottom: 0; width: 150px; height: 28px; }
  .login-visual-pages i { top: 35px; width: 112px; height: 78px; border-radius: 17px; }
  .login-visual-orbit { inset: 5px 36px; }
  .login-visual-orbit i { width: 7px; height: 7px; }
  .login-visual-orbit i:nth-child(1) { top: 3px; left: 35px; }
  .login-visual-orbit i:nth-child(2) { right: 2px; bottom: 24px; }
  .login-visual-orbit i:nth-child(3) { bottom: 2px; left: 18px; }
  .login-visual-logo { top: 39px; left: calc(50% - 35px); width: 70px; height: 70px; border-radius: 22px; }
  .login-visual-logo img { width: 49px; height: 49px; }
  .login-level-chip { display: grid; min-width: 34px; height: 23px; padding-inline: 7px; font-size: 8px; }
  .chip-a1 { top: 17px; left: 10px; }
  .chip-b2 { top: 17px; right: 8px; }
  .chip-telc { right: 13px; bottom: 4px; }
}

@media (max-width: 370px) {
  .login-introduction { min-height: 118px; padding: 0; }
}

/* Premium illustrated hero: a transparent 3D study diorama replaces the former CSS card stack. */
.login-introduction { min-height: 500px; }
.login-learning-visual {
  width: min(520px, 108%);
  height: auto;
  aspect-ratio: 1;
  filter: none;
}
.login-learning-visual::before {
  bottom: 5%;
  width: 76%;
  height: 15%;
  background: radial-gradient(ellipse, rgba(27, 48, 69, .28), rgba(27, 48, 69, 0) 72%);
  filter: blur(9px);
}
.login-learning-visual::after {
  position: absolute;
  inset: 7%;
  z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 34%, rgba(255, 250, 231, .92), rgba(224, 239, 255, .56) 42%, rgba(190, 221, 255, .08) 68%, transparent 72%);
  content: "";
  filter: blur(2px);
  animation: gateway-aura-breathe 6.5s ease-in-out infinite;
}
.login-diorama {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 27px rgba(27, 46, 67, .24));
  transform-origin: 50% 72%;
  animation: gateway-diorama-float 6s cubic-bezier(.45, 0, .35, 1) infinite;
}
.login-diorama-aura { position: absolute; inset: 4%; z-index: -1; animation: gateway-aura-turn 24s linear infinite; }
.login-diorama-aura i {
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(46, 99, 211, .17);
  border-radius: 50%;
  transform: rotate(-14deg) scaleY(.58);
}
.login-diorama-aura i:nth-child(2) {
  inset: 20% 8%;
  border-color: rgba(211, 61, 78, .13);
  transform: rotate(24deg) scaleY(.7);
}
.login-diorama-aura i:nth-child(3) {
  inset: 8% 23%;
  border-color: rgba(217, 167, 45, .2);
  transform: rotate(76deg) scaleY(.64);
}
.login-diorama-spark {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  background: #fff8d7;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 7px rgba(255, 205, 78, .72));
  animation: gateway-sparkle 3.8s ease-in-out infinite;
}
.sparkle-one { top: 15%; right: 13%; }
.sparkle-two { bottom: 24%; left: 5%; width: 8px; height: 8px; animation-delay: 1.4s; }
.login-diorama-effects {
  position: absolute;
  inset: 0;
  z-index: 3;
  animation: gateway-diorama-float 6s cubic-bezier(.45, 0, .35, 1) infinite;
  pointer-events: none;
}
.diorama-steam {
  position: absolute;
  top: 51%;
  left: 80.5%;
  width: 11%;
  height: 15%;
  filter: blur(.15px);
}
.diorama-steam i {
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 11px;
  height: 44px;
  border-left: 2px solid rgba(255, 255, 255, .83);
  border-radius: 50%;
  opacity: 0;
  animation: gateway-steam-rise 3.8s ease-out infinite;
}
.diorama-steam i:nth-child(2) { left: 46%; height: 53px; animation-delay: 1.1s; }
.diorama-steam i:nth-child(3) { left: 70%; height: 38px; animation-delay: 2.1s; }
.diorama-page-light {
  position: absolute;
  top: 36%;
  left: 27%;
  width: 51%;
  height: 29%;
  overflow: hidden;
  clip-path: polygon(2% 18%, 47% 0, 98% 14%, 91% 95%, 51% 81%, 7% 100%);
  opacity: .72;
}
.diorama-page-light::after {
  position: absolute;
  inset: -20% -70%;
  background: linear-gradient(110deg, transparent 39%, rgba(255, 255, 255, .68) 49%, transparent 59%);
  content: "";
  transform: translateX(-45%);
  animation: gateway-page-shine 7.2s ease-in-out infinite;
}
.diorama-headphone-pulse {
  position: absolute;
  top: 27%;
  left: 7%;
  width: 40%;
  height: 45%;
}
.diorama-headphone-pulse i {
  position: absolute;
  inset: 9%;
  border: 2px solid rgba(103, 157, 255, .44);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  opacity: 0;
  animation: gateway-headphone-wave 4.4s ease-out infinite;
}
.diorama-headphone-pulse i:nth-child(2) { animation-delay: 2.2s; }
.diorama-pen-glint {
  position: absolute;
  top: 81.7%;
  left: 57%;
  width: 31%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0 38%, rgba(255, 238, 160, .95) 48% 52%, transparent 62% 100%);
  background-size: 240% 100%;
  transform: rotate(8deg);
  filter: drop-shadow(0 0 4px rgba(255, 210, 85, .72));
  animation: gateway-pen-glint 5.4s ease-in-out infinite;
}
.diorama-tower-light {
  position: absolute;
  top: 2.7%;
  left: 77.8%;
  width: 7px;
  height: 7px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #e43f50;
  box-shadow: 0 0 0 0 rgba(228, 63, 80, .62);
  animation: gateway-tower-beacon 2.6s ease-out infinite;
}
@keyframes gateway-diorama-float {
  0%, 100% { translate: 0 0; rotate: -.4deg; }
  50% { translate: 0 -10px; rotate: .7deg; }
}
@keyframes gateway-aura-breathe { 50% { scale: 1.045; opacity: .82; } }
@keyframes gateway-aura-turn { to { rotate: 360deg; } }
@keyframes gateway-sparkle { 0%, 100% { scale: .65; opacity: .3; } 50% { scale: 1.25; opacity: 1; } }
@keyframes gateway-steam-rise {
  0% { translate: 0 8px; scale: .7; opacity: 0; }
  25% { opacity: .82; }
  70% { opacity: .36; }
  100% { translate: 7px -29px; scale: 1.18; opacity: 0; }
}
@keyframes gateway-page-shine {
  0%, 28% { transform: translateX(-48%); opacity: 0; }
  44% { opacity: .9; }
  63%, 100% { transform: translateX(48%); opacity: 0; }
}
@keyframes gateway-headphone-wave {
  0% { scale: .78; opacity: 0; }
  18% { opacity: .5; }
  75%, 100% { scale: 1.16; opacity: 0; }
}
@keyframes gateway-pen-glint {
  0%, 34% { background-position: 120% 0; opacity: 0; }
  48% { opacity: 1; }
  65%, 100% { background-position: -120% 0; opacity: 0; }
}
@keyframes gateway-tower-beacon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(228, 63, 80, .6); opacity: .7; }
  55% { box-shadow: 0 0 0 9px rgba(228, 63, 80, 0); opacity: 1; }
}

@media (max-width: 1000px) {
  .login-introduction { min-height: 420px; }
  .login-learning-visual { width: min(410px, 112%); }
}

@media (max-width: 740px) {
  .login-introduction { min-height: 168px; }
  .login-learning-visual { width: 222px; height: 168px; aspect-ratio: auto; }
  .login-learning-visual::before { bottom: 0; }
  .login-learning-visual::after { inset: 1% 14%; }
  .login-diorama { filter: drop-shadow(0 13px 15px rgba(27, 46, 67, .2)); }
  .login-diorama-aura { inset: -7% 9%; }
  .login-diorama-spark { width: 8px; height: 8px; }
}

@media (max-width: 370px) {
  .login-introduction { min-height: 148px; }
  .login-learning-visual { width: 196px; height: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-diorama,
  .login-diorama-effects,
  .login-diorama-effects *,
  .login-diorama-effects *::after,
  .login-diorama-aura,
  .login-learning-visual::after,
  .login-diorama-spark { animation: none !important; }
}

/* True layered diorama: every object is a separate transparent asset and moves on its own transform. */
.login-diorama-stage { position: absolute; inset: 0; z-index: 2; perspective: 900px; transform-style: preserve-3d; }
.diorama-layer,
.diorama-object,
.diorama-object > img { position: absolute; display: block; }
.diorama-base {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 27px rgba(27, 46, 67, .2));
  animation: gateway-base-breathe 8s ease-in-out infinite;
}
.diorama-object { transform-style: preserve-3d; will-change: transform; }
.diorama-object > img { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.diorama-book {
  z-index: 4;
  top: 35%;
  left: 20%;
  width: 65%;
  aspect-ratio: 900 / 532;
  transform-origin: 50% 82%;
  animation: gateway-book-live 5.8s ease-in-out infinite;
}
.diorama-headphones {
  z-index: 5;
  top: 27%;
  left: 5%;
  width: 39%;
  aspect-ratio: 881 / 900;
  transform-origin: 58% 72%;
  animation: gateway-headphones-live 4.9s ease-in-out infinite;
}
.diorama-cup {
  z-index: 6;
  top: 59%;
  left: 76%;
  width: 23%;
  aspect-ratio: 900 / 862;
  transform-origin: 50% 88%;
  animation: gateway-cup-live 4.4s ease-in-out infinite;
}
.diorama-pen {
  z-index: 7;
  top: 80%;
  left: 55%;
  width: 39%;
  aspect-ratio: 900 / 511;
  transform-origin: 52% 50%;
  animation: gateway-pen-live 5.6s ease-in-out infinite;
}
.diorama-cards {
  z-index: 7;
  top: 73%;
  left: 15%;
  width: 40%;
  aspect-ratio: 900 / 558;
  transform-origin: 50% 80%;
  animation: gateway-cards-live 6.2s ease-in-out infinite;
}
.diorama-cup .diorama-steam { top: -28%; left: 34%; width: 36%; height: 38%; }
.diorama-book .diorama-page-light { inset: 8% 7% 13%; width: auto; height: auto; }
.diorama-pen .diorama-pen-glint { top: 50%; left: 5%; width: 87%; }
.diorama-headphones > i {
  position: absolute;
  z-index: -1;
  inset: 12%;
  border: 2px solid rgba(93, 150, 255, .42);
  border-radius: 50%;
  opacity: 0;
  animation: gateway-headphone-wave 4s ease-out infinite;
}
.diorama-headphones > i:nth-of-type(2) { animation-delay: 2s; }
.login-diorama-stage > .diorama-tower-light { top: 2.8%; left: 77.8%; z-index: 8; }
@keyframes gateway-base-breathe {
  0%, 100% { translate: 0 2px; scale: .995; }
  50% { translate: 0 -3px; scale: 1.005; }
}
@keyframes gateway-book-live {
  0%, 100% { transform: translate3d(0, 0, 16px) rotateZ(-.6deg) rotateX(0deg); }
  48% { transform: translate3d(0, -9px, 28px) rotateZ(.7deg) rotateX(2deg); }
}
@keyframes gateway-headphones-live {
  0%, 100% { transform: translate3d(0, 0, 34px) rotateZ(-4deg); }
  50% { transform: translate3d(-4px, -12px, 46px) rotateZ(1.5deg); }
}
@keyframes gateway-cup-live {
  0%, 100% { transform: translate3d(0, 0, 48px) rotateZ(0deg); }
  40% { transform: translate3d(2px, -8px, 56px) rotateZ(1.8deg); }
  55% { transform: translate3d(-1px, -6px, 54px) rotateZ(-1deg); }
}
@keyframes gateway-pen-live {
  0%, 100% { transform: translate3d(0, 0, 58px) rotateZ(0deg); }
  50% { transform: translate3d(8px, -5px, 66px) rotateZ(-2.2deg); }
}
@keyframes gateway-cards-live {
  0%, 100% { transform: translate3d(0, 0, 62px) rotateY(0deg) rotateZ(-1deg); }
  48% { transform: translate3d(-3px, -8px, 74px) rotateY(8deg) rotateZ(1.2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .diorama-base,
  .diorama-object,
  .diorama-object *,
  .login-diorama-stage > .diorama-tower-light { animation: none !important; }
}
