:root {
    color-scheme: light dark;
    --background: #f3f4f1;
    --surface: #ffffff;
    --text: #1a1f1c;
    --muted: #5b655f;
    --border: #cfd5d1;
    --accent: #0b6b4f;
    --accent-hover: #09573f;
    --accent-text: #ffffff;
    --danger: #b3261e;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #111412;
        --surface: #1a1f1c;
        --text: #eef1ef;
        --muted: #a5afa9;
        --border: #3a433e;
        --accent: #4cc79a;
        --accent-hover: #6ad6ae;
        --accent-text: #0b1f17;
        --danger: #ff9c94;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: var(--background);
    color: var(--text);
    font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
    width: 100%;
    max-width: 27rem;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.08);
}

.brand {
    margin: 0 0 2rem;
    color: var(--accent);
    font-weight: 700;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    line-height: 1.25;
    text-wrap: balance;
}

.lead {
    margin: 0 0 1.75rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--muted);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

input[aria-invalid="true"] { border-color: var(--danger); }

input:focus-visible,
button:focus-visible,
.button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.hint,
.error {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
}

.hint { color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }

button,
.button {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button { margin-top: 1.5rem; }

button:hover,
.button:hover { background: var(--accent-hover); }

.status {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 700;
}

.status.success { color: var(--accent); }
.status.failure { color: var(--danger); }
