/* Блог sprocent.ru/blog/ — подключается после styles.css */
:root { --link: var(--lime); --mark-bg: rgba(194, 255, 10, .2); }
html[data-theme="light"] { --link: #050505; --mark-bg: #cafd5d; }

.read-progress { position: fixed; top: 0; left: 0; z-index: 100; width: 100%; height: 3px; background: var(--lime); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
html[data-theme="light"] .read-progress { background: #9ad21a; }

.blog { padding-bottom: 80px; }

/* хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current] { color: var(--text-2); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) { .crumbs [aria-current], .crumbs .sep:has(+ [aria-current]) { display: none; } }

/* лента */
.blog-hero { max-width: 820px; margin: 36px auto 26px; text-align: center; }
.blog-title { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.blog-title .t-hl { color: var(--lime); }
html[data-theme="light"] .blog-title .t-hl, html[data-theme="light"] .post-title mark {
  color: #050505; padding: 0 .12em;
  background: linear-gradient(100deg, transparent .1em, #cafd5d .1em, #cafd5d calc(100% - .1em), transparent calc(100% - .1em)) 0 72% / 100% 48% no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.blog-lead { margin: 16px auto 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
@media (max-width: 560px) { .blog-hero { margin-top: 26px; } .blog-lead { font-size: 16px; } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 26px; }
.chips a { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); color: var(--text-2); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color .2s, color .2s; }
.chips a:hover { border-color: var(--border-2); color: var(--text); }
@media (max-width: 620px) {
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 22px; padding: 2px 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex: none; padding: 8px 16px; font-size: 14.5px; }
}
.chips a[aria-current] { background: var(--lime); border-color: transparent; color: #0b0d12; }
html[data-theme="light"] .chips a { background: #fff; border-color: #e4e4df; color: #292a2e; }
html[data-theme="light"] .chips a:hover { border-color: #050505; }
html[data-theme="light"] .chips a[aria-current] { background: #050505; border-color: #050505; color: #fff; }

.post-featured { margin-bottom: 18px; padding: 36px 40px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 44px; align-items: center; }
.post-featured > * { grid-column: 2; }
.post-featured .pc-top { grid-column: 1; grid-row: 1 / span 4; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.post-featured .pc-kicker { font-size: clamp(46px, 6vw, 76px); }
.post-featured .pc-kicker-note { font-size: 16px; max-width: 30ch; }
.post-featured .pc-title { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.post-featured .pc-desc { font-size: 16.5px; -webkit-line-clamp: 4; }
@media (max-width: 760px) {
  .post-featured { display: flex; padding: 26px 24px; }
  .post-featured .pc-top { flex-direction: row; align-items: baseline; flex-wrap: wrap; }
  .post-featured .pc-kicker { font-size: 44px; }
}

.calc-promo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 56px; }
@media (max-width: 700px) { .calc-promo { grid-template-columns: 1fr; gap: 14px; } }
.promo-card { display: grid; gap: 6px; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.promo-card:hover { border-color: var(--lime); transform: translateY(-2px); }
.promo-kicker { color: var(--muted); font-size: 13px; font-weight: 700; }
.promo-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.promo-text { color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.promo-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 800; color: var(--link); }
html[data-theme="light"] .promo-card { background: #cafd5d; border-color: #b6e83f; }
html[data-theme="light"] .promo-card:hover { border-color: #050505; }
html[data-theme="light"] .promo-kicker, html[data-theme="light"] .promo-text { color: #3e3e3a; }

.tg-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 56px; padding: 26px 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.tg-title { font-size: 21px; font-weight: 800; }
.tg-cta p { margin: 4px 0 0; color: var(--muted); }
.tg-btn, .side-tg { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; background: #2aabee; color: #fff; font-weight: 800; text-decoration: none; }

/* статья */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; margin-top: 18px; }
.post { width: 100%; max-width: 740px; min-width: 0; margin: 0 auto; }
.post-side { display: none; }
@media (min-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .post { margin: 0; }
  .post-side { display: block; }
  .toc-mobile { display: none; }
}
.side-sticky { position: sticky; top: 100px; display: grid; gap: 16px; }

.post-head { margin: 10px 0 30px; }
.post-cat { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--mark-bg); color: var(--link); font-size: 13.5px; font-weight: 700; text-decoration: none; }
html[data-theme="light"] .post-cat { color: #050505; }
.post-title { margin: 14px 0 0; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.post-lead { margin: 18px 0 0; font-size: 20px; line-height: 1.55; color: var(--text-2); }
.post-meta { margin-top: 16px; color: var(--muted); font-size: 14.5px; }
@media (max-width: 560px) { .post-lead { font-size: 17.5px; } .post-head { margin-bottom: 24px; } }

.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.4; }
.toc li::marker { color: var(--muted); font-size: 13px; }
.toc a { color: var(--muted); text-decoration: none; transition: color .2s; }
.toc a:hover, .toc a.active { color: var(--text); }
.toc a.active { font-weight: 650; }
.toc-side { padding: 20px 22px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--border); max-height: calc(100vh - 340px); overflow: auto; }
.toc-title { margin-bottom: 12px; font-weight: 750; font-size: 15px; color: var(--text); }
.toc-mobile { margin: 0 0 28px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.toc-mobile summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; }
.toc-mobile[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.toc-mobile ol { padding: 0 18px 16px 38px; }
html[data-theme="light"] .toc-side, html[data-theme="light"] .toc-mobile { background: #f4f4f1; border-color: #e4e4df; }

.side-calc { display: grid; gap: 6px; padding: 22px; border-radius: 18px; background: var(--lime); color: #0b0d12; text-decoration: none; transition: transform .2s; }
.side-calc:hover { transform: translateY(-2px); }
.side-calc-kicker { font-size: 13px; font-weight: 600; opacity: .72; }
.side-calc-title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.side-calc .promo-go { color: #0b0d12; }

/* текст статьи */
.post-body { font-size: 18px; line-height: 1.72; color: var(--text-2); overflow-wrap: break-word; }
.post-body > * { margin: 0 0 22px; }
.post-body h2 { margin: 52px 0 18px; font-size: clamp(24px, 3vw, 30px); line-height: 1.22; font-weight: 800; letter-spacing: -.02em; color: var(--text); scroll-margin-top: 100px; }
.post-body h3 { margin: 34px 0 12px; font-size: 21px; line-height: 1.3; font-weight: 750; color: var(--text); scroll-margin-top: 100px; }
.post-body > h2:first-child { margin-top: 0; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body a { color: var(--link); text-underline-offset: 3px; }
html[data-theme="light"] .post-body a:not(.calc-cta-btn) { text-decoration-color: #9ad21a; text-decoration-thickness: 2px; }
.post-body mark { color: var(--text); background: var(--mark-bg); padding: 0 .15em; border-radius: 3px; }
html[data-theme="light"] .post-body mark { color: #050505; border-radius: 0; background: linear-gradient(100deg, transparent .1em, #cafd5d .1em, #cafd5d calc(100% - .1em), transparent calc(100% - .1em)) 0 70% / 100% 55% no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li { margin: 0 0 8px; }
.post-body li::marker { color: var(--lime); font-weight: 700; }
html[data-theme="light"] .post-body li::marker { color: #050505; }
.post-body blockquote { margin-left: 0; margin-right: 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--lime); color: var(--text); font-style: italic; }
.post-body blockquote p { margin: 0; }
.post-body .formula { margin: 0 0 22px; }
@media (max-width: 560px) { .post-body { font-size: 17px; line-height: 1.68; } .post-body h2 { margin-top: 44px; } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 16px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.post-body th, .post-body td, .post-body th:first-child, .post-body td:first-child { padding: 12px 16px; text-align: left; white-space: normal; }
.post-body thead th { position: static; background: var(--card-2); color: var(--muted); font-size: 14px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.post-body td { border-top: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.post-body td:first-child { color: var(--text); font-weight: 600; }
.post-body th.num, .post-body td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-body td.num { color: var(--text); }
.post-body tbody tr { border-top: 0; }
.post-body tbody tr:hover { background: transparent; }
@media (max-width: 560px) {
  .post-body table { font-size: 14.5px; }
  .post-body th, .post-body td, .post-body th:first-child, .post-body td:first-child { padding: 10px 12px; }
  .post-body thead th { font-size: 13px; }
}
html[data-theme="light"] .table-wrap { border-color: #e4e4df; }
html[data-theme="light"] .post-body td { border-top-color: #e4e4df; }

.tldr { padding: 22px 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.tldr-title { margin-bottom: 8px; font-weight: 800; color: var(--text); font-size: 17px; }
.tldr ul { margin: 0; }
.tldr li:last-child { margin-bottom: 0; }
.callout { padding: 20px 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--lime); font-size: 17px; }
.callout-title { margin-bottom: 6px; font-weight: 800; color: var(--text); font-size: 16px; }
.callout p { margin: 0 0 10px; }
.callout > :last-child, .tldr > :last-child { margin-bottom: 0; }
.callout-note { border-left-color: #3b8bd9; }
.callout-warn { border-left-color: #ff9f43; }
html[data-theme="light"] .callout, html[data-theme="light"] .tldr { background: #f4f4f1; border-color: #e4e4df; }
html[data-theme="light"] .callout-tip { border-left-color: #9ad21a; }
html[data-theme="light"] .callout-note { border-left-color: #3b8bd9; }
html[data-theme="light"] .callout-warn { border-left-color: #f08c1a; }

.calc-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 18px; border: 1px solid rgba(194, 255, 10, .45); background: linear-gradient(135deg, rgba(194, 255, 10, .1), rgba(194, 255, 10, .02)); }
.calc-cta-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--lime); color: #0b0d12; }
.calc-cta-title { font-weight: 800; font-size: 17.5px; line-height: 1.35; color: var(--text); }
.calc-cta p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.post-body .calc-cta-btn, .calc-cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; background: var(--lime); color: #0b0d12; font-weight: 800; font-size: 15.5px; text-decoration: none; white-space: nowrap; transition: transform .15s, filter .2s; }
.calc-cta-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
@media (max-width: 640px) {
  .calc-cta { grid-template-columns: auto minmax(0, 1fr); padding: 20px; }
  .calc-cta-btn { grid-column: 1 / -1; justify-content: center; }
}
html[data-theme="light"] .calc-cta { background: #f6fde6; border-color: #c9ef72; }
html[data-theme="light"] .calc-cta-icon { background: #050505; color: #cafd5d; }
html[data-theme="light"] .post-body .calc-cta-btn { background: #050505; color: #fff; }

.post-body .faq { margin-bottom: 22px; }
.faq-a p { margin: 0; padding: 0 22px 18px; color: var(--text-2); line-height: 1.65; font-size: 16.5px; }
.faq-a ul { margin: 0; padding: 0 22px 18px 44px; font-size: 16.5px; }
html[data-theme="light"] .faq-a p { color: #3e3e3a; }

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.post-share span { margin-right: 4px; }
.post-share a, .post-share button { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); color: var(--text-2); font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s; }
.post-share a:hover, .post-share button:hover { border-color: var(--border-2); color: var(--text); }
html[data-theme="light"] .post-share a, html[data-theme="light"] .post-share button { background: #fff; border-color: #e4e4df; color: #292a2e; }
html[data-theme="light"] .post-share a:hover, html[data-theme="light"] .post-share button:hover { border-color: #050505; }

.author { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.author-logo svg { display: block; }
.author-name { font-weight: 800; color: var(--text); }
.author p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
html[data-theme="light"] .author { background: #f4f4f1; border-color: #e4e4df; }
.disclaimer { margin: 18px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.related { margin-top: 72px; }
.section-title { margin: 0 0 18px; font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; }

@media print {
  .read-progress, .post-side, .toc-mobile, .post-share, .related, .calc-promo, .tg-cta, .crumbs { display: none !important; }
  .post-body { font-size: 12pt; }
}

.fig { margin: 2em 0; }
.fig img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--border); background: #fff; }
.fig figcaption { margin-top: 10px; font-size: 14px; color: var(--muted, #888); text-align: center; }

.tg-inline { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 40px 0; padding: 24px 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); border-left: 4px solid #2aabee; }
.tg-inline-text { flex: 1 1 320px; }
.tg-inline p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.tg-inline .tg-btn { flex: 0 0 auto; }
@media print { .tg-inline { display: none !important; } }
