:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #f1f4f8;
  --muted: #a5adba;
  --line: #3b414d;
  --line-focus: #f1f4f8;
  --rejected: #ff1f3d;
  --accepted: #67b7ff;
  --welcome: #ffe45e;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.auth {
  position: relative;
  width: min(100%, 320px);
  transition:
    opacity 900ms ease,
    transform 900ms ease;
}

.auth.is-gone {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.form {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px 12px;
  align-items: center;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-align: right;
  text-transform: lowercase;
}

input {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

input:focus {
  border-bottom-color: var(--line-focus);
}

button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  color: #ffffff;
}

button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

button:disabled,
input:disabled {
  cursor: default;
  opacity: 0.52;
}

.actions {
  display: flex;
  grid-column: 2;
  gap: 18px;
  padding-top: 2px;
}

.welcome {
  position: absolute;
  right: 0;
  bottom: calc(100% + 18px);
  left: 0;
  margin: 0;
  color: var(--welcome);
  opacity: 0;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  transition: opacity 420ms ease;
}

.welcome.is-visible {
  opacity: 1;
}

.status {
  min-height: 1.4em;
  margin: 22px 0 0;
  opacity: 0;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  transition: opacity 420ms ease;
}

.status.is-visible {
  opacity: 1;
}

.status[data-state="rejected"] {
  color: var(--rejected);
}

.status[data-state="accepted"] {
  color: var(--accepted);
}

.error-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.error-screen h1 {
  margin: 0;
  color: var(--rejected);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  transition: opacity 700ms ease;
}

.error-screen h1.is-fading {
  opacity: 0;
}

@media (max-width: 420px) {
  .shell {
    padding: 20px;
    place-items: center start;
  }

  .auth {
    width: 100%;
  }

  .form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  label {
    text-align: left;
  }

  .actions {
    grid-column: 1;
    padding-top: 10px;
  }
}
