html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body {
    margin: 0;
    display: flex;
    height: 100vh;
    font-size: 16px;
}
#sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid lightgray;
    overflow-y: auto;
    padding: 12px 12px;
}
#filter {
    width: 100%;
    padding: 8px 8px;
    margin-bottom: 10px;
    font: inherit;
    border: 1px solid lightgray;
    border-radius: 8px;
}
#cmdlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
#cmdlist button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    padding: 5px 10px;
    font: inherit;
    border-radius: 6px;
}
#cmdlist button:hover {
    background: #f0f0f0;
}
#cmdlist li.active button {
    background: #d4e5fc;
    color: #004cad;
    font-weight: 600;
}
#cmdlist li.hidden {
    display: none;
}
#main {
    background: #f8f8f8;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
#diagram {
    flex: 1;
    overflow: auto;
    padding: 20px;
    min-height: 0;
}
#diagram figure.subgraph {
    margin: 0;
}

#navToggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    border: 1px solid lightgray;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 3px #202020;
}
#scrim {
    display: none;
}
@media (max-width: 720px) {
    #navToggle {
        display: flex;
    }
    body.nav-open #navToggle {
        display: none;
    }
    #sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 80vw);
        z-index: 2;
        transform: translateX(-105%);
        transition: transform 0.2s ease-out;
    }
    body.nav-open #sidebar {
        transform: none;
        box-shadow: 0 0 12px #202020;
    }
    body.nav-open #scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1;
        background: #20202080
    }
}
