/* ============================================================
   article-editorial.css — общий CSS-каркас шаблона .art-ed
   Используется на статьях /articles/* (флаг $articleEditorial = true).
   Все компоненты скоупятся под .art-ed, цвет и шрифт — сайтовые.

   Содержит: токены (:root-overrides на .art-ed), типографику,
   утилиты (.wrap, .section, .eyebrow), кнопки, крошки, мета+автор,
   prose-блок, общий FAQ, финальный CTA (форма + контакты),
   reveal-анимацию, базовый адаптив.

   Специфичные компоненты конкретной статьи (.vs, .cost, .pit,
   .ens-plate, .nums, .mistakes, .steps, .services, .case и т.п.)
   остаются inline в самой статье.
   ============================================================ */

.art-ed{
  --bg:#f8f9fb; --soft:#f1f4f9; --paper:#fff;
  --navy:#07062B; --navy-deep:#050416;
  --ink:#0a0a0a; --ink-2:#374151; --ink-3:#6b7280;
  --on-dark:#e8eaf2; --on-dark-2:#a5a8c0;
  --line:#e5e7eb; --line-soft:#eef1f6;
  --accent:#1F5BFF; --accent-d:#1648d8; --accent-soft:#eaf0ff; --accent-ink:#fff;
  --gold:#9db8ff;
  --red:#dc2626; --green:#16a34a; --amber:#d97706;
  --r:14px; --r-s:9px;
  --container:1140px; --reading:1140px;
  --sh-s:0 1px 2px rgba(7,6,43,.05);
  --sh-m:0 2px 12px rgba(7,6,43,.06), 0 18px 44px -24px rgba(7,6,43,.22);
  --sh-l:0 24px 60px -28px rgba(7,6,43,.4);
  --sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  --serif:var(--sans);
  --font-display:var(--sans);
  font-family:var(--sans);
  font-size:18px; line-height:1.66; color:var(--ink);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.art-ed h1,.art-ed h2,.art-ed h3,.art-ed h4{ font-family:var(--font-display); color:var(--ink); margin:0; font-weight:800; line-height:1.14; letter-spacing:-.012em; }
.art-ed a{ color:inherit; text-decoration:none; }
.art-ed button{ font:inherit; color:inherit; cursor:pointer; }
.art-ed img{ max-width:100%; display:block; }
.art-ed code{ font-family:'SF Mono','Menlo','Consolas',monospace; font-size:.9em; background:var(--soft); padding:2px 7px; border-radius:5px; color:var(--ink); }
.art-ed ::selection{ background:var(--accent); color:#fff; }

.art-ed .wrap{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:26px; }
.art-ed .section{ padding-block:clamp(48px,7vw,90px); }
.art-ed .section--soft{ background:var(--soft); }

.art-ed .eyebrow{ font-size:13px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--accent); margin:0 0 18px; display:flex; align-items:center; gap:12px; }
.art-ed .eyebrow::before{ content:""; width:26px; height:1px; background:currentColor; }
.art-ed .eyebrow--ondark{ color:var(--gold); }

/* ---- buttons ---- */
.art-ed .btn{ --b:var(--accent); --f:var(--accent-ink);
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:15px 26px; border-radius:var(--r-s); border:1px solid transparent;
  background:var(--b); color:var(--f); font-weight:600; font-size:16px; line-height:1; letter-spacing:-.005em;
  transition:background .18s ease, color .18s ease, border-color .18s ease, filter .18s ease; }
.art-ed .btn:hover{ background:var(--accent-d); }
.art-ed .btn--lg{ padding:17px 30px; font-size:16.5px; }
.art-ed .btn--light{ --b:#fff; --f:var(--navy); }
.art-ed .btn--light:hover{ background:#eef1f7; }
.art-ed .btn--block{ width:100%; }

/* ---- breadcrumbs ---- */
.art-ed .crumbs{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:14px; color:#6b7280; line-height:1.5; }
.art-ed .crumbs a{ color:#1F5BFF; text-decoration:none; }
.art-ed .crumbs a:hover{ text-decoration:underline; }
.art-ed .crumbs .sep{ color:#9ca3af; }
.art-ed .crumbs .cur{ color:#0a0f2c; }

/* ---- article head / meta / author ---- */
.art-ed .art-head{ padding-block:clamp(28px,4vw,52px) 0; }
.art-ed .art-meta{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; font-size:13.5px; color:var(--ink-3); margin-bottom:22px; }
.art-ed .art-meta .pill{ display:inline-flex; align-items:center; gap:7px; }
.art-ed .art-meta .pill svg{ width:15px; height:15px; opacity:.7; }
.art-ed .art-meta .dot{ width:4px; height:4px; border-radius:50%; background:var(--ink-3); opacity:.5; }
.art-ed .art-head h1{ font-size:clamp(31px,4.4vw,52px); line-height:1.08; letter-spacing:-.02em; max-width:20ch; margin:0; }
.art-ed .art-lead{ font-size:clamp(18px,1.7vw,21px); color:var(--ink-2); line-height:1.62; max-width:var(--reading); margin:26px 0 0; }
.art-ed .art-lead b{ color:var(--ink); font-weight:600; }
.art-ed .art-author{ display:flex; align-items:center; gap:13px; margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }
.art-ed .art-author .av{ width:46px; height:46px; border-radius:50%; object-fit:cover; object-position:center top; border:1px solid var(--line); flex:none; display:block; }
.art-ed .art-author .nm{ display:block; font-size:17px; font-weight:700; color:var(--ink); line-height:1.1; }
.art-ed .art-author .rl{ display:block; font-size:13px; color:var(--ink-3); margin-top:4px; }

/* ---- table of contents ---- */
.art-ed .toc{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r); padding:24px 28px; max-width:var(--reading); margin:clamp(34px,4vw,46px) 0 0; }
.art-ed .toc__h{ font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); margin:0 0 16px; }
.art-ed .toc ol{ margin:0; padding:0; list-style:none; counter-reset:toc; columns:2; column-gap:34px; }
.art-ed .toc li{ counter-increment:toc; break-inside:avoid; margin-bottom:11px; }
.art-ed .toc a{ display:flex; gap:11px; font-size:15px; color:var(--ink-2); line-height:1.4; }
.art-ed .toc a::before{ content:counter(toc,decimal-leading-zero); font-weight:700; font-size:13px; color:var(--accent); flex:none; padding-top:1px; }
.art-ed .toc a:hover{ color:var(--accent); }

/* ---- prose ---- */
.art-ed .prose{ max-width:var(--reading); }
/* Типографика: длина строки основного текста ~72-78ch; широкие элементы (таблицы, врезки) остаются на всю ширину */
.art-ed .prose > p,.art-ed .prose > ul,.art-ed .prose > ol,.art-ed .prose > h2,.art-ed .prose > h3,.art-ed .lead{ max-width:760px; }
.art-ed .prose > h2{ font-size:clamp(25px,2.9vw,34px); line-height:1.2; margin:clamp(44px,5vw,64px) 0 0; scroll-margin-top:90px; position:relative; padding-top:30px; }
.art-ed .prose > h2::before{ content:""; position:absolute; top:0; left:0; width:46px; height:3px; background:var(--accent); border-radius:2px; }
.art-ed .prose > h3{ font-size:clamp(19px,2vw,23px); margin:38px 0 0; color:var(--ink); }
.art-ed .prose p{ font-size:17.5px; line-height:1.72; color:var(--ink-2); margin:18px 0 0; }
.art-ed .prose p b,.art-ed .prose li b{ color:var(--ink); font-weight:600; }
.art-ed .prose h2 + p,.art-ed .prose h3 + p{ margin-top:14px; }
.art-ed .prose ul{ margin:18px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:11px; }
.art-ed .prose ul li{ position:relative; padding-left:26px; font-size:17px; line-height:1.6; color:var(--ink-2); }
.art-ed .prose ul li::before{ content:""; position:absolute; left:4px; top:11px; width:7px; height:7px; border-radius:50%; background:var(--accent); opacity:.55; }
.art-ed .prose ol{ margin:18px 0 0; padding:0; list-style:none; counter-reset:plist; display:flex; flex-direction:column; gap:14px; }
.art-ed .prose ol li{ counter-increment:plist; position:relative; padding-left:38px; font-size:17px; line-height:1.6; color:var(--ink-2); }
.art-ed .prose ol li::before{ content:counter(plist,decimal-leading-zero); position:absolute; left:0; top:0; font-weight:800; font-size:14px; color:var(--accent); letter-spacing:.04em; padding-top:3px; }
.art-ed .prose a.inline{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; }

/* ---- inline CTA band (in-article navy panel) ---- */
.art-ed .cta-inline{ background:var(--navy); color:#fff; border-radius:var(--r); padding:clamp(30px,4vw,44px); margin-top:clamp(40px,5vw,56px); position:relative; overflow:hidden; max-width:var(--reading); }
.art-ed .cta-inline::after{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(125deg,rgba(255,255,255,.04) 0 1px,transparent 1px 24px); pointer-events:none; }
.art-ed .cta-inline__in{ position:relative; }
.art-ed .cta-inline .eyebrow{ color:var(--gold); }
.art-ed .cta-inline h3{ color:#fff; font-size:clamp(22px,2.6vw,28px); line-height:1.2; margin:0 0 12px; }
.art-ed .cta-inline p{ color:var(--on-dark); font-size:16px; line-height:1.6; margin:0 0 22px; max-width:52ch; }
.art-ed .cta-inline .row{ display:flex; flex-wrap:wrap; gap:13px; align-items:center; }
.art-ed .cta-inline .note{ font-size:12.5px; color:var(--on-dark-2); margin-top:16px; }
.art-ed .cta-inline .note a{ color:var(--on-dark); text-decoration:underline; }

/* ---- related cards (3 ссылки внизу) ---- */
.art-ed .related{ max-width:var(--reading); margin-top:clamp(44px,5vw,60px); }
.art-ed .related__h{ font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); margin:0 0 18px; }
.art-ed .related__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.art-ed .rel{ display:block; border:1px solid var(--line); border-radius:var(--r); padding:22px 22px; background:var(--paper); transition:border-color .15s, background .15s; }
.art-ed .rel:hover{ border-color:var(--accent); background:var(--bg); }
.art-ed .rel .k{ font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--accent); }
.art-ed .rel .t{ font-size:18px; font-weight:700; color:var(--ink); margin-top:8px; line-height:1.3; display:block; }
.art-ed .rel .arr{ margin-top:14px; color:var(--ink-3); display:inline-flex; }

/* ---- final CTA (форма + контакты на navy) ---- */
.art-ed .cta{ position:relative; background:var(--navy); color:#fff; border-radius:var(--r); padding:clamp(40px,6vw,72px); overflow:hidden; }
.art-ed .cta::after{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(125deg,rgba(255,255,255,.04) 0 1px,transparent 1px 26px); pointer-events:none; }
.art-ed .cta__grid{ position:relative; display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center; }
.art-ed .cta h2{ color:#fff; font-size:clamp(27px,3.2vw,38px); margin-bottom:16px; }
.art-ed .cta > .cta__grid p{ color:var(--on-dark); font-size:17.5px; margin:0 0 26px; max-width:46ch; line-height:1.6; }
.art-ed .cta__contacts{ display:flex; flex-direction:column; gap:0; }
.art-ed .cta__form{ background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); border-radius:var(--r); padding:28px; }
.art-ed .field{ display:flex; flex-direction:column; gap:8px; }
.art-ed .field label{ font-size:14px; font-weight:600; color:var(--on-dark-2); }
.art-ed .field input{ padding:16px 18px; border:1px solid transparent; border-radius:var(--r-s); font-size:16px; font-family:var(--sans); background:#fff; color:#0a0a0a; transition:.15s; width:100%; }
.art-ed .field input:focus{ outline:none; box-shadow:0 0 0 3px rgba(31,91,255,.45); }
.art-ed .field .err{ color:#ffb4b4; font-size:13.5px; display:none; }
.art-ed .field.invalid .err{ display:block; }
.art-ed .field.invalid input{ box-shadow:0 0 0 2px var(--red); }
.art-ed .cta__consent{ font-size:12.5px; color:var(--on-dark-2); margin-top:14px; line-height:1.5; }
.art-ed .cta__consent a{ color:var(--on-dark); text-decoration:underline; }
.art-ed .cta__or{ display:flex; align-items:center; gap:14px; margin:22px 0; color:var(--on-dark-2); font-size:13px; }
.art-ed .cta__or::before,.art-ed .cta__or::after{ content:""; flex:1; height:1px; background:rgba(255,255,255,.14); }
.art-ed .cta__msglinks{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.art-ed .cta__msg{ display:flex; align-items:center; gap:11px; padding:15px 18px; border-radius:var(--r); color:#fff; font-weight:600; font-size:15px; transition:filter .18s; }
.art-ed .cta__msg:hover{ filter:brightness(1.08); }
.art-ed .cta__line-ic{ width:34px; height:34px; border-radius:8px; background:rgba(255,255,255,.18); display:grid; place-items:center; color:#fff; flex:none; }
.art-ed .cta__msg.tg{ background:#2aabee; } .art-ed .cta__msg.wa{ background:#25d366; }

/* ---- FAQ accordion ---- */
.art-ed .faq{ max-width:var(--reading); }
.art-ed .qa{ border-bottom:1px solid var(--line); }
.art-ed .qa__q{ width:100%; display:flex; align-items:center; gap:22px; justify-content:space-between; text-align:left; padding:24px 2px; background:none; border:none; font-size:clamp(18px,2vw,21px); font-weight:700; color:var(--ink); line-height:1.3; }
.art-ed .qa__q:hover{ color:var(--accent); }
.art-ed .qa__ic{ flex:none; width:26px; height:26px; position:relative; color:var(--accent); }
.art-ed .qa__ic::before,.art-ed .qa__ic::after{ content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); background:currentColor; }
.art-ed .qa__ic::before{ width:14px; height:1.5px; }
.art-ed .qa__ic::after{ width:1.5px; height:14px; transition:transform .25s ease; }
.art-ed .qa.open .qa__ic::after{ transform:translate(-50%,-50%) scaleY(0); }
.art-ed .qa__a{ overflow:hidden; height:0; transition:height .28s ease; }
.art-ed .qa__a-inner{ padding:0 2px 26px; color:var(--ink-2); font-size:16.5px; line-height:1.66; max-width:74ch; }

/* ---- защита от коллизии: глобальный .step::before (counter-бейдж лендингов)
       и .step::after (синяя линия-коннектор) не должны протекать
       в редакционный блок шагов .art-ed .step ---- */
.art-ed .step::before,
.art-ed .step::after{ content:none !important; display:none !important; }

/* ---- reveal animation (показывается только когда JS включает .reveal-on) ---- */
@media (prefers-reduced-motion:no-preference){
  .art-ed.reveal-on [data-reveal]{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  .art-ed.reveal-on [data-reveal].in{ opacity:1; transform:none; }
}

/* ---- базовый адаптив для общих компонентов ---- */
@media (max-width:860px){
  .art-ed .related__grid,.art-ed .cta__grid{ grid-template-columns:1fr; }
  .art-ed .toc ol{ columns:1; }
}
@media (max-width:560px){
  .art-ed .cta-inline .row .btn{ width:100%; }
  .art-ed .cta__msglinks{ grid-template-columns:1fr; }
}

/* ---- единая центрированная колонка чтения ---- */
.art-ed .art-head > div,
.art-ed .art-lead,.art-ed .toc,
.art-ed .prose,
.art-ed .cta-inline,.art-ed .related,.art-ed .faq{ margin-left:auto; margin-right:auto; }
