/* ==========================================================================
   Реплиус — блог (/blog). Поверх /landing/styles.css: те же токены, шрифт, радиусы и «обои».
   Утверждённый макет: docs/design/blog/article.html (вариант 1, белый фон).
   Статья: текст слева (до 760px), оглавление справа (липкое).
   ========================================================================== */

body { background: var(--bg); }
.bl-page { padding-top: 8px; }

/* ---------- шапка сайта на светлом фоне (на лендинге она белая поверх синего hero) ---------- */
.hdr.hdr--plain:not(.scrolled):not(.menu) { --text: var(--p-text); --text-2: var(--p-text-2); }
.hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-light { display: block; }
.hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-dark { display: none; }
.hdr.hdr--plain:not(.scrolled):not(.menu) .hdr-right .btn-primary { background: var(--accent); color: var(--accent-on); }
.hdr.hdr--plain:not(.scrolled):not(.menu) .nav-a:hover, .hdr.hdr--plain:not(.scrolled):not(.menu) .icon-btn:hover { background: var(--surface-2); }
:root[data-theme="dark"] .hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-light { display: none; }
:root[data-theme="dark"] .hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-light { display: none; }
  :root:not([data-theme="light"]) .hdr.hdr--plain:not(.scrolled):not(.menu) .logo .logo-dark { display: block; }
}
.nav-a.cur { color: var(--text); background: var(--surface-2); }

/* ---------- хлебные крошки: домик › раздел › раздел; на телефоне — одна ссылка «‹ назад» ---------- */
.bl-crumbs { margin: 20px 0 32px; font-size: 14px; }
.bl-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; min-width: 0; }
.bl-crumbs li { display: flex; align-items: center; min-width: 0; flex: none; }
.bl-crumbs li + li::before {
  content: ""; width: 16px; height: 16px; margin: 0 6px; flex: none; background: var(--text-3); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bl-crumbs a { display: inline-flex; align-items: center; height: 32px; padding: 0 8px; margin: 0 -2px; border-radius: 8px; color: var(--text-2); font-weight: 500; transition: color .15s, background .15s; }
.bl-crumbs li:first-child a { padding: 0 7px; margin-left: -7px; }
.bl-crumbs a:hover { color: var(--accent); background: var(--accent-soft); }
.bl-crumbs svg { width: 18px; height: 18px; }
.bl-crumbs .cur span { padding: 0 6px; color: var(--text-3); white-space: nowrap; }
.bl-crumbs .m-only { display: none; }
@media (max-width: 680px) {
  .bl-crumbs li { display: none; }
  .bl-crumbs li.parent { display: flex; }
  .bl-crumbs li.parent::before { display: none; }
  .bl-crumbs .parent a { padding-left: 4px; margin-left: -4px; color: var(--accent); }
  .bl-crumbs .parent a::before {
    content: ""; width: 18px; height: 18px; margin-right: 2px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .bl-crumbs .m-only { display: inline; }
  .bl-crumbs .d-only { display: none; }
  /* на страницах списка нет «назад»: показываем всю цепочку */
  .bl-crumbs ol:has(.cur) li { display: flex; }
}

.draft-note { display: flex; gap: 10px; align-items: center; margin-top: 20px; padding: 12px 16px; border-radius: var(--r-in); background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 500; }
.draft-note i { font-size: 18px; }

/* ---------- шапка статьи ---------- */
.ah { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.ah-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 6px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--text-2); }
.tag .si { width: 22px; height: 22px; }
.tag .ph { font-size: 18px; color: var(--accent); margin-left: 4px; }
.tag.plain { padding: 0 14px; }
.ah h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.ah h1 .hl { color: var(--accent); }
.ah-lead { font-size: 19px; color: var(--text-2); margin-top: 22px; max-width: 54ch; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }

/* обложка: «обои мессенджера» с перепиской вместо стоковой картинки */
.cover { border-radius: var(--r-blk); min-height: 440px; padding: 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; box-shadow: var(--shadow); }
.cover .bub { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.45; box-shadow: var(--shadow); background: var(--p-surface); color: var(--p-text); animation: rvIn .8s var(--ease) var(--d, 0s) backwards; }
.cover .bub small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--p-text-3); margin-bottom: 4px; font-weight: 500; }
.cover .bub small .si { width: 16px; height: 16px; }
.cover .bub small .ph { font-size: 14px; }
.cover .in { align-self: flex-start; border-bottom-left-radius: 6px; }
.cover .out { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--blue); color: #fff; }
.cover .out small { color: rgb(255 255 255 / .75); }
.cover .ai { align-self: flex-end; max-width: 88%; background: color-mix(in srgb, var(--p-surface) 78%, transparent); backdrop-filter: blur(10px); border: 1px dashed color-mix(in srgb, var(--blue) 45%, transparent); }
.cover .ai small { color: var(--blue); }
.cover .ai .acts { display: flex; gap: 8px; margin-top: 10px; }
.cover .ai .acts b { font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: var(--r-pill); background: var(--blue); color: #fff; }
.cover .ai .acts b + b { background: transparent; color: var(--p-text-2); border: 1px solid var(--p-line-2); }
@media (prefers-reduced-motion: reduce) { .cover .bub { animation: none; } }

/* ---------- тело: текст слева, оглавление справа ---------- */
.ab { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: 64px; justify-content: space-between; margin-top: 72px; }
.toc { order: 2; position: sticky; top: 112px; align-self: start; font-size: 14px; }
.toc h4 { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc ol a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); line-height: 1.35; transition: color .15s, border-color .15s; }
.toc ol a:hover { color: var(--text); }
.toc ol a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc-cta { margin-top: 28px; padding: 18px; border-radius: var(--r-card); background: var(--surface-2); }
.toc-cta b { font-size: 15px; }
.toc-cta p { font-size: 14px; color: var(--text-2); margin: 6px 0 14px; }
.toc-cta .btn { width: 100%; }
.toc-m { display: none; }

/* ---------- типографика статьи ---------- */
.prose { font-size: 18px; line-height: 1.7; color: var(--text); }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.035em; margin-top: 64px; scroll-margin-top: 100px; }
.prose h3 { font-size: 21px; letter-spacing: -0.02em; margin-top: 40px; }
.prose p { color: var(--text-2); }
.prose p b, .prose li b { color: var(--text); font-weight: 600; }
.prose a:not(.btn) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); }
.prose ul li { position: relative; padding-left: 30px; }
.prose ul li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.prose ol:not(.steps) { padding-left: 24px; color: var(--text-2); display: grid; gap: 10px; }
.prose code { font-size: .88em; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }

/* «Коротко» — ответ сразу, для сниппета Яндекса и для тех, кто не дочитает */
.tldr { border-radius: var(--r-card); background: var(--accent-soft); padding: 26px 28px; }
.tldr h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent-ink); margin-bottom: 12px; letter-spacing: 0; }
.tldr ul { gap: 8px; }
.tldr ul li { color: var(--text); font-size: 16px; }

/* шаги */
.steps { list-style: none; padding: 0; margin: 24px 0 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 22px 24px 22px 76px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.steps li::before { content: counter(s); position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-on); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.steps li b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.steps li span { display: block; color: var(--text-2); font-size: 16px; line-height: 1.55; }

/* таблица */
.tbl { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl thead th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.tbl td { color: var(--text-2); }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl .y { color: var(--ok); } .tbl .n { color: var(--text-3); }

/* врезки */
.callout { display: flex; gap: 16px; padding: 22px 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); }
.callout > i { font-size: 24px; color: var(--accent); flex: none; margin-top: 2px; }
.callout.warn { background: var(--warn-soft); border-color: transparent; }
.callout.warn > i { color: var(--warn); }
.callout p { font-size: 16px; color: var(--text-2); }
.callout p b { color: var(--text); }

/* картинка/скриншот */
.fig { margin-top: 32px; }
.fig img, .fig .shot { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; box-shadow: var(--shadow); }
.fig figcaption { font-size: 14px; color: var(--text-3); margin-top: 12px; text-align: center; }
/* нарисованный «скриншот» кабинета: список диалогов + чат */
.fig .bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fig .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.fig .ui { display: grid; grid-template-columns: 210px 1fr; min-height: 250px; }
.fig .ui .lst { border-right: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; align-content: start; }
.fig .ui .row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.fig .ui .row.on { background: var(--accent-soft); color: var(--text); }
.fig .ui .row .si { width: 22px; height: 22px; flex: none; }
.fig .ui .row b { display: block; color: var(--text); font-weight: 500; font-size: 13px; }
.fig .ui .chat { padding: 18px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.fig .ui .m { max-width: 75%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.4; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.fig .ui .m.o { align-self: flex-end; background: var(--blue); color: #fff; border: 0; }
@media (max-width: 680px) { .fig .ui { grid-template-columns: 1fr; } .fig .ui .lst { display: none; } }

/* продуктовая врезка в потоке (вставляется на место <!--cta-->) */
.inline-cta { border-radius: var(--r-blk); padding: 36px 40px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin-top: 44px !important; }
.inline-cta h3 { font-size: 26px; line-height: 1.15; letter-spacing: -0.035em; margin: 0; }
.inline-cta p { color: var(--text-2) !important; font-size: 16px; margin-top: 10px; }
.inline-cta .chs { display: flex; gap: 6px; margin-top: 16px; }
.inline-cta .chs .si { width: 30px; height: 30px; }
.inline-cta .btn { background: #fff; color: var(--blue); }

/* вопросы и ответы (FAQPage) */
.afaq details { border-bottom: 1px solid var(--line-2); }
.afaq summary { list-style: none; padding: 20px 0; font-weight: 500; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; cursor: pointer; color: var(--text); }
.afaq summary::-webkit-details-marker { display: none; }
.afaq summary i { font-size: 18px; color: var(--text-3); transition: transform .35s var(--ease); flex: none; margin-top: 4px; }
.afaq details[open] summary i { transform: rotate(45deg); color: var(--accent); }
.afaq details p { padding-bottom: 20px; font-size: 16px; }

/* автор, «полезно?», поделиться */
.author { display: flex; gap: 18px; align-items: center; padding: 26px; border-radius: var(--r-card); background: var(--surface-2); margin-top: 64px !important; }
.author .ava { width: 56px; height: 56px; font-size: 20px; }
.author b { display: block; font-size: 17px; color: var(--text); }
.author p { font-size: 15px; margin-top: 4px; }
/* «Статья была полезной?» — класс .bl-rate: .rate уже занят на лендинге (плашка рейтинга со звёздами) */
.bl-rate { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 32px !important; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bl-rate-q { font-size: 16px; font-weight: 500; color: var(--text); }
.bl-rate .btns { display: flex; gap: 8px; }
.bl-rate button { height: 40px; padding: 0 16px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); transition: border-color .2s, background .2s, color .2s; }
.bl-rate button i { font-size: 18px; color: var(--text-3); transition: color .2s; }
.bl-rate button:hover { border-color: var(--accent); color: var(--accent); }
.bl-rate button:hover i { color: var(--accent); }
.bl-rate button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.bl-rate button.on i { color: var(--accent-on); }
.bl-rate-thanks { font-size: 15px; color: var(--ok); }

/* ---------- карточки статей ---------- */
.rel { margin-top: 120px; }
.rel-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.rel-head .h2 { font-size: clamp(28px, 3vw, 40px); }
.rel-head a { color: var(--accent); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .th { height: 150px; display: grid; place-items: center; }
.card .th .si, .card .th .big { width: 64px; height: 64px; font-size: 44px; color: #fff; display: grid; place-items: center; filter: drop-shadow(0 10px 18px rgb(12 19 36 / .2)); }
.card .bd { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .bd small { font-size: 13px; color: var(--text-3); }
.card .bd h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.card .bd p { font-size: 15px; color: var(--text-2); }

/* ---------- страница списка ---------- */
.bl-head h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.045em; }
.bl-head p { font-size: 19px; color: var(--text-2); margin-top: 18px; max-width: 60ch; }
.bl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 32px; }
.chip-cat { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; color: var(--text-2); transition: border-color .15s, color .15s, background .15s; }
.chip-cat .si { width: 22px; height: 22px; margin-left: -6px; }
.chip-cat .ph { font-size: 18px; color: var(--accent); }
.chip-cat:hover { border-color: var(--line-2); color: var(--text); }
.chip-cat.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.bl-empty { text-align: center; padding: 72px 24px; border: 1px dashed var(--line-2); border-radius: var(--r-blk); }
.bl-empty > i { font-size: 40px; color: var(--accent); }
.bl-empty h3 { font-size: 26px; margin-top: 12px; }
.bl-empty p { color: var(--text-2); margin: 10px auto 24px; max-width: 46ch; }

/* финальный призыв */
.a-final { margin-top: 112px; border-radius: 36px; padding: 72px; display: grid; grid-template-columns: 1.2fr auto; gap: 40px; align-items: center; }
.a-final h2 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.04; letter-spacing: -0.045em; max-width: 16ch; }
.a-final h2 em { font-style: normal; color: #bcd2ff; }
.a-final p { color: var(--text-2); font-size: 18px; margin-top: 16px; max-width: 46ch; }
.a-final .risk { display: flex; gap: 20px; margin-top: 20px; font-size: 15px; }
.a-final .risk span { display: inline-flex; gap: 6px; align-items: center; }
.a-final .btn { background: #fff; color: var(--blue); }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .ah { grid-template-columns: 1fr; gap: 40px; }
  .cover { min-height: 0; }
  .ab { grid-template-columns: minmax(0, 760px); justify-content: center; gap: 0; margin-top: 48px; }
  .toc { display: none; }
  .toc-m { display: block; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); margin-bottom: 8px; }
  .toc-m summary { list-style: none; padding: 16px 20px; font-weight: 600; display: flex; justify-content: space-between; cursor: pointer; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m ol { margin: 0; padding: 0 20px 16px 40px; display: grid; gap: 8px; color: var(--text-2); font-size: 15px; }
  .toc-m a { color: var(--text-2) !important; text-decoration: none !important; }
  .cards { grid-template-columns: 1fr 1fr; }
  .a-final { grid-template-columns: minmax(0, 1fr); padding: 48px 32px; }
}
@media (max-width: 680px) {
  .bl-page { padding: 0 20px; }
  .prose { font-size: 17px; }
  .cover { padding: 22px; }
  .inline-cta { grid-template-columns: 1fr; padding: 28px 24px; }
  .steps li { padding: 18px 18px 18px 64px; }
  .steps li::before { left: 16px; top: 16px; width: 32px; height: 32px; }
  .tbl { overflow-x: auto; }
  .tbl table { min-width: 560px; }
  .cards { grid-template-columns: 1fr; }
  .rel-head { flex-direction: column; align-items: start; }
  .a-final { grid-template-columns: minmax(0, 1fr); padding: 36px 24px; border-radius: 28px; gap: 28px; }
  .a-final h2 { font-size: 30px; }
  .a-final p { font-size: 16px; }
  .a-final .risk { flex-direction: column; gap: 8px; }
  .a-final .btn, .inline-cta .btn { width: 100%; height: auto; min-height: 56px; padding: 14px 24px; white-space: normal; text-align: center; line-height: 1.3; }
  .inline-cta { grid-template-columns: minmax(0, 1fr); }

}
