/* Элементы движка поверх темы mpseo */
.post-preview__heading {
  margin: 0;
  font: inherit;
}

.news-detail__title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
}
.news-detail__updated,
.news-detail__reading {
  margin-left: 8px;
  color: #9e9cb9;
}

.news-detail__content ul,
.news-detail__content ol {
  padding-left: 22px;
  margin-bottom: 20px;
}
.news-detail__content ul { list-style: disc; }
.news-detail__content ol { list-style: decimal; }
.news-detail__content li { margin-bottom: 6px; }
.news-detail__content h2,
.news-detail__content h3 {
  margin-top: 35px;
  scroll-margin-top: 100px;
}
.news-detail__content a { color: #6058ce; text-decoration: underline; }

.article-toc {
  margin: 25px 0 35px;
  padding: 20px 25px;
  border-radius: 16px;
  background: #f8f8f8;
}
.article-toc__title {
  font-weight: 500;
  margin-bottom: 10px;
}
.article-toc ol {
  list-style: decimal;
  padding-left: 20px;
}
.article-toc li { margin-bottom: 6px; }
.article-toc a { color: #6058ce; }

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 40px 0 10px;
  padding-top: 25px;
  border-top: 1px solid #e2e4e8;
}
.article-nav__link { color: #6058ce; max-width: 48%; }
.article-nav__link._next { text-align: right; margin-left: auto; }

.blog-section__intro {
  max-width: 760px;
  margin: 0 auto 25px;
  text-align: center;
  color: #524f73;
  line-height: 1.45;
}
.related { padding-top: 20px; }

.feed-more {
  margin-top: 30px;
  text-align: center;
}
.feed-more .button {
  width: 260px;
  height: 55px;
  font-size: 16px;
}

.pagination__prev a,
.pagination__next a {
  font-size: 28px;
  color: #6058ce;
  padding: 0 10px;
}

@media (max-width: 767.98px) {
  .news-detail__title { font-size: 24px; }
  .article-nav { flex-direction: column; }
  .article-nav__link { max-width: 100%; }
}

/* Топ сервисов аналитики на главной */
.services-top {
  padding: 50px 0 100px;
}
.services-top__lead {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
  color: #524f73;
  line-height: 1.5;
}
.services-top__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
}
.services-top__cell { display: flex; }

.svc-card {
  --accent: #6058ce;
  --accent-2: #938bff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 28px 28px 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #eceaf8;
  box-shadow: 0 1px 2px rgba(60, 55, 103, 0.04), 0 12px 32px -12px rgba(60, 55, 103, 0.14);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .25s ease;
}
.svc-card._link:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(60, 55, 103, 0.05), 0 24px 48px -16px rgba(96, 88, 206, 0.35);
}
.svc-card._link:hover::before { opacity: 1; }
.svc-card._link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.svc-card--1 { --accent: #0acf97; --accent-2: #5ee6bf; }
.svc-card--2 { --accent: #f5a524; --accent-2: #ffd166; }
.svc-card--3 { --accent: #3c3767; --accent-2: #6058ce; }
.svc-card--4 { --accent: #e5487d; --accent-2: #ff8fb1; }
.svc-card--5 { --accent: #2f80ed; --accent-2: #7cb4ff; }

.svc-card__rank {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  opacity: 0.12;
}
.svc-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 8px 20px -8px var(--accent);
}
.svc-card__name {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f1b3d;
}
.svc-card__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.svc-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  background: #f1f0fa;
  color: #524f73;
}
.svc-chip--wb { background: #f6e8fb; color: #a0239b; }
.svc-chip--ozon { background: #e6f0ff; color: #0058d6; }
.svc-chip--ym { background: #fff6d6; color: #8a6400; }
.svc-card__text {
  flex-grow: 1;
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: #524f73;
}
.svc-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid #f0eff7;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.svc-card__more span { transition: transform .25s ease; }
.svc-card._link:hover .svc-card__more span { transform: translateX(4px); }
.svc-card__more._soon { color: #9e9cb9; font-weight: 500; }

@media (max-width: 991.98px) {
  .services-top__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .services-top__list { grid-template-columns: 1fr; gap: 16px; }
  .services-top { padding: 30px 0 60px; }
  .svc-card { padding: 22px 20px 20px; }
}

/* длинные заголовки секций переносятся на две строки */
.blog-section__title { line-height: 1.15; }

/* логотип сервиса вместо монограммы */
.svc-card__logo._img {
  background: #fff;
  border: 1px solid #eceaf8;
  box-shadow: 0 6px 16px -8px rgba(60, 55, 103, 0.25);
}
.svc-card__logo._img img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.svc-chip--ali { background: #ffece6; color: #c43d12; }
.svc-chip--magnit { background: #ffe8ea; color: #c8102e; }

/* превью в ленте: единые пропорции для старых (320×215) и новых (1200×630) обложек */
.post-preview__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

/* таблицы в статьях */
.news-detail__content table {
  width: 100%;
  margin: 10px 0 28px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #eceaf8;
  border-radius: 14px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
}
.news-detail__content th,
.news-detail__content td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eceaf8;
}
.news-detail__content tr:last-child td { border-bottom: 0; }
.news-detail__content th {
  background: #f4f3fc;
  color: #3c3767;
  font-weight: 600;
}
.news-detail__content tbody tr:nth-child(even) td { background: #fbfbfe; }
.news-detail__content blockquote {
  margin: 0 0 25px;
  padding: 16px 20px;
  border-left: 4px solid #6058ce;
  border-radius: 0 12px 12px 0;
  background: #f8f8fc;
}
@media (max-width: 767.98px) {
  .news-detail__content table { display: block; overflow-x: auto; white-space: normal; }
}
