/* header.header-main del tema ki e' fixed e alto 65px: sticky e ancore devono starci sotto */
:root {
    --guide-header-offset: 65px;
}

.guide-sticky {
    position: sticky;
    top: calc(var(--guide-header-offset) + 1rem);
    max-height: calc(100vh - var(--guide-header-offset) - 2rem);
    overflow-y: auto;
}

.guide-search-compact {
    width: 260px;
}

.guide-search-results {
    z-index: 1000;
    min-width: 320px;
    max-height: 60vh;
    overflow-y: auto;
}

    .guide-search-results mark {
        padding: 0;
        background-color: rgba(var(--warning), 0.25);
    }

.guide-nav-link {
    border-left: 2px solid transparent;
    border-radius: 0;
    color: var(--bs-secondary-color);
}

    .guide-nav-link.active {
        color: var(--bs-primary);
        border-left-color: var(--bs-primary);
        font-weight: 600;
    }

.guide-content {
    line-height: 1.75;
}

    .guide-content > :last-child {
        margin-bottom: 0;
    }

    .guide-content h1 {
        display: none;
    }

    .guide-content h2 {
        font-size: 1.15rem;
        font-weight: 700;
        margin-top: 2.25rem;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid var(--bs-border-color);
        scroll-margin-top: calc(var(--guide-header-offset) + 1.5rem);
    }

        .guide-content h2:first-of-type {
            margin-top: 0;
        }

    .guide-content h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-top: 1.5rem;
        scroll-margin-top: calc(var(--guide-header-offset) + 1.5rem);
    }

    .guide-content li {
        margin-bottom: 0.35rem;
    }

    /* Nei .md il --- separa le macro-sezioni, ma qui a separare basta il bordo sotto gli h2 */
    .guide-content hr {
        display: none;
    }

    .guide-content pre {
        background: var(--bs-tertiary-bg);
        padding: 1rem;
        border: 1px solid var(--bs-border-color);
        border-radius: var(--app-border-radius);
        overflow-x: auto;
    }

    .guide-content :not(pre) > code {
        color: var(--bs-danger);
    }
