/*
 * FAQ: a title and a note on the left, the questions as an accordion on the right.
 * The accordion is native <details>, so it works without script.
 */

.faq {
    margin-bottom: var(--section-gap);
}

.faq__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 56px;
    align-items: start;
}

.faq__title {
    margin: 0;
    font-size: 34px;
    line-height: 1.14;
    letter-spacing: -0.035em;
    font-weight: 600;
    color: var(--ink);
}

.faq__note {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.faq__link {
    color: var(--accent-ink);
}

.faq__item {
    border-top: 1px solid var(--line);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    font-size: 17px;
    color: var(--ink);
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.faq__icon {
    position: relative;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent-tint);
    transition: transform 0.2s ease, background 0.2s ease;
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
    border-radius: 1px;
    background: var(--accent);
    transition: background 0.2s ease;
}

.faq__icon::after {
    transform: rotate(90deg);
}

.faq__item[open] .faq__icon {
    transform: rotate(45deg);
    background: var(--gradient);
}

.faq__item[open] .faq__icon::before,
.faq__item[open] .faq__icon::after {
    background: #fff;
}

.faq__answer {
    padding: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* The answer is the editor's classless HTML, styled by tag. */
.faq__answer p,
.faq__answer ul,
.faq__answer ol {
    margin: 0 0 12px;
}

.faq__answer > :last-child {
    margin-bottom: 0;
}

.faq__answer ul,
.faq__answer ol {
    padding-left: 22px;
}

.faq__answer strong,
.faq__answer b {
    font-weight: 600;
    color: var(--ink);
}

.faq__answer a {
    color: var(--accent-ink);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .faq__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
}

@media (max-width: 767px) {
    .faq__title {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq__icon,
    .faq__icon::before,
    .faq__icon::after {
        transition: none;
    }
}
