/* vault.md and readme.md: the header they share. Loaded after style.css and imd.css. */

html {
  scrollbar-width: thin;
  scrollbar-color: #3a3c35 transparent;
}

.page-header {
  position: absolute;
}

/* ---------------------------------------------------------------------------------------------
   File tabs, where the home page has its Menu button
   --------------------------------------------------------------------------------------------- */

.file-tabs {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  width: 320px;
  height: 56px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.08);
  font: 500 14px/1.4 var(--mono);
}

.file-tab {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  color: #a4a69e;
  transition: color 250ms ease, background-color 250ms ease;
}

.file-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms var(--ease);
}

.file-tab:hover {
  color: #fff;
}

.file-tab.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.file-tab.is-active::before {
  transform: scaleX(1);
}

.page-light .file-tabs {
  background: #0505050d;
}

.page-light .file-tab {
  color: #5c6054;
}

.page-light .file-tab:hover,
.page-light .file-tab.is-active {
  color: #050505;
}

.page-light .file-tab.is-active {
  background: #0505050f;
}

.page-light .file-tab::before {
  background: #050505;
}

.page-light :focus-visible {
  outline-color: #050505;
}

/* ---------------------------------------------------------------------------------------------
   Right side of the header
   --------------------------------------------------------------------------------------------- */

.page-actions {
  grid-column: 2;
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 56px;
}

.page-actions .cta {
  grid-column: auto;
}

button.cta {
  cursor: pointer;
}

@media (max-width: 900px) {
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .file-tabs {
    position: static;
    width: auto;
    height: 44px;
    transform: none;
    font-size: 13px;
  }

  .file-tab {
    padding: 0 12px;
  }

  .page-actions {
    display: none;
  }
}

@media (max-width: 380px) {
  .file-tab {
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .file-tab,
  .file-tab::before {
    transition: none;
  }
}
