:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1f2430;
    --muted: #5c6370;
    --border: #d9dce1;
    --accent: #3b5bdb;
    --accent-strong: #2f4ac0;
    --error-bg: #fdecec;
    --error-text: #a12626;
    --ok-bg: #e8f6ee;
    --ok-text: #1d6b3e;
    --radius: 12px;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161b;
        --surface: #1d2027;
        --text: #e8eaee;
        --muted: #a0a6b1;
        --border: #343843;
        --accent: #6b8cff;
        --accent-strong: #8aa4ff;
        --error-bg: #3a1d1f;
        --error-text: #ffb3b3;
        --ok-bg: #173323;
        --ok-text: #9fe0b9;
    }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    padding: 0 16px;
}

a { color: var(--accent); }

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
    max-width: 440px;
    padding: 32px 0 16px;
}

.brand {
    color: var(--text);
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}

.card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.card.wide { max-width: 720px; }

h1 { font-size: 22px; margin: 0 0 12px; }

p { margin: 0 0 16px; }

.muted { color: var(--muted); font-size: 14px; }

form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }

label { font-weight: 600; }

input[type="email"], input[type="text"], input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

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

input.code {
    font-size: 28px;
    letter-spacing: 8px;
    text-align: center;
}

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }

.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

button {
    padding: 12px 16px;
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

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

button.secondary {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 0 0 16px;
    background: var(--error-bg);
    color: var(--error-text);
}

.alert.ok { background: var(--ok-bg); color: var(--ok-text); }

.alert ul { margin: 0; padding-left: 18px; }

.big-code {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 8px;
    text-align: center;
    margin: 8px 0 20px;
}


.site-footer {
    width: 100%;
    max-width: 440px;
    flex-wrap: wrap;
    display: flex;
    gap: 8px;
    padding: 24px 0 40px;
    font-size: 14px;
    color: var(--muted);
}

.validation-summary-valid { display: none; }

.is-wide .site-header, .is-wide .site-footer { max-width: 720px; }

.site-nav { display: flex; gap: 16px; font-size: 14px; }

.legal { overflow-wrap: anywhere; }
.legal h1, .legal h2, .legal h3 { font-size: 18px; margin: 20px 0 8px; }
.legal p, .legal ul, .legal ol { margin: 0 0 12px; }

h2 { font-size: 18px; margin: 28px 0 8px; }

.section { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 4px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 16px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

button.danger { background: #b42318; }
button.danger:hover { background: #912018; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions form { flex-direction: row; }
form.inline { display: inline-flex; flex-direction: row; gap: 8px; }
button.small { padding: 6px 12px; font-size: 14px; }

.links { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }

.cf-turnstile { min-height: 65px; }
.footer-contact { flex-basis: 100%; }
