/* The sign-in pages, by hand until the web UI brings Tailwind (DESIGN.md
   5, 6.4, 7). Values only from design/tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ps-canvas);
  color: var(--ps-ink);
  font-family: var(--ps-font-sans);
  font-size: var(--ps-text-base);
  line-height: var(--ps-text-base-leading);
  text-wrap: pretty;
}

.top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.wordmark {
  font-weight: 500;
}

.page {
  max-width: 30rem;
  padding: 24px 16px 32px;
}

@media (min-width: 768px) {
  .top-bar,
  .page {
    padding-left: 24px;
    padding-right: 24px;
  }
}

h1 {
  margin: 0 0 16px;
  font-size: var(--ps-text-xl);
  line-height: var(--ps-text-xl-leading);
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.muted {
  color: var(--ps-ink-muted);
}

.inbox {
  font-weight: 500;
}

.field {
  margin: 0 0 16px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--ps-text-sm);
  line-height: var(--ps-text-sm-leading);
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ps-line-strong);
  border-radius: var(--ps-radius-md);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font: inherit;
}

.field .help,
.field .error {
  margin: 4px 0 0;
  font-size: var(--ps-text-sm);
  line-height: var(--ps-text-sm-leading);
}

.field .help {
  color: var(--ps-ink-muted);
}

.field .error {
  color: var(--ps-stop);
}

.code input {
  max-width: 10rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--ps-radius-md);
  background: transparent;
  color: var(--ps-ink-muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--ps-wash-strong);
}

.button:active:not([aria-disabled="true"]) {
  transform: translateY(1px);
}

.button.primary {
  background: var(--ps-accent);
  color: var(--ps-on-accent);
}

.button.primary:hover {
  background: var(--ps-accent-hover);
}

.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 2px;
}

.button:not(.primary):focus-visible {
  outline-offset: -2px;
}

@media (pointer: coarse) {
  .button,
  .field input {
    min-height: 44px;
  }
}
