body.hilbert-auth-page {
  margin: 0;
}

.hilbert-auth-screen {
  --auth-canvas: #f0f5f4;
  --auth-surface: #fff;
  --auth-ink: #17232b;
  --auth-muted: #53616a;
  --auth-border: #dce4e3;
  --auth-accent: #006b60;
  --auth-accent-hover: #00574f;
  --auth-spinner-track: #e0f0ec;

  align-items: center;
  background: var(--auth-canvas);
  box-sizing: border-box;
  color: var(--auth-ink);
  color-scheme: light;
  display: grid;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  justify-items: center;
  min-height: 100dvh;
  padding: 1.5rem;
}

.hilbert-auth-card {
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 0.625rem;
  box-shadow: 0 2px 8px rgb(23 35 43 / 4%);
  box-sizing: border-box;
  padding: 1.75rem;
  width: min(100%, 21.5rem);
}

.hilbert-auth-brand {
  align-items: center;
  display: flex;
  font-size: 0.9375rem;
  font-weight: 700;
  gap: 0.5625rem;
  margin-bottom: 1.5rem;
}

.hilbert-auth-brand > span {
  background: var(--auth-accent);
  border-radius: 0.375rem;
  color: #fff;
  display: grid;
  font-size: 1.0625rem;
  font-weight: 750;
  height: 1.875rem;
  place-items: center;
  width: 1.875rem;
}

.hilbert-auth-card h1 {
  font-size: 1.5rem;
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin: 0;
}

.hilbert-auth-description,
.hilbert-auth-status p,
.hilbert-auth-error {
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hilbert-auth-description {
  margin: 0.5rem 0 0;
}

.hilbert-auth-status {
  align-items: flex-start;
  display: flex;
  gap: 0.5625rem;
  margin-top: 0.9375rem;
}

.hilbert-auth-status p {
  margin: 0;
}

.hilbert-auth-error {
  color: #9f3028;
  margin: 0.75rem 0 0;
  overflow-wrap: anywhere;
}

.hilbert-auth-button {
  align-items: center;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 0.4375rem;
  box-sizing: border-box;
  color: var(--auth-ink);
  cursor: pointer;
  display: inline-flex;
  font: 650 0.875rem/1.35 system-ui, sans-serif;
  gap: 0.5625rem;
  justify-content: center;
  margin-top: 1rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.8125rem;
  text-decoration: none;
}

.hilbert-auth-button:hover {
  border-color: var(--auth-accent);
}

.hilbert-auth-button:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.hilbert-auth-primary {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  color: #fff;
  margin-top: 1.375rem;
  width: 100%;
}

.hilbert-auth-primary:hover:not(:disabled) {
  background: var(--auth-accent-hover);
}

.hilbert-auth-primary:disabled {
  cursor: wait;
  opacity: 0.8;
}

.hilbert-auth-provider {
  background: #fff;
  border-radius: 0.3125rem;
  display: grid;
  flex: 0 0 1.5625rem;
  height: 1.5625rem;
  place-items: center;
}

.hilbert-auth-provider > img {
  display: block;
  height: 1.1875rem;
  width: 1.1875rem;
}

.hilbert-auth-spinner {
  animation: hilbert-auth-spin 0.8s linear infinite;
  border: 2px solid var(--auth-spinner-track);
  border-radius: 50%;
  border-top-color: var(--auth-accent);
  box-sizing: border-box;
  flex: 0 0 0.9375rem;
  height: 0.9375rem;
  margin-top: 0.1875rem;
}

.hilbert-auth-screen [hidden] {
  display: none;
}

@keyframes hilbert-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hilbert-auth-spinner {
    animation: none;
  }
}
