.auth-page {
  --auth-unit: clamp(.88px, .11765vw, 2px);
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 5% 8%, #58400e88, transparent 15%),
    radial-gradient(ellipse at 94% 73%, #68460985, transparent 18%),
    radial-gradient(ellipse at 48% 52%, #121b2a, #0a0e17 76%);
}

.auth-shell {
  isolation: isolate;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: clip;
  min-height: 100svh;
  max-width: none;
  padding: calc(19 * var(--auth-unit)) 0 0;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.auth-shell::before {
  width: min(19vw, 325px);
  height: min(14vw, 240px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 118' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='y'%3E%3Cstop stop-color='%23ffc000'/%3E%3Cstop offset='.56' stop-color='%23ffed65'/%3E%3Cstop offset='1' stop-color='%23ffca00'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23y)' d='M0 0h125Q56 20 0 62Z'/%3E%3Cpath fill='none' stroke='%23ffcc00' stroke-width='1.8' d='M0 116Q54 40 158 0'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.auth-shell::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 244 118' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='y'%3E%3Cstop stop-color='%23ffc000'/%3E%3Cstop offset='.74' stop-color='%23ffed65'/%3E%3Cstop offset='1' stop-color='%23ffbd00'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23y)' d='M48 118q131-26 196-65v65Z'/%3E%3Cpath fill='none' stroke='%23ffcc00' stroke-width='1.8' d='M2 118Q170 88 244 6'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  inset: auto 0 calc(52 * var(--auth-unit)) auto;
  width: min(29vw, 493px);
  height: min(14vw, 236px);
}

.auth-shell > .brand {
  width: max-content;
  justify-content: center;
  gap: calc(14 * var(--auth-unit));
  margin: 0 0 calc(27 * var(--auth-unit));
}

.auth-shell .symbol {
  width: calc(60 * var(--auth-unit));
  height: calc(62 * var(--auth-unit));
  background-position: calc(-28 * var(--auth-unit)) calc(-15.3 * var(--auth-unit));
  background-size: calc(288 * var(--auth-unit)) calc(96 * var(--auth-unit));
}

.auth-shell .brand strong {
  font-size: clamp(23px, calc(30 * var(--auth-unit)), 60px);
  letter-spacing: -.025em;
  line-height: 1.1;
}

.auth-shell .brand small {
  margin-top: calc(4 * var(--auth-unit));
  padding: calc(3 * var(--auth-unit)) 0 calc(3 * var(--auth-unit)) calc(10 * var(--auth-unit));
  border-left: 1px solid #ffd000;
  color: #f1f2f5;
  font-size: clamp(13px, calc(15 * var(--auth-unit)), 30px);
}

.auth-shell .panel {
  width: min(calc(100% - 36px), calc(364 * var(--auth-unit)));
  margin: 0;
  padding: calc(14 * var(--auth-unit)) calc(26 * var(--auth-unit)) calc(16 * var(--auth-unit));
  border: 1px solid #4b515d;
  border-top: 3px solid #ffd000;
  border-radius: calc(16 * var(--auth-unit));
  background:
    radial-gradient(ellipse 45% 16px at 50% -2px, #bd880659, transparent),
    linear-gradient(160deg, #191e26, #10151d 65%);
  box-shadow: 0 15px 40px #03060c80;
}

.auth-shell h1 {
  margin: 0 0 calc(12 * var(--auth-unit)) calc(5 * var(--auth-unit));
  font-size: clamp(25px, calc(28 * var(--auth-unit)), 56px);
  letter-spacing: -.025em;
}

.auth-shell [hidden], #auth-description:empty, #auth-error:empty { display: none !important; }
.auth-input { position: relative; margin-bottom: calc(10 * var(--auth-unit)); }
.auth-shell input:not([type=checkbox]) {
  min-height: max(44px, calc(33 * var(--auth-unit)));
  background: #181d25;
  border-color: #555e6a;
  font-size: max(16px, calc(13 * var(--auth-unit)));
}

.auth-shell .auth-input input { padding: 7px calc(41 * var(--auth-unit)); }
.auth-shell input::placeholder { color: #c5ccd6; }
.auth-toggle {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: max(44px, calc(35 * var(--auth-unit)));
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: #fff;
}
.auth-toggle svg { width: max(19px, calc(18 * var(--auth-unit))); }
.auth-toggle[aria-pressed=true] { color: var(--yellow); }

.auth-shell form > button {
  width: 100%;
  min-height: max(44px, calc(33 * var(--auth-unit)));
  margin-top: calc(6 * var(--auth-unit));
  background: linear-gradient(#ffe54a, #ffc400 75%);
  font-size: max(16px, calc(14 * var(--auth-unit)));
}

#login-links { text-align: center; margin: calc(12 * var(--auth-unit)) 0 0; }
#login-links a { text-decoration: underline; color: #ffda29; }
.auth-first-access { margin: 7px 0 12px; max-width: min(80vw, 430px); color: #b1bac8; text-align: center; font-size: 12px; }
.auth-first-access p { margin: 5px 0 0; }
.auth-first-access summary { cursor: pointer; margin: auto; width: max-content; }
.auth-first-access summary:focus-visible { outline: 2px solid white; outline-offset: 3px; }

.auth-shell footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin: auto 0 0;
  gap: 8px 0;
  padding: calc(13 * var(--auth-unit)) 12px calc(18 * var(--auth-unit));
  background: #0b0f18;
  border-top: 1px solid #777b85;
  color: #f0f1f5;
  font-size: max(11px, calc(10 * var(--auth-unit)));
}
.auth-shell footer > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 clamp(8px, 1.1vw, 22px);
}
.auth-shell footer svg { width: 1.45em; height: 1.45em; flex: none; }
.auth-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#auth-codes { font: 15px/1.6 ui-monospace, monospace; resize: vertical; }

@media (min-width: 740px) {
  .auth-shell footer > span + span { border-left: 1px solid #f0c20c; }
}
@media (max-width: 739px) {
  .auth-shell::before { width: 105px; height: 77px; }
  .auth-shell::after { width: 122px; height: 60px; bottom: 85px; }
  .auth-shell > .brand { margin-top: 12px; }
  .auth-shell footer > span:last-child { justify-content: center; flex-basis: 100%; }
}
.auth-input::before{content:"";position:absolute;left:15px;top:50%;width:18px;height:18px;transform:translateY(-50%);background-size:contain;background-repeat:no-repeat;pointer-events:none}
.email-icon::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a9b6' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E")}
.lock-icon::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a9b6' stroke-width='1.6'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")}
