/* THS SYSTEM FIXES — root boundary patch */

/* TOC — lock final luxury layout and defeat child-theme legacy TOC CSS */
.ths-toc {
  clear: both;
  margin: 0 0 30px !important;
  padding: 20px 24px 20px !important;
  background: #f7f7f7 !important;
  border: 1px solid rgba(120, 90, 60, 0.12) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(25, 30, 45, 0.04) !important;
}
.ths-toc__head {
  margin: 0 0 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(120, 90, 60, 0.10) !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #1f1f1f !important;
}
.ths-toc__body { position: relative; }
.ths-toc__body.is-collapsed {
  max-height: 320px !important;
  overflow: hidden !important;
}
.ths-toc__body.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(247,247,247,0), rgba(247,247,247,1));
}
.ths-toc__list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.ths-toc__item { margin: 0 0 12px !important; }
.ths-toc__item:last-child { margin-bottom: 0 !important; }
.ths-toc__item.is-h3 { padding-left: 28px !important; }
.ths-toc__item.is-h4 { padding-left: 44px !important; }
.ths-toc__link,
.ths-toc__item a {
  display: inline-flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  color: #3e79dd !important;
  line-height: 1.55 !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 400 !important;
}
.ths-toc__link:hover,
.ths-toc__link:focus,
.ths-toc__item a:hover {
  color: #255fbe !important;
  text-decoration: none !important;
}
.ths-toc__item.is-active > .ths-toc__link,
.ths-toc__link.is-active {
  color: #1f1f1f !important;
  font-weight: 600 !important;
}
.ths-toc__num {
  flex: 0 0 auto;
  min-width: 28px !important;
  color: inherit !important;
}
.ths-toc__text {
  flex: 1 1 auto;
  color: inherit !important;
  word-break: break-word;
}
.ths-toc__actions {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  margin: 18px 0 0 !important;
  padding: 8px 0 4px !important;
  min-height: 66px !important;
  text-align: center !important;
  position: relative !important;
  overflow: visible !important;
}
.ths-toc__toggle,
button.ths-toc__toggle {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 auto !important;
  min-width: 160px !important;
  height: 56px !important;
  padding: 0 28px !important;
  border: 2px solid #2a2a2a !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}
.ths-toc__toggle::before,
.ths-toc__toggle::after {
  display: none !important;
  content: none !important;
}
.entry-content h2[id], .entry-content h3[id], .entry-content h4[id],
.post-content h2[id], .post-content h3[id], .post-content h4[id],
.article-inner h2[id], .article-inner h3[id], .article-inner h4[id] {
  scroll-margin-top: 110px;
}
@media (max-width: 849px) {
  .ths-toc {
    margin-bottom: 22px !important;
    padding: 18px 16px 18px !important;
    border-radius: 16px !important;
  }
  .ths-toc__head {
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
    font-size: 26px !important;
  }
  .ths-toc__body.is-collapsed { max-height: 340px !important; }
  .ths-toc__item { margin-bottom: 14px !important; }
  .ths-toc__item.is-h3 { padding-left: 24px !important; }
  .ths-toc__item.is-h4 { padding-left: 38px !important; }
  .ths-toc__link, .ths-toc__item a {
    gap: 8px !important;
    font-size: 15px !important;
    line-height: 1.56 !important;
  }
  .ths-toc__num { min-width: 28px !important; }
  .ths-toc__actions {
    margin-top: 20px !important;
    min-height: 72px !important;
    padding-top: 10px !important;
    padding-bottom: 6px !important;
  }
  .ths-toc__toggle, button.ths-toc__toggle {
    min-width: 178px !important;
    height: 58px !important;
    font-size: 13px !important;
  }
}
