/* Shared furniture for the pages you meet before you are inside: sign in, sign
   up, join a session, accept an invitation, reset a password. All of them are
   one card on an empty page, so they share one stylesheet rather than five
   near-identical <style> blocks. */

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background: radial-gradient(120% 100% at 50% 0%, var(--bg-2), var(--bg-0) 70%);
}

.card {
  width: min(92vw, 25rem);
  padding: 2.5rem 2rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
}
.card.wide { width: min(92vw, 32rem); }

.mark { color: var(--accent); font-size: 1.8rem; text-align: center; }
h1 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.5rem;
  text-align: center; margin: .5rem 0 .25rem;
}
.sub {
  text-align: center; color: var(--ink-3); font-size: .8rem; margin: 0 0 2rem;
  letter-spacing: .1em; text-transform: uppercase;
}

label {
  display: block; font-size: .78rem; color: var(--ink-2); margin: 0 0 .4rem;
  letter-spacing: .06em; text-transform: uppercase;
}
input, select {
  width: 100%; padding: .8rem .9rem; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink-0); font: inherit;
}
input:focus, select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field + .field { margin-top: 1.2rem; }
.hint { font-size: .75rem; color: var(--ink-3); margin: .45rem 0 0; text-transform: none; letter-spacing: 0; }

button.primary {
  width: 100%; margin-top: 1.6rem; padding: .85rem; border: 0;
  border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 650; cursor: pointer;
}
button.primary:hover { filter: brightness(1.07); }
button.primary:disabled { opacity: .5; cursor: default; }

/* A fallback that is on its way out should not look like the main way in. */
button.secondary {
  width: 100%; margin-top: 1.2rem; padding: .8rem; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--bg-2); color: var(--ink-1);
  font: inherit; font-size: .88rem; cursor: pointer;
}
button.secondary:hover { background: var(--bg-3); color: var(--ink-0); }

/* Two ways in on one card - a password or a link in your inbox. */
.tabs { display: flex; gap: .25rem; margin-bottom: 1.6rem; background: var(--bg-2);
        padding: .25rem; border-radius: var(--r-md); }
.tabs button {
  flex: 1; padding: .55rem; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2); font: inherit; font-size: .85rem;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--bg-0); color: var(--ink-0); font-weight: 600; }

/* Single sign-on. An anchor rather than a button because it is a plain
   navigation - no fetch, no JSON, just leaving for the provider. */
.btn-link {
  display: block; width: 100%; box-sizing: border-box; margin-bottom: .6rem;
  padding: .8rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); color: var(--ink-0); text-align: center;
  font-size: .9rem; text-decoration: none;
}
.btn-link:hover { background: var(--bg-3); }

.divider {
  display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0;
  color: var(--ink-3); font-size: .72rem; letter-spacing: .16em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.msg { font-size: .85rem; margin-top: 1rem; text-align: center; min-height: 1.2em; }
.msg.err { color: var(--err); }
.msg.ok  { color: var(--ok); }

.foot { margin-top: 1.8rem; text-align: center; font-size: .82rem; color: var(--ink-3); }
.foot a { color: var(--accent-text); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* The link the server could not email, shown so an operator can pass it on by
   hand. Deliberately plain and selectable. */
.link-box {
  margin-top: 1rem; padding: .7rem .8rem; background: var(--bg-2);
  border: 1px dashed var(--line); border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: .72rem; color: var(--ink-1);
  word-break: break-all; user-select: all;
}
