.anchor-nav {
    display: flex;
    align-items: flex-start;
    column-gap: 0.75rem;
    margin-block: 1rem;

    input[type="checkbox"] {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
        display: inline-block;
    }

    label {
        width: 1.5rem;
        height: 3rem;
        display: none;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        position: relative;
    }

    label::before, label::after {
        content: "";
        transition: all 0.3s ease-in-out;
        border: 1px solid var(--color-primary);
        border-radius: 4px;
        width: 16px;
        height: 0;
        position: absolute;
    }

    input:checked ~ ul {
        flex-wrap: wrap; /* fully expanded */
    }

    input[type="checkbox"]:focus-visible ~ label {
        outline: 2px solid var(--color-black);
    }

    input:not(:checked) ~ label::after {
        transform: rotate(90deg);
    }

    > ul {
        display: flex;
        margin-block: 0;
        gap: 0.75rem;
        overflow-x: scroll;
        scroll-behavior: smooth;
        scrollbar-width: none;
        white-space: nowrap;
        list-style: none;
        padding-left: 0;
    }

    .anchor-nav__link {
        border: 2px solid var(--color-bright-gray);
        border-radius: 8px;
        padding: 0.75rem;
        text-transform: capitalize;
        display: inline-flex;
        text-decoration: none;

        &:hover {
            color: var(--color-white);
            background-color: var(--color-raspberry);
        }

        &:focus {
            outline: 2px solid var(--color-black);
            outline-offset: -3px;
        }
    }

    @media (min-width: 1024px) {
        &.anchor-nav--expandable label {
            display: flex;
        }
    }
}