/*
 * Location: /assets/css/single-post-toc.css
 * Purpose:
 * - Styles the single post table-of-contents block.
 * - Kept in the canonical /assets/css directory so /inc/enqueue.php can load it conditionally on single posts.
 */

.stm-toc{
  max-width: var(--stm-sp-read);
  margin: 26px auto 0;
  padding: 16px 18px 14px;
  border: 1px solid var(--stm-sp-line);
  border-radius: 16px;
  background: rgba(0,0,0,.015);
}

/* Header */
.stm-toc__title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stm-sp-muted);
  margin-bottom: 10px;
}

.stm-toc__toggle{
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--stm-sp-muted);
  cursor: pointer;
}
.stm-toc__toggle:hover{
  color: rgba(0,0,0,.75);
}

/* List */
.stm-toc__list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.stm-toc__item{
  margin: 0;
  padding: 0;
}

/* Level spacing */
.stm-toc__item--h2{ margin-top: 6px; }
.stm-toc__item--h3{ margin-left: 14px; }

/* Links */
.stm-toc__link{
  display: block;
  padding: 6px 2px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(0,0,0,.78);
  text-decoration: none;
  border-radius: 8px;
  transition: background .12s ease, color .12s ease;
}

.stm-toc__link:hover{
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.9);
}

/* Active section */
.stm-toc__link.is-active{
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.95);
  font-weight: 700;
}

/* Small screen */
@media (max-width: 900px){
  .stm-toc{
    margin-top: 22px;
    padding: 14px 14px 12px;
  }

  .stm-toc__link{
    font-size: 13.5px;
  }
}
