/* HIPPOLIT: spis treści tylko na stronach pojedynczych artykułów. */
html,
body {
    scroll-behavior: auto !important;
}

.singleNews.hippolit-blog-page {
    --hippolit-toc-top: 84px;
    margin-top: calc(var(--hippolit-toc-top) + 4px);
}

.hippolit-article-layout {
    display: block;
}

.hippolit-article-content {
    display: flow-root;
    min-width: 0;
}

.hippolit-article-content [id] {
    scroll-margin-top: var(--hippolit-toc-top);
}

.hippolit-toc {
    box-sizing: border-box;
    margin: 0 0 28px;
    border: 1px solid #dfd7c4;
    border-radius: 12px;
    background: #f8f5ec;
    color: #303030;
    font: 400 13px/1.5 "Open Sans", Arial, sans-serif;
    overflow-wrap: anywhere;
}

.hippolit-toc * {
    box-sizing: border-box;
}

.hippolit-toc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 16px 18px;
    color: #303030;
    font: 600 16px/1.5 Poppins, Arial, sans-serif;
    list-style: none;
    cursor: pointer;
}

.hippolit-toc__summary::-webkit-details-marker {
    display: none;
}

.hippolit-toc__summary::after {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-right: 2px solid #756039;
    border-bottom: 2px solid #756039;
    transform: rotate(45deg);
}

.hippolit-toc__details[open] > .hippolit-toc__summary::after {
    transform: rotate(225deg);
}

.hippolit-toc .hippolit-toc__list {
    margin: 0;
    padding: 0 12px 14px;
    list-style: none;
    counter-reset: hippolit-toc;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b5a681 transparent;
}

.hippolit-toc__list > li {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-increment: hippolit-toc;
}

.hippolit-toc__list > li > a {
    position: relative;
    display: block;
    min-height: 40px;
    margin: 2px 0;
    padding: 9px 8px 9px 35px;
    border-left: 3px solid transparent;
    border-radius: 4px;
    color: #3c3c3c;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    white-space: normal;
}

.hippolit-toc__list > li > a::before {
    content: counter(hippolit-toc) ".";
    position: absolute;
    top: 9px;
    left: 7px;
    width: 22px;
    color: #756039;
    font-weight: 600;
}

.hippolit-toc__list > li > a:hover,
.hippolit-toc__list > li > a[aria-current="location"] {
    border-left-color: #806531;
    background: #eee5cf;
    color: #282828;
}

.hippolit-toc__list > li > a:focus-visible,
.hippolit-toc__summary:focus-visible {
    outline: 2px solid #806531;
    outline-offset: 2px;
}

@media screen and (min-width: 1100px) {
    .singleNews.hippolit-blog-page {
        --hippolit-toc-top: calc(5vw + 20px);
        margin-top: calc(var(--hippolit-toc-top) + 16px);
    }

    .singleNews--toc .singleNews__wrap {
        width: calc(100% - 8vw) !important;
        max-width: 1440px;
        height: auto;
    }

    .hippolit-article-layout {
        display: grid;
        grid-template-columns: clamp(220px, 20vw, 280px) minmax(0, 1fr);
        align-items: start;
        gap: clamp(24px, 3vw, 48px);
    }

    .hippolit-toc {
        position: sticky;
        top: var(--hippolit-toc-top);
        align-self: start;
        margin: 0;
    }

    .hippolit-toc .hippolit-toc__list {
        max-height: max(80px, calc(100vh - var(--hippolit-toc-top) - 90px));
        max-height: max(80px, calc(100dvh - var(--hippolit-toc-top) - 90px));
        overflow-y: auto;
    }
}

@media screen and (max-width: 1099px) {
    .hippolit-toc__list > li > a {
        min-height: 44px;
        font-size: 14px;
    }
}

@media print {
    .hippolit-toc {
        display: none;
    }

    .hippolit-article-layout {
        display: block;
    }

    .singleNews--toc .singleNews__wrap {
        width: 100% !important;
        max-width: none;
    }
}
