/* Zaezzd — страница статьи T3.
   Только то, чего нет в main.css: раскладка «оглавление · текст · сайдбар»,
   шапка статьи, блок «Коротко», врезка инструмента, автор и «Читать дальше».
   Всё остальное (article__body, quote, toc, alert, ad, card, table) — общие компоненты. */

/* ── Мобильная шапка внутренней страницы ──────────────────────────
   Кнопка «назад» и крошка съедают ширину: слово логотипа уступает место,
   знак остаётся ссылкой на главную. До 768 — иначе крошка обрезается в ноль. */
@media (max-width: 767px) {
  .hdr .logo__word { display: none; }
}

/* ── Каркас статьи ────────────────────────────────────────────────
   Mobile-first: одна колонка, порядок = порядок чтения.
   Заголовок → «Коротко» → оглавление → текст. Сайдбар скрыт. */
.art { display: flex; flex-direction: column; gap: 18px; }
.art > * { min-width: 0; }

.art__head { display: block; }
.art__meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.art__head h1 { margin: 0 0 12px; }
.art__lead { margin: 0; }
@media (min-width: 768px) {
  .art__head h1 { margin-bottom: 18px; }
  .art__lead { font-size: 20px; line-height: 1.5; }
}

/* ── Блок «Коротко» ───────────────────────────────────────────── */
.brief__t { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.brief__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.brief__list li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.brief__list li::before { content: '·'; flex: 0 0 auto; color: var(--acc); font-weight: 700; }
@media (min-width: 768px) {
  .brief__t { font-size: 18px; margin-bottom: 14px; }
  .brief__list { gap: 11px; }
  .brief__list li { font-size: 15px; line-height: 1.55; gap: 11px; }
}

/* ── Оглавление ───────────────────────────────────────────────── */
.toc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.toc__n { font-size: 12px; color: var(--ink-3); }
.art__read { margin: 12px 0 0; }
.art__toc .toc a { min-height: 44px; display: flex; align-items: center; }

/* ── Тело статьи ──────────────────────────────────────────────── */
.art__body { display: flex; flex-direction: column; gap: 22px; }

/* Компоненты внутри текста набраны интерфейсным шрифтом, а не PT Serif */
.article__body .card,
.article__body .alert,
.article__body .ad,
.article__body .art__tbl,
.article__body figure { font-family: var(--sans); }

/* Якоря оглавления не должны уезжать под липкую шапку */
.article__body h2 { scroll-margin-top: 76px; }
@media (min-width: 768px) { .article__body h2 { scroll-margin-top: 126px; } }

.article__body ol > li::marker { font-weight: 700; }
.article__body .lead-in { font-weight: 700; }

/* Врезка инструмента — единственный чёрный блок в теле статьи (NOTES.article) */
.inset { padding: 15px; border-radius: 14px; }
.inset__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 7px;
}
.inset__t { font-size: 15.5px; font-weight: 600; line-height: 1.35; margin-bottom: 5px; }
.inset__d { font-size: 12.5px; color: #A8ACB5; line-height: 1.4; margin-bottom: 12px; }
.inset .btn { width: 100%; }
@media (min-width: 768px) {
  .inset { padding: 24px; border-radius: var(--r-res); }
  .inset__label { font-size: 11.5px; margin-bottom: 8px; }
  .inset__t { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
  .inset__d { font-size: 14px; line-height: 1.45; margin-bottom: 18px; max-width: 480px; }
  .inset .btn { width: auto; }
}

/* Таблица сроков: скролл внутри рамки, страница вбок не едет */
.art__tbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.art__tbl .table-wrap { scrollbar-width: thin; }
.art__tbl table { min-width: 520px; }
.art__tbl .table thead th { background: var(--bg); }
.art__src { padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 11.5px; line-height: 1.4; color: var(--ink-4); }
.art__src a { color: inherit; text-decoration: underline; }
@media (min-width: 768px) {
  .art__tbl table { min-width: 0; }
  .art__src { padding: 11px 16px; font-size: 12px; }
}

/* ── Подпись: автор, дата, «сообщить об ошибке» ───────────────── */
.author { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.author__ava {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ink-3);
}
.author__n { font-size: 13.5px; font-weight: 600; }
.author__d { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.author__act { display: flex; align-items: center; min-height: 44px; font-size: 12.5px; }
@media (min-width: 768px) {
  .author { gap: 16px; }
  .author__ava { flex: 0 0 56px; width: 56px; height: 56px; font-size: 17px; }
  .author__n { font-size: 16px; }
  .author__d { font-size: 13.5px; line-height: 1.45; }
  .author__sp { flex: 1 1 auto; }
}

/* ── «Читать дальше» ──────────────────────────────────────────── */
.rel { display: grid; gap: 7px; }
.rel .card--dark .post__note { color: #A8ACB5; }
@media (min-width: 768px) { .rel { grid-template-columns: 1fr 1fr; gap: 12px; } .rel__wide { grid-column: 1 / -1; } }

/* ── Сайдбар: A1 + карточка напоминаний. Только с 1200 ─────────── */
.art__side { display: none; }
.side__t { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 8px 0 6px; }
.side__d { margin: 0 0 12px; }

/* ── Десктоп 1200: три колонки 176 / текст / 240 ───────────────── */
@media (min-width: 1200px) {
  .art {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr) 240px;
    column-gap: 32px;
    row-gap: 0;
    align-items: start;
    grid-template-areas:
      'toc head side'
      'toc brief side'
      'toc body side';
  }
  .art__head { grid-area: head; margin-bottom: 22px; }
  .art__brief { grid-area: brief; margin-bottom: 28px; }
  .art__body { grid-area: body; gap: 28px; }

  .art__toc { grid-area: toc; position: sticky; top: 124px; }
  .art__toc .toc { background: none; border: 0; border-radius: 0; padding: 0; }
  .art__toc .toc ol { margin-top: 12px; gap: 0; }
  .art__toc .toc a {
    border-left: 2px solid var(--line); border-radius: 0;
    padding: 8px 0 8px 11px; color: var(--ink-2);
  }
  .art__toc .toc a:hover { background: none; color: var(--ink); }
  .art__toc .toc a.is-active { background: none; border-left-color: var(--acc); color: var(--ink); }
  .toc__n { display: none; }
  .art__read { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

  .art__side {
    grid-area: side; display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 124px;
  }
}

/* ── Печать: остаётся только текст ────────────────────────────── */
@media print {
  .art { display: block; }
  .art__toc, .art__side, .author__act { display: none !important; }
  .art__tbl table { min-width: 0; }
  .article__body h2 { break-after: avoid; }
}
