/* Shared Hub category navigation surface for FAQ and Guide.
   Page-specific behaviour is deliberately preserved: FAQ filters topics;
   Guide expands groups of linked guides and remembers internal scroll. */
.faq-index-page .hub-topic-sidebar,
#guidePage .guide-show-categories.hub-topic-sidebar {
    --topic-accent: var(--amoot-color, #2166ae);
    --topic-line: #e5e9ef;
    --topic-soft: #f7f9fb;
    --topic-muted: #797f88;
    --topic-text: #545f6d;
    border: 1px solid var(--topic-line);
    border-radius: 8px;
    background: var(--topic-soft);
    box-shadow: none;
    min-width: 0;
}

.faq-index-page .hub-topic-sidebar.hc-faq__category-buttons {
    padding: 17px 13px;
    scrollbar-color: #cbd4df transparent;
    scrollbar-width: thin;
}

#guidePage .guide-show-categories.hub-topic-sidebar {
    padding: 0;
    overflow: hidden;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__heading {
    padding: 0 10px 12px;
    margin: 0 0 7px;
    border-bottom: 1px solid var(--topic-line);
    background: var(--topic-soft);
}

#guidePage .hub-topic-sidebar .hub-topic-sidebar__heading {
    flex: 0 0 auto;
    padding: 17px 23px 12px;
    border-bottom: 1px solid var(--topic-line);
    background: var(--topic-soft);
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__heading strong,
#guidePage .hub-topic-sidebar .hub-topic-sidebar__heading h2 {
    display: block;
    margin: 0;
    color: #333a44;
    font-size: 14px !important;
    font-weight: 750;
    line-height: 1.8;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__heading span,
#guidePage .hub-topic-sidebar .hub-topic-sidebar__description {
    display: block;
    color: var(--topic-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.9;
    margin-top: 5px;
}

#guidePage .hub-topic-sidebar .hub-topic-sidebar__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd4df transparent;
    padding: 9px 13px 13px;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__row,
#guidePage .hub-topic-sidebar .hub-topic-sidebar__row {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--topic-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.8;
    text-align: right;
    text-decoration: none;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__row:hover,
#guidePage .hub-topic-sidebar .hub-topic-sidebar__row:hover {
    background: #fff;
    color: var(--topic-accent);
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__row.is-active,
#guidePage .hub-topic-sidebar .guide-show-category.is-current > .hub-topic-sidebar__row {
    color: var(--topic-accent);
    border-color: #d9e5f4;
    background: #fff;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__count,
#guidePage .hub-topic-sidebar .hub-topic-sidebar__count {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 5px;
    border-radius: 4px;
    text-align: center;
    color: #7c8692;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.8;
    font-variant-numeric: tabular-nums;
}

.faq-index-page .hub-topic-sidebar .hub-topic-sidebar__row.is-active .hub-topic-sidebar__count,
#guidePage .hub-topic-sidebar .guide-show-category.is-current > .hub-topic-sidebar__row .hub-topic-sidebar__count {
    color: var(--topic-accent);
    background: #edf4fc;
}

#guidePage .hub-topic-sidebar .hub-topic-sidebar__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

#guidePage .hub-topic-sidebar .hub-topic-sidebar__chevron {
    flex: 0 0 15px;
    color: #8b95a3;
    transition: transform .15s ease;
}

#guidePage .hub-topic-sidebar .guide-show-category[open] .hub-topic-sidebar__chevron {
    transform: rotate(180deg);
}

#guidePage .hub-topic-sidebar .guide-show-category > ul {
    padding: 4px 10px 7px 0;
}

#guidePage .hub-topic-sidebar .guide-show-category__link {
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.8;
    border-right: 2px solid transparent;
    border-radius: 5px;
}

#guidePage .hub-topic-sidebar .guide-show-category__link.is-active {
    background: #fff;
    color: var(--topic-accent);
    border: 1px solid #d9e5f4;
    border-right: 2px solid var(--topic-accent);
}

.faq-index-page .hub-topic-sidebar :is(button, a):focus-visible,
#guidePage .hub-topic-sidebar :is(summary, a, button):focus-visible {
    outline: 2px solid var(--topic-accent);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    /* FAQ retains its content-first mobile grid. */
    .faq-index-page .hc-faq--content-first > .hub-topic-sidebar.hc-faq__category-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        max-height: none;
        padding: 12px;
        overflow: visible;
    }

    .faq-index-page .hub-topic-sidebar .hub-topic-sidebar__heading {
        grid-column: 1 / -1;
        padding: 4px 5px 12px;
    }

    .faq-index-page .hub-topic-sidebar .hub-topic-sidebar__row {
        background: #fff;
        border-color: var(--topic-line);
    }
}

@media (max-width: 399.98px) {
    .faq-index-page .hc-faq--content-first > .hub-topic-sidebar.hc-faq__category-buttons {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #guidePage .hub-topic-sidebar .hub-topic-sidebar__chevron { transition: none; }
}
