/* === TOC: неоновая палитра под стиль сайта === */
.toc__container{
  --toc-c1: #22d3ee;   /* cyan */
  --toc-c2: #8b5cf6;   /* violet */
  --toc-c3: #f472b6;   /* pink */
  --toc-grad: linear-gradient(90deg,var(--toc-c1),var(--toc-c2) 55%,var(--toc-c3));
  --toc-bg: rgba(255,255,255,.03);
  --toc-bd: rgba(255,255,255,.06);
}

/* элементы — компактные “пилюли” */
.toc__container > ul li {
  min-width: max-content;
  max-width: max-content;
  list-style: none;
  margin: 6px 10px 6px 0;
}

/* ссылки — спокойные по умолчанию */
.toc__container > ul a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--textMain) !important;
  background: var(--toc-bg);
  border: 1px solid var(--toc-bd);
  text-decoration: none;
  transition: 
    background .25s ease, 
    box-shadow .25s ease, 
    transform .15s ease,
    color .25s ease,
    -webkit-text-fill-color .25s ease;
  -webkit-text-fill-color: currentColor; /* для градиентного ховера */
  will-change: transform, box-shadow;
}

/* неоновый ховер: градиентный текст + мягкое свечение */
.toc__container > ul a:hover {
  background:
    radial-gradient(120% 120% at 50% 50%, rgba(34,211,238,.18), rgba(139,92,246,.12) 40%, transparent 70%),
    var(--toc-bg);
  box-shadow:
    0 0 0 1px rgba(139,92,246,.35),
    0 10px 24px rgba(34,211,238,.18),
    0 4px 12px rgba(244,114,182,.18);
  transform: translateY(-1px);
  color: transparent !important;
  background-clip: padding-box, border-box;
  -webkit-background-clip: text, padding-box;
  background-image: var(--toc-grad), radial-gradient(120% 120% at 50% 50%, transparent, transparent);
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(139,92,246,.35);
}

/* активный пункт — фиксированный градиент и более плотная рамка */
.toc__container > ul a.is-active,
.toc__container > ul li.current > a {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  background-image: var(--toc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  border-color: rgba(139,92,246,.55);
  box-shadow:
    0 0 0 1px rgba(139,92,246,.55),
    0 8px 22px rgba(34,211,238,.14),
    inset 0 0 32px rgba(139,92,246,.08);
}

/* фокус — заметный, но аккуратный */
.toc__container > ul a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(34,211,238,.75),
    0 0 0 6px rgba(34,211,238,.15);
}

/* плавнее для тех, кто не отключил анимации */
@media (prefers-reduced-motion: reduce) {
  .toc__container > ul a {
    transition: none;
  }
}
