/* Sign-up by invitation, email confirmation and the Invite page.
   These pages are used on phones, often standing up: nothing below 14px, inputs at 16px
   so that iOS does not zoom, and buttons at least 48px tall. */

.join-shell,
.invite-shell {
  width: min(560px, calc(100% - 32px));
  margin: 28px auto 80px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.invite-shell {
  width: min(760px, calc(100% - 32px));
}

.join-shell h1,
.invite-shell h1 {
  max-width: none;
  margin: 0 0 12px;
  font: 400 clamp(30px, 7vw, 42px)/1.1 var(--serif);
  letter-spacing: -0.02em;
}

.join-shell h2,
.invite-shell h2 {
  margin: 36px 0 12px;
  font: 700 18px/1.3 var(--sans);
}

.join-shell p,
.invite-shell p {
  margin: 0 0 12px;
}

.join-muted {
  color: var(--muted);
  font-size: 14px;
}

.join-card {
  margin-top: 20px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--lime);
  border-radius: 12px;
  background: #fffdf8;
}

.join-form {
  display: grid;
  gap: 16px;
}

.join-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.join-form input[type="email"],
.join-form input[type="password"],
.join-form input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #a9b5ac;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 500 16px var(--sans);
}

.join-form input:focus {
  outline: 3px solid #98c00055;
  border-color: var(--green);
}

.join-form .errorlist,
.join-errors {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #8d3028;
  font-size: 14px;
  font-weight: 600;
}

.join-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: 700 16px var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.join-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.join-button-quiet {
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
}

.join-button-small {
  width: auto;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

.join-address {
  display: block;
  margin: 4px 0 16px;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.join-messages {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.join-messages li {
  padding: 12px 14px;
  border-radius: 8px;
  background: #e5efd9;
  font-size: 15px;
}

.join-messages li.error {
  background: #f8ded9;
  color: #762d27;
}

.join-details {
  margin-top: 16px;
}

.join-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.join-details .join-form {
  margin-top: 8px;
}

.join-steps {
  margin: 0 0 12px;
  padding-left: 22px;
}

.join-steps li {
  margin-bottom: 6px;
}

/* The Invite page. */
.invite-warning {
  padding: 12px 14px;
  border-left: 4px solid var(--yellow);
  background: #fbf3d6;
  font-size: 15px;
}

.invite-qr {
  width: min(100%, 420px);
  margin: 8px auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.invite-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.invite-center {
  text-align: center;
}

.invite-url {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.invite-state {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8e7df;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.invite-state-open {
  background: #fbf3d6;
  color: #6b5200;
}

.invite-state-waiting {
  background: #fde6d2;
  color: #7a3d0c;
}

.invite-state-done {
  background: #dcebd0;
  color: #1e5b2e;
}

.invite-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.invite-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.invite-list a {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.invite-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

.invite-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.invite-inline-form {
  display: inline;
}

.join-shell a:not(.join-button),
.invite-shell a:not(.join-button) {
  color: var(--green);
  text-underline-offset: 0.18em;
}

.join-form label.join-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: -8px;
  font-weight: 500;
}

.join-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.invite-earlier {
  margin-top: 28px;
}

.invite-earlier[open] summary {
  margin-bottom: 4px;
}

.join-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}
