/* The public pages of consent (#1050): sober, readable on a phone first, accessible.
   Styles live in this file - the content security policy refuses inline styles. */

:root {
    --ink: #1f2933;
    --muted: #52606d;
    --line: #d9dee3;
    --surface: #ffffff;
    --background: #f5f7f9;
    --primary: #3b2f8f;
    --primary-ink: #ffffff;
    --accept: #1e7a46;
    --accept-soft: #e8f5ee;
    --refuse: #a3261c;
    --refuse-soft: #fbeceb;
    --info-soft: #eaf1fb;
    --focus: #f2a900;
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--background);
    -webkit-text-size-adjust: 100%;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.site-header__name {
    font-weight: 700;
}

.page {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

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

h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 1.25rem 0 0.5rem;
}

h3 {
    font-size: 1.05rem;
    margin: 1rem 0 0.5rem;
}

p,
ul {
    margin: 0 0 0.75rem;
}

ul {
    padding-inline-start: 1.5rem;
}

.lead {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

.notice {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
    overflow-wrap: anywhere;
}

.notice__version {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.notice__title {
    margin-top: 0;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
}

.panel h2 {
    margin-top: 0;
}

.panel--result {
    border-color: var(--accept);
}

.message {
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.message--info {
    background: var(--info-soft);
}

.message--error {
    background: var(--refuse-soft);
    color: var(--refuse);
    font-weight: 600;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.choices {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.choices legend {
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding: 0;
}

.choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-weight: 600;
    cursor: pointer;
}

.choice input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}

.choice--accept:has(input:checked) {
    border-color: var(--accept);
    background: var(--accept-soft);
}

.choice--refuse:has(input:checked) {
    border-color: var(--refuse);
    background: var(--refuse-soft);
}

.field-label {
    font-weight: 700;
}

.code-input {
    width: 100%;
    max-width: 14rem;
    font-size: 1.75rem;
    letter-spacing: 0.4em;
    text-align: center;
    padding: 0.5rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    font-variant-numeric: tabular-nums;
}

.button {
    font: inherit;
    font-weight: 700;
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    min-height: 3rem;
    cursor: pointer;
}

.button--primary {
    width: 100%;
    border: 0;
    background: var(--primary);
    color: var(--primary-ink);
}

.button--link {
    border: 0;
    background: none;
    color: var(--primary);
    text-decoration: underline;
    padding: 0.5rem 0;
    min-height: 2.75rem;
}

.resend {
    margin-top: 0.75rem;
}

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

@media (min-width: 36rem) {
    h1 {
        font-size: 1.75rem;
    }

    .choices {
        grid-template-columns: 1fr 1fr;
    }

    .button--primary {
        width: auto;
        align-self: flex-start;
    }
}
