/* The "Log in" and "Sign up" window, on every page (signin.js). */
dialog.si {
  position: fixed; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  border: 0; border-radius: 22px; background: var(--panel); color: var(--ink); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(24, 25, 29, .08), 0 40px 100px -30px rgba(24, 25, 29, .5);
}
dialog.si::backdrop { background: rgba(24, 25, 29, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.si[open] { display: flex; flex-direction: column; animation: si-pop .28s cubic-bezier(.2, .8, .2, 1); }
.si [hidden] { display: none !important; }
.si h2, .si p { margin: 0; }
.si-body { display: grid; gap: 16px; min-height: 0; padding: 28px 26px 24px; overflow-y: auto; overscroll-behavior: contain; }
.si-x { position: absolute; top: 14px; right: 16px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--panel); color: var(--muted); cursor: pointer; }
.si-x:hover { background: var(--canvas); color: var(--ink); }
.si-x svg { width: 16px; height: 16px; }
.si-head { display: grid; gap: 8px; padding-right: 28px; }
.si-head > svg { width: 32px; height: 32px; margin-bottom: 4px; }
.si-head h2 { font: 400 30px/1.1 var(--display); letter-spacing: -.015em; color: var(--ink); }
.si-head p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.si .si-wide { width: 100%; height: 46px; padding: 0 16px; font-size: 15px; }
.si .si-wide[disabled] { opacity: .6; cursor: progress; }
.si .si-google { gap: 12px; }
.si .si-google svg { width: 20px; height: 20px; }
.si-or { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--faint); }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.si-form { display: grid; gap: 12px; }
.si-field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.si-field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); font: 400 16px/1 var(--body); color: var(--ink); }
.si-field input::placeholder { color: var(--faint); }
.si-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.si-field input.si-code { height: 56px; text-align: center; letter-spacing: .5em; padding-left: calc(14px + .5em); font: 500 24px/1 var(--mono); }
.si-note { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.si-note b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.si-error { font-size: 13.5px; line-height: 1.45; color: #c0392b; }
.si-link { padding: 0; border: 0; background: none; font: 600 14px/1.4 var(--body); color: var(--accent-text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-tint); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.si-link:hover { text-decoration-color: var(--accent-text); }
.si-form .si-link { justify-self: center; font-weight: 500; }
.si-switch { padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; }
.si-fine { font-size: 12.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.si-fine a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-tint); text-underline-offset: 3px; }
@keyframes si-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .si-body { padding: 24px 18px 20px; } .si-head h2 { font-size: 27px; } }
