.page-faq {
    box-sizing: border-box;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 16px;
    color: #302d37;
    text-align: left;
}

.page-faq h2 {
    margin: 0 0 20px;
    color: #302d37;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.page-faq details {
    margin: 0 0 12px;
    background: #fff;
    border: 1px solid #e7e3ee;
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}

.page-faq details:hover,
.page-faq details[open] {
    border-color: #d3c6e6;
}

.page-faq details[open] {
    box-shadow: 0 6px 20px rgba(76, 52, 120, .08);
}

.page-faq summary {
    position: relative;
    display: block;
    padding: 18px 64px 18px 20px;
    border-radius: 12px;
    color: #302d37;
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    list-style: none;
    transition: color .2s;
}

.page-faq summary::-webkit-details-marker {
    display: none;
}

.page-faq summary::marker {
    content: '';
}

/* Кружок и шеврон справа от вопроса; при раскрытии шеврон разворачивается вверх. */
.page-faq summary::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    border-radius: 50%;
    background: #f3eff9;
    transition: background .2s;
}

.page-faq summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 29px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border: solid #6b4a99;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .2s, margin-top .2s;
}

.page-faq summary:hover,
.page-faq details[open] > summary {
    color: #613b8b;
}

.page-faq summary:hover::before,
.page-faq details[open] > summary::before {
    background: #e9e0f5;
}

.page-faq details[open] > summary::after {
    margin-top: -2px;
    transform: rotate(-135deg);
}

.page-faq summary:focus-visible {
    outline: 2px solid #674392;
    outline-offset: 2px;
}

.page-faq details p {
    margin: 0;
    padding: 0 20px 20px;
    color: #4a4553;
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .page-faq {
        margin: 28px auto;
    }

    .page-faq h2 {
        margin-bottom: 16px;
        font-size: 20px;
    }

    .page-faq details {
        margin-bottom: 10px;
    }

    .page-faq summary {
        padding: 16px 56px 16px 16px;
        font-size: 16px;
    }

    .page-faq summary::before {
        right: 14px;
    }

    .page-faq summary::after {
        right: 25px;
    }

    .page-faq details p {
        padding: 0 16px 16px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-faq details,
    .page-faq summary,
    .page-faq summary::before,
    .page-faq summary::after {
        transition: none;
    }
}
