:root {
  color-scheme: light dark;
  --paper: #f7f4ec;
  --ink: #23211d;
  --quiet: #5f5a50;
  --rule: #d8d1c2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1b18;
    --ink: #ece7dc;
    --quiet: #c0b9ab;
    --rule: #3a3731;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

main {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.invite {
  margin: 0;
  font-size: 1.25rem;
}

/* The door: sign in, sign out, make a passkey. Real controls now, so
   they look like controls: a bordered button with a 44px target. */
.door {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.door p {
  margin: 0 0 1rem;
}

button, a.button {
  display: inline-block;
  text-decoration: none;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  cursor: pointer;
}

button:disabled {
  color: var(--quiet);
  background: transparent;
  border-color: var(--rule);
  cursor: default;
}

button:focus-visible, a.button:focus-visible {
  outline: 3px solid var(--quiet);
  outline-offset: 3px;
}

.words {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.words:empty, .words output:empty {
  display: none;
}

.quiet {
  color: var(--quiet);
}

.refused {
  margin: 1rem 0 0;
  font-weight: 600;
}

.refused:empty {
  display: none;
}

@media (min-width: 40rem) {
  h1 {
    font-size: 2.5rem;
  }
}

a {
  color: inherit;
}
