:root {
  color: #f5f5f5;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #050505;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #050505;
}

a {
  color: #f5f5f5;
  text-underline-offset: 3px;
}

.shell {
  position: relative;
  display: flex;
  width: min(100% - 32px, 520px);
  min-height: 100vh;
  margin: auto;
  padding: 64px 0 28px;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 100%;
  padding: 38px;
  border: 1px solid #252525;
  border-radius: 22px;
  background: #0d0d0d;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.login-logo {
  display: block;
  width: min(100%, 290px);
  height: auto;
  margin: 0 auto 24px;
}

h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.85rem, 7vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro {
  margin: 13px 0 29px;
  color: #a3a3a3;
  font-size: 1rem;
  line-height: 1.6;
}

form {
  display: grid;
  gap: 14px;
}

label,
legend {
  color: #e5e5e5;
  font-size: 0.84rem;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #333333;
  border-radius: 11px;
  outline: none;
  color: #ffffff;
  background: #080808;
  font: inherit;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input::placeholder {
  color: #666666;
}

input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

button {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  color: #050505;
  background: #ffffff;
  box-shadow: none;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.06);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.cf-turnstile {
  width: 100%;
  min-width: 300px;
  min-height: 65px;
  margin-top: 2px;
  justify-self: center;
}

.legal-note {
  color: #777777;
  font-size: 0.77rem;
  line-height: 1.55;
  text-align: center;
}

.legal-note {
  margin: 20px 5px 0;
}

.form-error {
  margin: 0;
  padding: 11px 13px;
  max-height: 60px;
  overflow: hidden;
  border: 1px solid #7f1d1d;
  border-radius: 10px;
  color: #fecaca;
  background: #2a0d0d;
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
  animation:
    error-shake 480ms ease-in-out,
    error-dismiss 500ms ease 2.5s forwards;
}

@keyframes error-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes error-dismiss {
  from {
    max-height: 60px;
    margin-bottom: 0;
    padding-block: 11px;
    border-width: 1px;
    opacity: 1;
  }
  to {
    max-height: 0;
    margin-bottom: -14px;
    padding-block: 0;
    border-width: 0;
    opacity: 0;
  }
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: #8f8f8f;
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover {
  color: #ffffff;
}

.code-fieldset {
  min-width: 0;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.code-fieldset legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
}

.code-digit {
  min-width: 0;
  height: 58px;
  padding: 0;
  font-size: 1.45rem;
  font-weight: 720;
  text-align: center;
}

.account-card dl {
  display: grid;
  margin: 0 0 30px;
  gap: 12px;
}

.account-card dl div {
  display: flex;
  padding: 15px 16px;
  border: 1px solid #242424;
  border-radius: 11px;
  background: #090909;
  justify-content: space-between;
  gap: 20px;
}

dt {
  color: #858585;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.role {
  color: #ffffff;
  text-transform: capitalize;
}

button.secondary {
  color: #f0f0f0;
  background: #242424;
  box-shadow: none;
}

.legal-card {
  color: #aaaaaa;
  line-height: 1.7;
}

.legal-card h1 {
  margin-bottom: 24px;
}

.legal-card h2 {
  margin: 28px 0 6px;
  color: #eeeeee;
  font-size: 1rem;
}

.legal-card p {
  margin: 0 0 12px;
}

.eyebrow {
  color: #777777;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 520px);
    padding-top: 28px;
  }

  .card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .code-inputs {
    gap: 6px;
  }

  .code-digit {
    height: 52px;
    font-size: 1.25rem;
  }
}

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

  .form-error {
    animation: error-dismiss 1ms linear 3s forwards;
  }
}
