/* ТЗ «Статьи и новости» (02.11.2026): статья и новость. main.css не трогаем. */
.wg-art { --wg-accent: #9e4a30; --wg-line: #e6e1d8; --wg-muted: #6b6b6b; --wg-soft: #f7f4ef; --wg-ink: #1a1a1a; }
html:has(.wg-art) { scroll-behavior: smooth; }
/* sticky-оглавление: тема ставит html/body overflow-x:hidden, это ломает sticky. clip так же прячет горизонтальный скролл, но не ломает */
html:has(.wg-art), html:has(.wg-art) body { overflow-x: clip; }

/* Meta-блок */
.wg-ameta { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 28px; }
.wg-ameta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--wg-muted); }
.wg-ameta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--wg-ink); font-weight: 500; text-decoration: none; }
.wg-ameta__author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
a.wg-ameta__author:hover { color: var(--wg-accent); }

/* Поделиться */
.wg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wg-share__label { margin-right: 4px; font-size: 14px; color: var(--wg-muted); }
.wg-share__btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--wg-line); border-radius: 50%; background: #fff; color: var(--wg-ink); cursor: pointer; transition: border-color .2s, color .2s; }
.wg-share__btn:hover, .wg-share__btn:focus-visible { border-color: var(--wg-accent); color: var(--wg-accent); }
.wg-share__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wg-share__msg { font-size: 13px; color: var(--wg-accent); opacity: 0; transition: opacity .2s; }
.wg-share__msg.is-on { opacity: 1; }

/* Левый сайдбар: оглавление + рубрика */
.wg-art .single-article__col.wg-art__aside { align-self: stretch; }
.wg-art__sticky { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.wg-toc__title, .wg-aside-rubric__label { margin: 0 0 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wg-muted); }
.wg-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--wg-line); }
.wg-toc li { margin: 0; }
.wg-toc a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent;
  font-size: 14px; line-height: 1.35; color: var(--wg-ink); text-decoration: none; }
.wg-toc .wg-toc__h3 a { padding-left: 28px; font-size: 13px; color: var(--wg-muted); }
.wg-toc a:hover { color: var(--wg-accent); }
.wg-toc a.is-active { border-left-color: var(--wg-accent); color: var(--wg-accent); font-weight: 500; }
.wg-aside-rubric .wg-badge { display: inline-block; }
.wg-aside-rubric__link { display: block; margin-top: 10px; font-size: 14px; color: var(--wg-accent); }

/* Оглавление на мобильном */
.wg-toc-m { display: none; margin: 0 0 24px; border: 1px solid var(--wg-line); border-radius: 8px; background: var(--wg-soft); }
.wg-toc-m summary { position: relative; padding: 12px 40px 12px 16px; font-weight: 500; cursor: pointer; list-style: none; }
.wg-toc-m summary::-webkit-details-marker { display: none; }
.wg-toc-m summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 20px; color: var(--wg-accent); }
.wg-toc-m[open] summary::after { content: "−"; }
.wg-toc-m ol { margin: 0; padding: 0 16px 12px 34px; }
.wg-toc-m li { padding: 4px 0; }
.wg-toc-m .wg-toc__h3 { margin-left: 14px; font-size: 14px; }
.wg-toc-m a { color: var(--wg-ink); }
@media (max-width: 1023px) {
  .wg-art__sticky { display: none; }
  .wg-toc-m { display: block; }
}

/* Заголовки в тексте */
.wg-art .single-article__content h2, .wg-art .entry-content h2 { margin-top: 40px; font-size: 28px; line-height: 1.25; font-weight: 500; }
.wg-art .single-article__content h3, .wg-art .entry-content h3 { margin-top: 28px; font-size: 22px; line-height: 1.3; font-weight: 500; }
.wg-art h2[id], .wg-art h3[id] { scroll-margin-top: 110px; }
@media (max-width: 767px) {
  .wg-art .single-article__content h2, .wg-art .entry-content h2 { font-size: 22px; }
  .wg-art .single-article__content h3, .wg-art .entry-content h3 { font-size: 19px; }
}

/* CTA */
.wg-acta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin: 32px 0; padding: 24px 28px; border-left: 4px solid var(--wg-accent); border-radius: 12px; background: var(--wg-soft); }
.wg-acta > *, .wg-acta * + * { margin: 0; }
.wg-acta__body { flex: 1 1 320px; }
.wg-acta__q { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--wg-ink); }
.wg-acta .wg-acta__t { margin-top: 6px; font-size: 15px; color: var(--wg-muted); }
.wg-acta__btn { flex: none; display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--wg-accent);
  box-sizing: border-box; color: #fff !important; font-size: 15px; font-weight: 500; text-decoration: none !important; transition: filter .2s; }
.wg-acta__btn:hover { filter: brightness(.92); }
@media (max-width: 600px) { .wg-acta { padding: 20px; } .wg-acta__btn { width: 100%; text-align: center; } }

/* FAQ, источники, автор */
.wg-faq, .wg-sources, .wg-author-box { margin-top: 48px; }
.wg-block-title { margin: 0 0 16px; font-size: 26px; line-height: 1.25; font-weight: 500; }
.wg-faq details { border-bottom: 1px solid var(--wg-line); }
.wg-faq summary { position: relative; padding: 16px 36px 16px 0; font-weight: 500; cursor: pointer; list-style: none; }
.wg-faq summary::-webkit-details-marker { display: none; }
.wg-faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: var(--wg-accent); }
.wg-faq details[open] summary::after { content: "−"; }
.wg-faq__a { padding: 0 0 16px; }
.wg-sources ol { margin: 0; padding-left: 20px; font-size: 14px; color: var(--wg-muted); }
.wg-sources li + li { margin-top: 6px; }
.wg-sources a { color: var(--wg-accent); word-break: break-word; }
.wg-author-box { display: flex; gap: 20px; align-items: flex-start; padding: 24px; border: 1px solid var(--wg-line); border-radius: 12px; }
.wg-author-box__img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.wg-author-box p { margin: 0; }
.wg-author-box__label { font-size: 13px; color: var(--wg-muted); }
.wg-author-box__name { margin-top: 2px !important; font-size: 18px; font-weight: 500; }
.wg-author-box__name a { color: inherit; }
.wg-author-box__role { margin-bottom: 8px !important; font-size: 14px; color: var(--wg-accent); }
.wg-author-box__bio { font-size: 15px; }
.wg-author-box__more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--wg-accent); }

/* Похожие */
.wg-rel { padding: 56px 0 64px; }
.wg-rel__title { margin: 0 0 24px; font-size: 28px; font-weight: 500; }
.wg-rel__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.wg-rel__card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.wg-rel__img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--wg-soft); }
.wg-rel__name { margin: 12px 0 8px; font-size: 16px; line-height: 1.35; font-weight: 500; color: var(--wg-ink); }
.wg-rel__card:hover .wg-rel__name { color: var(--wg-accent); }
.wg-rel__meta { display: flex; gap: 12px; font-size: 13px; color: var(--wg-muted); }
@media (max-width: 1023px) { .wg-rel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .wg-rel__grid { grid-template-columns: 1fr; } .wg-author-box { flex-direction: column; } }
.wg-author-box__socs { display: flex; gap: 8px; margin-top: 12px; }
.wg-author-box__soc { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--wg-line); border-radius: 50%; color: var(--wg-ink); }
.wg-author-box__soc:hover { border-color: var(--wg-accent); color: var(--wg-accent); }
.wg-author-box__soc svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Страница новости 03.11: белая карточка на сером фоне, как у статей; отступы абзацев темы внутри наших блоков */
body.single-news { background: #efeff1; }
.wg-art.news-single { background: #fff; border: 0 !important; border-radius: 24px; padding: 48px 56px 56px; margin: 30px auto 64px !important; max-width: 960px; box-sizing: border-box; }
.wg-art.news-single .wg-rel { padding: 48px 0 0; }
.wg-art .wg-author-box p { margin: 0 !important; }
.wg-art .wg-author-box .wg-author-box__name { margin-top: 2px !important; }
.wg-art .wg-author-box .wg-author-box__role { margin-bottom: 8px !important; }
.wg-art .wg-acta p { margin: 0; }
.wg-art .wg-acta .wg-acta__t { margin-top: 6px; }
@media (max-width: 1000px) { .wg-art.news-single { margin: 20px 16px 48px !important; } }
@media (max-width: 767px) { .wg-art.news-single { padding: 28px 20px 36px; border-radius: 16px; } }
