/* family · sections/article.css
   article.html — статья: сетка контент + WP-сайдбар, виджеты, оглавление, мета */

/* ============ сетка статьи ============ */
.article-grid {
  display: grid;
  gap: 2.5rem;
}

@media(min-width:1024px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 3.5rem;
  }
}

.article-main {
  min-width: 0;
}

/* не даём длинным словам/коду распирать колонку */
.article-main .entry-content {
  max-width: 44rem;
}

/* комфортная мера строки для чтения */

/* мета-строка под заголовком */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  font-size: .82rem;
  color: rgba(23, 36, 29, .6);
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 99px;
  background: rgba(23, 36, 29, .3);
}

/* ============ WP-сайдбар (виджетная зона) ============ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media(min-width:1024px) {
  .sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
    /* max-height: calc(100vh - 6rem); */
    overflow-y: auto;
    /* тонкий скролл, чтобы длинный сайдбар оставался доступным */
    scrollbar-width: thin;
  }
}

.widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: 1.25rem 1.35rem;
}

.widget-title {
  font-family: 'Bitter', serif;
  font-weight: 600;
  font-size: .98rem;
  margin-bottom: .9rem;
}

.widget--accent {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
}

.widget--accent .widget-title {
  color: #fff;
}

/* оглавление */
.toc-list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .85rem;
}

.toc-list a {
  display: block;
  color: rgba(23, 36, 29, .62);
  border-left: 2px solid var(--line);
  padding: .3rem 0 .3rem .75rem;
  transition: color .2s ease, border-color .2s ease;
}

.toc-list a:hover {
  color: var(--ink);
}

.toc-list a.is-active {
  color: var(--brass-2);
  border-color: var(--brass);
  font-weight: 500;
}

/* похожие статьи (мини) */
.related-item {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.related-item+.related-item {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.related-item .thumb {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: .4rem;
  overflow: hidden;
  flex: none;
  position: relative;
  background: var(--paper-2);
}

.related-item .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item h5 {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
}

.related-item:hover h5 {
  color: var(--brass-2);
}

/* спец-виджет «Сергей и Марина» */
.widget .spec-mini {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.widget .spec-ava {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: #fff;
  flex: none;
}

/* якорь под липкий хедер: чтобы переход по оглавлению не прятал заголовок */
.entry-content h2[id] {
  scroll-margin-top: 5rem;
}