html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  scroll-margin-top: 100px;
}

#wrapwrap {
  scroll-behavior: smooth;
}

#wrap.wrapper {
  display: grid;
  grid-template-areas: "sidebar content links";
  grid-template-columns: minmax(0, 350px) minmax(0, auto) minmax(0, 20%);
}

.header {
  display: block;
  background-color: #FFFFFF;
  color: #212529;
  --o-cc-bg: #FFFFFF;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
}

.header .header-navbar {
  display: flex;
  padding: 0 3rem 0 1.5rem;
  height: 80px;
}

.header .search-panel {
  display: flex;
  justify-content: space-between;
  flex-grow: 1;
  align-items: center;
}

.header .logo-wrapper {
  width: calc(350px - 1.5rem);
  margin-right: 3rem;
}

.header .logo-wrapper a {
  max-height: 100%;
  vertical-align: sub;
}

.header .logo-wrapper img {
  height: 30px;
}

.header .searchbar .search-button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
  padding: 0 0.5rem;
  font-size: 1.2rem;
  color: #888888;
  box-shadow: none;
  background-color: #FFF;
}

.header .searchbar form {
  position: relative;
}

.page-links {
    display: block;
    grid-area: links;
    top: 86px;
    padding: 48px 0 1.5rem;
    overflow-y: auto;
    position: -webkit-sticky;
    position: sticky;
    height: 100%;
    max-height: calc(100vh - 112px);
}

.page-links .page-links-title {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #282F33;
    text-transform: uppercase;
}

.page-links .page-link {
  background-color: unset;
}

.page-links .page-link a {
  transition: all, .1s;
}

.page-links .page-link:hover {
  background-color: #F2F2F2;
}

.wiki-content-wrapper {
  grid-area: content;
  word-break: break-word;
}

.wiki-content-wrapper #content img {
  max-width: 100% !important;
}

.wiki-sidebar-wrapper {
  grid-area: sidebar;
  transition: all, .3s;
  margin-top: 80px;
  height: calc(100vh - 80px);
  width: 350px;
  overflow-x: visible;
  overflow-y: auto;
  padding-left: 1rem;
  z-index: 100;
}

.wiki-sidebar-wrapper::-webkit-scrollbar {
  width: 5px;
}

.wiki-sidebar-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary);
}

.wiki-sidebar-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), 0.9);
}

.wiki-sidebar-wrapper .search-panel {
  display: none;
  margin-bottom: 1rem;
  margin-left: 4px;
}

.wiki-sidebar-wrapper .search-panel .search-button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
  padding: 0 0.5rem;
  font-size: 1.2rem;
  color: #888888;
  box-shadow: none;
  background-color: #FFF;
}

.wiki-sidebar-wrapper .accordion-button,
.page-links .accordion-button {
  padding: 0 0 0 4px;
  width: 1rem;
}

.wiki-sidebar-wrapper .accordion-button::after,
.page-links .accordion-button::after {
  background-size: .85rem;
  width: 1rem;
  height: 1rem;
}

.wiki-sidebar-wrapper .current-page-item .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.wiki-sidebar-wrapper .current-page-item .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.wiki-sidebar-wrapper .current-page-item .accordion-button:not(.collapsed) {
  color: #212529;
  background: none;
  box-shadow: none;
}

.wiki-sidebar-wrapper .accordion-button:not(.collapsed),
.page-links .accordion-button:not(.collapsed) {
  color: #212529;
  background: none;
  box-shadow: none;
}

.page-links .current-link-item {
  font-weight: 800;
}

.wiki-sidebar-wrapper .accordion-collapse {
  padding-left: 0;
}

.wiki-sidebar-wrapper .accordion-body {
  padding: 0 0 0 1.25rem !important;
}

.current-page-item {
  background-color: var(--primary) !important;
  color: #FFFFFF !important;
  font-weight: inherit;
  border-radius: 0.25rem 0 0 0.25rem;
}

.current-page-item a {
  color: #FFFFFF !important;
}

.mobile-menu-button {
  display: none;
  margin-left: 8px;
}

.mobile-overlay {
  width: 100%;
  height: calc(100% - 80px);
  position: absolute;
  opacity: 0;
  z-index: -1;
  transition: opacity .2s linear;
  background-color: rgba(0, 0, 0, 0.3);
}

.menu-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")
}

@media (max-width: 1200px) {
    #wrap.wrapper {
      grid-template-columns: minmax(0, 350px) minmax(0, auto) minmax(0, 0);
      position: relative;
    }
}

@media (max-width: 768px) {
  .wiki-sidebar-wrapper.hide {
    left: -100% !important;
    width: auto;
    max-width: 350px;
    opacity: 0;
  }
  .mobile-overlay {
    height: 100% !important;
  }
  #wrap.wrapper {
    grid-template-columns: minmax(0, 0) minmax(0, auto) minmax(0, 0);
    position: relative;
  }
  .header .header-navbar {
    padding: 0 1rem 0 1rem;
    justify-content: space-around;
  }
  .header .search-panel {
    display: none !important;
  }
  .header .logo-wrapper {
    margin-right: 0;
  }
  .mobile-menu-button {
    display: block !important;
  }
  .wiki-content-wrapper {
    padding: 1rem !important;
  }
  .wiki-sidebar-wrapper {
    padding-top: 1rem !important;
  }
  .wiki-sidebar-wrapper .search-panel {
    display: flex;
  }
}
