/* ===========================
   TOC — Severim Soft Studio
   (тот же layout, новые цвета)
=========================== */

:root {
  --tocMaxWidth: 1160px;

  /* Палитра сайта */
  --toc-ink: #111827;
  --toc-muted: #6b7280;
  --toc-nude: #fdf5f0;
  --toc-nude-soft: #f9fafb;
  --toc-mint: #22c55e;
  --toc-orange: #ff7a32;

  /* Pills */
  --toc-pill-bg: rgba(255, 255, 255, 0.94);
  --toc-pill-brd: rgba(148, 163, 184, 0.55);
}

/* Wrapper */
.toc {
  background: transparent;
}

.toc.wrapper {
  width: min(var(--tocMaxWidth), 92vw);
  margin-inline: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 10px;
}

.toc .swiper {
  padding: 0 16px 16px !important;
  padding-top: 0 !important;
}

.toc .swiper-wrapper {
  padding-top: 14px;
  padding-bottom: 18px;
  justify-content: flex-start;
}

.toc .swiper-slide {
  width: fit-content;
}

/* =======================
   Soft glass pills
======================= */

.toc a {
  --bg: var(--toc-pill-bg);
  --brd: var(--toc-pill-brd);
  --clr: var(--toc-ink);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;

  color: var(--clr);
  border: 1px solid var(--brd);

  padding: 10px 22px;
  height: 42px;

  border-radius: 18px;

  background:
    linear-gradient(135deg, #fff7ed, #ecfdf5);

  backdrop-filter: blur(8px) saturate(120%);

  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .12s ease,
    opacity .18s ease;
}

/* Hover — лёгкий нюд + подсветка бордюра */
.toc a:hover,
.toc a:focus {
  --bg: #fef3e7;
  --brd: rgba(248, 171, 115, 0.8);

  background:
    linear-gradient(135deg, #fff7ed, #ecfdf5);

  color: var(--toc-ink);
  transform: translateY(-2px);
}

/* Active press */
.toc a:active {
  transform: translateY(0);
}

/* Active — оранжевый градиент и светлый текст */
.toc a.is-active {
  --bg: linear-gradient(120deg, var(--toc-orange), #ff6a2f);
  --brd: transparent;
  --clr: #f9fafb;

  background: var(--bg);
  color: var(--clr);
  transform: translateY(-2px);
}

/* Альтернативный актив — мятный акцент */
.toc a.is-active--cyan {
  --bg: linear-gradient(120deg, #a7f3d0, var(--toc-mint));
  --brd: transparent;
  --clr: #022c22;
  background: var(--bg);
  color: var(--clr);
}

/* =======================
       Scrollbar
======================= */

.toc-swiper {
  max-width: var(--tocMaxWidth);
  margin-inline: auto;
}

.toc-swiper .swiper-scrollbar {
  background: #e5e7eb;
  height: 3px;
  border-radius: 999px;
}

.toc-swiper .swiper-scrollbar-drag {
  background: linear-gradient(90deg, var(--toc-orange), var(--toc-mint));
  border-radius: 999px;
}

.swiper-horizontal > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-horizontal {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* =======================
        Mobile
======================= */
@media (max-width: 750px) {
  .toc.wrapper {
    width: min(100vw, 92vw);
  }

  .swiper-horizontal > .swiper-scrollbar,
  .swiper-scrollbar.swiper-scrollbar-horizontal {
    width: 92% !important;
    margin: 0 auto;
  }

  .toc .swiper-wrapper {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .toc a {
    font-size: 10.5px;
    padding: 9px 18px;
    height: 38px;
    border-radius: 14px;
  }
}
