/* ==========================================================================
   Раздел новостей — новая вёрстка (2026-09).
   Все классы с префиксом nd-, чтобы не пересекаться с .news-* из main.css.
   Подключается только на /news/, странице новости и хабах рубрик.
   ========================================================================== */

@font-face {
  font-family: "Literata";
  src: url("../fonts/Literata-cyr.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+2116, U+00A0;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/Literata-lat.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00AB, U+00BB, U+2010-2015, U+2018-201F, U+2026, U+2030, U+20BD;
}

.nd {
  --nd-serif: "Literata", Georgia, "Times New Roman", serif;
  --nd-sans: var(--font-family), "Segoe UI", system-ui, sans-serif;
  --nd-ink: var(--color-dark);
  --nd-ink-2: #5a5450;
  --nd-ink-3: #8d8580;
  --nd-line: #e5dfd8;
  --nd-line-2: #d3ccc3;
  --nd-surface: #f7f5f2;
  --nd-surface-2: #efeae4;
  --nd-accent: var(--color-primary);
  --nd-accent-ink: #c25412;
  --nd-accent-soft: var(--color-primary-light);
  --nd-navy: var(--color-blue);
  --nd-navy-soft: #eaecf6;
  --nd-ok: #0f8f52;
  font-family: var(--nd-sans);
  color: var(--nd-ink);
}
.nd *,
.nd *::before,
.nd *::after { box-sizing: border-box; }

/* ---------- шапка раздела ---------- */
.nd-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
  margin-bottom: 22px;
}
.nd-head__sub {
  margin: 10px 0 0;
  max-width: 62ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--nd-ink-2);
}
.nd-head__sub b { font-weight: 600; color: var(--nd-ink); }
.nd-head .search-form { margin: 0; }

/* ---------- фильтры ---------- */
.nd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--nd-line);
  padding-top: 16px;
}
.nd-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--nd-line-2);
  border-radius: 100px;
  padding: 6px 13px;
  font-size: 0.78125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--nd-ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.nd-chip:hover { border-color: var(--nd-ink-3); color: var(--nd-ink); }
.nd-chip span { font-size: 0.6875rem; color: var(--nd-ink-3); }
.nd-chip.is-active { background-color: var(--nd-navy); border-color: var(--nd-navy); color: #fff; }
.nd-chip.is-active span { color: rgba(255, 255, 255, 0.7); }
.nd-years {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--nd-ink-3);
}
.nd-years a { padding: 4px 7px; border-radius: 3px; text-decoration: none; color: var(--nd-ink-2); }
.nd-years a:hover { background-color: var(--nd-surface-2); color: var(--nd-ink); }

/* ---------- лид ---------- */
.nd-lead {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 34px;
  align-items: center;
  margin: 22px 0 8px;
  border: 1px solid var(--nd-line);
  border-radius: 4px;
  background-color: var(--nd-surface);
  padding: 22px;
}
.nd-lead__img {
  margin: 0;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--nd-surface-2);
}
.nd-lead__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nd-lead__title {
  margin: 12px 0 10px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-lead__title a { color: inherit; text-decoration: none; }
.nd-lead__title a:hover { color: var(--nd-accent-ink); }
.nd-lead__text {
  margin: 0 0 14px;
  max-width: 60ch;
  font-size: 0.90625rem;
  line-height: 1.55;
  color: var(--nd-ink-2);
}
.nd-lead__text p { margin: 0; }
.nd-lead__more {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-weight: 600;
  font-size: 0.84375rem;
  line-height: 1.4;
  color: var(--nd-accent-ink);
  text-decoration: none;
}

/* ---------- две колонки ---------- */
.nd-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 56px;
  align-items: start;
  padding: 26px 0 0;
}

/* ---------- лента ---------- */
.nd-feed { margin: 0; padding: 0; list-style: none; }
.nd-row::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--nd-line);
}
.nd-row:first-child::before { top: 8px; }
.nd-row:last-child::before { bottom: 20px; }
.nd-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px 156px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  border-bottom: 1px solid var(--nd-line);
  padding: 20px 0;
}
.nd-row:first-child { padding-top: 2px; }
.nd-row__when {
  position: relative;
  padding: 1px 0 0 18px;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--nd-ink-3);
  font-variant-numeric: tabular-nums;
}
.nd-row__when::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: var(--nd-line-2);
  box-sizing: content-box;
}
.nd-row.is-fresh .nd-row__when::before { background-color: var(--nd-accent); }
.nd-row__when b { display: block; font-weight: 500; color: var(--nd-ink-2); }
.nd-row__when i { font-style: normal; font-size: 0.65625rem; }
.nd-row__img {
  margin: 0;
  border: 1px solid var(--nd-line);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background-color: var(--nd-surface-2);
}
.nd-row__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nd-row__title {
  margin: 0 0 6px;
  font-family: var(--nd-serif);
  font-weight: 600;
  font-size: 1.15625rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-row__title a { color: inherit; text-decoration: none; }
.nd-row__title a:hover { color: var(--nd-accent-ink); }
.nd-row__text {
  margin: 0;
  font-size: 0.859375rem;
  line-height: 1.5;
  color: var(--nd-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nd-row__text p { margin: 0; }

/* ---------- метки над заголовком ---------- */
.nd-marks { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 7px; }
.nd-tag {
  border-radius: 2px;
  background-color: var(--nd-navy-soft);
  padding: 3px 7px;
  font-weight: 600;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--nd-navy);
  text-decoration: none;
}
.nd-tag:hover { background-color: var(--nd-navy); color: #fff; }
.nd-src {
  font-weight: 600;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nd-ink-3);
}
.nd-eff {
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--nd-ok);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- врезка с предложением ---------- */
.nd-promo {
  position: relative;   /* врезка перекрывает линию таймлайна: она не часть хронологии */
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  margin: 22px 0;
  border: 1px solid var(--nd-accent);
  border-radius: 4px;
  background-color: var(--nd-accent-soft);
  padding: 22px 24px;
}
.nd-promo__title {
  margin: 0 0 8px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-promo ul { margin: 0; padding-left: 18px; list-style: disc; font-size: 0.84375rem; line-height: 1.5; color: var(--nd-ink-2); }
.nd-promo li + li { margin-top: 3px; }
.nd-promo__act { display: flex; flex-direction: column; gap: 9px; min-width: 200px; }
.nd-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--nd-accent);
  border-radius: 3px;
  background-color: var(--nd-accent);
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.84375rem;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.nd-btn:hover { background-color: var(--nd-accent-ink); border-color: var(--nd-accent-ink); color: #fff; }
.nd-btn--ghost { background-color: transparent; color: var(--nd-accent-ink); }
.nd-btn--ghost:hover { background-color: var(--nd-accent); color: #fff; }
.nd-btn--wide { width: 100%; }

/* ---------- «показать ещё» и пагинация ---------- */
.nd-more { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 0 0; }
.nd-more .nav-links { display: flex; gap: 5px; align-items: center; }
.nd-more .page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--nd-line);
  border-radius: 3px;
  font-size: 0.78125rem;
  color: var(--nd-ink-2);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.nd-more .page-numbers:hover { border-color: var(--nd-ink-3); color: var(--nd-ink); }
.nd-more .page-numbers.current { background-color: var(--nd-ink); border-color: var(--nd-ink); color: #fff; }
.nd-more .page-numbers.dots { border: 0; min-width: 16px; }

/* ---------- правая колонка ---------- */
.nd-rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; }
.nd-card { border: 1px solid var(--nd-line); border-radius: 4px; background-color: var(--nd-surface); padding: 19px; }
.nd-card__title {
  margin: 0 0 4px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.03125rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-card p { margin: 0 0 13px; font-size: 0.8125rem; line-height: 1.5; color: var(--nd-ink-2); }
.nd-card small { display: block; margin-top: 9px; font-size: 0.6875rem; line-height: 1.45; color: var(--nd-ink-3); }
.nd-field { display: flex; gap: 8px; }
.nd-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--nd-line-2);
  border-radius: 3px;
  background-color: #fff;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--nd-ink);
}
.nd-dates { margin: 0; padding: 0; list-style: none; }
.nd-dates li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; border-top: 1px solid var(--nd-line); padding: 9px 0; }
.nd-dates li:first-child { border-top: 0; padding-top: 2px; }
.nd-dates b { font-weight: 500; font-size: 0.78125rem; line-height: 1.4; color: var(--nd-accent-ink); font-variant-numeric: tabular-nums; }
.nd-dates span { font-size: 0.8125rem; line-height: 1.4; color: var(--nd-ink-2); }
.nd-top { margin: 0; padding: 0; list-style: none; counter-reset: ndtop; }
.nd-top li {
  counter-increment: ndtop;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  border-top: 1px solid var(--nd-line);
  padding: 11px 0;
}
.nd-top li:first-child { border-top: 0; padding-top: 2px; }
.nd-top li::before { content: counter(ndtop); padding-top: 2px; font-size: 0.75rem; color: var(--nd-ink-3); }
.nd-top a { font-size: 0.84375rem; line-height: 1.36; color: var(--nd-ink); text-decoration: none; }
.nd-top a:hover { color: var(--nd-accent-ink); }
.nd-note { font-size: 0.71875rem; line-height: 1.5; color: var(--nd-ink-3); }
.nd-note b { color: var(--nd-ink); }

/* ---------- страница новости ---------- */
.nd-art-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding: 8px 0 0; }
.nd-art { max-width: 70ch; }
.nd-art__title {
  margin: 6px 0 14px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 2.1875rem;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-art__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  border-bottom: 1px solid var(--nd-line);
  padding-bottom: 18px;
  font-size: 0.78125rem;
  line-height: 1.4;
  color: var(--nd-ink-3);
}
.nd-art__meta b { font-weight: 600; color: var(--nd-ink-2); }
.nd-tldr { margin: 20px 0; border-radius: 4px; background-color: var(--nd-surface-2); padding: 19px 22px; }
.nd-tldr__title {
  margin: 0 0 11px;
  font-family: var(--nd-sans);
  font-weight: 600;
  font-size: 0.71875rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nd-ink-3);
}
.nd-tldr ul { margin: 0; padding-left: 19px; list-style: disc; font-size: 0.90625rem; line-height: 1.55; color: var(--nd-ink); }
.nd-tldr li + li { margin-top: 7px; }
.nd-art__fig { margin: 22px 0; }
.nd-art__fig img { display: block; width: 100%; border-radius: 3px; }
.nd-art__body { font-size: 0.96875rem; line-height: 1.65; color: var(--nd-ink-2); }
.nd-art__body p { margin: 0 0 16px; }
.nd-art__body h2 {
  margin: 30px 0 10px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.22;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-art__body h3 {
  margin: 24px 0 8px;
  font-family: var(--nd-serif);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-art__body ul,
.nd-art__body ol { margin: 0 0 16px; padding-left: 20px; }
.nd-art__body li + li { margin-top: 6px; }
.nd-art__body a { color: var(--nd-accent-ink); }
.nd-art__body img { max-width: 100%; height: auto; border-radius: 3px; }
.nd-art__body table { width: 100%; border-collapse: collapse; }
.nd-art__scroll { overflow-x: auto; }
.nd-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 26px 0;
  border: 1px solid var(--nd-accent);
  border-radius: 4px;
  background-color: var(--nd-accent-soft);
  padding: 22px;
}
.nd-cta__title {
  margin: 0 0 6px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-cta p { margin: 0; font-size: 0.84375rem; line-height: 1.5; color: var(--nd-ink-2); }
.nd-end {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 26px 0;
  border-top: 1px solid var(--nd-line);
  border-bottom: 1px solid var(--nd-line);
  padding: 16px 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--nd-ink-3);
}
.nd-end__ava {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--nd-navy-soft);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--nd-navy);
}
.nd-end b { color: var(--nd-ink-2); }
.nd-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: ndtoc; }
.nd-toc li { counter-increment: ndtoc; border-top: 1px solid var(--nd-line); padding: 7px 0; }
.nd-toc li:first-child { border-top: 0; }
.nd-toc a {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--nd-ink-2);
  text-decoration: none;
}
.nd-toc a::before { content: counter(ndtoc); font-size: 0.71875rem; color: var(--nd-ink-3); }
.nd-toc a:hover { color: var(--nd-accent-ink); }
.nd-rel__title {
  margin: 8px 0 4px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.4375rem;
  line-height: 1.2;
  text-transform: none;
  color: var(--nd-ink);
}

/* ---------- хаб рубрики ---------- */
.nd-hub__intro { margin: 10px 0 16px; max-width: 70ch; font-size: 0.90625rem; line-height: 1.6; color: var(--nd-ink-2); }
.nd-hub__links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; font-size: 0.78125rem; color: var(--nd-ink-3); }
.nd-bridge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--nd-navy);
  border-radius: 4px;
  background-color: var(--nd-navy-soft);
  padding: 18px 22px;
}
.nd-bridge__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  background-color: var(--nd-navy);
  font-family: var(--font-family-2);
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  color: #fff;
}
.nd-bridge__title {
  margin: 0 0 3px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-bridge p { margin: 0; font-size: 0.825rem; line-height: 1.5; color: var(--nd-ink-2); }
.nd-faq { margin-top: 34px; border-top: 1px solid var(--nd-line); }
.nd-faq__title {
  margin: 26px 0 12px;
  font-family: var(--nd-serif);
  font-weight: 700;
  font-size: 1.4375rem;
  line-height: 1.2;
  text-transform: none;
  color: var(--nd-ink);
}
.nd-faq details { border-bottom: 1px solid var(--nd-line); padding: 13px 0; }
.nd-faq summary {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}
.nd-faq summary::-webkit-details-marker { display: none; }
.nd-faq summary::before { content: "+"; font-size: 1rem; line-height: 1.35; color: var(--nd-accent-ink); }
.nd-faq details[open] summary::before { content: "\2212"; }
.nd-faq details p { margin: 9px 0 2px 24px; max-width: 66ch; font-size: 0.859375rem; line-height: 1.55; color: var(--nd-ink-2); }

/* ---------- фокус ---------- */
.nd a:focus-visible,
.nd button:focus-visible,
.nd input:focus-visible,
.nd summary:focus-visible { outline: 2px solid var(--nd-accent); outline-offset: 2px; }

/* ---------- адаптив ---------- */
@media (max-width: 1279.9px) {
  .nd-cols { gap: 40px; grid-template-columns: minmax(0, 1fr) 300px; }
  .nd-art-cols { gap: 40px; }
}
@media (max-width: 1024px) {
  .nd-cols,
  .nd-art-cols { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .nd-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .nd-rail > * { flex: 1 1 260px; }
  .nd-lead { grid-template-columns: 1fr; gap: 18px; }
  .nd-art { max-width: none; }
}
@media (max-width: 767.9px) {
  .nd-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .nd-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; }
  .nd-years { display: none; }
  .nd-row::before { display: none; }
  .nd-row { grid-template-columns: minmax(0, 1fr) 92px; gap: 14px; }
  .nd-row__when { grid-column: 1 / -1; grid-row: 1; display: flex; gap: 8px; align-items: baseline; padding-left: 0; }
  .nd-row__when::before { display: none; }
  .nd-row__when b { display: inline; }
  .nd-row__img { grid-column: 2; grid-row: 2 / 4; aspect-ratio: 1 / 1; }
  .nd-row__body { grid-column: 1; grid-row: 2; }
  .nd-lead__title { font-size: 1.375rem; }
  .nd-art__title { font-size: 1.6875rem; }
  .nd-promo,
  .nd-cta,
  .nd-bridge { grid-template-columns: 1fr; gap: 16px; }
  .nd-bridge__mark { display: none; }
  .nd-promo__act { min-width: 0; }
  .nd-rail { flex-direction: column; }
}
@media (max-width: 576px) {
  .nd-lead { padding: 14px; }
  .nd-tldr { padding: 16px; }
}

/* ---------- подписка ---------- */
.nd-sub { margin: 0; }
.nd-sub__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.nd-sub__msg { margin: 9px 0 0; font-size: 0.78125rem; line-height: 1.45; color: var(--nd-ink-3); }
.nd-sub__msg:empty { display: none; }
.nd-sub__msg.is-ok { color: var(--nd-ok); }
.nd-sub__msg.is-err { color: #b3261e; }
.nd-sub button[disabled] { opacity: 0.6; cursor: default; }
