/* Article navigation and FAQ refinements */

.article-toc {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(9, 26, 46, 0.94), rgba(8, 28, 49, 0.86)),
        rgba(11, 31, 53, 0.9);
    border: 1px solid rgba(0, 201, 167, 0.2);
    border-top: 2px solid rgba(0, 201, 167, 0.64);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.article-toc__list {
    gap: 4px;
}

.article-toc__item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    min-height: 30px;
    padding: 3px 0;
}

.article-toc__item::before {
    content: attr(data-toc-number);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 24px;
    border: 1px solid rgba(0, 201, 167, 0.2);
    border-radius: 999px;
    background: rgba(0, 201, 167, 0.055);
    color: rgba(0, 201, 167, 0.86);
    font-size: 11px;
    line-height: 1;
}

.article-toc__item--sub {
    grid-template-columns: 52px minmax(0, 1fr);
    margin-left: 26px;
    padding-left: 16px;
    border-left: 1px solid rgba(0, 201, 167, 0.18);
}

.article-toc__item--sub::after {
    content: none !important;
    display: none !important;
}

.article-toc__item--sub::before {
    content: attr(data-toc-number) !important;
    width: 40px;
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(0, 201, 167, 0.16);
    color: rgba(133, 218, 204, 0.82);
}

.article-toc__item a {
    display: block;
    padding: 2px 0;
}

.article-toc__item a:hover,
.article-toc__item a:focus {
    color: #f5fbff;
}

.article-faq {
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(9, 30, 52, 0.94), rgba(7, 27, 48, 0.88)),
        rgba(9, 29, 50, 0.92);
    border: 1px solid rgba(0, 201, 167, 0.16);
    border-top: 2px solid rgba(0, 201, 167, 0.48);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.article-faq__list {
    display: grid;
    gap: 10px;
}

.article-faq__item {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.article-faq__item[open] {
    border-color: rgba(0, 201, 167, 0.28) !important;
    background: rgba(0, 201, 167, 0.045);
}

.article-faq__item summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 16px 58px 16px 18px;
}

.article-faq__item summary::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 201, 167, 0.78);
    box-shadow: 0 0 0 5px rgba(0, 201, 167, 0.08);
}

.article-faq__item summary::after {
    content: ">" !important;
    position: absolute;
    top: 50%;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 201, 167, 0.26);
    border-radius: 50%;
    background: rgba(0, 201, 167, 0.06);
    color: var(--teal);
    font-size: 22px;
    line-height: 1;
    transform: translateY(-50%) rotate(90deg);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.article-faq__item[open] summary::after {
    content: ">" !important;
    border-color: rgba(0, 201, 167, 0.48);
    background: rgba(0, 201, 167, 0.12);
    transform: translateY(-50%) rotate(-90deg);
}

.article-faq__answer {
    max-width: none;
    padding: 0 58px 20px 40px;
}

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

@media (max-width: 768px) {
    .article-toc,
    .article-faq {
        padding: 20px;
    }

    .article-toc__item,
    .article-toc__item--sub {
        grid-template-columns: 42px minmax(0, 1fr);
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .article-toc__item::before,
    .article-toc__item--sub::before {
        width: 34px;
    }

    .article-faq__item summary {
        padding: 15px 52px 15px 16px;
    }

    .article-faq__answer {
        padding: 0 20px 18px 38px;
    }
}
