/* tools.cetto.ru — блог: список статей и статья. Подключается после styles.css и tool.css */

/* ---------- Статья ---------- */
.post-hero h1 { max-width: 980px; }
.post-meta { margin-top: 14px; color: var(--on-dark); font-size: 15px; }
.post-author { margin-top: 6px; color: var(--on-dark-2); font-size: 14px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; padding-block: 40px 24px; }
.post { min-width: 0; max-width: 780px; font-size: 17px; line-height: 1.7; overflow-wrap: break-word; }
.post > * + * { margin-top: 16px; }
.post h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; font-weight: 700; margin-top: 44px; scroll-margin-top: 90px; }
.post h3 { font-size: 20px; font-weight: 600; margin-top: 28px; }
.post p, .post ul, .post ol { margin-bottom: 0; }
.post ul, .post ol { padding-left: 24px; }
.post li + li { margin-top: 8px; }
.post code { font-family: var(--mono); font-size: 15px; background: var(--chip); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.post pre { background: var(--night); color: #E9E9E9; border-radius: 12px; padding: 18px 20px; overflow: auto; line-height: 1.6; }
.post pre code { background: none; padding: 0; color: inherit; font-size: 14px; overflow-wrap: normal; }
.post table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; display: block; overflow-x: auto; }
.post th, .post td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.post th { background: #FAFAFA; font-weight: 600; }

/* «Коротко» — прямой ответ в начале статьи: его удобно цитировать и людям, и нейросетям */
.post-summary { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 20px 24px; }
.post .post-summary h2 { margin: 0 0 8px; font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
.post-summary ul { margin: 0; }

.post-tool { display: flex; flex-direction: column; gap: 4px; background: var(--warn-bg); border-radius: 12px; padding: 16px 20px; font-size: 16px; }
.post-tool b { font-weight: 700; }
.post-checklist { list-style: none; padding-left: 0 !important; }
.post-checklist li { position: relative; padding-left: 30px; }
.post-checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 5px; }

.post-faq { margin-top: 48px !important; }
.post-faq .faq__list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.post-faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.post-faq summary { font-weight: 600; cursor: pointer; }
.post-faq details p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* Боковая колонка: содержание и инструменты */
.post-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.post-toc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 14px; }
.post-toc b { display: block; margin-bottom: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.post-toc ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.post-toc a { color: var(--ink); }
.post-toc a:hover { color: var(--link); }
.post-toc--inline { display: none; }
.post-tools { display: flex; flex-direction: column; gap: 8px; }
.post-tools > b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.post-tools a { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.post-tools a:hover { border-color: var(--ink); text-decoration: none; color: var(--ink); }
.post-tools a b { font-size: 15px; font-weight: 600; }
.post-tools a span { font-size: 13px; color: var(--muted); line-height: 1.4; }

@media (max-width: 960px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .post-aside { position: static; }
  .post-aside .post-toc { display: none; }
  .post-toc--inline { display: block; }
  .post { font-size: 16px; }
}

/* ---------- Автор ---------- */
.avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--night); font-weight: 800; font-size: 26px; letter-spacing: .02em; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 120px; height: 120px; font-size: 42px; }
.post-author { display: flex; align-items: center; gap: 10px; }
.post-author a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); }
.post-author a:hover { color: var(--accent); }
.author-box { display: flex; gap: 20px; align-items: flex-start; margin-top: 48px !important; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.author-box > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.author-box__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.author-box__name { font-size: 20px; font-weight: 700; color: var(--ink); }
.author-box p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.author-hero { display: flex; gap: 28px; align-items: center; }
.author-hero > div { min-width: 0; }
.author-lead { font-size: 19px; line-height: 1.6; }
.author-timeline { list-style: none; padding-left: 0 !important; }
.author-timeline li { display: flex; gap: 16px; align-items: baseline; }
.author-timeline span { flex: 0 0 140px; color: var(--muted); font-size: 15px; }
@media (max-width: 640px) {
  .author-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar--lg { width: 88px; height: 88px; font-size: 32px; }
  .author-box { flex-direction: column; }
  .author-timeline li { flex-direction: column; gap: 0; }
  .author-timeline span { flex-basis: auto; }
}
.author-about h2 { margin-top: 36px; }
.author-about > :first-child { margin-top: 0; }

/* ---------- Рубрики и фото автора ---------- */
.post-rubric { display: inline-block; margin-right: 10px; background: var(--accent); color: var(--night); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.post-rubric:hover { color: var(--night); text-decoration: none; background: #FFEB3B; }
img.avatar { background: transparent; }
.author-hero__cta { margin-top: 18px; }
.author-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.author-photo { margin: 0; position: sticky; top: 96px; }
.author-photo img { display: block; width: 100%; height: auto; border-radius: 20px; }
.author-box__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 960px) {
  .author-about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .author-photo { position: static; max-width: 420px; order: -1; }
}
