/* =============================================
   Статья блога — типографика больших текстов,
   callout-блоки, перелинковка, FAQ. Стили сайта.
   ============================================= */
.article-body {
    font-family: var(--font-family-primary, 'Muller', sans-serif);
    color: #1f272a;
    font-size: 17px;
    line-height: 1.75;
    text-align: left;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 18px; }
.article-body h2 {
    font-family: var(--font-family-heading, 'Muller', sans-serif);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 44px 0 16px;
    padding-top: 8px;
    scroll-margin-top: 100px;
}
.article-body h3 {
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin: 30px 0 12px;
}
.article-body ul,
.article-body ol { margin: 0 0 20px; padding-left: 4px; list-style: none; }
.article-body ul li,
.article-body ol li { position: relative; padding-left: 30px; margin-bottom: 11px; }
.article-body ul li::before {
    content: "";
    position: absolute; left: 4px; top: 11px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #059669;
}
.article-body ol { counter-reset: ab; }
.article-body ol li { counter-increment: ab; }
.article-body ol li::before {
    content: counter(ab);
    position: absolute; left: 0; top: 2px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #d1fae5; color: #047857;
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.article-body li strong,
.article-body p strong { color: #0f172a; font-weight: 700; }
.article-body a { color: #047857; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #a7f3d0; }
.article-body a:hover { color: #059669; text-decoration-color: #059669; }

/* Лид-абзац */
.article-body .article-lead {
    font-size: 19px;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 26px;
}

/* Оглавление (TOC) */
.article-toc {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 22px 26px;
    margin: 0 0 32px;
}
.article-toc__title { font-weight: 800; font-size: 15px; color: #047857; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px; }
.article-toc ol { margin: 0; padding: 0; counter-reset: toc; }
.article-toc li { list-style: none; padding-left: 0; margin-bottom: 8px; }
.article-toc li::before { display: none; }
.article-toc a { color: #1f272a; text-decoration: none; font-weight: 600; }
.article-toc a:hover { color: #059669; }

/* Callout-блоки */
.article-callout {
    display: flex; gap: 14px;
    background: #f0fdf4;
    border-left: 4px solid #059669;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 24px 0;
    font-size: 16px;
    line-height: 1.6;
}
.article-callout--tip { background: #f0fdf4; border-left-color: #059669; }
.article-callout--warn { background: #fef6ec; border-left-color: #c2410c; }
.article-callout__icon { flex: none; font-size: 22px; line-height: 1.2; }
.article-callout p:last-child { margin-bottom: 0; }
.article-callout strong { color: #0f172a; }

/* Таблицы */
.article-table-wrap { overflow-x: auto; margin: 24px 0; border-radius: 12px; border: 1px solid #e5e7eb; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.article-body table th { background: #f0fdf4; text-align: left; padding: 12px 16px; font-weight: 700; color: #065f46; border-bottom: 1px solid #d1fae5; }
.article-body table td { padding: 11px 16px; border-bottom: 1px solid #eef2f0; vertical-align: top; transition: background-color .15s ease; }
.article-body table tr:last-child td { border-bottom: none; }
/* Зебра + hover строк — читабельнее на длинных таблицах (и на мобильном скролле) */
.article-body table tbody tr:nth-child(even) td { background: #f8fbfa; }
.article-body table tbody tr:hover td { background: #eefdf5; }

/* Перелинковка внутри статьи (кейсы/услуги) */
.article-links {
    background: linear-gradient(160deg, #f0fdf4, #ffffff);
    border: 1px solid #d1fae5;
    border-radius: 18px;
    padding: 24px 26px;
    margin: 30px 0;
}
.article-links__title { font-weight: 800; font-size: 18px; color: #0f172a; margin: 0 0 14px; }
.article-links__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.article-links__item {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 13px 16px; text-decoration: none; color: #111827; font-weight: 600; font-size: 15px;
    transition: border-color .2s, transform .2s;
}
.article-links__item:hover { border-color: #a7f3d0; transform: translateY(-2px); text-decoration: none; color: #047857; }
.article-links__item::before { content: "→"; color: #059669; font-weight: 800; }

/* Врезка-CTA в статье */
.article-cta {
    background: linear-gradient(150deg, #0f172a 0%, #0d1f1a 45%, #065f46 100%);
    border-radius: 20px;
    padding: 32px 34px;
    margin: 34px 0;
    color: #fff;
    text-align: left;
}
.article-cta h3 { color: #fff; font-size: 22px; margin: 0 0 8px; }
.article-cta p { color: rgba(236,253,245,0.82); margin: 0 0 18px; }
.article-cta .btn { display: inline-flex; }

/* FAQ статьи */
.blog-faq__heading {
    font-family: var(--font-family-heading, 'Muller', sans-serif);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 20px;
    text-align: left;
}
.blog-faq .case-faq__list { display: flex; flex-direction: column; gap: 12px; }
.blog-faq .case-faq__item { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.blog-faq .case-faq__item[open] { border-color: #a7f3d0; box-shadow: 0 10px 30px rgba(5,150,105,0.08); }
.blog-faq .case-faq__q { list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; font-size: 17px; font-weight: 700; color: #111827; position: relative; line-height: 1.4; text-align: left; }
.blog-faq .case-faq__q::-webkit-details-marker { display: none; }
.blog-faq .case-faq__q::after { content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; border-right: 2px solid #059669; border-bottom: 2px solid #059669; transform: translateY(-65%) rotate(45deg); transition: transform .25s; }
.blog-faq .case-faq__item[open] .case-faq__q::after { transform: translateY(-35%) rotate(-135deg); }
.blog-faq .case-faq__a { padding: 0 24px 22px; color: #4b5563; font-size: 15.5px; line-height: 1.65; text-align: left; }
.blog-faq .case-faq__a p { margin: 0 0 10px; }

@media (max-width: 768px) {
    .article-body { font-size: 16px; }
    .article-links__grid { grid-template-columns: 1fr; }
    .article-cta { padding: 26px 22px; }
    .blog-faq .case-faq__q { font-size: 16px; padding: 17px 48px 17px 18px; }
}

/* ── Глоссарий (словарь терминов) ── */
.article-glossary { margin: 1.4em 0; }
.article-glossary dt {
  font-weight: 700;
  color: #065f46;
  font-size: 1.05em;
  margin-top: 1.1em;
  padding-left: .9em;
  border-left: 3px solid #059669;
}
.article-glossary dt:first-child { margin-top: 0; }
.article-glossary dd {
  margin: .3em 0 0 0;
  padding-left: .9em;
  color: #374151;
  line-height: 1.6;
}

/* Контекстные инлайн-ссылки в теле статьи @since 1.72.0 */
.article-body a.article-inline-link {
  color: #059669;
  text-decoration: none;
  border-bottom: 1px solid rgba(5,150,105,.35);
  transition: border-color .15s, color .15s;
}
.article-body a.article-inline-link:hover {
  color: #047857;
  border-bottom-color: #047857;
}

/* ── Блок «Кратко» (answer-first) @since 1.73.0 ── */
.article-tldr {
  margin: 0 0 28px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(5,150,105,.06), rgba(5,150,105,.02));
  border: 1px solid rgba(5,150,105,.18);
  border-left: 4px solid #059669;
  border-radius: 12px;
}
.article-tldr__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 8px;
}
.article-tldr__answer { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: #1f2937; font-weight: 500; }
.article-tldr__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.article-tldr__list li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.5; color: #374151; }
.article-tldr__list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #059669; font-weight: 800; }
@media (max-width: 576px) { .article-tldr { padding: 16px 16px; } .article-tldr__answer { font-size: 15px; } }

/* ============================================================
   E-E-A-T: блок «Об авторе» (single.php). @since 1.75.0
   ============================================================ */
.article-author {
  background: #f8fafc; border: 1px solid #e6e9ee; border-radius: 20px;
  padding: 28px 30px; margin-top: 64px;
}
.article-author__head { display: flex; align-items: center; gap: 18px; }
.article-author__avatar {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #059669, #34d399);
  color: #fff; font-weight: 800; font-size: 26px; letter-spacing: -.02em;
}
.article-author__meta { display: flex; flex-direction: column; gap: 3px; }
.article-author__label { font-size: 13px; color: #94a3b8; }
.article-author__name { font-size: 19px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.article-author__role { font-size: 14px; line-height: 1.5; color: #64748b; margin-top: 2px; }
.article-author__exp { margin-top: 20px; padding-top: 18px; border-top: 1px dashed #dbe0e6; }
.article-author__exp-title { display: block; font-size: 14px; font-weight: 700; color: #334155; margin-bottom: 10px; }
.article-author__cases { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.article-author__cases li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.45; }
.article-author__cases li::before { content: '→'; position: absolute; left: 0; top: 0; color: #059669; font-weight: 800; }
.article-author__cases a { color: #047857; text-decoration: none; border-bottom: 1px solid rgba(5,150,105,.25); }
.article-author__cases a:hover { border-color: #047857; }
.article-author__ymyl {
  margin: 18px 0 0; padding: 12px 16px; border-radius: 12px;
  background: rgba(5,150,105,.06); border-left: 3px solid #059669;
  font-size: 13.5px; line-height: 1.55; color: #475569;
}
.article-author__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.article-author__link {
  display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 99px;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  background: #059669; color: #fff; transition: background .18s ease, transform .18s ease;
}
.article-author__link:hover { background: #047857; transform: translateY(-1px); }
.article-author__link--ghost { background: transparent; color: #047857; border: 1px solid rgba(5,150,105,.35); }
.article-author__link--ghost:hover { background: rgba(5,150,105,.08); }
@media (max-width: 576px) {
  .article-author { padding: 22px 18px; margin-top: 44px; }
  .article-author__head { gap: 14px; }
  .article-author__cta { flex-direction: column; }
  .article-author__link { justify-content: center; }
}

/* Таблица сравнения в статьях-сравнениях (пара к блоку .comparison-verdict) */
.comparison-table {
  max-width: 1062px;
  margin-left: auto;
  margin-right: auto;
}
.comparison-table__title {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 800;
  color: #0f172a;
}
.comparison-table__answer {
  margin: 0 0 22px;
  padding-left: 18px;
  border-left: 3px solid #2b5cff;
  font-size: 17px;
  line-height: 1.6;
  color: #1f2937;
}
.comparison-table__scroll {
  overflow-x: auto;
  border: 1px solid #dfe5f5;
  border-radius: 18px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.comparison-table__scroll:focus-visible {
  outline: 2px solid #2b5cff;
  outline-offset: 2px;
}
.comparison-table__grid {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.comparison-table__grid caption {
  caption-side: top;
  text-align: left;
  padding: 16px 20px 12px;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
}
.comparison-table__grid thead th {
  background: #f4f7ff;
  text-align: left;
  padding: 13px 18px;
  font-weight: 700;
  color: #1e2a54;
  border-bottom: 1px solid #dfe5f5;
}
.comparison-table__grid tbody th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 700;
  color: #0f172a;
  background: #fafbff;
  border-bottom: 1px solid #eef1f9;
  vertical-align: top;
  min-width: 160px;
}
.comparison-table__grid tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f9;
  vertical-align: top;
  color: #374151;
}
.comparison-table__grid tbody tr:last-child th,
.comparison-table__grid tbody tr:last-child td { border-bottom: none; }
.comparison-table__grid tbody tr:hover td { background: #f7f9ff; }
.comparison-table__grid a {
  color: #2b5cff;
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 92, 255, .3);
  transition: border-color .18s ease, color .18s ease;
}
.comparison-table__grid a:hover { color: #1740c9; border-color: #1740c9; }
.comparison-table__note {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #64748b;
}
.comparison-table__note a {
  color: #2b5cff;
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 92, 255, .3);
}
.comparison-table__note a:hover { color: #1740c9; border-color: #1740c9; }
@media (max-width: 768px) {
  .comparison-table__title { font-size: 24px; }
  .comparison-table__answer { font-size: 16px; }
  .comparison-table__grid { font-size: 14px; }
  .comparison-table__grid thead th,
  .comparison-table__grid tbody th,
  .comparison-table__grid tbody td { padding: 11px 14px; }
}

/*
 * Таблицы в тексте статьи, 20.08.2026.
 *
 * В статьях блога таблица выводится из post_content голым тегом, без обёртки —
 * в отличие от лендингов, где шаблон оборачивает её в .lp-longread__table-wrap.
 * На мобильном таблица шире экрана раздвигала документ: на /trendy-prodvizheniya-
 * seks-shopov-2026-2027/ замер показал 449px при вьюпорте 390.
 *
 * display: block делает саму таблицу прокручиваемым боксом (внутри неё браузер
 * строит анонимную табличную обёртку, поэтому колонки продолжают выравниваться).
 * Тени по краям на градиентах показывают, что содержимое можно листать: без них
 * обрезанная таблица читается как поломка вёрстки, а не как прокрутка.
 */
.blog-text table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 6px 0 26px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    border-collapse: collapse;
    background-color: #fff;
    background-image:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)),
        radial-gradient(farthest-side at 0 50%, rgba(15, 42, 33, 0.16), rgba(15, 42, 33, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(15, 42, 33, 0.16), rgba(15, 42, 33, 0));
    background-position: left center, right center, left center, right center;
    background-size: 28px 100%, 28px 100%, 13px 100%, 13px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll;
}

.blog-text table caption {
    caption-side: top;
    padding: 14px 16px 10px;
    color: #6b7280;
    font-size: 13px;
    text-align: left;
}

.blog-text table th,
.blog-text table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f0;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
}

.blog-text table thead th {
    background: #f7fbf9;
    color: #0f2a21;
    font-weight: 700;
    white-space: nowrap;
}

.blog-text table tbody th {
    font-weight: 600;
    color: #111827;
}

.blog-text table tr:last-child th,
.blog-text table tr:last-child td {
    border-bottom: 0;
}

/* ── Блоки кода и схемы в статьях ────────────────────────────────
   Добавлено 27.08.2026 под материал про мониторинг AI-трафика.
   В теме до этого не было стилей pre/code вообще, поэтому листинги
   отдавались браузерным дефолтом и выпадали из вёрстки статьи. */

.article-body .codewrap { margin: 24px 0; }
.article-body .codecap {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 8px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
    color: #6b7280;
}
.article-body .codecap .badge {
    background: #d1fae5; color: #065f46;
    padding: 3px 9px; border-radius: 6px; letter-spacing: .03em;
}
.article-body pre {
    margin: 0; padding: 20px 22px;
    background: #0f1a17; color: #d7e6e0;
    border: 1px solid #12241f; border-radius: 12px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13.5px; line-height: 1.65;
    -webkit-overflow-scrolling: touch;
}
.article-body pre code {
    background: none; border: none; padding: 0;
    font-size: inherit; color: inherit; white-space: pre;
}
/* Инлайновый код внутри текста — светлый, чтобы не спорить с панелью листинга */
.article-body p code,
.article-body li code,
.article-body td code,
.article-body th code {
    background: #f0fdf4; color: #065f46;
    border: 1px solid #d1fae5; border-radius: 5px;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: .88em; word-break: break-word;
}

/* Схема прохождения запроса: шаги с отсевом и попаданием */
.article-body .flow {
    display: flex; flex-direction: column; gap: 1px;
    background: #e5e7eb; border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; margin: 24px 0;
}
.article-body .step {
    display: grid; grid-template-columns: 104px 1fr; gap: 16px;
    align-items: baseline;
    background: #fff; padding: 14px 18px;
}
.article-body .step .k {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px; color: #059669; letter-spacing: .03em;
}
.article-body .step .v { font-size: 15px; line-height: 1.55; color: #374151; }
.article-body .step .v b { color: #111827; font-weight: 700; }
.article-body .step.stop { background: #fef2f2; }
.article-body .step.stop .k { color: #b91c1c; }
.article-body .step.hit { background: #f0fdf4; }
.article-body .step.hit .k { color: #047857; }

@media (max-width: 640px) {
    .article-body pre { font-size: 12px; padding: 14px 15px; border-radius: 10px; }
    .article-body .step { grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
}

/* Схемы в теле статьи — инлайновый SVG, наследует шрифт и палитру сайта */
.article-body .article-fig { margin: 34px 0; padding: 0; }
.article-body .article-fig__title {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}
.article-body .article-fig__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-body .article-fig__svg { display: block; width: 100%; height: auto; }
.article-body .article-fig__cap {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: #64748b;
}
/* На узких экранах схема не сжимается до нечитаемого, а прокручивается — как таблицы */
@media (max-width: 760px) {
    .article-body .article-fig { margin: 26px 0; }
    .article-body .article-fig__svg { min-width: 660px; }
    .article-body .article-fig__title { font-size: 17px; }
    .article-body .article-fig__cap { font-size: 14px; }
}

/* Скриншот интерфейса внутри статьи — показывается близко к своему размеру,
   чтобы не размывался при растяжении на всю колонку */
.article-body .article-fig__img {
    display: block;
    max-width: 620px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}
.article-body .article-fig--shot .article-fig__cap {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────
   Таблица внутри .article-table-wrap.
   В теме есть более раннее правило .blog-text table с display:block —
   оно делало прокручиваемым бокс саму таблицу. Когда таблица уже лежит
   в .article-table-wrap, эти два механизма накладываются: получается
   двойная рамка, а строки перестают растягиваться на всю ширину
   (блочный бокс шириной 100%, а внутренняя таблица — по содержимому).
   Здесь возвращаем таблице табличное поведение: рамку, скругление и
   прокрутку даёт обёртка, ширину распределяет сама таблица.
   ───────────────────────────────────────────────────────────── */
.article-body .article-table-wrap > table {
    display: table;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background-image: none;
    overflow: visible;
}
/* Подсказка о горизонтальной прокрутке переезжает на обёртку */
.article-body .article-table-wrap {
    background-color: #fff;
    background-image:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)),
        radial-gradient(farthest-side at 0 50%, rgba(15, 42, 33, 0.16), rgba(15, 42, 33, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(15, 42, 33, 0.16), rgba(15, 42, 33, 0));
    background-position: left center, right center, left center, right center;
    background-size: 28px 100%, 28px 100%, 13px 100%, 13px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll;
}
