.faq-embed {
    --paper-card: var(--global-code-background-color);
    --ink: var(--global-text-color);
    --ink-soft: var(--global-text-color-light);
    --accent: var(--global-accent-text-color);
    --hairline: var(--global-border-color);
}

.faq-embed,
.faq-embed * {
    box-sizing: border-box;
}

.faq-embed {
    background: transparent;
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding: 2.5rem 0 3rem;
}

.faq-embed .fq-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0.5rem;
    container-type: inline-size;
    container-name: fq;
}

.faq-embed .layout {
    display: grid;
    grid-template-columns: minmax(0, 220px) 1fr;
    gap: 1.0rem;
    align-items: start;
}

.faq-embed nav.index {
    position: sticky;
    top: 1rem;
    border-left: 2px solid var(--hairline);
    padding-left: 1.2rem;
}

.faq-embed nav.index .index-label {
    font-size: 1.3rem;
    color: var(--ink);
    margin: 0 0 0.9rem;
}

.faq-embed nav.index ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.faq-embed nav.index button {
    all: unset;
    cursor: pointer;
    font-family: "Tsukimi Rounded", sans-serif;
    font-size: 1.0rem;
    color: var(--ink-soft);
    padding: 0.15rem 0;
    transition: color 0.15s ease;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    text-align: left;
    width: 100%;
}

.faq-embed nav.index button .count {
    font-size: 0.75rem;
    color: var(--ink-soft);
    opacity: 0.55;
}

.faq-embed nav.index button:hover,
.faq-embed nav.index button.active {
    color: var(--ink);
}

.faq-embed nav.index button.active {
    color: var(--accent);
}

.faq-embed nav.index button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.faq-embed section.category {
    margin-bottom: 3rem;
    scroll-margin-top: 1.5rem;
}

.faq-embed section.category h3 {
    font-family: "Tsukimi Rounded", sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    margin: 0 0 1.1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
}

.faq-embed details.item {
    background: var(--paper-card);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    margin-bottom: 0.7rem;
    overflow: hidden;
}

.faq-embed details.item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.05rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: left;
}

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

.faq-embed details.item summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.faq-embed .plus {
    flex: none;
    width: 22px;
    height: 22px;
    position: relative;
}

.faq-embed .plus::before,
.faq-embed .plus::after {
    content: '';
    position: absolute;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
}

.faq-embed .plus::before {
    width: 14px;
    height: 2px;
}

.faq-embed .plus::after {
    width: 2px;
    height: 14px;
    transition: transform 0.2s ease;
}

.faq-embed details.item[open] .plus::after {
    transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

.faq-embed .answer {
    padding: 0 1.2rem 1.2rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
    max-width: 68ch;
    text-align: justify;
}

.faq-embed .answer p {
    margin: 0;
}

@container fq (max-width: 700px) {
    .faq-embed .layout {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .faq-embed nav.index {
        position: static;
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid var(--hairline);
        padding-bottom: 1rem;
    }

    .faq-embed nav.index ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem 1rem;
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 760px) {
        .faq-embed .layout {
            grid-template-columns: 1fr;
            gap: 1.8rem;
        }

        .faq-embed nav.index {
            position: static;
            border-left: none;
            padding-left: 0;
            border-bottom: 1px solid var(--hairline);
            padding-bottom: 1rem;
        }

        .faq-embed nav.index ul {
            flex-direction: row;
            flex-wrap: wrap;
            gap: 0.4rem 1rem;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-embed * {
        transition: none !important;
    }
}

.image-center {
    width: 85%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}