header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 40px;
    display: flex;
    background-color: #ebebeb;
    box-shadow: 0 0 3px #000;
    margin-bottom: 1px;
}

/* header h1, */
header>div.button {
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-right: #fff 2px solid;
}

header h1 {
    /* background-color: #fff; */
    font-weight: bold;
    font-size: 20px;
    /* cursor: initial; */
    margin: 0;
}

header>div.button {
    cursor: pointer;
    background-color: #eee;
}

header>div.button:hover {
    background-color: #ddd;
}

header>div.button:active {
    background-color: #aaa;
}

nav {
    display: flex;
    /* margin-top: 45px; */
}

nav>ul {
    display: flex;
    margin: 0;
}

nav ul {
    padding: 0;
}

nav>ul>li>a, header>a {
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-right: #fff 2px solid;
    background-color: #eee;
}

nav ul>li ul {
    background-color: #eee;
    position: absolute;
    top: 100%;
}

nav ul>li ul ul {
    top: unset;
    left: 100%;
}

nav ul>li>a, header>a {
    text-decoration: none;
    cursor: pointer;
}

nav ul>li>a:hover, header>a:not(:first-child):hover {
    background-color: #ddd;
}

nav ul>li>a:active, header>a:not(:first-child):active {
    background-color: #aaa;
}

nav ul>li li>a {
    flex: 1;
    padding: 5px;
}

nav ul>li a+ul>li {
    border-top: solid #fff 1px;
    display: none;
}

nav>ul>li,
nav ul>li a:hover+ul>li,
nav ul>li a+ul:hover>li {
    display: flex;
}

nav li a, header>a {
    color: inherit;
}