/* Sign in / sign up */

/*
 * The sign-in column has to fit the viewport without scrolling, so everything
 * in it is sized against the available height rather than stacked freely. The
 * island floats over the layout, which is why the grid starts at the very top
 * and the column simply pads itself clear of it.
 */

body.auth-page { height: 100%; overflow: hidden; }
body.auth-page .nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); margin: 0; }

.auth {
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 92px 40px 28px;
  min-height: 0;
  overflow: hidden;
}
.auth-card { width: min(392px, 100%); }
.auth-card h1 { font-size: clamp(22px, 2.4vw, 27px); letter-spacing: -0.025em; }
.auth-card > p { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.5; }

/*
 * Two choices, fused into one block. Asking for the address up front made the
 * page look like a password form, so the field only appears once someone picks
 * email, and the button that opened it steps out of the way.
 */
.auth-choices { margin-top: 20px; display: grid; }
.auth-choices .btn { border-radius: 0; }
.auth-choices .btn:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0; }
.auth-choices #email-choice { border-radius: 0 0 var(--r-sm) var(--r-sm); }
/* Overlap the rings so stacked buttons share one line, not two. */
.auth-choices .btn + .btn { margin-top: -1px; }

.auth-card form { display: grid; margin-top: -1px; }
.auth-card form .input {
  border-radius: 0;
  height: 46px;
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
  z-index: 1;
}
.auth-card form .input:focus { z-index: 2; }
.auth-card form .btn { border-radius: 0 0 var(--r-sm) var(--r-sm); }

.auth-hint { margin-top: 8px; font-size: 12.5px; color: var(--faint); line-height: 1.45; }

.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--faint); font-size: 12.5px;
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

.skip-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.skip-card h2 { font-size: 15px; }
.skip-card p { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.skip-card .btn { justify-self: start; }

.auth-legal { margin-top: 18px; font-size: 12px; color: var(--faint); line-height: 1.55; }

.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--r-sm);
  font-size: 13.5px; margin-top: 20px;
}
.alert-error { background: var(--red-wash); color: #a3103090; color: #9e1638; }
.alert-info { background: var(--blue-wash); color: #0b4f9e; }
.alert-success { background: var(--green-wash); color: #07694a; }
.alert svg { flex: none; margin-top: 2px; }

.auth-aside {
  position: relative;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  overflow: hidden;
  background: linear-gradient(150deg, #0a2540 0%, #1d2260 48%, #4b3fa0 100%);
  color: #fff;
}
.auth-aside::before {
  content: '';
  position: absolute; width: 640px; height: 640px;
  top: -180px; right: -220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 91, 255, 0.55), transparent);
}
.auth-aside::after {
  content: '';
  position: absolute; width: 480px; height: 480px;
  bottom: -160px; left: -160px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(11, 165, 236, 0.35), transparent);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-quote { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.32; font-weight: 560; letter-spacing: -0.025em; color: #fff; max-width: 13em; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 34ch; }
.auth-points li {
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}
.auth-points li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }

@media (max-width: 900px) {
  body.auth-page { overflow: auto; }
  .auth { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .auth-aside { display: none; }
  .auth-main { padding: 86px 20px 40px; overflow: visible; }
}

/* Short viewports: tighten rather than scroll. */
@media (max-height: 760px) and (min-width: 901px) {
  .auth-main { padding-top: 84px; }
  .auth-card > p { display: none; }
  .auth-hint { display: none; }
  .auth-or { margin: 14px 0; }
  .skip-card { padding: 13px 15px; }
}

/* Offered but not configured on this server. */
.btn.is-unavailable { opacity: 0.62; }
.btn.is-unavailable:hover { background: var(--btn-bg); }

/* The no-account path, given the same weight as signing in. */
.handoff-block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.handoff-head h2 { font-size: 17px; }
.handoff-head p { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.handoff-prompt {
  margin: 16px 0 12px;
  padding: 14px 16px;
  max-height: 210px;
  overflow: auto;
  border-radius: var(--r-md);
  background: var(--navy);
  color: #cbd9e8;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

/* What only the server's operator can act on, one click away. */
.alert-body { min-width: 0; }
.alert-detail { margin-top: 7px; }
.alert-detail summary {
  cursor: pointer; font-size: 12.5px; font-weight: 560;
  opacity: 0.75; list-style: none;
}
.alert-detail summary::-webkit-details-marker { display: none; }
.alert-detail summary::before { content: '▸ '; font-size: 10px; }
.alert-detail[open] summary::before { content: '▾ '; }
.alert-detail p {
  margin-top: 5px; font-size: 12.5px; line-height: 1.5; opacity: 0.85;
  font-family: var(--mono); word-break: break-word;
}

/* Offered, but not yet. Visible so the option is never a mystery, and plainly
   not clickable so nobody waits for an email that is not coming. */
.btn.is-soon { opacity: 0.6; cursor: default; pointer-events: none; }
.soon-badge {
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-sunken); color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
