.counter-ankieta-wrapper {
    counter-reset: counter-ankieta;
}

.counter-ankieta::before {
    counter-increment: counter-ankieta;
    content: counter(counter-ankieta);
    display: grid;
    place-content: center;
    background-color: #d8242f;
    border-bottom: solid #fdcb26 .6rem;
    border-radius: .5rem;
    width: 5rem;
    height: 5rem;
    aspect-ratio: 1 / 1;
    color: #fff;
    font-size: 2.5rem;
    position: static;
    font-weight: bold;
}

.ankieta {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1.125rem;
    font-family: 'Nunito Sans';
    line-height: 24px;
    display: grid;
    gap: 1.6875rem;
}

.ankieta label{
    display: flex;
    gap: .4em;
    align-items: center;
}

/* Ukrycie natywnych inputów */
label>input[type="checkbox"],
label>input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* Kontener z pozycją względną */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    position: relative;
}

/* Tło i obramowanie */
label:has(input[type="checkbox"])::before,
label:has(input[type="radio"])::before {
    content: '';
    display: block;
    width: 2rem;
    height: 2rem;
    aspect-ratio: 1/1;
    border: 2px solid #d8242f;
    border-radius: 6px;
    background-color: transparent;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Symbol: ✓ dla checkboxa, ● dla radio */
label:has(input[type="checkbox"])::after,
label:has(input[type="radio"])::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translate(-50%, -50%);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    color: white;
    font-weight: bold;
}

/* Zaznaczenie: kolor tła + widoczność symbolu */
label:has(input[type="checkbox"]:checked)::before,
label:has(input[type="radio"]:checked)::before {
    background-color: #d8242f;
    border-color: #d8242f;
}

label:has(input[type="checkbox"]:checked)::after,
label:has(input[type="radio"]:checked)::after {
    opacity: 1;
}