/* ======================================================
   SINGLE POST — TABLE OF CONTENTS (ON THIS PAGE)
   File: assets/css/single-post-toc.css
   Style: Editorial, minimal, premium
====================================================== */

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

/* Header */
.hdaf-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(--hdaf-sp-muted);
  margin-bottom: 10px;
}

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

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

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

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

/* Links */
.hdaf-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;
}

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

/* Active section */
.hdaf-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){
  .hdaf-toc{
    margin-top: 22px;
    padding: 14px 14px 12px;
  }

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


/* Toggle state fallback: works even if the main single-post stylesheet loads first/late. */
.hdaf-toc__title[data-hdaf-toc-trigger]{
  cursor: pointer;
}

.hdaf-toc__list[hidden],
.hdaf-toc.is-collapsed .hdaf-toc__list{
  display: none !important;
}

.hdaf-toc:not(.is-collapsed) .hdaf-toc__list{
  display: block;
}
