improve layout of TOC with close button and internal scrollbar