/***********************
  目次CSS - 完全独立版
  他のCSSに影響されない構成
***********************/

/* 目次ボックス全体 */
.toc-box {
  background-color: #f8f8f8 !important; /* デフォルトのグレー背景 */
  border: none !important;              /* 外枠線を除去 */
  padding: 15px !important;
  margin: 30px auto !important;
  font-size: 90% !important;
  width: fit-content !important;
  max-width: 100% !important;
}


/* 目次タイトル */
.toc-box-title {
  text-align: center !important;
  font-weight: bold !important;
  font-size: 18px !important;
  margin-bottom: 10px !important;
  cursor: pointer !important;
}

/* 折りたたみトグル */
.toc-box-toggle {
  font-size: 90% !important;
  color: #0073aa !important;
  text-decoration: underline !important;
  margin-left: 10px !important;
  cursor: pointer !important;
}

.toc-box-toggle:hover {
  color: #005177 !important;
  text-decoration: none !important;
}

/* リスト全体 */
.toc-box-list {
  background-color: #f8f8f8 !important;
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
  border: none !important;              /* 外枠線を除去 */

}

/* 各リストアイテム */
.toc-box-list li {
  margin: 5px 0 !important;
}


/* 目次リンクの下線を完全に消す */
.toc-box-list a,
.toc-box-list a:visited,
.toc-box-list a:hover,
.toc-box-list a:active,
.toc-box-list li a {
  text-decoration: none !important;
  border-bottom: none !important;
}
.toc-box-list a:hover {
  color: inherit !important;
}



/* 各見出し階層のインデント */
.toc-box-h2 {
  padding-left: 0em !important;
}

.toc-box-h3 {
  padding-left: 1em !important;
}

.toc-box-h4 {
  padding-left: 2em !important;
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
  .toc-box {
    background-color: #f9f9f9 !important;
    padding: 15px !important;
    margin-bottom: 30px !important;
  }

  .toc-box-title {
    font-size: 16px !important;
  }

  .toc-box-toggle {
    font-size: 90% !important;
    color: #0073aa !important;
    text-decoration: underline !important;
  }

  .toc-box-list li {
    margin: 5px 0 !important;
    border-bottom: 1px dotted #ccc !important;
  }

.toc-box-h2 {
  padding-left: 0em !important;
}

.toc-box-h3 {
  padding-left: 1em !important;
}

.toc-box-h4 {
  padding-left: 2em !important;
}
}
