/**
 * hana+nils · Büro für Gestaltung
 * https://hananils.de · buero@hananils.de
 */

.jumpmarks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    min-height: 3.8rem;
    margin-top: 0;
    padding: 0.8rem var(--dynamic-spacing-inline-end) 0.8rem
        var(--dynamic-spacing-inline-start);
    color: var(--color-text);
    font-size: var(--text-size-fine);
    /* line-height is smaller than what we list in app.typography.css – looks better in this case */
    line-height: 1.4;
    background-color: var(--color-surface);
    z-index: var(--z-index-top);
}

.jumpmarks + * {
    margin-top: 2.75rem;
}

@supports (display: grid) {
    .jumpmarks {
        top: 5.4rem;
    }

    @media (min-height: 700px) and (min-width: 500px) {
        .jumpmarks {
            top: 0;
        }
    }
}

.jumpmarks p {
    position: relative;
    overflow: hidden;
    width: 0.7rem;
    margin-right: 1.28rem;
    color: transparent;
    font-weight: var(--text-weight-bold);
    font-variant: small-caps;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.jumpmarks p::after {
    content: '↓';
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
    color: var(--color-text);
    font-weight: var(--text-weight-extrablack);
}

@media (min-width: 500px) {
    .jumpmarks p {
        overflow: auto;
        width: auto;
        color: var(--color-text);
    }

    .jumpmarks p::after {
        position: relative;
        left: auto;
        padding-left: 0.48rem;
    }
}

.jumpmarks ol {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-weight: var(--text-weight-blond);
    list-style: none;
}

.jumpmarks li {
    float: left;
}

@supports (display: flex) {
    .jumpmarks ol {
        overflow: auto;
    }

    .jumpmarks li {
        float: none;
    }
}

.jumpmarks li + li::before {
    content: '·';
    margin: 0 0.5ch 0 0.8ch;
}

.jumpmarks a {
    text-decoration: none;
}

.jumpmarks a.is-current,
.jumpmarks a:hover {
    color: var(--color-jeweled-peach);
}
