@layer components {

  /* Sign-in, passkey setup and invitation pages: one card in the middle of the screen. */
  .auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: calc(24px + env(safe-area-inset-top)) 16px 32px;
  }

  .auth__card {
    width: min(380px, 100%);
    display: grid;
    gap: 12px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-edge);
    border-radius: 10px;
  }

  .auth__title {
    font-size: 20px;
    font-weight: 600;
  }

  .auth__lead {
    line-height: 1.5;
  }

  .auth__hint,
  .auth__status {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-ink-muted);
  }

  .auth__status:empty {
    display: none;
  }

  .auth__button,
  .auth__button.button {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
  }

  .auth__field {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: var(--color-ink-muted);

    & input {
      padding: 6px 8px;
      font: inherit;
      font-size: 14px;
      color: var(--color-ink);
      background: var(--color-surface-sunken);
      border: 1px solid var(--color-line);
      border-radius: 4px;
    }
  }

  /* A quiet way out: back, or cancel (button_to's button reads as a link). */
  .auth__locale {
    display: flex;
    justify-content: center;
  }

  .auth__link,
  button.auth__link {
    justify-self: center;
    padding: 0;
    font-size: 12px;
    color: var(--color-ink-muted);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
  }
}
