/* ==========================================================================
   Страница публикации (блог, новости, истории) и страница автора.
   Шапка по левому краю контейнера; ниже — широкий текст + липкая колонка.
   Цвета — токены из daylapu.css.
   ========================================================================== */

.post__head { max-width: 980px; }
.post__title { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--dl-text-soft); }
.post__meta > * { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; } /* ссылки — удобная зона нажатия */
.post__meta .icon { color: var(--dl-accent); }
.post__meta a:hover { color: var(--dl-accent); }

.post__grid { display: grid; gap: 48px; margin-top: var(--dl-space); align-items: start; }
.post__grid > * { min-width: 0; }
@media (min-width: 1024px) {
  .post__grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

.post__cover { margin: 0 0 28px; border-radius: var(--dl-radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--dl-surface-2); box-shadow: var(--dl-shadow); }
.post__cover img { width: 100%; height: 100%; object-fit: cover; }
.post__lead { font-size: 21px; line-height: 1.55; font-weight: 600; color: var(--dl-text-muted); }
/* текст статьи на всю ширину колонки (≈860px) — шире прежних 720 */
.post__body { max-width: none; margin-top: 24px; font-size: 18.5px; line-height: 1.75; }
.post__body h2, .post__body h3 { scroll-margin-top: 96px; }
.post__body h2 { position: relative; padding-left: 18px; }
.post__body h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--dl-accent-solid); }
.post__body blockquote { background: var(--dl-surface-2); border-radius: var(--dl-radius); padding: 18px 22px; border-left-width: 5px; font-style: normal; }

.post__block { margin-top: 48px; }
.post__block-title { font-size: 26px; margin-bottom: 20px; }

/* содержание: в тексте — сворачиваемое (телефон), в колонке — липкое (десктоп) */
.toc--inline { margin-top: 24px; border: 1px solid var(--dl-border); border-radius: var(--dl-radius); background: var(--dl-surface); }
.toc--inline summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-weight: 800; color: var(--dl-heading); list-style: none; }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary::after { content: "+"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--dl-accent); }
.toc--inline[open] summary::after { content: "–"; }
.toc--inline .toc__list { padding: 0 18px 16px 44px; }
.toc__count { display: inline-flex; min-width: 24px; height: 24px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 999px; background: var(--dl-brand-soft); font-size: 12px; }
/* нумеруются только разделы (h2), подразделы (h3) — без номера, с отступом */
.toc__list { margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; list-style: none; counter-reset: toc; }
.toc__item--h2 { counter-increment: toc; display: flex; gap: 8px; }
.toc__item--h2::before { content: counter(toc) "."; flex: none; min-width: 18px; font-weight: 800; color: var(--dl-accent); }
.toc__item--h3 { padding-left: 26px; font-size: 14px; position: relative; }
.toc__item--h3::before { content: ""; position: absolute; left: 12px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--dl-border-strong); }
.toc__list a { color: var(--dl-text-muted); transition: color .15s; }
.toc__list a:hover, .toc__list a[aria-current] { color: var(--dl-accent); }
.toc__list a[aria-current] { font-weight: 800; }
@media (min-width: 1024px) {
  .toc--inline { display: none; }
}

.post__side { display: none; }
@media (min-width: 1024px) {
  .post__side { display: block; }
  .post__side-inner { position: sticky; top: 96px; display: grid; gap: 20px; max-height: calc(100vh - 116px); overflow-y: auto; padding: 2px; }
}
.toc--side { padding: 18px 20px; border-radius: var(--dl-radius); background: var(--dl-surface); border: 1px solid var(--dl-border); }
.side-card { padding: 18px 20px; border-radius: var(--dl-radius); background: var(--dl-surface); border: 1px solid var(--dl-border); display: grid; gap: 12px; }
.side-card--help { background: var(--dl-peach); border-color: var(--dl-peach-border); }
.side-card--help p:not(.side-title) { font-size: 14px; color: var(--dl-text); }
.side-card--help .btn { justify-self: start; }
.side-pets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-pets a { display: flex; align-items: center; gap: 12px; padding: 4px; border-radius: var(--dl-radius-sm); transition: background-color .15s; }
.side-pets a:hover { background: var(--dl-surface-2); }
.side-pets__img { width: 56px; height: 56px; flex: none; border-radius: var(--dl-radius-sm); overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--dl-brand-soft); color: var(--dl-heading); }
.side-pets__img img { width: 100%; height: 100%; object-fit: cover; }
.side-pets__name { display: block; font-weight: 800; color: var(--dl-heading); }
.side-pets__note { display: block; font-size: 13px; color: var(--dl-text-soft); }

/* соседние публикации */
.post-nav { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); margin-top: 48px; }
.post-nav__link { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--dl-radius); background: var(--dl-surface); border: 1px solid var(--dl-border); transition: transform .15s, box-shadow .15s; }
.post-nav__link:hover { transform: translateY(-2px); box-shadow: var(--dl-shadow); }
.post-nav__link--next { text-align: right; align-items: flex-end; }
.post-nav__dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--dl-accent); }
.post-nav__title { font-weight: 800; color: var(--dl-heading); }

/* автор */
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 48px; padding: 22px 24px; border-radius: var(--dl-radius-lg); background: var(--dl-surface-2); border: 1px solid var(--dl-border); }
.author-box__photo { width: 72px; height: 72px; flex: none; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--dl-sand); color: var(--dl-sand-ink); box-shadow: var(--dl-shadow); }
.author-box__photo img { width: 100%; height: 100%; object-fit: cover; }
.author-box__photo--brand { background: var(--dl-brand); color: var(--dl-sand); }
.author-box__initial { font-family: var(--dl-font-hand); font-size: 38px; font-weight: 700; }
.author-box__label { display: block; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--dl-text-soft); }
.author-box__name { display: inline-block; margin-top: 2px; font-size: 20px; font-weight: 900; color: var(--dl-heading); }
a.author-box__name:hover { color: var(--dl-accent); }
.author-box__role { font-size: 14px; font-weight: 700; color: var(--dl-accent); }
.author-box__bio { margin-top: 6px; font-size: 15px; color: var(--dl-text-muted); }

/* страница автора */
.author-page { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.author-page .author-box__photo { width: 120px; height: 120px; }
.author-page .author-box__initial { font-size: 60px; }
.author-page__links { display: flex; gap: 10px; margin-top: 10px; }
