/* Блог AI Managers. Подключается после /css/landing.css: шапка, подвал, кнопки и сетка — оттуда.
   Здесь только то, чего нет на лендинге: статья, лента, хабы, калькулятор, CTA, cookie-баннер. */

:root {
    /* Цвета для схем в статьях (prompts/40-svg.md). Сайт тёмный, тема одна. */
    --c-brand: #2563eb;
    --c-accent: #38bdf8;
    --c-ink: #ffffff;
    --c-muted: #9ca3af;
    --c-surface: #111827;
    --c-line: rgba(255, 255, 255, 0.18);
    --c-good: #22c55e;
    --c-violet: #7c3aed;
    --read: 760px;
}

.blog { padding: clamp(28px, 5vw, 56px) 0 clamp(64px, 8vw, 110px); }
.blog a { color: #93c5fd; text-decoration: underline; text-decoration-color: rgba(147, 197, 253, 0.4); text-underline-offset: 3px; }
.blog a:hover { text-decoration-color: currentColor; }
.blog a.button, .blog a.post-card, .blog .breadcrumbs a, .blog a.niche-badge { text-decoration: none; }
.blog a.button { color: var(--white); }

/* ---------- Крошки, шапка статьи ---------- */

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 22px; color: var(--text-muted); font-size: 14px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span[aria-hidden] { opacity: 0.5; }

.post { max-width: calc(var(--read) + 48px); }
.post-header h1, .blog-list-header h1 { margin: 14px 0 16px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
.niche-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-soft); font-size: 13px; font-weight: 600; }
.byline { margin: 0 0 26px; color: var(--text-muted); font-size: 15px; }
.post-cover { margin: 0 0 30px; }
.post-cover img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-card); }

/* ---------- Оглавление ---------- */

.toc { margin: 0 0 34px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.toc-title { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.toc a { color: var(--text-soft); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Текст статьи ---------- */

.post-body { color: var(--text-soft); font-size: 18px; line-height: 1.7; }
.post-body > section { margin-bottom: 44px; }
.post-body h2 { margin: 0 0 16px; color: var(--text); font-size: clamp(24px, 3.2vw, 31px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 800; scroll-margin-top: 100px; text-wrap: balance; }
.post-body h3 { margin: 28px 0 12px; color: var(--text); font-size: 21px; line-height: 1.3; font-weight: 700; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); font-size: 0.9em; }
.post-body blockquote { margin: 0 0 20px; padding: 4px 0 4px 20px; border-left: 3px solid var(--blue); color: var(--text); }

.tldr { margin: 0 0 36px; padding: 22px 26px; border: 1px solid rgba(37, 99, 235, 0.45); border-radius: 18px; background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(124, 58, 237, 0.1)); color: var(--text); font-size: 19px; line-height: 1.6; }
.tldr::before { display: block; margin-bottom: 8px; content: "Кратко"; color: #93c5fd; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tldr p:last-child { margin-bottom: 0; }

.note { margin: 0 0 24px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.note > :last-child { margin-bottom: 0; }
.note--practice { border-color: rgba(34, 197, 94, 0.4); }
.note--practice::before { display: block; margin-bottom: 8px; content: "Из практики"; color: #86efac; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.note--model { border-color: rgba(56, 189, 248, 0.4); }
.note--model > h3:first-child, .note--model > p:first-child > strong:first-child { color: #7dd3fc; }
.note--model > h3:first-child { margin-top: 0; font-size: 18px; }

.table-wrap { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.table-wrap th, .table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap th { background: rgba(255, 255, 255, 0.06); color: var(--text); font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: 0; }

.figure-svg { margin: 0 0 26px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--c-surface); }
.figure-svg svg { display: block; width: 100%; height: auto; font-family: inherit; }
.figure-svg figcaption { margin-top: 12px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.calc-teaser { padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: 14px; }

/* ---------- FAQ, источники, «Советуем посмотреть» ---------- */

.post-body .faq { display: block; }
.post-body .faq details { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.post-body .faq summary { padding: 16px 20px; color: var(--text); font-weight: 700; cursor: pointer; list-style-position: outside; }
.post-body .faq details > :not(summary) { margin: 0; padding: 0 20px 16px; }

.sources { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.sources h2 { font-size: 20px; }

.related h2 { margin-bottom: 18px; }
.related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.related li { margin: 0; }
.related a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); color: var(--text); font-weight: 700; line-height: 1.35; text-decoration: none; }
.related a:hover { border-color: var(--line-strong); }
.related a span { display: block; margin-top: 6px; color: var(--text-muted); font-size: 14px; font-weight: 500; line-height: 1.45; }

/* ---------- CTA ---------- */

.cta { margin: 32px 0; padding: 24px 26px; border: 1px solid rgba(124, 58, 237, 0.45); border-radius: 20px; background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.16)); }
.cta-title { margin: 0 0 8px; color: var(--text); font-size: 22px; font-weight: 800; line-height: 1.25; }
.cta-text { margin: 0 0 18px; color: var(--text-soft); font-size: 17px; line-height: 1.55; }
/* Призыв в конце статьи (владелец, 11.10): тёмная минималистичная карточка, тонкая градиентная рамка,
   белая кнопка и живой график. Движение — только CSS и SVG; без скрипта и при «меньше движения» всё видно статично. */
.cta-end { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 36px; align-items: center; margin: 56px 0 72px; padding: 44px 40px; overflow: hidden; border: 0; border-radius: 28px; background: #070b16; box-shadow: 0 40px 80px -48px rgba(37, 99, 235, 0.55); }
.cta-end::before { position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit; content: ""; background: linear-gradient(140deg, rgba(125, 211, 252, 0.55), rgba(255, 255, 255, 0.07) 38%, rgba(255, 255, 255, 0.04) 62%, rgba(167, 139, 250, 0.45)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
.cta-end::after { position: absolute; top: -45%; right: -25%; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%; content: ""; background: radial-gradient(closest-side, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0)); animation: cta-drift 14s ease-in-out infinite alternate; pointer-events: none; }
.cta-end .cta-eyebrow { margin: 0 0 14px; color: #7dd3fc; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase; }
.cta-end .cta-title { margin: 0 0 14px; color: #fff; font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.cta-end .cta-text { max-width: 36ch; margin: 0 0 28px; color: rgba(255, 255, 255, 0.62); font-size: 16px; line-height: 1.6; }
/* Кнопка — как на всём сайте (.button.button-primary из landing.css); обёртка нужна, чтобы появление блока не перебивало её анимацию наведения. */
.cta-end .cta-end-action { margin: 0; }

.cta-end-visual { position: relative; padding: 18px 18px 14px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); }
.cta-chart { display: block; width: 100%; height: auto; overflow: visible; }
.cta-chart-grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.cta-chart-base { fill: none; stroke: rgba(148, 163, 184, 0.55); stroke-width: 1.5; stroke-dasharray: 0.012 0.02; stroke-linecap: round; }
.cta-stop-area-top { stop-color: #38bdf8; stop-opacity: 0.28; }
.cta-stop-area-bottom { stop-color: #38bdf8; stop-opacity: 0; }
.cta-stop-line-start { stop-color: #3b82f6; }
.cta-stop-line-end { stop-color: #7dd3fc; }
.cta-chart-area { fill: url(#cta-chart-area); }
.cta-chart-line { fill: none; stroke: url(#cta-chart-stroke); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45)); }
.cta-chart-end { fill: #e0f2fe; }
.cta-chart-ring { fill: none; stroke: #7dd3fc; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: cta-pulse 2.6s ease-out infinite; }
.cta-chart-dot { fill: #fff; filter: drop-shadow(0 0 6px rgba(125, 211, 252, 0.9)); }
.cta-chart-label { fill: rgba(255, 255, 255, 0.45); font-size: 12px; letter-spacing: 0.04em; }
.cta-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: rgba(255, 255, 255, 0.5); font-size: 13px; line-height: 1.4; }
.cta-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.cta-legend-item::before { width: 16px; height: 0; content: ""; border-top: 2px solid #7dd3fc; }
.cta-legend-base::before { border-top: 2px dashed rgba(148, 163, 184, 0.7); }

/* Появление, когда блок попал на экран: скрипт ставит reveal-ready сразу и is-visible при показе. */
.cta-end.reveal-ready .cta-end-copy > * { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.cta-end.reveal-ready:not(.is-visible) .cta-end-copy > * { opacity: 0; transform: translateY(10px); }
.cta-end.is-visible .cta-end-copy > :nth-child(2) { transition-delay: 0.08s; }
.cta-end.is-visible .cta-end-copy > :nth-child(3) { transition-delay: 0.16s; }
.cta-end.is-visible .cta-end-copy > :nth-child(4) { transition-delay: 0.24s; }
.cta-end.is-visible .cta-end-copy > :nth-child(5) { transition-delay: 0.32s; }
.cta-end.reveal-ready .cta-chart-line { transition: stroke-dashoffset 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s; }
.cta-end.reveal-ready:not(.is-visible) .cta-chart-line { stroke-dashoffset: 1; }
.cta-end.reveal-ready .cta-chart-area, .cta-end.reveal-ready .cta-chart-base, .cta-end.reveal-ready .cta-chart-end, .cta-end.reveal-ready .cta-chart-dot, .cta-end.reveal-ready .cta-chart-label, .cta-end.reveal-ready .cta-legend { transition: opacity 0.9s ease 1.1s; }
.cta-end.reveal-ready:not(.is-visible) .cta-chart-area, .cta-end.reveal-ready:not(.is-visible) .cta-chart-base, .cta-end.reveal-ready:not(.is-visible) .cta-chart-end, .cta-end.reveal-ready:not(.is-visible) .cta-chart-dot, .cta-end.reveal-ready:not(.is-visible) .cta-chart-label, .cta-end.reveal-ready:not(.is-visible) .cta-legend { opacity: 0; }
.cta-end.reveal-ready:not(.is-visible) .cta-chart-ring { visibility: hidden; animation: none; }
@keyframes cta-pulse { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
@keyframes cta-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-18%, 22%, 0); } }

/* Блок «Было и стало»: цифры модельного расчёта, график окупаемости, призыв внутри. */
.post-body .result { margin: 56px 0 72px; }
.post-body .result > h2 { margin-bottom: 20px; }
.result .note--model { margin: 0; padding: 28px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 24px; background: rgba(255, 255, 255, 0.02); }
.result .note--model > h3:first-child { margin: 0 0 10px; color: rgba(255, 255, 255, 0.45); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.result .note--model > p { font-size: 16px; line-height: 1.6; }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 22px 0 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.08); }
.post-body .result-stats p { margin: 0; padding: 20px 20px 18px; background: #0a0f1c; }
.post-body .result-stats strong { display: block; color: #fff; font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.post-body .result-stats p:first-child strong { color: #86efac; }
.result-stats span { display: block; margin-top: 8px; color: rgba(255, 255, 255, 0.5); font-size: 14px; line-height: 1.4; }
.post-body .result-rows { margin: 0 0 26px; padding: 0; list-style: none; }
.post-body .result-rows li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1.15fr); gap: 16px; align-items: baseline; margin: 0; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 15px; line-height: 1.4; }
.post-body .result-rows li.result-head { padding-top: 0; color: rgba(255, 255, 255, 0.4); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.result-label { color: var(--text-soft); }
.result-before { color: rgba(255, 255, 255, 0.45); }
.result-after { color: #fff; font-weight: 700; }
.post-body .result-rows li.result-total { border-bottom: 0; }
.result-total .result-label { color: #fff; font-weight: 700; }
.result-total .result-after { color: #86efac; font-size: 17px; }
.result .figure-svg { margin: 0 0 18px; border-color: rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.015); }
.result .cta-end { margin: 28px 0 0; }

/* ---------- Калькулятор потерянных заявок (шаг 4.3): шесть полей, результат, графики, «было → стало» ---------- */

.calculator .blog-list-header { max-width: var(--read); }
.calc { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1fr); gap: 24px; align-items: stretch; color-scheme: dark; }
.calc-form { margin: 0; }
.calc-group { height: 100%; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, 0.03); }
.calc-field { display: grid; gap: 6px; margin: 0 0 16px; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field > label, .calc-sub label { color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.35; }
.calc-field input[type="number"], .calc-field select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--text); font: inherit; font-size: 18px; }
.calc-field input:focus, .calc-field select:focus { border-color: transparent; outline: 2px solid rgba(56, 189, 248, 0.65); outline-offset: 1px; }
.calc-field-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 14px; align-items: center; }
/* Ползунок и поле связаны скриптом: двигаешь один — меняется другое. */
.calc-field input[type="range"] { width: 100%; height: 28px; margin: 0; padding: 0; border: 0; background: transparent; accent-color: #38bdf8; cursor: pointer; }
.calc-field input[type="range"]:focus { outline: none; }
.calc-field input[type="range"]:focus-visible { outline: 2px solid rgba(56, 189, 248, 0.65); outline-offset: 4px; border-radius: 6px; }
.calc-field-row input[type="number"] { font-size: 16px; padding: 0 10px; }
.calc-hint { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.calc-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.calc-checkbox input { width: 20px; height: 20px; margin: 0; accent-color: #38bdf8; }
.calc-sub { display: grid; gap: 6px; margin-top: 10px; padding-left: 30px; }
.calc-sub[hidden] { display: none; }

.calc-result { position: relative; overflow: hidden; padding: 28px 26px 24px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 24px; background: #070b16; box-shadow: 0 40px 80px -48px rgba(37, 99, 235, 0.5); }
.calc-result::after { position: absolute; top: -40%; right: -20%; z-index: 0; width: 60%; aspect-ratio: 1; content: ""; border-radius: 50%; background: radial-gradient(closest-side, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0)); pointer-events: none; }
.calc-result > * { position: relative; z-index: 1; }
/* Стартовый экран: размытый график, подпись и кнопка «Узнать»; результат появляется после нажатия. */
.calc-result.is-locked { display: grid; place-items: center; min-height: 440px; }
.calc-lock { position: relative; display: grid; place-items: center; width: 100%; min-height: 380px; text-align: center; }
.calc-lock[hidden] { display: none; }
/* График — фон под текстом: размытый, приглушённый, по центру карточки; текст и кнопка поверх него. */
.calc-lock-chart { position: absolute; top: 50%; left: 50%; z-index: 0; width: min(100%, 340px); height: auto; transform: translate(-50%, -56%); filter: blur(9px); opacity: 0.45; pointer-events: none; }
.calc-lock-copy { position: relative; z-index: 1; margin: 0; text-shadow: 0 2px 18px rgba(7, 11, 22, 0.9); }
.calc-lock-title { max-width: 22ch; margin: 0 auto 8px; color: #fff; font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.calc-lock-text { margin: 0 0 20px; color: rgba(255, 255, 255, 0.6); font-size: 15px; }
.calc-lock .button { min-width: 180px; }
.calc-result-body[hidden], .calc-charts[hidden], .calc-rows[hidden], .calc-how[hidden] { display: none; }
.calc-eyebrow { margin: 0 0 10px; color: #7dd3fc; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.calc-headline { margin: 0 0 18px; }
.calc-headline strong { display: block; color: #86efac; font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.calc-headline span { display: block; margin-top: 8px; color: rgba(255, 255, 255, 0.6); font-size: 15px; line-height: 1.45; }
.calc-error { margin: 0 0 14px; color: #fca5a5; font-size: 14px; line-height: 1.5; }
.calc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.08); }
.calc-stat { margin: 0; padding: 14px 16px 12px; background: #0a0f1c; }
.calc-stat strong { display: block; color: #fff; font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.calc-stat span { display: block; margin-top: 5px; color: rgba(255, 255, 255, 0.5); font-size: 13px; line-height: 1.4; }
.calc-year { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 15px; }
.calc-year strong { margin-left: 6px; color: #fff; font-size: 20px; font-weight: 800; }
.calc-year-note { margin: 6px 0 0; color: rgba(255, 255, 255, 0.5); font-size: 13px; line-height: 1.45; }
.calc-year-note[hidden] { display: none; }

.calc-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0 0; }
.calc-chart { margin: 0; padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--c-surface); }
.calc-chart--wide { grid-column: 1 / -1; }
.calc-chart figcaption { margin: 0 0 8px; color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.calc-chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.calc-bar rect { fill: rgba(148, 163, 184, 0.45); }
.calc-bar--after rect { fill: #38bdf8; }
.calc-bar-value { fill: #fff; font-size: 15px; font-weight: 700; }
.calc-bar-label { fill: rgba(255, 255, 255, 0.55); font-size: 13px; }
.calc-axis { stroke: rgba(255, 255, 255, 0.18); }
.calc-axis-label { fill: rgba(255, 255, 255, 0.45); font-size: 12px; }
.calc-grid { stroke: rgba(255, 255, 255, 0.06); }
.calc-part-label { fill: #fff; font-size: 14px; }
.calc-part-label--total { font-size: 15px; font-weight: 700; }
.calc-part-value { fill: #fff; font-size: 15px; font-weight: 700; }
.calc-part-value--total { fill: #86efac; font-size: 17px; }
.calc-part-link { stroke: rgba(156, 163, 175, 0.7); stroke-dasharray: 3 4; }
.calc-part--brand rect { fill: #2563eb; }
.calc-part--accent rect { fill: #38bdf8; }
.calc-part--violet rect { fill: #7c3aed; }
.calc-part--total rect { fill: #22c55e; }
.calc-area { fill: rgba(56, 189, 248, 0.14); }
.calc-line { fill: none; stroke: #7dd3fc; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45)); }
.calc-line-end { fill: #86efac; font-size: 15px; font-weight: 700; }
/* Рост столбцов и линии при каждом пересчёте; при «меньше движения» скрипт эти классы не ставит. */
.calc-bar.calc-grow { transform: scaleY(0.001); transition: transform 0.7s var(--ease); }
.calc-bar.calc-grown { transform: scaleY(1); }
.calc-part.calc-grow { transform: scaleX(0.001); transition: transform 0.7s var(--ease); }
.calc-part.calc-grown { transform: scaleX(1); }
.calc-line.calc-grow { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.calc-line.calc-grown { stroke-dashoffset: 0; }

.calc-rows { max-width: 840px; margin: 28px 0 0; padding: 0; list-style: none; }
.calc-rows li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-soft); font-size: 15px; line-height: 1.4; }
.calc-rows li span:nth-child(2) { color: rgba(255, 255, 255, 0.5); }
.calc-rows li span:nth-child(3) { color: #fff; font-weight: 700; }
.calc-rows li.calc-rows-head { padding-top: 0; }
.calc-rows li.calc-rows-head span { color: rgba(255, 255, 255, 0.4); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.calc-rows li.calc-rows-last { border-bottom: 0; }
.calc-rows li[hidden] { display: none; }
.calc-rows li.calc-rows-note { padding-top: 6px; border-top: 1px dashed rgba(255, 255, 255, 0.1); color: var(--text-muted); font-size: 14px; }
.calc-rows li.calc-rows-total span:first-child { color: #fff; font-weight: 700; }
.calc-rows li.calc-rows-total span:nth-child(3) { color: #86efac; font-size: 17px; }
.calc-how { max-width: var(--read); margin: 22px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.calc-how summary { color: var(--text-soft); font-weight: 600; cursor: pointer; }
.calc-how ol { margin: 12px 0 0; padding-left: 20px; }
.calc-how li { margin-bottom: 6px; }
.calc-toast { position: fixed; bottom: 20px; left: 50%; z-index: 45; max-width: calc(100% - 32px); margin: 0; padding: 12px 18px; border: 1px solid rgba(134, 239, 172, 0.5); border-radius: 14px; background: rgba(11, 15, 26, 0.97); color: #fff; font-size: 14px; font-weight: 600; transform: translateX(-50%); box-shadow: var(--shadow-soft); }
.calc-toast[hidden] { display: none; }
.calculator .cta-end { margin-top: 40px; }

.cta-sticky { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 40; display: none; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(17, 24, 39, 0.96); box-shadow: var(--shadow-soft); }
.cta-sticky-text { flex: 1; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3; }
.cta-sticky .button { min-height: 40px; padding: 0 16px; font-size: 14px; }
.cta-sticky-close { width: 32px; height: 32px; border: 0; background: none; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }

/* ---------- Лента, хабы ---------- */

.blog-lead { max-width: var(--read); margin: 0 0 30px; color: var(--text-soft); font-size: 19px; line-height: 1.6; }
.hub-intro { max-width: var(--read); margin-bottom: 34px; color: var(--text-soft); font-size: 18px; line-height: 1.7; }
.sections-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.sections-nav a { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.sections-nav a:hover, .sections-nav a[aria-current] { border-color: var(--blue); color: var(--text); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(255, 255, 255, 0.03); color: var(--text); transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.post-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.post-card > span, .post-card > strong { padding: 0 20px; }
.post-card-niche { margin-top: 6px; color: #93c5fd; font-size: 13px; font-weight: 700; }
.post-card-title { font-size: 19px; font-weight: 800; line-height: 1.3; }
.post-card-summary { color: var(--text-soft); font-size: 15px; line-height: 1.5; }
.post-card-meta { margin-top: auto; color: var(--text-muted); font-size: 13px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); font-weight: 600; text-decoration: none; }
.pagination span[aria-current] { border-color: var(--blue); color: var(--text); }

/* ---------- Cookie-баннер, плашка черновика ---------- */

.cookie-banner { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; padding: 14px 24px; border-top: 1px solid var(--line-strong); background: rgba(11, 15, 26, 0.97); color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { max-width: 760px; margin: 0; }
.cookie-banner a { color: #93c5fd; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-button { min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.06); color: var(--text); font-size: 14px; cursor: pointer; }

.preview-bar { position: sticky; top: 0; z-index: 60; padding: 10px 16px; background: #b45309; color: #fff; font-size: 14px; font-weight: 700; text-align: center; }

/* ---------- Телефон ---------- */

@media (max-width: 980px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc, .calc-charts { grid-template-columns: 1fr; }
    .calc-chart--wide { grid-column: auto; }
}

@media (max-width: 680px) {
    .post-body { font-size: 17px; }
    .post-grid, .related ul { grid-template-columns: 1fr; }
    .tldr { padding: 18px 20px; font-size: 18px; }
    .cta { padding: 20px; }
    .cta-end { grid-template-columns: 1fr; gap: 26px; padding: 30px 22px 24px; border-radius: 24px; }
    .cta-end .cta-text { max-width: none; }
    .cta-end { margin-bottom: 56px; }
    .post-body .result { margin-bottom: 56px; }
    .cta-end-action .button { width: 100%; }
    .result .note--model { padding: 20px 16px; }
    .result-stats { grid-template-columns: 1fr; }
    .post-body .result-rows li { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
    .post-body .result-rows li .result-label { grid-column: 1 / -1; }
    .post-body .result-rows li.result-head { display: none; }
    .result-before::before { content: "было "; color: rgba(255, 255, 255, 0.35); font-size: 12px; }
    .result-after::before { content: "стало "; color: rgba(255, 255, 255, 0.35); font-size: 12px; font-weight: 500; }
    .cta-sticky:not([hidden]) { display: flex; }
    .cookie-banner { justify-content: flex-start; padding: 12px 16px; }
    .calc-group, .calc-result { padding: 20px 16px; }
    .calc-field-row { grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
    .calc-result.is-locked { min-height: 360px; }
    .calc-chart { padding: 14px 12px 10px; }
    .calc-rows li { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
    .calc-rows li span:first-child { grid-column: 1 / -1; }
    .calc-rows li.calc-rows-head { display: none; }
    .calc-rows li span:nth-child(2)::before, .calc-rows li span:nth-child(3)::before { display: inline-block; margin-right: 8px; color: rgba(255, 255, 255, 0.35); font-size: 12px; font-weight: 500; }
    .calc-rows li span:nth-child(2)::before { content: "было"; }
    .calc-rows li span:nth-child(3)::before { content: "стало"; }
    .calc-toast { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card { transition: none; }
    .cta-end::after, .cta-chart-ring { animation: none; }
    .calc-grow { transition: none; }
    .cta-chart-ring, .cta-chart-dot { display: none; }
}
