.ApiMenu {
    position: fixed;
    inset: 0;
    z-index: 1;
    padding: 0 1rem 1rem;
    overflow-y: auto;
    border-radius: 1em;
    font-family: var(--font-headings);
    background: var(--color-cloudy);
}

.ApiMenu__toggle {
    min-width: 100%;
    padding: .8em 2em;
    border-radius: 1em;
    background: var(--color-cloudy) url(bars.svg) no-repeat 1em 50%;
    background-size: 1em;
    cursor: pointer;
    outline: inherit;
}

.ApiMenu__toggle--show {
    margin-top: 1rem;
}

.ApiMenu__toggle--hide {
    position: sticky;
    top: 0;
    width: calc(100% + 2rem);
    margin: 0 -1rem 1rem;
    background-image: url(close.svg);
    background-color: #fff;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, .07), 0 2px 0 1px rgba(0,0,0,.07);
}

.ApiMenu__title {
    position: absolute;
    left: -999em;
}

@media screen and (min-width: 769px) {
    .ApiMenu {
        position: sticky;
        right: unset;
        bottom: unset;
        left: unset;
        height: 100%;
        max-height: 100%;
        padding: max(3vw, 1rem) 1rem 1rem 0;
        font-size: .875rem;
        background: var(--color-white);
    }

    .ApiMenu__toggle {
        display: none;
    }
}

.ApiMenu ul,
.ApiMenu ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ApiMenu__link {
    display: block;
    margin-bottom: .3em;
    padding: .3em .5rem .3rem .3em;
    border-radius: .5em;
    text-decoration: none;
    color: inherit;
    transition: background .1s;
}

.ApiMenu .--active,
.ApiMenu__link:hover {
    text-decoration: none;
    background: #F6F5FA;
}

.ApiMenu__name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-left: 1.2em;
}

.ApiMenu__link--toggle .ApiMenu__name  {
    background: url(expand.svg) no-repeat 0 50%;
    background-size: .7em;
}

.ApiMenu__link--toggle.--open .ApiMenu__name {
    background-image: url(collapse.svg);
}

.ApiMenu ol > li > a {
    font-weight: 500;
}

.ApiMenu .--active {
    color: #000;
    background: #F6F5FA;
    box-shadow: 0 0 1px #481FFF inset;
}

.ApiMenu__subMenu {
    position: absolute;
    left: -999em;
}

.--open ~ .ApiMenu__subMenu {
    position: static;
}

.ApiMenu__subMenu .ApiMenu__link {
    padding-left: 1rem;
}

@media screen and (max-width: 768px) {
    .ApiMenu[aria-hidden='true'] {
        right: 100vw;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        white-space: nowrap !important;
    }

    .ApiMenu__link {
        padding-block: .4em;
    }
}

@media screen and (min-height: 769px) {
    .ApiMenu__link {
        padding-block: .4em;
    }
}