/* blog.css — статті блогу (хвиля 17): аркуш креслення як мова сторінки.
   Штамп аркуша під заголовком, блок «Коротко» (пряма відповідь для пошуку й ШІ), формули й приклади як виноски,
   картка калькулятора. Підключається лише на /blog/*. */

.crumbs { font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--pencil); margin-bottom: 28px; }
.crumbs a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.crumbs a:hover { color: var(--drafting); }
.crumbs [aria-current] { color: var(--ink); }

/* ── герой статті ───────────────────────────────────────────── */
.post-hero .post__title { font-size: clamp(40px, 5.6vw, 76px); max-width: 16ch; }
.post-hero .page-hero__lead { max-width: 62ch; }
.post-stamp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 44px 0 0; border: 1px solid var(--ink); }
.post-stamp > div { padding: 12px 14px; border-left: 1px solid var(--ink); min-width: 0; }
.post-stamp > div:first-child { border-left: 0; }
.post-stamp dt { font: 500 10px/1.3 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--pencil); margin-bottom: 6px; }
.post-stamp dd { margin: 0; font: 500 13px/1.4 var(--f-mono); color: var(--ink); overflow-wrap: anywhere; }
.post-stamp a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--drafting); transition: color .25s; }
.post-stamp a:hover { color: var(--drafting); }

/* ── текст ──────────────────────────────────────────────────── */
.post-sheet { padding-top: 48px; }
.article { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.article h2 { font-family: var(--f-display); font-size: clamp(28px, 3vw, 40px); margin: 64px 0 18px; font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; }
.article h2 em { font-style: italic; color: var(--drafting); }
.article h3 { font: 600 13px/1.4 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; margin: 34px 0 12px; color: var(--ink); }
.article p { font-size: 17px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 18px; }
.article p strong, .article li strong { color: var(--ink); }
.article a:not(.btn):not(.dwg):not(.post-calc) { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--drafting); transition: color .25s; }
.article a:not(.btn):not(.dwg):not(.post-calc):hover { color: var(--drafting); }
.article ul, .article ol { margin: 18px 0 26px; padding-left: 0; list-style: none; }
.article li { padding: 9px 0 9px 28px; position: relative; font-size: 16px; line-height: 1.65; color: var(--ink-soft); border-bottom: 1px dashed rgba(14, 14, 12, 0.12); }
.article ul > li::before { content: '+'; position: absolute; left: 0; color: var(--drafting); font-family: var(--f-mono); font-weight: 600; }
.article ol { counter-reset: step; }
.article ol > li { counter-increment: step; }
.article ol > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 11px; color: var(--drafting); font: 600 11px/1 var(--f-mono); }
.article blockquote { margin: 34px 0; padding: 20px 24px; border-left: 3px solid var(--drafting); background: var(--paper-dim); font-family: var(--f-display); font-size: 22px; line-height: 1.4; color: var(--ink); font-style: italic; }
.article sup, .article sub { font-size: 0.7em; line-height: 0; }

/* «Коротко»: пряма відповідь першим абзацом */
.post-tldr { position: relative; margin: 0 0 44px; padding: 26px 26px 22px; border: 1px solid var(--ink); background: var(--paper); }
.post-tldr::before { content: ''; position: absolute; inset: 6px -7px -7px 6px; border: 1px solid var(--ink); z-index: -1; }
.post-tldr__k { position: absolute; top: -9px; left: 18px; padding: 0 8px; background: var(--paper); font: 600 11px/18px var(--f-mono); letter-spacing: 0.18em; color: var(--drafting); }
.article .post-tldr p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--ink); }

/* формула і приклад: виноска на аркуші */
.formula { position: relative; margin: 26px 0 30px; padding: 30px 22px 20px; background: var(--paper-dim); border-left: 3px solid var(--drafting); font: 500 15px/1.85 var(--f-mono); color: var(--ink); overflow-x: auto; }
.formula::before { content: attr(data-k); position: absolute; top: 9px; left: 22px; font: 600 10px/1 var(--f-mono); letter-spacing: 0.18em; color: var(--drafting); text-transform: uppercase; }
.formula b { color: var(--drafting); font-weight: 600; }
.formula small { display: block; margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--pencil); }

.table-wrap { margin: 24px 0 30px; overflow-x: auto; border: 1px solid var(--ink); }
.article-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.article-table th, .article-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid rgba(14, 14, 12, 0.18); vertical-align: top; }
.article-table th { background: var(--ink); color: var(--paper); font: 500 11px/1.3 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.article-table td.n { font-family: var(--f-mono); white-space: nowrap; }
.article-table tr.is-key td { background: var(--drafting-wash); }
.article-table .ok { color: var(--green); font-weight: 600; }
.article-table .no { color: var(--drafting); font-weight: 600; }
.table-wrap + p.cap, .cap { font: 500 12px/1.6 var(--f-mono); color: var(--pencil); margin-top: -18px; }

/* картка калькулятора */
.post-calc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 26px; margin: 48px 0; padding: 26px 28px; background: var(--dark-bg); color: var(--dark-ink); text-decoration: none; transition: background .3s; }
.post-calc:hover { background: var(--dark-bg-alt); }
.post-calc__code { font: 600 11px/1 var(--f-mono); letter-spacing: 0.16em; color: var(--drafting-bright); }
.post-calc__t { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
.post-calc__t small { display: block; margin-top: 6px; font: 400 14px/1.5 var(--f-body); color: var(--dark-muted); }
.post-calc__go { font: 600 11px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; padding: 12px 16px; border: 1px solid var(--dark-ink); transition: background .3s, color .3s; }
.post-calc:hover .post-calc__go { background: var(--dark-ink); color: var(--dark-bg); }

.post-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.post-more { margin-top: 70px; }
.post-more__k { font: 600 11px/1 var(--f-mono); letter-spacing: 0.18em; color: var(--pencil); text-transform: uppercase; margin-bottom: 14px; }
.article .faq { margin-top: 10px; }

@media (max-width: 760px) {
    .post-stamp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-stamp > div:nth-child(3) { border-left: 0; }
    .post-stamp > div:nth-child(n+3) { border-top: 1px solid var(--ink); }
    .post-calc { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
    .post-calc__go { justify-self: start; }
    .article p, .article li { font-size: 16px; }
    .post-tldr { padding: 24px 18px 18px; }
    .post-tldr::before { inset: 5px -5px -5px 5px; }
    .formula { font-size: 13.5px; padding: 28px 16px 16px; }
    /* таблиця вміщується в екран: ключова колонка не ховається за краєм; прокрутка лишається запасом для довгих рядків */
    .article-table { min-width: 0; font-size: 12.5px; }
    .article-table th, .article-table td { padding: 9px 6px; }
    .article-table th:first-child, .article-table td:first-child { padding-left: 10px; }
    .article-table th { font-size: 9.5px; letter-spacing: 0.06em; }
    .article-table td.n { white-space: normal; }
}
