/* Signing in (signin.js): the page shown in place of the app when a hosted
   session has run out, and the same form in a dialog over the landing page. */

body.is-signin .topbar-right > :not(#btn-theme) { display: none; }

.view-signin {
  min-height: calc(100dvh - 64px);
  display: grid;
  place-items: center;
  padding: 32px 16px 48px;
}

.signin-card {
  width: min(400px, 100%);
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signin-mark { display: block; width: 40px; height: 40px; color: var(--accent-text); }
.signin-mark svg { display: block; width: 100%; height: 100%; }

.signin-card :is(h1, h2) { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.signin-lede { margin: -6px 0 4px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

.signin-google { width: 100%; justify-content: center; gap: 10px; }
.signin-google svg { flex: none; }

.signin-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 12px;
}
.signin-or::before,
.signin-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.signin-form { display: flex; flex-direction: column; gap: 8px; }
.signin-form .input { width: 100%; }
.signin-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.signin-main { width: 100%; justify-content: center; margin-top: 8px; }

.signin-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.signin-row .input { flex: 1; min-width: 0; }

.signin-status { margin: 0; min-height: 1.4em; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.signin-status.is-error { color: var(--danger); }

/* Phones: a field under 16px makes iOS zoom the whole page when it takes the
   keyboard, and fingers want taller targets. */
@media (max-width: 640px), (hover: none) {
  .signin-form .input { height: 42px; font-size: 16px; }
}

/* ---- in a dialog (openSignIn): the dialog is the card, so the form's own
   panel steps back; a thread of the accent runs along its top edge. */
.modal.modal-signin { width: min(420px, 100%); }
.modal.modal-signin::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 70%, transparent);
  pointer-events: none;
}
.modal-signin .signin-card {
  width: 100%;
  padding: 26px 28px 20px;
  background: none;
  border: 0;
  box-shadow: none;
}
@media (max-width: 480px) {
  .modal-signin .signin-card { padding: 22px 18px 16px; }
}
