h1,h2,h3,h4,h5,h6 {
    margin-top: 0;
    margin-bottom: .5rem
}

div.body h3 { font-size: 160%; }
div.body h4 { font-size: 140%; }
div.body h5 { font-size: 120%; }

p.rubric {font-size: 120%; }

table {
    margin-bottom: 1em;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

p.caption {
    margin-bottom: 0.5em;
}

#scroll-to-top {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: url('../_images/totop.svg');
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

#scroll-to-top:hover {
    opacity: 1;
}

.footer {
    display: none;
}

div.sphinxsidebarwrapper p.logo img {
    height: 100%;
}

div.sphinxsidebarwrapper h1.logo {
    margin-bottom: 20px;
}

div.sphinxsidebarwrapper h3#searchlabel {
    display: none;
}

/* Show sidebar on mobile by stacking it above content */
@media screen and (max-width: 875px) {

    html, body {
        margin: 0;
    }

    div.document {
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    div.sphinxsidebar {
        position: static;
        width: 100%;
        background: white;
    }

    div.documentwrapper {
        flex: 1;
        min-height: 0;
    }

    div.bodywrapper {
        margin: 0;
    }

    div.searchformwrapper {
        max-width: 350px;
    }
}

div.sphinxsidebarwrapper p.logo {
    text-align: left;
    margin-bottom: 20px;
    height: 60px;
}

div.sphinxsidebarwrapper h1.logo {
    font-size: 12px;
}

div.sphinxsidebarwrapper h1.logo a {
    color: #888;
}

div.script-block {
    background-color: #E4E4E4;
    padding: 2px 20px;
    margin-bottom: 10px;
}

code.op {
    margin-left: 6em;
    font-size: 0.7em;
}

span.smversion {
    margin-left: 1em;
    font-size: 0.8em;
}

#searchbox {
    margin-bottom: 10px;
}

div.sphinxsidebar {
    top:0;
    bottom:0;
    overflow-x: auto;
    overflow-y: auto;
}

a.current.reference {
    border-bottom: 1px solid #e53b4c;
}

div.body {
    max-width: none;
}

p.admonition-title {
    display: block;
}

div.admonition {
    padding: 15px 10px 3px 20px;
}

