/* Блог «Ясного учёта». Токены и шрифт наследуются из style.css */

/* ---------- общее ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--dim); }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--acc); }
.crumbs span:last-child { color: #8a8a8a; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 100px;
  background: transparent; border: 1px solid var(--card-line); color: var(--soft);
  font: 500 14px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.chip:hover { color: #fff; border-color: rgba(255, 201, 51, .45); }
.chip--on { background: var(--acc); border-color: transparent; color: var(--acc-ink); font-weight: 600; }

/* обложка: пока картинок нет — фирменная заглушка */
.post__cover, .article__cover, .mini__cover {
  position: relative; overflow: hidden; border-radius: 16px; background: #232325;
}
.post__cover img, .article__cover img, .mini__cover img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.post__cover { aspect-ratio: 16 / 9; }
.mini__cover { aspect-ratio: 16 / 9; }
.article__cover { aspect-ratio: 16 / 9; margin-top: 26px; }
.post__cover--empty, .article__cover--empty, .mini__cover--empty {
  display: grid; place-items: center;
  background: linear-gradient(140deg, #35342f 0%, #262628 60%);
  border: 1px solid var(--card-line);
}
.post__cover--empty span, .article__cover--empty span, .mini__cover--empty span {
  width: 54px; height: 54px; border-radius: 16px; background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center; font: 700 18px/1 var(--font); letter-spacing: -.03em; opacity: .9;
}
.article__cover--empty span { width: 72px; height: 72px; font-size: 24px; border-radius: 22px; }
.mini__cover--empty span { width: 38px; height: 38px; font-size: 13px; border-radius: 12px; }

/* ---------- список статей ---------- */
.blog-index { padding-top: 40px; }
.blog-index__h1 { margin: 22px 0 0; font: 700 44px/1.1 var(--font); letter-spacing: -.02em; max-width: 900px; }
.blog-index__lead { margin: 20px 0 0; max-width: 780px; font-size: 18px; line-height: 1.55; color: #cfcfcf; }
.chips--filter { margin-top: 30px; }
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.posts__empty { margin: 30px 0 0; color: var(--dim); }
.post {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 22px;
  border-radius: var(--r); border: 1px solid var(--card-line); text-decoration: none;
  background: linear-gradient(160deg, #2e2e30 0%, var(--card) 45%);
  transition: border-color .25s, transform .25s;
}
.post:hover { border-color: rgba(255, 201, 51, .45); transform: translateY(-3px); }
.post > :not(.post__cover) { padding-inline: 12px; }
.post__m { margin-top: 4px; font-size: 13px; color: var(--dim); }
.post__t { font: 600 22px/1.3 var(--font); letter-spacing: -.01em; color: #fff; }
.post__d { font-size: 15px; line-height: 1.5; color: #b4b4b4; }
.post__go { margin-top: auto; padding-top: 6px; font: 600 15px/1 var(--font); color: var(--acc); }

/* ---------- статья ---------- */
.article { padding-top: 40px; max-width: 820px; }
.article__h1 { margin: 22px 0 0; font: 700 42px/1.12 var(--font); letter-spacing: -.02em; }
.article__meta { display: flex; gap: 8px; margin: 16px 0 18px; font-size: 14px; color: var(--dim); }

.author {
  display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 16px 20px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--card-line);
}
.author__mark {
  flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center; font: 700 16px/1 var(--font); letter-spacing: -.03em;
}
.author__photo {
  flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  background: #1f1f21; box-shadow: 0 0 0 1px rgba(255, 201, 51, .35);
}
.author > div b { display: block; font: 600 16px/1.3 var(--font); color: #fff; }
.author > div span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--dim); }

.article__lead {
  margin: 28px 0 0; padding-left: 20px; border-left: 3px solid var(--acc);
  font: 500 20px/1.5 var(--font); color: #e8e8e6;
}

.toc { margin: 32px 0 0; padding: 22px 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); }
.toc__t { margin: 0 0 12px; font: 600 15px/1 var(--font); color: #fff; }
.toc ol { margin: 0; padding-left: 20px; counter-reset: toc; }
.toc li { margin-bottom: 8px; }
.toc li::marker { color: var(--acc); font-size: 14px; }
.toc a { font-size: 16px; line-height: 1.4; color: #cfcfcf; text-decoration: none; }
.toc a:hover { color: var(--acc); }

.article__body { margin-top: 36px; font-size: 18px; line-height: 1.65; color: #d2d2d0; }
.article__body h2 { margin: 46px 0 16px; font: 600 30px/1.25 var(--font); letter-spacing: -.01em; color: #fff; scroll-margin-top: 20px; }
.article__body h3 { margin: 34px 0 12px; font: 600 22px/1.3 var(--font); color: #fff; }
.article__body p { margin: 0 0 18px; }
.article__body a { color: var(--acc); text-underline-offset: 3px; }
.article__body strong { color: #fff; font-weight: 600; }
.article__body ul, .article__body ol { margin: 0 0 20px; padding-left: 22px; }
.article__body li { margin-bottom: 10px; }
.article__body li::marker { color: var(--acc); }
.article__body blockquote {
  margin: 26px 0; padding: 20px 24px; border-radius: 18px;
  background: var(--acc-soft); border: 1px solid rgba(255, 201, 51, .25);
  font-size: 17px; line-height: 1.55; color: #ececea;
}
.article__body blockquote p:last-child { margin-bottom: 0; }
.article__body table {
  width: 100%; margin: 26px 0; border-collapse: collapse; font-size: 16px;
  border: 1px solid var(--card-line); border-radius: 14px; overflow: hidden;
}
.article__body th, .article__body td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--card-line); }
.article__body th { background: rgba(255, 255, 255, .04); color: #fff; font-weight: 600; }
.article__body tr:last-child td { border-bottom: 0; }
.article__body td:not(:first-child), .article__body th:not(:first-child) { white-space: nowrap; }
.article__body hr { margin: 36px 0; border: 0; border-top: 1px solid var(--card-line); }

/* ---------- призыв ---------- */
.cta-box {
  margin: 40px 0; padding: 30px 32px 32px; border-radius: var(--r);
  background: linear-gradient(150deg, #33322d 0%, var(--card) 55%);
  border: 1px solid rgba(255, 201, 51, .25);
}
.cta-box__t { margin: 0; font: 600 24px/1.25 var(--font); color: #fff; }
.cta-box__d { margin: 12px 0 22px; font-size: 16px; line-height: 1.55; color: #cfcfcf; }
.cta-box__btn {
  display: inline-flex; align-items: center; height: 54px; padding: 0 28px; border-radius: 100px;
  background: var(--acc); color: var(--acc-ink); font: 600 17px/1 var(--font); text-decoration: none;
  box-shadow: 0 16px 34px rgba(255, 201, 51, .18); transition: background-color .2s;
}
.cta-box__btn:hover { background: #ffd65c; }
/* внутри текста статьи ссылки жёлтые — кнопке возвращаем тёмную надпись */
.article__body .cta-box__btn { color: var(--acc-ink); text-decoration: none; }

/* ---------- смотрите также ---------- */
.related { margin: 50px 0 90px; }
.related__h { margin: 0 0 18px; font: 600 26px/1.2 var(--font); }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini {
  display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 18px;
  border-radius: 20px; border: 1px solid var(--card-line); background: var(--card);
  text-decoration: none; transition: border-color .25s, transform .25s;
}
.mini:hover { border-color: rgba(255, 201, 51, .45); transform: translateY(-2px); }
.mini > :not(.mini__cover) { padding-inline: 8px; }
.mini__m { font-size: 12px; color: var(--dim); }
.mini__t { font: 600 16px/1.35 var(--font); color: #fff; }

@media (max-width: 999px) {
  .posts { grid-template-columns: minmax(0, 1fr); }
  .related__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .blog-index { padding-top: 26px; }
  .blog-index__h1 { font-size: 30px; }
  .blog-index__lead { font-size: 16px; }
  .chips--filter { margin-top: 22px; }
  .chip { height: 34px; padding: 0 14px; font-size: 13px; }
  .posts { gap: 14px; margin-top: 22px; }
  .post { padding: 10px 10px 18px; }
  .post__t { font-size: 19px; }
  .article { padding-top: 24px; }
  .article__h1 { font-size: 29px; }
  .article__lead { font-size: 17px; padding-left: 14px; }
  .author { padding: 14px 16px; }
  .toc { padding: 18px 18px; }
  .toc a { font-size: 15px; }
  .article__body { font-size: 17px; }
  .article__body h2 { font-size: 24px; margin-top: 36px; }
  .article__body h3 { font-size: 19px; }
  .article__body table { font-size: 15px; display: block; overflow-x: auto; }
  .cta-box { padding: 22px 20px 24px; }
  .cta-box__t { font-size: 20px; }
  .cta-box__btn { width: 100%; justify-content: center; }
  .related { margin-bottom: 60px; }
  .related__h { font-size: 22px; }
}
