:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --code-bg: #0a0f1e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }
header.site { padding: 16px 24px; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; align-items: center; }
header.site a { color: var(--text); text-decoration: none; }
main { max-width: 880px; margin: 0 auto; padding: 24px; }
h1, h2, h3 { color: #f1f5f9; }
.card { background: var(--panel); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card.muted { opacity: 0.55; }
.btn { background: var(--accent); color: #fff; border: 0; padding: 10px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.secondary { background: transparent; border: 1px solid #475569; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"] {
  background: var(--code-bg); color: var(--text); border: 1px solid #475569; border-radius: 6px; padding: 8px 12px; font-family: ui-monospace, monospace; min-width: 180px;
}
.progress { display: flex; gap: 6px; margin-bottom: 18px; }
.progress > div { flex: 1; height: 4px; border-radius: 2px; background: #475569; }
.progress > div.done { background: var(--ok); }
.progress > div.current { background: var(--accent); }
.hint { color: var(--warn); margin-top: 8px; font-size: 0.95em; }
.code { background: var(--code-bg); border-left: 3px solid #c084fc; border-radius: 4px; padding: 10px 14px; font-family: ui-monospace, monospace; font-size: 0.92em; white-space: pre; overflow-x: auto; }
.banner { background: #1e40af; color: #dbeafe; padding: 10px 16px; border-radius: 6px; margin: 12px 0; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--panel); border-radius: 10px; padding: 24px; max-width: 720px; width: 90%; max-height: 80vh; overflow: auto; }
.help { background: rgba(148, 163, 184, 0.08); border-left: 3px solid var(--muted); border-radius: 4px; padding: 10px 14px; margin-top: 14px; color: var(--muted); font-size: 0.94em; }
.help summary { cursor: pointer; color: #cbd5e1; font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; }
.help[open] summary { margin-bottom: 8px; }
.help p:first-of-type { margin-top: 0; }
.help p:last-of-type { margin-bottom: 0; }
.help code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; font-size: 0.95em; color: #e2e8f0; }

/* ---- auth forms (signup, login, logged-out) ---- */
.auth-card { max-width: 400px; margin: 40px auto; }
.auth-card h1 { margin-top: 0; font-size: 1.5em; }
.auth-card .auth-subtitle { color: var(--muted); margin-top: -8px; margin-bottom: 24px; font-size: 0.95em; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 0.85em; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.field > input { width: 100%; min-width: 0; font-family: ui-sans-serif, system-ui, sans-serif; }
.field small { display: block; font-size: 0.8em; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.field small.field-error { color: var(--bad); }
.field small ul { margin: 4px 0 0 16px; padding: 0; }
.field small li { margin-bottom: 2px; }
.form-error { background: rgba(239, 68, 68, 0.1); border-left: 3px solid var(--bad); padding: 8px 12px; border-radius: 4px; margin-bottom: 14px; color: var(--bad); font-size: 0.9em; }
.btn.btn-block { width: 100%; padding: 12px; font-size: 1em; margin-top: 6px; }
.auth-footer { margin-top: 18px; text-align: center; font-size: 0.9em; color: var(--muted); }
.auth-footer a { color: var(--accent); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
