/* ==========================================================================
   Курсачев — раздел «Полезные материалы»
   Использует переменные и компоненты из style.css (светлая и тёмная тема).
   ========================================================================== */

.nav a[aria-current="page"] { color: var(--pen); }

/* Хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-mute); margin-bottom: 20px; }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--pen); text-decoration: underline; }

/* ---------- Список статей ---------- */
.articles-hero { border-bottom: 1px solid var(--line); padding: 56px 0 64px; }
.articles-hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; }
.articles-hero .lead { max-width: 40em; }

.acards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.acard { display: flex; }
.acard__link {
  display: flex; flex-direction: column; gap: 10px; width: 100%;
  padding: 24px 24px 22px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.acard__link:hover { border-color: var(--pen); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.acard__tag {
  align-self: flex-start;
  font-size: 13px; font-weight: 600; color: var(--pen);
  background: var(--pen-soft); border-radius: 999px; padding: 3px 10px;
}
.acard__title { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.acard__excerpt { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.acard__meta { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--ink-mute); }

/* ---------- Статья ---------- */
.article-page > .wrap { padding-top: 40px; padding-bottom: 80px; }
.article__head { max-width: 820px; margin-bottom: 40px; display: grid; gap: 14px; justify-items: start; }
.article__head h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.article__meta { font-size: 15px; color: var(--ink-mute); }

.article__layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; align-items: start; }

.toc { position: sticky; top: 92px; font-size: 15px; }
.toc__title { font-weight: 600; margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; line-height: 1.35;
}
.toc a:hover { color: var(--pen); border-left-color: var(--pen); }

/* Типографика текста */
.prose { font-size: 18px; line-height: 1.7; min-width: 0; }
.prose > * + * { margin-top: 1em; }
.prose .article__lead { font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.prose h2 {
  margin-top: 2.2em; font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  scroll-margin-top: 88px;
}
.prose h3 { margin-top: 1.6em; font-size: 20px; font-weight: 700; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: .45em; }
.prose li::marker { color: var(--pen); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em;
  background: var(--pen-soft); color: var(--ink); padding: 1px 6px; border-radius: 5px; white-space: nowrap;
}
.prose a:not(.btn) { color: var(--pen); }

/* Образец библиографической записи / формулировки — «как в работе» */
.sample {
  font-family: var(--gost); font-size: 17px; line-height: 1.55;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--pen);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
}
.example {
  font-family: var(--gost); font-size: 17px; line-height: 1.6;
  border: 1px dashed var(--line); border-radius: 10px; padding: 20px 22px;
  display: grid; gap: .7em;
}
.note {
  background: var(--pen-soft); border-radius: 10px; padding: 14px 18px;
  font-size: 16px; line-height: 1.55;
}

/* Таблицы */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-size: 14px; font-weight: 600; color: var(--ink-mute); border-bottom: 2px solid var(--ink); }
.prose td:first-child { font-weight: 500; }
.table-pairs { min-width: 620px; }

/* Чек-лист */
.prose .checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px;
  border: 2px solid var(--pen); border-radius: 4px;
}

/* Блок «Не хватает времени» */
.cta-box {
  margin-top: 3em !important; padding: 28px 28px 26px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
  display: grid; gap: 10px;
}
.cta-box__title { font-size: 22px; font-weight: 700; }
.cta-box p:not(.cta-box__title) { font-size: 16px; color: var(--ink-soft); }
.cta-box__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Читайте также */
.related { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.related h2 { font-size: 28px; margin-bottom: 24px; }

/* Ссылка на статьи с главной */
.foot .logo { color: var(--ink); text-decoration: none; }
.foot__in > a { margin-left: 0; }
.foot__in > a.foot__privacy { margin-left: auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .article__layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; padding: 18px 20px; background: var(--bg); border-radius: var(--radius); }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

@media (max-width: 720px) {
  .articles-hero { padding: 40px 0 44px; }
  .article-page > .wrap { padding-top: 28px; padding-bottom: 56px; }
  .acards { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
  .prose .article__lead { font-size: 18px; }
  .prose h2 { font-size: 24px; }
  .sample, .example { font-size: 16px; }
  .cta-box { padding: 22px 20px; box-shadow: 4px 4px 0 var(--ink); }
  .cta-box .btn { width: 100%; }
  .foot__in > a.foot__privacy { margin-left: 0; }
}

/* Блок статей на главной */
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.section__head--row > div { max-width: 680px; }
