/* =========================================================
   TOC — YCColor (Light / Yellow + Grey)
   Палитра: #41444B #52575D #FDDB3A #F6F4E6
   (стиль: светлый фон, контраст, “маркер” желтым, мягкие тени)
========================================================= */

/* можно добавить к :root проекта */
:root{
  --tocMaxWidth: 1400px;

  /* локальные токены (если у тебя нет общих) */
  --toc-bg: rgba(246,244,230,.88);
  --toc-ink: #41444B;
  --toc-muted: rgba(82,87,93,.86);
  --toc-stroke: rgba(82,87,93,.16);
  --toc-accent: #FDDB3A;

  --toc-radius: 999px;
  --toc-shadow: 0 16px 34px rgba(65,68,75,.10);
  --toc-shadow-hover: 0 22px 46px rgba(65,68,75,.16);
}

/* ===========================
   TOC — WRAPPER / LAYOUT
=========================== */

.toc{ background: transparent; }

.toc.wrapper{
  width: min(var(--tocMaxWidth), 92vw);
  margin-inline: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.toc .swiper{
  padding: 0 4px 16px !important;
  padding-top: 0 !important;
}

.toc .swiper-wrapper{
  padding-top: 16px;
  padding-bottom: 18px;
  justify-content: flex-start;
  overflow: initial;
}

.toc .swiper-slide{ width: fit-content; }

/* ===========================
   TOC — TITLE
=========================== */



/* ===========================
   TOC — LINKS (PILLS)
=========================== */

.toc a{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  white-space: nowrap;

  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 14px;              /* лейблы = 14px */
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: var(--toc-muted);

  padding: 10px 18px;
  border-radius: var(--toc-radius);

  background: rgba(255,255,255,.62);
  border: 1px solid var(--toc-stroke);


  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);

  transition:
    transform .2s ease,
    color .2s ease,
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}



/* Hover / Focus */
.toc a:hover,
.toc a:focus{
  color: var(--toc-ink);
  background: rgba(253,219,58,.18);
  border-color: rgba(253,219,58,.55);
  transform: translateY(-1px);
  filter: contrast(1.03);
}

.toc a:hover::before,
.toc a:focus::before{
  opacity: 1;
  transform: translateY(0);
}

/* Active */
.toc a:active{
  transform: translateY(0);
  box-shadow:
    0 10px 22px rgba(65,68,75,.12),
    0 1px 0 rgba(255,255,255,.85);
}

/* Focus visible */
.toc a:focus-visible{
  outline: 2px solid rgba(253,219,58,.95);
  outline-offset: 3px;
}

/* (опционально) “active” класс для текущей секции */
.toc a.is-active{
  color: #41444B;
  background: rgba(253,219,58,.28);
  border-color: rgba(253,219,58,.75);
  box-shadow:
    0 18px 40px rgba(65,68,75,.14),
    0 1px 0 rgba(255,255,255,.9);
}

/* ===========================
   TOC — SWIPER SCROLLBAR
=========================== */

.toc-swiper{
  max-width: var(--tocMaxWidth);
  margin-inline: auto;
}

.toc-swiper .swiper-scrollbar{
  background: rgba(82,87,93,.16);
  height: 4px;
  border-radius: 999px;
}

.toc-swiper .swiper-scrollbar-drag{
  background: linear-gradient(90deg, rgba(253,219,58,1), rgba(253,219,58,.65));
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(65,68,75,.14);
}

/* выравнивание скроллбара по ширине контейнера */
.swiper-horizontal > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-horizontal{
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* ===========================
   TOC — MOBILE
=========================== */
@media (max-width: 750px){
  .toc.wrapper{
    width: min(100vw, 92vw);
  }

  .toc .swiper-wrapper{
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .toc a{
    font-size: 14px;          /* лейблы остаются 14px по твоему правилу */
    padding: 10px 16px;
  }

  .swiper-horizontal > .swiper-scrollbar,
  .swiper-scrollbar.swiper-scrollbar-horizontal{
    width: 92% !important;
    margin: 0 auto;
  }
}
