/* Blog post contents: the server-rendered details also works without JavaScript. */
body.dhg-blog-contents-page .dhg-blog-contents {
  min-width: 0;
  margin: 0 0 28px;
  border: 1px solid #ddd6eb;
  border-radius: 18px;
  color: #31284b;
  background: #fbfaff;
  box-shadow: 0 10px 30px rgba(47, 35, 89, 0.06);
  font-size: 14px;
  line-height: 1.5;
}

body.dhg-blog-contents-page .dhg-blog-contents > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-radius: 17px;
  color: #25194c;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

body.dhg-blog-contents-page .dhg-blog-contents > summary::-webkit-details-marker {
  display: none;
}

body.dhg-blog-contents-page .dhg-blog-contents > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin: -4px 3px 0 0;
  border-right: 2px solid #5d42b7;
  border-bottom: 2px solid #5d42b7;
  content: "";
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

body.dhg-blog-contents-page .dhg-blog-contents[open] > summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

body.dhg-blog-contents-page .dhg-blog-contents nav {
  min-width: 0;
  padding: 0 10px 12px;
}

body.dhg-blog-contents-page .dhg-blog-contents .dhg-blog-contents__list {
  max-height: 350px;
  max-height: min(65vh, 450px);
  margin: 0;
  padding: 0 3px;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #bab0d2 transparent;
}

body.dhg-blog-contents-page .dhg-blog-contents__list li,
body.dhg-blog-contents-page .dhg-blog-contents__list li + li {
  margin: 0;
  padding: 0;
}

body.dhg-blog-contents-page .dhg-blog-contents__list a {
  display: block;
  padding: 9px 10px;
  border-left: 3px solid transparent;
  border-radius: 7px;
  color: #3a3153;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}

body.dhg-blog-contents-page .dhg-blog-contents__list li[data-level="3"] a {
  padding-left: 22px;
  color: #5d536f;
  font-size: 13px;
  font-weight: 500;
}

body.dhg-blog-contents-page .dhg-blog-contents__list a:hover,
body.dhg-blog-contents-page .dhg-blog-contents__list a[aria-current="location"] {
  border-left-color: #6545c4;
  color: #392575;
  background: #eee8fa;
}

body.dhg-blog-contents-page .dhg-blog-contents > summary:focus-visible,
body.dhg-blog-contents-page .dhg-blog-contents__list a:focus-visible {
  outline: 2px solid #147b8a;
  outline-offset: 2px;
}

/* Existing section/group anchors also clear the header without JavaScript. */
body.dhg-blog-contents-page .dhg-guides-entry h2[id],
body.dhg-blog-contents-page .dhg-guides-entry h3[id],
body.dhg-blog-contents-page .dhg-guides-entry section[id],
body.dhg-blog-contents-page .dhg-guides-entry div[id],
body.dhg-blog-contents-page .dhg-guides-entry [data-dhg-contents-target] {
  scroll-margin-top: var(--dhg-contents-top, 110px);
}

body.dhg-blog-contents-ready .dhg-guides-sidebar .dhg-blog-sidebar-ad {
  min-width: 0;
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

@media (min-width: 992px) {
  /* Clipping only the horizontal axis does not create a sticky scroll parent. */
  body.dhg-blog-contents-ready #page.page,
  body.dhg-blog-contents-ready > .wsmenucontainer {
    overflow-x: clip;
    overflow-y: visible;
  }

  @supports not (overflow-x: clip) {
    body.dhg-blog-contents-ready #page.page,
    body.dhg-blog-contents-ready > .wsmenucontainer {
      overflow: visible;
    }
  }

  body.dhg-blog-contents-ready .dhg-guides-sidebar {
    position: sticky;
    top: var(--dhg-contents-top, 110px);
    align-self: start;
    min-height: 0;
    max-height: calc(100vh - var(--dhg-contents-top, 110px) - 20px);
    max-height: calc(100dvh - var(--dhg-contents-top, 110px) - 20px);
    padding-bottom: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #bab0d2 transparent;
  }

  body.dhg-blog-contents-ready .dhg-guides-sidebar .dhg-blog-contents {
    margin: 0;
  }

  body.dhg-blog-contents-ready .dhg-blog-contents .dhg-blog-contents__list {
    max-height: min(45vh, 350px);
    max-height: min(45dvh, 350px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.dhg-blog-contents-page .dhg-blog-contents > summary::after {
    transition: none;
  }
}
