/* Mobile menu: a full-screen shelf under the header. Rendered by js/shelf.js. */
.shelf {
  position: fixed;
  top: var(--shelf-top, var(--header-h));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 39;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease-std), visibility 0s linear .25s;
}
.shelf.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease-std), visibility 0s; }

.shelf__search { width: auto; margin: 0 var(--margin) 12px; border: 1px solid var(--ink-2); }
.shelf__list { padding: 28px var(--margin) 12px; }
.shelf__list > li + li { margin-top: 8px; }

.shelf__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  color: var(--ink);
  font: 400 32px/1 var(--sans);
  letter-spacing: -0.035em;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease-std), transform .5s var(--ease-out);
}
.shelf__item::-webkit-details-marker { display: none; }
.shelf__tick {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  transition: background-color .2s var(--ease-std);
}
details[open] > .shelf__item .shelf__tick, .shelf__item:hover .shelf__tick, .shelf__item:focus-visible .shelf__tick { background: currentColor; }
.shelf__chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  position: relative;
}
.shelf__chev::before, .shelf__chev::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.2px;
  background: currentColor;
  transition: transform .3s var(--ease-out);
}
.shelf__chev::after { transform: rotate(90deg); }
details[open] > .shelf__item .shelf__chev::after { transform: rotate(0deg); }

.shelf.is-open .shelf__item { opacity: 1; transform: none; }
.shelf.is-open li:nth-child(2) .shelf__item { transition-delay: .05s; }
.shelf.is-open li:nth-child(3) .shelf__item { transition-delay: .1s; }
.shelf.is-open li:nth-child(4) .shelf__item { transition-delay: .15s; }

.shelf__sub { padding: 6px 0 14px 15px; }
.shelf__sub a {
  display: block;
  padding: 9px 0 9px 14px;
  border-left: 1px solid var(--mist);
  font: 400 17px/1.25 var(--sans);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.shelf__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding: 24px var(--margin) calc(24px + env(safe-area-inset-bottom));
}

html.is-locked { overflow: hidden; }

@media (min-width: 768px) {
  .shelf { display: none; }
}
