﻿@charset "utf-8";
/* 目次本体 */
#toc{
border: solid #999 1px;
border-radius: 4px;
background-color: #f7f7f7;
margin: 0.5em;
}

#toc ol{ padding: 0px 5px 0px 5px!important;}
#toc *,#toc *::before,#toc *::after{box-sizing: border-box;}
#toc ol li a{
  position: relative;
  display: block;
  padding: 0 0 0 1.5em;
}

#toc ol li a::before,
#toc ol li a::after{
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 20px;
  height: 1.5em;
  text-align: center;
}

#toc ol li a::before{  z-index: 2;}
#toc ol li a::after{content: "";}

/* 大見出し */
#toc > ol{counter-reset: contentNum;}
#toc ol li a::before{
content: counter(contentNum) ".";
counter-increment: contentNum;
color: #666;
}

/* 中見出し */
#toc ol ol li{padding-left: 1.5em;}
#toc ol ol li a{padding-left: 2.5em;}
#toc > ol > li{counter-reset: subContNum;}
#toc ol ol li a::before,#toc ol ol li a::before{
  white-space: nowrap;
  color: #666;
}
#toc ol ol li a::before{
  counter-increment: subContNum;
  content: counter(contentNum) "-" counter(subContNum) ".";
}

/* 小見出し */
#toc ol ol ol li{padding-left: 3.5em;}
#toc ol ol ol li a{padding: 0 0 0 3.5em;}
#toc > ol > ol > li{counter-reset: section;}
#toc ol ol ol li a::before{
  counter-increment: section;
  content: counter(contentNum) "-" counter(subContNum) "-" counter(section) ".";
}

/* 小々見出し */
#toc ol ol ol ol li{padding-left: 4em;}
#toc ol ol ol ol li a{padding: 0 0 0 4.5em;}
#toc > ol > ol > ol > li{counter-reset: clm;}
#toc ol ol ol ol li a::before{
  counter-increment: clm;
  content: counter(contentNum) "-" counter(subContNum) "-" counter(section) "-" counter(clm) ".";
}
