/* Темы FAQ — полноценные страницы (20260710-29) */
@media (prefers-reduced-motion: no-preference) {
  .faq-topic-page { scroll-behavior: smooth; }
}

.faq-topic-page {
  --faq-frame-border: 2px solid color-mix(in srgb, var(--theme-border, #b8c6df) 82%, var(--theme-text, #1a2340) 18%);
  --faq-frame-radius: 16px;
  --faq-frame-shadow:
    0 0 0 1px color-mix(in srgb, var(--theme-surface, #fff) 88%, var(--theme-border, #d4deef) 12%),
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 6px 20px rgba(20, 45, 95, 0.08);
}

.faq-topic-page .container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.faq-topic-doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.05rem, 2.2vw, 1.65rem);
  border: var(--faq-frame-border);
  border-radius: var(--faq-frame-radius);
  box-shadow: var(--faq-frame-shadow);
  background: var(--theme-surface, #fff);
  color: var(--theme-text, #18243d);
}

.faq-topic-back {
  margin: 0 0 1rem;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-border, #d4deef) 80%, var(--theme-text) 20%);
}

.faq-topic-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--theme-primary, #1a3d8a);
  text-decoration: none;
}

.faq-topic-back a:hover { text-decoration: underline; }

.faq-topic-back a:focus-visible {
  outline: 2px solid var(--theme-primary, #1f57c3);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-topic-page .breadcrumb {
  font-size: 0.9rem;
  color: var(--theme-muted, #5f6d8c);
  margin: 0 0 0.75rem;
}

.faq-topic-page .breadcrumb a {
  color: var(--theme-primary, #243b84);
  text-decoration: none;
  font-weight: 600;
}

.faq-topic-page .breadcrumb a:hover { text-decoration: underline; }

.faq-topic-page h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.8vw, 1.65rem);
  line-height: 1.2;
  color: var(--theme-text, #18243d);
}

.faq-topic-page .section-h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.faq-topic-page .section-lead {
  margin: 0 0 0.9rem;
  max-width: 75ch;
  line-height: 1.6;
  color: var(--theme-muted, #3d4b63);
}

.faq-topic-page p,
.faq-topic-page li {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--theme-text, #1a1f2e);
}

.faq-topic-page p { margin: 0 0 0.9rem; max-width: 72ch; }

.faq-topic-page ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.35rem;
}

.faq-topic-page li { margin: 0.4rem 0; }

.faq-topic-page li::marker { color: var(--theme-primary, #1a3d8a); }

.faq-topic-page a { text-underline-offset: 0.14em; }

.faq-federal-theme { scroll-margin-top: 100px; }

.faq-toc-mega-block { break-inside: avoid; margin: 0 0 0.85rem; }

.faq-topic-page .faq-toc-mega-block > h3,
.faq-topic-page .faq-toc-mega-block h3 {
  padding-bottom: 0.55rem;
  margin: 0 0 0.7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-border, #d4deef) 78%, var(--theme-text, #18243d) 22%);
  font-size: 1.2rem;
  line-height: 1.32;
  font-weight: 800;
  color: var(--theme-primary, #1a3d8a);
}

.faq-toc-mega-block h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--theme-primary, #1a3d8a) 55%, transparent);
}

.faq-toc-mega-block h3 a:hover { border-bottom-style: solid; }

.faq-toc-accordion {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.faq-block {
  margin: 0;
  border: var(--faq-frame-border);
  border-radius: 14px;
  background: var(--theme-surface, #fff);
  box-shadow: var(--faq-frame-shadow);
  overflow: hidden;
}

.faq-block summary {
  padding: 0.75rem 1.05rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1.45;
  color: var(--theme-primary, #1a3d8a);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.faq-block summary::-webkit-details-marker { display: none; }

.faq-block summary::after {
  content: "▼";
  font-size: 0.65rem;
  opacity: 0.6;
}

.faq-block[open] summary::after { content: "▲"; }

.faq-block .answer {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--theme-text, #1a1f2e);
  padding: 0.4rem 1.05rem 1.1rem;
  border-top: 1px solid var(--theme-border, #e8ecf5);
}

.faq-block .answer > p,
.faq-block .answer p:not(.source-note) {
  max-width: 72ch;
}

.faq-block .answer p,
.faq-topic-page .qa-static p {
  margin: 0 0 0.7rem;
  line-height: 1.6;
}

.faq-block .answer p:last-child { margin-bottom: 0; }

.faq-topic-page .qa-static h3,
.faq-block .answer h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1.05rem;
}

.faq-block .answer h4,
.faq-topic-page .answer h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0.75rem 0 0.45rem;
}

.faq-topic-page .qa-static ul,
.faq-block .answer ul {
  margin: 0.2rem 0 0.6rem;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.faq-topic-page .section,
.faq-topic-page details[id] {
  scroll-margin-top: 100px;
}

.faq-topic-page p.notice {
  font-size: 0.9rem;
  color: var(--theme-muted, #5f6d8c);
  line-height: 1.55;
  max-width: 75ch;
}

.faq-topic-page p.source-note,
.faq-topic-page .source-note {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--theme-muted, #5f6d8c);
  max-width: 70ch;
}

.faq-answer--readable { display: flow-root; }

.faq-topic-page p.faq-lead {
  font-size: 1.06em;
  line-height: 1.58;
  margin: 0 0 0.9rem;
  color: var(--theme-text, #1a1f2e);
}

.faq-topic-page .faq-answer__h {
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1.35;
  margin: 1rem 0 0.5rem;
  color: var(--theme-text, #18243d);
}

.faq-answer--readable > p.faq-lead + .faq-answer__h {
  margin-top: 0.4rem;
}

.faq-a11y-list {
  margin: 0.35rem 0 0.95rem;
  padding-left: 1.4rem;
  list-style: disc;
  line-height: 1.65;
}

.faq-a11y-list--ordered { list-style: decimal; }

.faq-a11y-list li { margin: 0.5em 0; }

.faq-a11y-list li::marker { color: var(--theme-primary, #1a3d8a); }

.faq-fact {
  margin: 1rem 0;
  padding: 0.95rem 1.05rem;
  max-width: 70ch;
  line-height: 1.6;
  border-left: 0.3rem solid var(--theme-primary, #1f57c3);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--theme-surface-soft, #eef3fb) 92%, #fff 8%);
}

.faq-fact__label {
  display: block;
  font-weight: 800;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  color: var(--theme-primary, #1a3d8a);
  margin-bottom: 0.4rem;
}

.faq-topic-page abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 0.12em;
  cursor: help;
}

:root[data-theme="dark"] .faq-topic-page {
  --faq-frame-shadow:
    0 0 0 1px color-mix(in srgb, var(--theme-surface, #16213a) 55%, var(--theme-border, #33456d) 45%),
    0 1px 0 color-mix(in srgb, var(--theme-text, #eef3ff) 8%, transparent) inset,
    0 6px 22px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .faq-fact {
  background: color-mix(in srgb, var(--theme-surface-soft) 90%, var(--theme-border) 10%);
}

@media print {
  .faq-topic-doc {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  .faq-topic-back { display: none; }
  .faq-block { box-shadow: none !important; }
}
