/* Account pages for the commercial subdomain.
 *
 * SHARED BY FOUR PAGES, UNLIKE login.html, WHICH IS SELF-CONTAINED.
 * That page argues for inlining because it is ONE page that has to
 * render for a visitor with no session, possibly on a phone at a
 * hilltop. The reasoning holds for one page and inverts for four:
 * a stylesheet copied four times is a stylesheet where two copies
 * drift, and the drift shows up as a login form that does not look
 * like the signup form the same person used last week.
 *
 * Same origin, same server block, no auth_request in front of it, so
 * it costs one cached request and cannot fail independently of the
 * HTML that references it.
 *
 * TOKENS MATCH frontend/login.html, which in turn is the light-first
 * sibling of frontend/src/style.css. Deliberately NOT an import of
 * style.css: that file is the app shell's grid and panel layout, and
 * pulling it in here would bring 1,000 lines of map furniture to
 * render a form.
 */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #14181d;
  --muted: #5b6672;
  --border: #d8dee6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error: #b91c1c;
  --ok: #15803d;
  --input-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a; --card: #1a1f27; --text: #e8ecf1;
    --muted: #96a1af; --border: #2b323c;
    --error: #f87171; --ok: #4ade80; --input-bg: #141920;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 24px;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { width: 100%; max-width: 420px; }
.brand { text-align: center; margin-bottom: 22px; }
.brand img { width: 100%; max-width: 340px; height: auto; }
.brand h1 { margin: 12px 0 4px; font-size: 19px; font-weight: 650; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 650; }
.card .lede { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

label { display: block; margin: 12px 0 5px; font-size: 13px;
        font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 10px 12px; font: inherit;
  color: var(--text); background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 8px;
}
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

button {
  width: 100%; margin-top: 18px; padding: 11px 16px;
  font: inherit; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 8px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: .6; cursor: progress; }

.msg {
  margin: 14px 0 0; padding: 10px 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px;
  background: rgba(127, 127, 127, .06);
}
.msg[data-kind="error"] { color: var(--error); border-color: var(--error); }
.msg[data-kind="ok"] { color: var(--ok); border-color: var(--ok); }

.alt { margin: 16px 2px 0; text-align: center; font-size: 13px;
       color: var(--muted); }
.alt a { color: var(--accent); }

footer {
  margin-top: 18px; text-align: center;
  color: var(--muted); font-size: 12px;
}
