.ddz-quiz,
.ddz-quiz * {
    box-sizing: border-box;
}

.ddz-quiz {
    max-width: 680px;
    margin: 40px auto;
    padding: 42px 48px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    color: #242638;
    font-family: inherit;
}

.ddz-quiz__header {
    text-align: center;
    margin-bottom: 32px;
}

.ddz-quiz__label {
    color: #c8102e;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 4px;
}

.ddz-quiz__header h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.16;
    color: #242638;
}

.ddz-quiz__header p {
    max-width: 500px;
    margin: 0 auto;
    color: #7b7f90;
    font-size: 16px;
    line-height: 1.55;
}

.ddz-quiz__question {
    background: #f4f4f5;
    border-radius: 12px;
    padding: 20px 18px;
    margin-bottom: 16px;
}

.ddz-quiz__question strong {
    display: block;
    font-size: 16px;
    line-height: 1.4;
    color: #242638;
}

.ddz-quiz__answers {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ddz-quiz__answers button {
    appearance: none;
    border: 2px solid #c8102e;
    background: #fff;
    color: #c8102e;
    border-radius: 16px;
    padding: 10px 18px;
    min-width: 60px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition:
            background-color 0.2s ease,
            border-color 0.2s ease,
            color 0.2s ease,
            transform 0.2s ease;
}

.ddz-quiz__answers button:hover,
.ddz-quiz__answers button.is-active {
    background: #c8102e;
    border-color: #c8102e;
    color: #fff;
}

.ddz-quiz__answers button:focus-visible {
    outline: 3px solid rgba(200, 16, 46, 0.25);
    outline-offset: 2px;
}

.ddz-quiz__answers button:active {
    transform: scale(0.98);
}

/*
 * Pole wyniku – ustawienia wspólne.
 * Kolor jest nadawany przez klasy:
 * is-low, is-medium oraz is-high.
 */
.ddz-quiz__result {
    margin-top: 32px;
    padding: 24px;
    border: 2px solid #d5d5d5;
    background: #f7f7f8;
    border-radius: 14px;
    transition:
            background-color 0.25s ease,
            border-color 0.25s ease;
}

.ddz-quiz__result h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #242638;
    transition: color 0.25s ease;
}

.ddz-quiz__result p {
    margin: 0;
}

/*
 * NISKI poziom ryzyka – zielony
 */
.ddz-quiz__result.is-low {
    border-color: #16a34a;
    background: #ecfdf3;
}

.ddz-quiz__result.is-low h3 {
    color: #166534;
    margin: 0 0 14px;
}

/*
 * ŚREDNI poziom ryzyka – pomarańczowy
 */
.ddz-quiz__result.is-medium {
    border-color: #f59e0b;
    background: #fffbeb;
}

.ddz-quiz__result.is-medium h3 {
    color: #92400e;
    margin: 0 0 14px;
}

/*
 * WYSOKI poziom ryzyka – czerwony
 */
.ddz-quiz__result.is-high {
    border-color: #dc2626;
    background: #fef2f2;
}

.ddz-quiz__result.is-high h3 {
    color: #991b1b;
    margin: 0 0 14px;
}

.ddz-quiz__score {
    margin-top: 10px !important;
    font-size: 13px;
    color: #62677a;
}

.ddz-quiz__form {
    margin-top: 24px;
}

.ddz-quiz__form input[type="email"] {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid #d5d5d5;
    background: #f7f7f8;
    color: #242638;
    font-size: 16px;
    outline: none;
}

.ddz-quiz__form input[type="email"]:focus {
    border-color: #c8102e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.ddz-quiz__consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 14px 0;
    color: #62677a;
    font-size: 14px;
    line-height: 1.45;
}

.ddz-quiz__consent input {
    margin-top: 3px;
}

.ddz-quiz__form button[type="submit"] {
    width: 100%;
    min-height: 60px;
    margin-top: 16px;
    border: 0;
    border-radius: 14px;
    background: #c8102e;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition:
            opacity 0.2s ease,
            transform 0.2s ease;
}

.ddz-quiz__form button[type="submit"]:hover {
    opacity: 0.92;
}

.ddz-quiz__form button[type="submit"]:active {
    transform: scale(0.99);
}

.ddz-quiz__form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ddz-quiz__small {
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #8a8e9d;
    margin: 16px 0 0;
}

.ddz-quiz__message {
    margin-top: 12px;
    text-align: center;
    font-weight: 700;
    color: #242638;
}

.ddz-quiz__notice {
    padding: 18px;
    border-radius: 12px;
    background: #fff8e5;
    border: 1px solid #f0c36d;
}

@media (max-width: 768px) {
    .ddz-quiz {
        margin: 24px auto;
        padding: 28px 20px;
        border-radius: 14px;
    }

    .ddz-quiz__header {
        margin-bottom: 24px;
    }

    .ddz-quiz__question {
        padding: 18px 16px;
    }

    .ddz-quiz__result {
        padding: 20px 18px;
    }
}