@layer components {
    .faq-item {
        border-block-end: 1px solid var(--color-border);

        & .faq-item__question {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-xs);
            padding-block: var(--space-s);
            background: none;
            border: none;
            color: var(--color-text);
            font: inherit;
            font-weight: 600;
            font-size: 1.05rem;
            text-align: start;
            cursor: pointer;
            transition: color 0.2s var(--ease-out);

            &:hover {
                color: var(--color-accent-strong);
            }

            &[aria-expanded="true"] {
                color: var(--color-accent-strong);
            }

            &[aria-expanded="true"] .faq-item__icon {
                transform: rotate(180deg);
                background: var(--gradient-brand-strong);

                &::before,
                &::after {
                    background: var(--color-on-brand);
                }
            }
        }

        & .faq-item__icon {
            position: relative;
            flex-shrink: 0;
            width: 1.75rem;
            height: 1.75rem;
            border-radius: var(--radius-full);
            background: var(--color-surface-mixed);
            transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out);

            &::before,
            &::after {
                content: '';
                position: absolute;
                inset: 0;
                margin: auto;
                width: 0.6rem;
                height: 2px;
                border-radius: 1px;
                background: currentColor;
            }

            &::after {
                transform: rotate(90deg);
                transition: transform 0.3s var(--ease-out);
            }
        }

        & .faq-item__question[aria-expanded="true"] .faq-item__icon::after {
            transform: rotate(0deg);
        }

        /* Expand/collapse via a JS-measured max-height (see FaqItem_controller.js) — more
           reliable across engines than the CSS-only "0fr to 1fr grid track" trick, which
           behaved inconsistently once nested a few levels deep in this project's markup. */
        & .faq-item__answer {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s var(--ease-out);
        }

        & .faq-item__answer-text {
            margin: 0;
            padding-block-end: var(--space-s);
            color: var(--color-text-muted);
        }
    }
}
