:root { --bg: #f4f4f2; --card: #ffffff; --text: #1d1d1b; --muted: #5a5a55; --line: #d6d6d0; --accent: #1d1d1b; --error: #a32020;
  --card-wide: 680px; --card-narrow: 380px; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151514; --card: #1f1f1d; --text: #ededea; --muted: #a6a6a0; --line: #3a3a37; --accent: #ededea; --error: #ff8a8a; }
}
* { box-sizing: border-box; }
/* The hidden attribute must win over every display rule below. Without this, .panel's grid and .divider's flex kept
   all three forms and the divider on screen at once (owner's report, 2026-09-26, task 8753ae2a). */
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.card { width: 100%; max-width: var(--card-wide); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
/* The forms that come without Google (new password, reset link) sit alone in a narrow card. */
.card:has(#google-col[hidden]) { max-width: var(--card-narrow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
h1 { font-size: 22px; margin: 0; font-weight: 600; }
.message { min-height: 1.5em; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.message.error { color: var(--error); }

/* Wide screen: forms on the left, "or" between, Google on the right. */
.split { display: flex; align-items: stretch; gap: 24px; }
.forms { flex: 1 1 0; min-width: 0; }
.alt { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.divider { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-left: 1px solid var(--line); }

.panel { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input { font: inherit; color: var(--text); background: transparent; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; cursor: pointer; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--card); font-weight: 600; }
button.link { background: none; border: none; color: var(--muted); padding: 4px 0; font-weight: 400; text-decoration: underline; justify-self: start; }
button.google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: transparent; color: var(--text); border-color: var(--line); }
.g-mark { flex: none; }
button:disabled { opacity: .6; cursor: default; }

/* Phone: one column, Google first so it is on screen without scrolling. Media queries cannot read custom
   properties, so the 640px breakpoint is written here once. */
@media (max-width: 640px) {
  .card { padding: 24px 20px; }
  .split { flex-direction: column; gap: 16px; }
  .alt { order: 1; }
  .divider { order: 2; flex-direction: row; }
  .divider::before, .divider::after { border-left: 0; border-top: 1px solid var(--line); }
  .forms { order: 3; }
}
