/* ==========================================================================
   Раздел «Вопросы и ответы». Дополняет news.css и home.css: секции, аккордеон
   и типографика берутся оттуда, здесь — шапка с поиском и навигация по темам.
   ========================================================================== */

.nd-faqhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px 44px;
  align-items: start;
  padding: 4px 0 26px;
}
.nd-faq-page h1.page-title { max-width: 24ch; }
.nd-faqhead .nd-hero__lead { margin-bottom: 0; }

/* ---------- поиск ---------- */
.nd-faqsearch { padding-top: 6px; }
.nd-faqsearch input {
  display: block;
  width: 100%;
  border: 1px solid var(--nd-line-2);
  border-radius: 3px;
  background-color: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--nd-ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nd-faqsearch input::-webkit-input-placeholder { color: var(--nd-ink-3); }
.nd-faqsearch input::placeholder { color: var(--nd-ink-3); }
.nd-faqsearch input:focus {
  outline: none;
  border-color: var(--nd-accent);
  -webkit-box-shadow: 0 0 0 3px rgba(243, 113, 43, 0.14);
  box-shadow: 0 0 0 3px rgba(243, 113, 43, 0.14);
}
.nd-faqsearch__count {
  margin: 8px 0 0;
  font-size: 0.78125rem;
  line-height: 1.4;
  color: var(--nd-ink-3);
}
.nd-faqsearch__count:empty { display: none; }

/* ---------- навигация по темам ---------- */
.nd-faqnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.nd-faqnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--nd-line-2);
  border-radius: 100px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--nd-ink-2);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.nd-faqnav a:hover { border-color: var(--nd-ink-3); color: var(--nd-ink); }
.nd-faqnav a span {
  font-weight: 500;
  font-size: 0.71875rem;
  color: var(--nd-ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- список вопросов ---------- */
.nd-faq-page .nd-sec { scroll-margin-top: 150px; }
.nd-faq--list { margin-top: 0; border-top: 1px solid var(--nd-line); }
.nd-faq--list details:last-child { border-bottom: 1px solid var(--nd-line); }
.nd-faq--list summary { font-size: 1rem; }
.nd-faq__more { margin: 10px 0 2px 24px; }
.nd-faq__more a {
  border-bottom: 1px solid currentColor;
  font-weight: 600;
  font-size: 0.84375rem;
  color: var(--nd-accent-ink);
  text-decoration: none;
}
.nd-faq__more a:hover { color: var(--nd-ink); }

.nd-faqempty {
  margin: 26px 0 0;
  border: 1px solid var(--nd-line);
  border-radius: 4px;
  background-color: var(--nd-surface);
  padding: 18px 20px;
  max-width: 70ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--nd-ink-2);
}

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .nd-faqhead { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 30px; }
}
@media (max-width: 810px) {
  .nd-faqhead { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 20px; }
  .nd-faqsearch { padding-top: 0; }
  .nd-faq-page .nd-sec { scroll-margin-top: 132px; }   /* шапка на телефоне 119px */
}
@media (max-width: 576px) {
  .nd-faqnav a { padding: 6px 12px; font-size: 0.78125rem; }
  .nd-faq__more { margin-left: 24px; }
}

/* ---------- страница отдельного вопроса ---------- */
.nd-faqrel { margin-top: 4px; }
.nd-faqrel li { border-top: 1px solid var(--nd-line); }
.nd-faqrel li:last-child { border-bottom: 1px solid var(--nd-line); }
.nd-faqrel a {
  display: block;
  padding: 13px 0;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--nd-ink);
  text-decoration: none;
}
.nd-faqrel a:hover { color: var(--nd-accent-ink); }

/* короткий ответ вверху страницы — сплошной абзац, а не список пунктов */
.nd-faq-single .nd-tldr p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--nd-ink);
}
