/* Чистый лот — раздел «Статьи» (site/blog). Подключается только на страницах блога, после site.css.
   Палитра, шрифты, кнопки, шапка и подвал — из site.css. Страницы собирает tools/blog/build.py. */

nav.menu a.is-current{color:var(--accent)}

/* общая обёртка страниц блога */
.post-page{padding:40px 0 0}
.blog-page{padding:48px 0 88px}

/* хлебные крошки: одна строка, длинный заголовок обрезается многоточием */
.post-crumbs{display:flex;align-items:baseline;gap:8px;white-space:nowrap;overflow:hidden;margin-bottom:22px}
.post-crumbs > *{flex:0 0 auto}
.post-crumbs [aria-current]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}

/* статья: читаемая колонка */
.post{max-width:720px;margin:0 auto;padding-bottom:88px}
.post h1{font-size:clamp(34px,4.4vw,50px);line-height:1.1;margin:0 0 18px}
.post-meta{display:flex;flex-wrap:wrap;gap:4px 0;color:var(--muted);font-size:14.5px;margin:0 0 28px}
.post-meta > span + span::before{content:"·";margin:0 10px;color:var(--line-2)}
.post-cover{margin:0 0 36px}
.post-cover img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--radius);background:var(--tint)}

/* оглавление */
.toc{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px 26px 18px;margin:0 0 40px}
.toc-title{font:600 12px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--brass);margin:0 0 12px}
.toc ol{margin:0;padding-left:22px}
.toc li{margin:7px 0;font-size:16px;line-height:1.45;color:var(--muted)}
.toc a{color:var(--ink-2);text-decoration:none}
.toc a:hover{color:var(--accent);text-decoration:underline}

/* текст статьи */
.post-body{font-size:18px;line-height:1.7;color:var(--ink-2)}
.post-body > :first-child{margin-top:0}
.post-body p{margin:0 0 18px}
.post-body h2{font-size:clamp(28px,3.2vw,36px);line-height:1.15;color:var(--ink);margin:56px 0 16px;scroll-margin-top:88px}
.post-body h3{font-size:clamp(22px,2.4vw,26px);line-height:1.2;color:var(--ink);margin:36px 0 12px;scroll-margin-top:88px}
.post-body h4{font:700 17px/1.4 var(--sans);color:var(--ink);margin:28px 0 8px}
.post-body ul,.post-body ol{margin:0 0 20px;padding-left:24px}
.post-body li{margin-bottom:8px}
.post-body li > ul,.post-body li > ol{margin:8px 0 0}
.post-body li > p{margin-bottom:8px}
.post-body strong{color:var(--ink);font-weight:700}
.post-body a:not(.btn){color:var(--accent);text-decoration-thickness:1px;overflow-wrap:anywhere}
.post-body a:not(.btn):hover{color:var(--accent-2)}
.post-body blockquote{margin:28px 0;padding:18px 22px;background:var(--accent-soft);border-left:3px solid var(--accent);border-radius:0 12px 12px 0;font-size:16.5px;line-height:1.6;color:var(--ink)}
.post-body blockquote p{margin:0 0 10px}
.post-body blockquote > :last-child{margin-bottom:0}
.post-body hr{border:0;border-top:1px solid var(--line);margin:40px 0}
.post-body code{font-size:.9em;background:var(--tint);border-radius:5px;padding:1px 5px}
.post-body img{display:block;height:auto;border-radius:10px}

/* таблицы: на телефоне — горизонтальная прокрутка внутри рамки */
/* тени по краям появляются, только когда таблицу есть куда прокрутить */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:28px 0;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(to right,var(--card) 30%,rgba(255,253,249,0)) left center/40px 100% no-repeat local,linear-gradient(to left,var(--card) 30%,rgba(255,253,249,0)) right center/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgba(21,25,31,.16),rgba(21,25,31,0)) left center/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgba(21,25,31,.16),rgba(21,25,31,0)) right center/14px 100% no-repeat scroll;background-color:var(--card)}
.table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.table-scroll table{width:100%;border-collapse:collapse;font-size:15.5px;line-height:1.5}
.table-scroll th,.table-scroll td{text-align:left;padding:12px 16px;border-top:1px solid var(--line);vertical-align:top;min-width:8em}
.table-scroll thead th{border-top:0;background:rgba(247,244,239,.7);font-size:12.5px;line-height:1.35;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600}
.table-scroll tbody td:first-child{font-weight:600;color:var(--ink)}

/* сноски Markdown */
.post-body .footnote{font-size:14.5px;color:var(--muted);margin-top:40px}
.post-body .footnote hr{margin:0 0 16px}
.post-body .footnote li{margin-bottom:6px}

/* призыв внутри текста — маркер {{cta}} */
.cta-inline{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;margin:36px 0;padding:22px 24px;background:var(--card);border:1px solid var(--line);border-left:3px solid var(--brass);border-radius:var(--radius)}
.cta-inline p{flex:1 1 300px;margin:0;font-size:16px;line-height:1.55;color:var(--ink-2)}
.cta-inline p b{color:var(--ink)}
.cta-inline .btn{flex:0 0 auto;min-height:46px;padding:11px 22px;font-size:15px}

/* обязательный блок в конце статьи и на странице списка */
.post-cta{margin:56px 0 0;background:var(--ink);color:#efeae2;border-radius:var(--radius);padding:36px 36px 34px}
.post-cta h2{color:#fff;font-size:clamp(28px,3.4vw,38px);line-height:1.12;margin:0 0 14px}
.post-cta p{color:#d9d3c8;font-size:16.5px;line-height:1.6;margin:0 0 10px;max-width:640px}
.post-cta .cta-row{margin-top:24px}
.post-cta .btn-primary{background:#fff;color:var(--ink)}
.post-cta .btn-primary:hover{background:#e9e4da}
.post-cta .btn-ghost{color:#fff;border-color:rgba(255,255,255,.35)}
.post-cta .btn-ghost:hover{border-color:#fff}

/* карточки статей: список и «Читайте также» */
.post-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px}
.post-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:border-color .2s,box-shadow .2s}
.post-card:hover{border-color:var(--line-2);box-shadow:0 18px 40px -30px rgba(21,25,31,.45)}
.post-card > a{display:flex;flex-direction:column;height:100%;color:inherit;text-decoration:none}
.post-card img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:var(--tint)}
.post-card-text{display:flex;flex-direction:column;gap:10px;flex:1;padding:20px 22px 22px}
.post-card h2,.post-card h3{font-size:24px;line-height:1.15;margin:0;color:var(--ink);transition:color .2s}
.post-card > a:hover h2,.post-card > a:hover h3{color:var(--accent)}
.post-card p{margin:0;font-size:15px;line-height:1.55;color:var(--ink-2)}
.post-card time{margin-top:auto;padding-top:4px;font-size:13.5px;font-weight:600;color:var(--muted)}
.post-card.featured{grid-column:1 / -1}
.post-card.featured > a{flex-direction:row}
.post-card.featured img{flex:0 0 58%;width:58%}
.post-card.featured .post-card-text{justify-content:center;padding:32px 36px}
.post-card.featured h2{font-size:clamp(28px,3vw,36px)}
.post-card.featured p{font-size:16.5px}
.related h2{margin-bottom:28px}

/* страница списка */
.blog-head{max-width:760px;margin-bottom:40px}
.blog-head h1{font-size:clamp(38px,5vw,56px);margin:0 0 16px}
.blog-empty{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px;color:var(--ink-2);margin:0}
.blog-page .post-cta{margin-top:64px}

@media (max-width:980px){
  .post-card.featured > a{flex-direction:column}
  .post-card.featured img{width:100%;flex:none}
  .post-card.featured .post-card-text{padding:22px 24px 24px}
}
@media (max-width:600px){
  .post-page{padding-top:28px}
  .blog-page{padding:36px 0 64px}
  .post{padding-bottom:64px}
  .post-meta{font-size:14px;margin-bottom:22px}
  .post-meta > span:first-child{flex-basis:100%}
  .post-meta > span:nth-child(2)::before{content:none}
  .post-cover{margin-bottom:28px}
  .post-cover img{border-radius:10px}
  .post-body{font-size:16.5px;line-height:1.68}
  .post-body h2{margin-top:44px}
  .post-body h3{margin-top:30px}
  .post-body blockquote{padding:16px 18px;font-size:15.5px}
  .table-scroll table{font-size:14.5px}
  .table-scroll th,.table-scroll td{padding:11px 13px}
  .toc{padding:18px 18px 16px}
  .toc li{font-size:15px}
  .cta-inline{padding:20px 18px}
  .cta-inline .btn{flex:1 1 100%}
  .post-cta{padding:28px 20px 24px;margin-top:44px}
  .post-card h2,.post-card h3{font-size:22px}
  .post-card-text{padding:18px 18px 20px}
}
