.h2-anchors {
    --h2a-accent: #c41265;
    --h2a-text: #595959;
    --h2a-border: #dedede;
    --h2a-offset: 96px;
    box-sizing: border-box;
    width: 100%;
    margin-block: 1.5rem;
    color: var(--h2a-text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    text-align: start;
}

.h2-anchors[hidden] {
    display: none !important;
}

.h2-anchors .h2-anchors__title {
    margin: 0 0 0.875rem;
    color: inherit;
    font: inherit;
    font-weight: 700;
}

.h2-anchors .h2-anchors__list {
    margin: 0;
    padding: 0;
    border-inline-start: 1px solid var(--h2a-border);
    list-style: none;
}

.h2-anchors .h2-anchors__item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.h2-anchors .h2-anchors__item::before,
.h2-anchors .h2-anchors__item::marker {
    content: none;
}

.h2-anchors .h2-anchors__link {
    display: block;
    box-sizing: border-box;
    margin-inline-start: -1px;
    padding: 0.625rem 0.5rem 0.625rem 1rem;
    border-inline-start: 2px solid transparent;
    color: var(--h2a-text);
    background: transparent;
    box-shadow: none;
    font: inherit;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 120ms ease, border-color 120ms ease;
}

[dir="rtl"] .h2-anchors .h2-anchors__link {
    padding-right: 1rem;
    padding-left: 0.5rem;
}

.h2-anchors .h2-anchors__link:hover {
    color: var(--h2a-accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.h2-anchors .h2-anchors__link[aria-current="location"] {
    border-inline-start-color: var(--h2a-accent);
    color: var(--h2a-accent);
    font-weight: 700;
}

.h2-anchors .h2-anchors__link:focus-visible {
    outline: 2px solid var(--h2a-accent);
    outline-offset: -2px;
    border-radius: 2px;
}

.h2-anchors__target {
    scroll-margin-top: var(--h2a-target-offset, 96px);
}

.h2-anchors__target:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 0.3em;
}

@media (min-width: 900px) {
    .h2-anchors--sticky {
        position: sticky;
        top: var(--h2a-effective-offset, var(--h2a-offset));
        align-self: start;
        max-height: max(8rem, calc(100vh - var(--h2a-effective-offset, var(--h2a-offset)) - 1.5rem));
        max-height: max(8rem, calc(100dvh - var(--h2a-effective-offset, var(--h2a-offset)) - 1.5rem));
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

@media (prefers-reduced-motion: reduce) {
    .h2-anchors .h2-anchors__link {
        transition: none;
    }
}

@media print {
    .h2-anchors {
        display: none;
    }

    .h2-anchors__target {
        scroll-margin-top: 0;
    }
}
