/* Раздел «Статьи»: /blog/ и /blog/<slug>/. Подключается только там (tools/blog.mjs).
   Спека — docs/superpowers/specs/2026-10-29-blog-design.md, §9. Цвета — переменные brand.css;
   классы только с приставкой post- и blog-: имена прежней страницы (.shot, .callout, .pill …) ловит ui-check. */

/* Переход по оглавлению не прячет заголовок под липкой шапкой. */
html { scroll-padding-top: 88px; }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ── Каркас статьи ─────────────────────────────────────── */

.post { padding-block: 40px 88px; }
.post-crumbs { font-size: 14px; color: var(--slate-400); margin-bottom: 18px; }
.post-crumbs a { color: var(--slate); text-underline-offset: 2px; }
.post-crumbs a:hover { color: var(--ink); }
.post h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; margin: 0 0 16px; max-width: 24ch; }
.post-lede { font-size: 19.5px; line-height: 1.55; color: var(--slate); max-width: 62ch; margin: 0 0 14px; }
.post-meta { font-size: 14.5px; color: var(--slate-400); margin-bottom: 30px; }

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

.post-toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; max-width: 70ch; }
.post-toc-title { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-400); margin-bottom: 8px; }
.post-toc ol { margin: 0; padding-left: 22px; }
.post-toc li { font-size: 16px; line-height: 1.55; padding-block: 3px; }
.post-toc a { color: var(--ink); text-underline-offset: 2px; text-decoration-color: var(--blue-100); }
.post-toc a:hover { color: var(--blue-700); text-decoration-color: currentColor; }

/* ── Текст ─────────────────────────────────────────────── */

.post-body { max-width: 70ch; }
.post-body h2 { font-size: 26px; line-height: 1.22; margin: 42px 0 14px; }
.post-body h3 { font-size: 20px; margin: 30px 0 10px; }
.post-body p, .post-body li { font-size: 17.5px; line-height: 1.68; color: #334155; }   /* slate-700: 10,3:1 на белом */
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 24px; }
.post-body li { margin-bottom: 6px; }
.post-body li::marker { color: var(--slate-400); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--blue-700); text-underline-offset: 2px; }
.post-body a:hover { color: var(--ink); }

/* ── Схемы и кадры ─────────────────────────────────────── */

.post-figure { margin: 26px 0; }
.post-figure svg { display: block; width: 100%; height: auto; }
.post-figure figcaption { font-size: 14.5px; line-height: 1.5; color: var(--slate-400); margin-top: 10px; }
.post-shot { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-card); }
.post-shot--phone { max-width: 300px; margin-inline: auto; border: 0; box-shadow: none; }
/* Широкий кадр в ссылке на свой файл (оборачивает сборка): на телефоне он мелкий, по нажатию — целиком. */
.post-zoom { display: block; cursor: zoom-in; }

/* ── Врезка «Как это в Ярусли» ─────────────────────────── */

.post-how { background: var(--blue-50); border-left: 4px solid var(--blue); border-radius: var(--r-sm); padding: 18px 22px; margin: 26px 0; }
.post-how-title { font-weight: 600; color: var(--blue-700); }
.post-body .post-how p { margin: 0 0 10px; }
.post-body .post-how p.post-how-title { margin-bottom: 6px; }
.post-body .post-how p:last-child, .post-body .post-how ul:last-child { margin-bottom: 0; }

/* ── Карточка призыва ──────────────────────────────────── */

.post-cta { margin-top: 48px; background: var(--navy-900); color: #fff; border-radius: var(--r-lg); padding: 30px 32px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.post-cta-title { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.25; color: #fff; }
.post-cta p:not(.post-cta-title) { color: #c6d4ee; margin-top: 6px; font-size: 16px; max-width: 52ch; }   /* 11:1 на navy-900 */

/* ── Ещё статьи и список ───────────────────────────────── */

/* section в brand.css — с полями секции главной; здесь это блок внутри страницы. */
.post-more { padding-block: 0; margin-top: 56px; }
.post-more h2 { font-size: 26px; line-height: 1.22; }
.post-more .blog-cards { margin-top: 20px; }

.blog-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.blog-card { display: grid; gap: 10px; align-content: start; padding: 24px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-card); color: inherit; text-decoration: none;
  transition: box-shadow .2s ease, border-color .2s ease; }
.blog-card:hover { box-shadow: var(--sh-lift); border-color: var(--blue-100); }
.blog-card-tag { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-700); }
.post .blog-card-title { font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; }
.blog-card:hover .blog-card-title { color: var(--blue-700); }
.blog-card-excerpt { font-size: 16px; line-height: 1.55; color: var(--slate); }
.blog-card-meta { font-size: 14px; color: var(--slate-400); }

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

@media (max-width: 620px) {
  .post { padding-block: 28px 64px; }
  .post h1 { font-size: 27px; }
  .post-lede { font-size: 18px; }
  .post-toc { padding: 16px 18px; }
  .post-body h2 { font-size: 23px; margin-top: 36px; }
  .post-body p, .post-body li { font-size: 17px; }
  .post-how { padding: 16px 18px; }
  .post-cta { padding: 24px; }
  .blog-cards { grid-template-columns: 1fr; }
  .blog-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
}
