

:root { --auth-accent: #5cc0ff; --auth-ink: #06121c; }

html.locked { background: var(--sheet); }
html.locked .dock, html.locked .me { display: none; }

body.auth {
  min-height: 100svh;
  background: var(--sheet);
}
body.auth::before { display: none; } 


.auth-stage {
  position: relative;
  min-height: 100svh;
  max-width: none;
  margin: 0;
  padding: 32px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  
  --accent: var(--auth-accent);
  --accent-ink: var(--auth-ink);
}

.auth-shell {
  width: 100%;
  max-width: 620px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-shell { max-width: 400px; }
.login-shell .auth-brand { gap: 10px; margin-bottom: 24px; }
.login-shell .auth-brand img { width: 30px; }
.login-shell .auth-brand span { font-size: 28px; }


.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
  color: var(--ink);
  transition: opacity .2s;
}
.auth-brand:hover { opacity: .82; }
.auth-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 10px; }
.auth-brand img { width: 36px; height: auto; }
.auth-brand span { font: 600 32px/1 Onest, sans-serif; letter-spacing: -.05em; }


.auth-card {
  position: relative;
  width: 100%;
  padding: 24px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--ring);
  overflow: hidden;
}


.login.auth-card {
  width: 372px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.login-title {
  margin: 0;
  font: 600 24px/1.25 Onest, sans-serif;
  letter-spacing: -.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.login-sub {
  margin: 6px 0 22px;
  font: 400 13.5px/1.45 Onest, sans-serif;
  color: var(--ink3);
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 16px;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.auth-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 600 24px/1.25 Onest, sans-serif;
  letter-spacing: -.015em;
  color: var(--ink);
}
.auth-bar {
  flex: none;
  width: 5px;
  height: 24px;
  border-radius: 3px;
  background: var(--accent);
}


.auth-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--auth-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25);
  transition: filter .2s, transform .12s;
}
.auth-icon:hover { filter: brightness(1.08); }
.auth-icon:active { filter: brightness(.92); transform: scale(.98); }
.auth-icon:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.auth-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-rule {
  height: 1px;
  margin: 22px 0 24px;
  background: var(--ring);
}


.auth-small {
  font: 500 13px/1.2 Onest, sans-serif;
  color: var(--ink3);
  transition: color .15s;
}
.auth-small:hover { color: var(--accent); }
.auth-small:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.field.big {
  height: 44px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--well);
  box-shadow: inset 0 2px 5px rgb(0 0 0 / .25), inset 0 0 0 1px rgb(255 255 255 / .06);
}
.field.big:focus-within {
  box-shadow: inset 0 2px 5px rgb(0 0 0 / .25), inset 0 0 0 1px var(--accent);
}
.field.big.bad { box-shadow: inset 0 2px 5px rgb(0 0 0 / .25), inset 0 0 0 1px var(--warn); }
.field.big input { padding: 0 14px; font-size: 14px; }
.field.big input::placeholder { color: var(--ink3); }
.field .icon-btn { width: 32px; height: 32px; margin-right: 8px; }
.field .icon-btn svg { width: 19px; height: 19px; }


.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--ink2);
  cursor: pointer;
  user-select: none;
}
.remember input {
  width: 15px; height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.remember input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.error {
  min-height: 18px;
  margin: 0 0 8px;
  font: 500 12.5px/18px Onest, sans-serif;
  color: var(--warn);
}


.go {
  width: 100%;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--auth-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25);
  font: 600 14px/1 Onest, sans-serif;
  cursor: pointer;
  transition: filter .2s, transform .12s;
}
.go:hover { filter: brightness(1.08); }
.go:active { filter: brightness(.92); transform: scale(.98); }
.go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.go.busy { pointer-events: none; opacity: .7; }
.auth-alt {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
}
.auth-alt a { color: var(--ink2); font-weight: 500; transition: color .15s; }
.auth-alt a:hover { color: var(--accent); }
.auth-alt a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }


.portal-video {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06);
  overflow: hidden;
}
.portal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.portal-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--well);
}
.portal-poster img { width: 64px; height: auto; opacity: .72; }
.portal-poster span {
  font: 500 11px/1 Onest, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink3);
}

.portal-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.portal-links a {
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: rgb(255 255 255 / .08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), inset 0 0 0 1px rgb(255 255 255 / .06);
  color: var(--ink2);
  font: 600 13.5px/1 Onest, sans-serif;
  transition: background .15s, color .15s;
}
.portal-links a:hover { background: rgb(255 255 255 / .13); color: var(--ink); }
.portal-links a:active { transform: scale(.98); }
.portal-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }


.legal-links {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--ink3);
}
.legal-links a { color: inherit; transition: color .15s; }
.legal-links a:hover { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.legal-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }


.auth-accent {
  position: absolute;
  top: 0; left: 28px;
  width: 62px; height: 2px;
  background: var(--accent);
}


.login.account {
  width: 372px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  margin: auto;
  text-align: center;
}
.account .login-sub { margin-bottom: 20px; }
.account .well { margin-bottom: 16px; text-align: left; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }


.startup {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: rgb(11 11 13 / .94);
}
.brand-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font: 600 46px/1 Onest, sans-serif;
  letter-spacing: -.04em;
  animation: fade 1.1s .25s both;
}
.brand-big img { width: 62px; height: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.spin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fade .6s 1s var(--ease-out) both;
}
.status { position: relative; height: 22px; width: 400px; max-width: 90vw; text-align: center; }
.status span {
  position: absolute; inset: 0;
  font: 500 15px/22px Onest, sans-serif; color: var(--ink2);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.status span.old { opacity: 0; transform: translateY(-8px); }
.status span.new { opacity: 0; transform: translateY(8px); }
.spinner.done { opacity: 0; transition: opacity .3s; }

@media (max-width: 560px) {
  .auth-stage { padding: 24px 16px; }
  .auth-brand { gap: 10px; margin-bottom: 24px; }
  .auth-brand img { width: 32px; }
  .auth-brand span { font-size: 29px; }
  .auth-card { padding: 20px; border-radius: 18px; }
  .login.auth-card { padding: 22px 20px 20px; }
  .login-shell { max-width: calc(100vw - 24px); }
  .login-shell .auth-brand { gap: 9px; margin-bottom: 20px; }
  .login-shell .auth-brand img { width: 28px; }
  .login-shell .auth-brand span { font-size: 26px; }
  .login-title { font-size: 22px; }
  .login-sub { margin-bottom: 18px; }
  .login-options { gap: 10px; margin-bottom: 14px; }
  .auth-title { gap: 10px; font-size: 22px; }
  .auth-bar { width: 4px; height: 22px; }
  .auth-rule { margin: 18px 0 20px; }
  .auth-small { font-size: 12.5px; }
  .portal-links { gap: 10px; margin-top: 20px; }
  .portal-links a { height: 44px; font-size: 13px; }
  .portal-poster { gap: 10px; }
  .portal-poster img { width: 54px; }
  .portal-poster span { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-big, .spin-wrap { animation-duration: .01ms; animation-delay: 0s; }
}
