/* ============================================================
   Про рейтинг — editorial layer
   Дополнение к style.css. Отдельный файл, чтобы не трогать
   существующие правила. Подключается только на страницах
   статей и на листинге /articles.
   ============================================================ */

/* ------------------------------------------------------------
   1. Полоса прогресса чтения
   ------------------------------------------------------------ */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transition: width 0.1s linear;
}

/* Якоря не должны прятаться под липкой шапкой */
.article-content h2,
.article-content h3,
.art-summary,
.faq-item {
  scroll-margin-top: 96px;
}

/* ------------------------------------------------------------
   2. Рубрика над заголовком статьи
   ------------------------------------------------------------ */
.art-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.art-kicker::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
}

/* ------------------------------------------------------------
   3. Оглавление: активный пункт
   ------------------------------------------------------------ */
.article-aside__list a {
  position: relative;
  display: block;
  padding: 2px 0;
}
.article-aside__list a.is-active {
  color: var(--accent);
  font-weight: 500;
}
.article-aside__list a.is-active::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: var(--accent);
}

/* ------------------------------------------------------------
   4. Мобильное оглавление (collapsible)
   ------------------------------------------------------------ */
.toc-mobile {
  display: none;
}

@media (max-width: 800px) {
  .toc-mobile {
    display: block;
    grid-column: 1 / -1;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    background: var(--white);
  }
  .toc-mobile__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
  .toc-mobile__summary::-webkit-details-marker { display: none; }
  .toc-mobile__summary::after {
    content: '+';
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1;
    color: var(--accent);
    transition: transform 0.25s var(--ease);
  }
  .toc-mobile[open] .toc-mobile__summary::after {
    transform: rotate(45deg);
  }
  .toc-mobile__list {
    list-style: none;
    margin: 0;
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .toc-mobile__list a {
    display: block;
    padding: 7px 0;
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--ink-3);
    border-bottom: 1px dashed var(--line);
  }
  .toc-mobile__list li:last-child a { border-bottom: none; }
  .toc-mobile__list a.is-active {
    color: var(--accent);
    font-weight: 500;
  }
}

/* ------------------------------------------------------------
   5. Дисклеймер в начале материала
   ------------------------------------------------------------ */
.art-note {
  position: relative;
  margin: 0 0 32px !important;
  padding: 14px 18px 14px 42px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  font-family: var(--font-mono) !important;
  font-size: 11.5px !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em;
  color: var(--ink-3) !important;
}
.art-note::before {
  content: 'i';
  position: absolute;
  left: 14px;
  top: 13px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
}

/* ------------------------------------------------------------
   6. Блок «Коротко»
   ------------------------------------------------------------ */
.art-summary {
  margin: 40px 0 48px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-warm) 0%, rgba(239, 237, 230, 0) 100%);
  padding: 24px 0 8px;
}
.article-content .art-summary h2,
.art-summary__title {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin: 0 0 18px !important;
  line-height: 1 !important;
}
.art-summary ol {
  list-style: none;
  counter-reset: art-sum;
  margin: 0 !important;
  padding: 0 !important;
}
.art-summary li {
  counter-increment: art-sum;
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 12px !important;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.art-summary li::before {
  content: counter(art-sum, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding-top: 4px;
}

/* ------------------------------------------------------------
   7. «Вывод редакции»
   ------------------------------------------------------------ */
.art-verdict {
  margin: 44px 0 40px;
  padding: 28px 30px;
  background: var(--accent-ink);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}
.art-verdict::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.art-verdict__hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.art-verdict__hdr::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent-tint);
}
.art-verdict p {
  margin: 0 !important;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92) !important;
}
.art-verdict a {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.4) !important;
}

/* ------------------------------------------------------------
   8. FAQ как аккордеон
   ------------------------------------------------------------ */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-of-type {
  border-top: 1px solid var(--line);
}
.faq-item__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.faq-item__summary::-webkit-details-marker { display: none; }
.faq-item__summary:hover { color: var(--accent); }
.faq-item__sign {
  flex: 0 0 auto;
  position: relative;
  width: 14px;
  height: 14px;
  margin-top: 5px;
}
.faq-item__sign::before,
.faq-item__sign::after {
  content: '';
  position: absolute;
  background: var(--accent);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.faq-item__sign::before {
  left: 0; right: 0; top: 6px;
  height: 1.5px;
}
.faq-item__sign::after {
  top: 0; bottom: 0; left: 6px;
  width: 1.5px;
}
.faq-item[open] .faq-item__sign::after {
  transform: scaleY(0);
  opacity: 0;
}
.faq-item__body {
  padding: 0 34px 20px 0;
}
.faq-item__body p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-3);
}
.faq-item__body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   9. «Ещё по теме» в конце материала
   ------------------------------------------------------------ */
.art-more {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.art-more__hdr {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.art-more__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.art-more__list li {
  border-bottom: 1px solid var(--line);
}
.art-more__list li:last-child { border-bottom: none; }
.art-more__list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  border: none !important;
  transition: color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
.art-more__list a:hover {
  color: var(--accent) !important;
  padding-left: 6px;
}
.art-more__num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}

/* Старый одиночный блок «Связано с материалом» оставляем
   как есть — он используется в разметке и в style.css. */

/* ------------------------------------------------------------
   10. Листинг /articles — направления
   ------------------------------------------------------------ */
.ed-group {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
  margin-top: 8px;
}
.ed-group + .ed-group { margin-top: 56px; }
.ed-group__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 6px;
}
.ed-group__label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.ed-group__num {
  color: var(--ink-4);
}
.ed-group__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.ed-group__desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 680px;
  margin: 0;
  padding-top: 4px;
}
@media (max-width: 800px) {
  .ed-group__head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ed-group__desc { padding-top: 0; }
}

/* Тезис и теги в карточке листинга */
.article-full__read {
  color: var(--ink-3);
}
.article-full__thesis {
  color: var(--ink-3);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-full__thesis strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.4;
}
.article-full__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.article-full__tags span {
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   11. Листинг — направление в шапке статьи
   ------------------------------------------------------------ */
.article-cover__caption {
  max-width: 100%;
}

/* Мелкая правка: счётчик разделов в meta */
.art-sections {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
  .art-verdict { padding: 22px 20px; }
  .art-verdict p { font-size: 16px; }
  .art-summary { padding-top: 20px; }
  .art-summary li { font-size: 15px; }
  .faq-item__summary { font-size: 16px; padding: 16px 0; }
  .faq-item__body { padding-right: 8px; }
  .art-more__list a { font-size: 15.5px; }
}
