:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1b1f24;
    --muted: #5d6673;
    --line: #dde1e6;
    --accent: #0b6bcb;
    --accent-text: #ffffff;
    --ok: #1a7f37;
    --warn: #9a6700;
    --error: #b42318;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111418;
        --surface: #1a1f25;
        --text: #e6e9ed;
        --muted: #9aa4b1;
        --line: #2c333b;
        --accent: #5aa7f0;
        --accent-text: #0b1520;
        --ok: #57c47a;
        --warn: #e0b04a;
        --error: #f2867c;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 0.75rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.1rem;
    margin-bottom: 1rem;
}

.muted { color: var(--muted); font-size: 0.92rem; }

label { display: block; font-weight: 600; margin: 0.9rem 0 0.35rem; }

input[type=email], input[type=text], input[type=tel], input[type=password], select, textarea {
    width: 100%;
    font: inherit;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
}

input.code { font-size: 1.6rem; letter-spacing: 0.4rem; text-align: center; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 0.3rem; width: 1.2rem; height: 1.2rem; flex: none; }

button {
    width: 100%;
    margin-top: 1.1rem;
    font: inherit;
    font-weight: 600;
    padding: 0.85rem;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: progress; }

button.danger {
    background: none;
    color: var(--error);
    border: 1px solid var(--error);
}

a.cancel {
    display: block;
    margin-top: 0.8rem;
    text-align: center;
    color: var(--accent);
}

button.link {
    margin-top: 0.4rem;
    background: none;
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
}

.policy {
    white-space: pre-wrap;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    font-size: 0.95rem;
}

.alert { border-radius: 10px; padding: 0.8rem 0.9rem; margin-bottom: 1rem; }
.alert.error { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
.alert.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.alert.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }

.steps { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.done { background: var(--accent); }

.big { font-size: 3rem; text-align: center; margin: 0.5rem 0; }
