/* TOC container */
.toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: transparent;   /* remove gray box look */
  padding: 0.5rem 1rem;
  border-left: 2px solid #6c63ff; /* slim accent line */
  font-family: "Comic Sans MS", "Comic Neue", sans-serif;
  font-size: 0.8rem;          /* smaller text */
  line-height: 1.4;
  margin-left: -2rem;
}

/* Title */
.toc h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
/* Smaller H1 inside post body */
.post-body h1 {
  font-size: 1.4rem;   /* default is usually 2–2.5rem */
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Top-level sections */
.toc li.h2 > a {
  color: #69032e;
  font-weight: 600;
}
/* Subsections */
.toc li.h3 > a { color: #721d3c; font-weight: 600; }
.toc li.h4 > a { color: #60283c; font-weight: 200;}
.toc li.h5 > a { color: #cf769c; }

/* Remove H5 entries from TOC entirely */
.toc li.h5 {
  display: none;
}

/* Remove default list styles */
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* List items */
.toc li.h2 {
  margin-left: 0;
  margin-bottom: 0.4rem;
  font-size: 1.00rem;
  line-height: 1.4;
}
.toc li.h3 {
  margin-left: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.95rem; /* even smaller for nested headings */
  line-height: 1.4;
}
.toc li.h4 {
  margin-left: 1.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.toc li.h5 {
  margin-left: 2rem;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}


/* Links */
.toc a {
  color: #444;
  text-decoration: none;
  font-weight: 400; /* normal, not bold */
}
.toc a:hover {
  color: #6c63ff;
  text-decoration: underline;
}

/* Scrollbar (WebKit browsers) */
.toc::-webkit-scrollbar {
  width: 6px;
}
.toc::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.toc::-webkit-scrollbar-thumb:hover {
  background: #999;
}
/* Active link */
.toc a.active {
  color: #6c63ff;
  font-weight: 600;
  border-left: 3px solid #6c63ff;
  padding-left: 5px;
}



#introduction ~ ul > li a {
  color: #83053a;
  font-weight: 600;
}

#introduction ~ ul ul > li a {
  color: #a81653;
  font-weight: 300;
}
