/* =========================================================
   Delow — blog article: header, reading column, table of contents,
   pull-quotes, callouts, in-article CTA, reading progress
   (TOC, crumbs, .doc grid and .quote come from service.css)
   ========================================================= */

/* Reading progress: a thin line along the top edge of the screen */
.readbar { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 3px; pointer-events: none; }
.readbar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }
html:not(.js) .readbar { display: none; }

/* ---------- Header ---------- */
.ahero { position: relative; padding: 16px 0 8px; overflow: clip; }
.ahero__glow {
  position: absolute; z-index: -1; pointer-events: none; right: -18%; top: -24%; width: 72vw; max-width: 980px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(203,169,197,.46), rgba(203,169,197,.15) 45%, transparent 72%);
}
@media (max-width: 767px) { .ahero__glow { width: 150vw; right: -70vw; top: -14%; } }
.ahero .crumbs { margin-bottom: 22px; }
.ahero .crumbs li:last-child { max-width: 28ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ahero__head { max-width: 980px; }
.ahero__title { margin-top: 18px; font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 650; text-wrap: balance; }
.ahero__dek { margin-top: 18px; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); max-width: 58ch; }
.ahero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 20px; font-size: .9375rem; color: var(--muted); }
.ahero__meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 14px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.ahero__cover { margin-top: 32px; border-radius: 28px; overflow: hidden; }
.ahero__cover .cover { aspect-ratio: 16 / 10; }
@media (min-width: 768px) { .ahero__cover .cover { aspect-ratio: 21 / 8; } .ahero__cover .cover__motif { scale: .62; } }
@media (min-width: 1024px) { .ahero { padding-top: 40px; } }
html.js .ahero__head > *, html.js .ahero__cover { opacity: 0; transform: translateY(16px); }
html.js.is-loaded .ahero__head > *, html.js.is-loaded .ahero__cover { opacity: 1; transform: none; transition: opacity .55s ease, transform .7s var(--ease-out); }
html.js.is-loaded .ahero__head > :nth-child(2) { transition-delay: .05s; }
html.js.is-loaded .ahero__head > :nth-child(3) { transition-delay: .1s; }
html.js.is-loaded .ahero__head > :nth-child(4) { transition-delay: .15s; }
html.js.is-loaded .ahero__head > :nth-child(5) { transition-delay: .2s; }
html.js.is-loaded .ahero__cover { transition-delay: .26s; }

/* ---------- Layout: the top progress line replaces the TOC's own line ---------- */
.adoc { padding-bottom: 16px; }
.adoc .toc__progress { display: none; }
@media (min-width: 1100px) {
  .adoc { grid-template-columns: 230px minmax(0, 1fr); }
  .adoc .toc { margin-top: 64px; }
  .adoc .toc__list { border-left: 2px solid var(--line); }
  .adoc .toc__list a { padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; }
  .adoc .toc__list a.is-current { border-left-color: var(--accent); }
}

/* ---------- Reading column ---------- */
.article { max-width: 68ch; padding-top: 40px; font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); }
@media (min-width: 768px) { .article { font-size: 1.1875rem; } }
@media (min-width: 1100px) { .article { padding-top: 64px; } }
.article p + p, .article p + ul, .article ul + p, .article p + ol { margin-top: 1.05em; }
.article a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-light); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
.article a:hover { text-decoration-color: var(--accent); }
.article strong { color: var(--ink); font-weight: 600; }
.art__sec { padding-top: 56px; scroll-margin-top: calc(var(--header-h) + 72px); }
.art__sec h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); line-height: 1.12; letter-spacing: -.03em; color: var(--ink); margin-bottom: 18px; max-width: 26ch; }
.art__sec h3 { font-size: clamp(1.25rem, 1.15rem + .4vw, 1.4375rem); line-height: 1.25; letter-spacing: -.02em; color: var(--ink); margin: 36px 0 12px; }
.art__sec h2 + h3 { margin-top: 8px; }
@media (min-width: 1100px) { .art__sec { scroll-margin-top: calc(var(--header-h) + 32px); } }

/* Lists: dots, or a bold lead per item */
.art__list { display: grid; gap: 10px; margin-top: 1.05em; }
.art__list li { position: relative; padding-left: 26px; }
.art__list li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.art__list--lead { gap: 12px; }
.art__list--lead li { padding: 16px 18px 16px 44px; border-radius: 16px; background: var(--surface); line-height: 1.6; }
.art__list--lead li::before { left: 20px; top: 1.55em; }

/* Pull-quote (bigger inside an article) */
.article .quote { margin: 40px 0; }
.article .quote p { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); }

/* Callout: a tinted box */
.callout { margin: 32px 0; padding: 24px 24px 22px; border-radius: 22px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(74,37,69,.12); }
.callout__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; letter-spacing: -.015em; color: var(--ink); margin-bottom: 8px; }
.callout__title .ico { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--accent); color: #fff; stroke-width: 2.2; }
.callout p { color: var(--ink-2); }
.callout .art__list { margin-top: 10px; gap: 6px; }

/* In-article CTA */
.acta { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 14px; justify-items: start; margin: 48px 0 8px; padding: 28px 24px 24px; border-radius: 26px; background: var(--dark); color: var(--on-dark-2); line-height: 1.55; }
.acta::before { content: ""; position: absolute; z-index: -1; right: -30%; top: -60%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(107,58,100,.85), transparent 70%); }
.acta__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); letter-spacing: -.025em; line-height: 1.15; color: #fff; }
.acta p { font-size: 1.0313rem; max-width: 46ch; }
.acta .btn { margin-top: 6px; }
@media (max-width: 559px) { .acta .btn { width: 100%; justify-content: space-between; } }
@media (min-width: 768px) { .acta { padding: 36px 36px 32px; } }

/* Diagram: the content work cycle (SEO content post) */
.cycle { margin: 32px 0 8px; padding: 26px 18px; border-radius: 26px; background: var(--surface); }
.cycle__ring { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.cycle__ring > svg { position: absolute; inset: 14%; width: 72%; height: 72%; overflow: visible; }
.cycle__ring circle { fill: none; stroke: var(--accent-light); stroke-width: 2; stroke-dasharray: 6 7; vector-effect: non-scaling-stroke; }
.cycle__ring path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cycle__step { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; display: grid; justify-items: center; gap: 6px; width: 38%; text-align: center; }
.cycle__step b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.cycle__step span { font-family: var(--font-display); font-weight: 600; font-size: clamp(.9375rem, .85rem + .3vw, 1.0625rem); line-height: 1.2; color: var(--ink); }
.cycle__step:nth-child(2) b { background: var(--accent); }
.cycle__center { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: .8125rem; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---------- More articles ---------- */
.more { padding-top: 64px; }
.more .section-head { margin-bottom: 28px; }
.more__grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .more__grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 767px) { .more .post__excerpt { display: none; } }

/* Phone: the title is right below, so the breadcrumb stops at "Блог" (no awkward second line) */
@media (max-width: 767px) { .ahero__head .crumbs li[aria-current] { display: none; } }
