#preamble {
  background: var(--bgcolor);
}

#preamble header {
  /* padding-top: 10vh; */  
    padding: 2vh 0;
    margin: 2.5% 2.5% 2.5% 345px;
    display: flex;
    width: 95%;
}

a[href*="//"]:after {
  font-weight: 300;
  font-size: .85em;
  content: "\2197"; /* top right arrow: ↗ */
}

#preamble nav {
    max-width: 1000vw;    
    text-align: center;
    font-size: 1.2em;
    flex: 1;
}

@media screen and (max-width: 768px) {
    #preamble header {
        margin-left: 0;
        padding: 5vh 5vw 0 5vw;
    }
}

@media (max-width: 600px) {
    #preamble {
        width: 100%;
        padding: 0 0;
        margin-top: 20px;
        margin-bottom: 30px;
        /* display: block; */
    }

    #preamble header {
        /* display: block; */
    }

    #preamble nav {
        /* display: inline-block; */
        line-height: 2.5em;
    }
}

#preamble #toggle-dark {
  flex: 1;
}

#preamble #toggle-dark .checkbox {
  opacity: 0;
  position: absolute;  
}

#preamble #toggle-dark .label {
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
  border-radius: 50px;
  position: relative;
  height: 26px;
  width: 44px;
}

#preamble #toggle-dark .ball {
  background-color: #fff;
  border-radius: 50px;
  position: absolute;
  top: 7px;
  left: 4px;
  width: 20px;
  height: 20px;
  transition: transform 0.2s linear;
}

#preamble #toggle-dark .toggled {
  transform: translateX(20px);
}

#preamble #toggle-dark .checkbox:checked + .label .ball {
  transform: translateX(20px);
}

#preamble #toggle-dark .checkbox:checked + .label .toggled {
  transform: translateX(-2px);
}

#preamble #toggle-dark .sun {
  width: 1.35em;
  height: 1.35em;
}

#preamble #toggle-dark .moon {
  height: 1.35em;
  width: 1.35em;
}
