/* All rules are scoped to the automatic TOC or its marked anchor targets. */
body.single-post .sy-auto-toc {
  box-sizing: border-box;
  display: block;
  clear: both;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 32px 0 40px !important;
  padding: 0 !important;
  border: 1px solid #ccdcd2 !important;
  border-radius: 12px;
  background: #f5f8f5 !important;
  color: #294638 !important;
  font-family: inherit;
  font-size: 16px !important;
  line-height: 1.7;
  text-align: left;
  overflow-wrap: anywhere;
}

body.single-post .sy-auto-toc .sy-auto-toc__summary {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 0 !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-radius: 11px;
  background: transparent !important;
  color: #294638 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  list-style: none !important;
  cursor: pointer;
}

body.single-post .sy-auto-toc .sy-auto-toc__summary::-webkit-details-marker {
  display: none;
}

body.single-post .sy-auto-toc .sy-auto-toc__summary::before {
  content: none !important;
}

body.single-post .sy-auto-toc .sy-auto-toc__summary::after {
  content: '⌄' !important;
  position: static !important;
  display: block;
  flex: none;
  width: auto;
  height: auto;
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  transform: none;
}

body.single-post .sy-auto-toc[open] .sy-auto-toc__summary::after {
  transform: rotate(180deg);
}

body.single-post .sy-auto-toc .sy-auto-toc__title {
  font-size: inherit !important;
  font-weight: 700;
}

body.single-post .sy-auto-toc .sy-auto-toc__count {
  flex: none;
  color: #587364;
  font-size: 12px !important;
  font-weight: 400;
}

body.single-post .sy-auto-toc .sy-auto-toc__nav {
  display: block !important;
  margin: 0 !important;
  padding: 0 20px 18px !important;
  border: 0 !important;
  background: transparent !important;
}

body.single-post .sy-auto-toc .sy-auto-toc__list {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  counter-reset: sy-auto-toc-item;
}

body.single-post .sy-auto-toc .sy-auto-toc__item {
  display: block !important;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  list-style: none !important;
  counter-increment: sy-auto-toc-item;
}

body.single-post .sy-auto-toc .sy-auto-toc__item::before,
body.single-post .sy-auto-toc .sy-auto-toc__item::after {
  content: none !important;
}

body.single-post .sy-auto-toc .sy-auto-toc__link {
  box-sizing: border-box;
  display: flex !important;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  margin: 0 !important;
  padding: 10px 6px !important;
  border: 0 !important;
  border-bottom: 1px solid #dce6df !important;
  border-radius: 0;
  background: transparent !important;
  color: #294f40 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  text-decoration: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.single-post .sy-auto-toc .sy-auto-toc__link::before {
  content: counter(sy-auto-toc-item) '.' !important;
  display: block;
  flex: 0 0 1.8em;
  color: #63816f;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

body.single-post .sy-auto-toc .sy-auto-toc__label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.single-post .sy-auto-toc .sy-auto-toc__item:last-child .sy-auto-toc__link {
  border-bottom: 0 !important;
}

body.single-post .sy-auto-toc .sy-auto-toc__link:hover {
  background: #e9f1eb !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

body.single-post .sy-auto-toc .sy-auto-toc__summary:focus-visible,
body.single-post .sy-auto-toc .sy-auto-toc__link:focus-visible {
  outline: 3px solid #267797 !important;
  outline-offset: 3px;
}

body.single-post [data-sy-auto-toc-target] {
  scroll-margin-top: calc(110px + var(--wp-admin--admin-bar--height, 0px)) !important;
}

@media (max-width: 600px) {
  body.single-post .sy-auto-toc {
    margin: 26px 0 32px !important;
  }
  body.single-post .sy-auto-toc .sy-auto-toc__summary {
    gap: 8px;
    padding: 15px 16px !important;
  }
  body.single-post .sy-auto-toc .sy-auto-toc__nav {
    padding: 0 14px 14px !important;
  }
  body.single-post .sy-auto-toc .sy-auto-toc__link {
    gap: 8px;
    padding: 10px 2px !important;
  }
}

@media print {
  body.single-post .sy-auto-toc {
    display: none !important;
  }
}
