:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #d8dee9;
    --primary: #c9151b;
    --primary-dark: #9f1116;
    --error-bg: #fff1f1;
    --error: #a00000;
    --success: #157347;
    --shadow: 0 18px 50px rgba(23, 32, 51, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, #ffffff 0, var(--bg) 52%);
}

.page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.card {
    background: var(--card);
    border: 1px solid rgba(216, 222, 233, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 48px);
}

.hero {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.home-title {
    margin: 0 0 14px;
    font-size: clamp(22px, 3.2vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.form-card h1,
.success-card h1 {
    font-size: clamp(30px, 5vw, 46px);
}

.lead {
    max-width: 660px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(18px, 2.4vw, 22px);
    line-height: 1.45;
}

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

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: #fff;
    background: var(--primary);
}

.button.primary:hover {
    background: var(--primary-dark);
}

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

.button.full {
    width: 100%;
    margin-top: 16px;
}

.link,
.back-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
}

form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 400;
}

.field input,
.field select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    font: inherit;
    font-weight: 400;
}


.form-section {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.form-section legend {
    padding: 0;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.section-note,
.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
}

.optional {
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
}

.radio-field.is-invalid {
    padding: 12px;
    border: 1px solid var(--error);
    border-radius: 14px;
    outline: 3px solid rgba(160, 0, 0, 0.12);
}

.radio-options {
    display: grid;
    gap: 10px;
}

.radio-option {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    font-weight: 400;
    line-height: 1.35;
}

.radio-option input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.field input:focus,
.field select:focus,
.signature-canvas:focus {
    outline: 3px solid rgba(201, 21, 27, 0.18);
    border-color: var(--primary);
}

.field input.is-invalid,
.field select.is-invalid,
.signature-canvas.is-invalid {
    border-color: var(--error);
    outline: 3px solid rgba(160, 0, 0, 0.12);
}

.checkbox-field {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    color: var(--text);
    line-height: 1.45;
}

.checkbox-field input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.signature-field {
    margin-top: 8px;
}

.signature-canvas {
    width: 100%;
    height: 220px;
    display: block;
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: 16px;
    touch-action: none;
}

.signature-actions {
    display: flex;
    justify-content: flex-start;
}

.field-error {
    color: var(--error);
    font-size: 14px;
    font-weight: 700;
}

.alert {
    border-radius: 16px;
    padding: 16px 18px;
    line-height: 1.45;
}

.alert.error {
    color: var(--error);
    background: var(--error-bg);
    border: 1px solid rgba(160, 0, 0, 0.18);
}

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

.success-card {
    text-align: center;
}

.success-card .lead {
    margin-left: auto;
    margin-right: auto;
}

.success-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: #fff;
    background: var(--success);
    border-radius: 50%;
    font-size: 40px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .page {
        width: min(100% - 20px, 920px);
        padding: 18px 0;
    }

    .card {
        border-radius: 18px;
        padding: 22px;
    }

    .hero {
        min-height: calc(100vh - 36px);
    }

    .button,
    .actions,
    .actions .button,
    .actions .link {
        width: 100%;
    }

    .actions .link {
        text-align: center;
    }

    .signature-canvas {
        height: 200px;
    }
}

/* UX patch: compact choices and initiative details */
.initiative-summary {
    max-width: 780px;
    margin: 4px 0 24px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.42;
}

.initiative-summary p {
    margin: 0 0 6px;
}

.initiative-summary strong {
    color: var(--text);
    font-weight: 700;
}

.initiative-activities {
    max-width: 780px;
    margin-top: 34px;
    color: var(--text);
    line-height: 1.55;
}

.initiative-activities h2 {
    margin: 0 0 14px;
    font-size: clamp(22px, 3.2vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.initiative-activities p {
    margin: 0 0 14px;
}

.initiative-activities ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

.initiative-activities li {
    margin-bottom: 8px;
}

.section-note {
    color: var(--text);
    font-size: 16px;
    line-height: 1.45;
}

.radio-options.compact-grid,
.radio-options.inline-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.radio-option {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.radio-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.radio-option span {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
}

.radio-option input:checked + span {
    color: var(--primary-dark);
    border-color: var(--primary);
    background: rgba(201, 21, 27, 0.06);
    box-shadow: 0 0 0 3px rgba(201, 21, 27, 0.10);
}

.radio-option input:focus + span {
    outline: 3px solid rgba(201, 21, 27, 0.18);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .initiative-activities {
        margin-top: 28px;
    }

    .radio-options.compact-grid,
    .radio-options.inline-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .radio-option span {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 15px;
    }
}

/* Patch: move broader initiative scope below main buttons on the home screen */
.initiative-summary-after-actions {
    margin-top: 26px;
    margin-bottom: 30px;
}


/* Home page bottom logos */
.home-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 22px;
    padding-top: 6px;
    flex-wrap: wrap;
}

.home-logos img {
    display: block;
    width: auto;
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

.home-logos img:first-child {
    max-width: 170px;
}

.home-logos img:last-child {
    max-width: 190px;
}

@media (max-width: 640px) {
    .home-logos {
        gap: 14px;
        margin-top: 18px;
    }

    .home-logos img {
        max-height: 48px;
    }

    .home-logos img:first-child {
        max-width: 135px;
    }

    .home-logos img:last-child {
        max-width: 155px;
    }
}

/* GDPR modal and footer link */
.gdpr-footer-link {
    margin-top: 26px;
    text-align: center;
}

.gdpr-open {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gdpr-modal[hidden] {
    display: none;
}

.gdpr-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.gdpr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}

.gdpr-modal-box {
    position: relative;
    width: min(760px, 100%);
    max-height: min(78vh, 720px);
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}

.gdpr-modal-box h2 {
    margin: 0 0 14px;
    font-size: clamp(22px, 3vw, 30px);
}

.gdpr-modal-content {
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 20px;
    white-space: normal;
}

body.modal-open {
    overflow: hidden;
}
