.menu {
  position: relative;
  z-index: 1;
  padding: 1.1rem var(--menu-pad-x) 2rem;
  border-right: 1px solid var(--cyan);
  overflow-wrap: break-word;
}

/* Full-height menu column, from below the header down to the footer. */
.workspace::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--menu-width);
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  /* PNG first, then SVG over PNG: SVG where supported, PNG otherwise. */
  background-image: url("../images/voronoi-2.png");
  background-image: url("../images/voronoi-2.svg"), url("../images/voronoi-2.png");
  background-repeat: repeat;
  background-size: 200px 200px;
  /* Viewport-locked so the same tile grid continues from header into menu. */
  background-attachment: fixed;
}

.menu > * {
  position: relative;
  z-index: 1;
}

.menu ul {
  list-style: none;
  margin: 0.25rem 0 1rem;
  padding: 0;
}

.menu li {
  margin: 0.15rem 0;
}

.menu a {
  color: inherit;
  text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--blue);
  box-shadow: inset 0 -1px 0 var(--cyan);
}

.menu h1,
.menu h2,
.menu h3,
.menu p {
  margin: 0.9rem 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
}

.menu h1:first-child,
.menu h2:first-child,
.menu h3:first-child,
.menu p:first-child {
  margin-top: 0;
}

.menu-strip {
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--cyan);
  color: var(--bg);
  user-select: none;
}

.menu-strip-open,
.menu-strip-close {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-strip-open {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.menu-strip-close {
  display: none;
}

.menu-toggle:checked ~ .menu-strip {
  background: var(--blue);
}

.menu-toggle:checked ~ .menu-strip .menu-strip-open {
  display: none;
}

.menu-toggle:checked ~ .menu-strip .menu-strip-close {
  display: inline;
  writing-mode: horizontal-tb;
  transform: none;
}

.menu-strip:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: calc(60ch + 4rem)) {
  .menu-toggle:checked ~ .menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image: url("../images/voronoi-2.png");
    background-image: url("../images/voronoi-2.svg"), url("../images/voronoi-2.png");
    background-repeat: repeat;
    background-size: 200px 200px;
    background-attachment: fixed;
  }
}
