/* =============================================================================
   guides.css — СправкаБК.РФ · дизайн-система статей-гайдов (DROP-IN REPLACEMENT)
   v3 — редакционная вёрстка: статья «дышит», карточки — только там, где контент
        действительно модульный (шаги, чек-лист, врезки, источники, FAQ).
   -----------------------------------------------------------------------------
   • Полная замена текущего guides.css. Имена классов и структура DOM НЕ изменены —
     все существующие селекторы 11 страниц продолжают работать.
   • Только статичные HTML + CSS. Без JS, внешних запросов, иконочных шрифтов и
     Google Fonts. Иконки — инлайн-SVG (data-URI) либо additive-вставки (icon-kit).
   • Inter подключается самохостингом на стороне сайта.
   • AEO-слой (.answer-box, .facts-table, .meta-line) сохранён и читаем.
   ========================================================================== */

/* Self-hosted Inter (cyrillic + latin, веса 300/400/600/700) — заменяет render-blocking
   Google Fonts. На проде шрифт самохостится: woff2 в /public/fonts/, те же unicode-range,
   без внешних запросов/CDN (YMYL + перф под Яндекс). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/inter-cyrillic-300-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/inter-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;

  /* — Брендовые токены — */
  --bg: #fafbfd;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #51607a;
  --soft: #7d8aa3;
  --line: #e6eaf2;
  --line-strong: #d4dbe8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0f766e;
  --highlight: #eef4ff;
  --warning: #fff7ed;
  --success: #ecfdf5;

  /* — Мягкие тинты иконок — */
  --blue-ink: #1d4ed8;
  --blue-tint: #e7eefe;
  --teal-ink: #0f766e;
  --teal-tint: #d7f3ec;
  --amber-ink: #b45309;
  --amber-tint: #fcecd6;
  --violet-ink: #6d28d9;
  --violet-tint: #ece7fb;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -22px rgba(15, 23, 42, 0.25);
  --shadow-lift: 0 2px 6px rgba(15, 23, 42, 0.05), 0 24px 48px -28px rgba(37, 99, 235, 0.3);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 1.0625rem;
  line-height: 1.75;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: rgba(37, 99, 235, 0.14);
}

.container {
  width: min(940px, calc(100% - 44px));
  margin: 0 auto;
}

.page-shell {
  max-width: 64rem;
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  padding: 28px 0 96px;
}

/* =============================================================================
   ИКОНКИ — data-URI SVG (цвет «запечён»). Без внешних запросов.
   ========================================================================== */
:root {
  --ico-check:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l4.5 4.5L19.5 6.5'/%3E%3C/svg%3E");
  --ico-warn:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 2.3 20.5h19.4z'/%3E%3Cpath d='M12 9.5v5'/%3E%3Cpath d='M12 17.6v.2'/%3E%3C/svg%3E");
  --ico-list:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6.5h11M9 12h11M9 17.5h11M4.5 6.5h.01M4.5 12h.01M4.5 17.5h.01'/%3E%3C/svg%3E");
  --ico-doc:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3.5H7.5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3.5V8h4.5'/%3E%3Cpath d='M9 13h6M9 16.5h4'/%3E%3C/svg%3E");
  --ico-link:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4.5h5.5V10'/%3E%3Cpath d='M19.5 4.5 12 12'/%3E%3Cpath d='M11 5.5H6.5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V13'/%3E%3C/svg%3E");
  --ico-chev:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5 12 15.5 18 9.5'/%3E%3C/svg%3E");
  --ico-spark:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l1.8 4.7L18.5 10l-4.7 1.8L12 16.5l-1.8-4.7L5.5 10l4.7-1.8z'/%3E%3C/svg%3E");
}

/* =============================================================================
   ШАПКА
   ========================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.top-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.top-links a {
  text-decoration: none;
  padding: 8px 13px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 9px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.top-links a:hover {
  color: var(--primary-dark);
  background: var(--highlight);
}

/* — Кнопки — */
.button,
.button-secondary,
.button-success {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 13px 20px;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.button {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.7);
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px -12px rgba(37, 99, 235, 0.75);
}

.button-secondary {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--text);
}

.button-secondary:hover {
  border-color: #bcd0f5;
  color: var(--primary-dark);
}

.button-success {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(15, 118, 110, 0.7);
}

.button-success:hover {
  background: #0b5d56;
  transform: translateY(-1px);
}

.button svg,
.button-secondary svg,
.button-success svg,
.top-links a svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

/* =============================================================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================================================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--soft);
}

.breadcrumbs a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
}

.breadcrumbs .sep {
  color: #c2ccdc;
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* =============================================================================
   HERO — мачта статьи (без «коробки», как в редакционной вёрстке)
   ========================================================================== */
.hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 0 40px;
  margin: 0 0 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--highlight);
  border: 1px solid #d8e3fb;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 6px 14px 6px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: var(--ico-spark) center / contain no-repeat;
}

.eyebrow:has(svg)::before {
  display: none;
}

.eyebrow svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.6vw, 3.05rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
  max-width: none;
  color: #0b1220;
}

:where(.hero) p {
  margin: 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* =============================================================================
   AEO: META-LINE + ANSWER-BOX
   ========================================================================== */
.meta-line {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 22px 0 44px;
  max-width: none;
  flex-wrap: wrap;
}

.meta-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e7eefe, #d7f3ec);
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.meta-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.meta-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.meta-role {
  color: var(--soft);
  font-weight: 400;
  font-size: 0.83rem;
  line-height: 1.4;
}

.meta-date {
  margin-left: auto;
  align-self: center;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 500;
  background: #f1f5fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
}

.answer-box {
  position: relative;
  margin: 0;
  max-width: none;
  background: linear-gradient(180deg, #f4f8ff, #ffffff 60%);
  border: 1px solid #d8e3fb;
  border-radius: 16px;
  padding: 22px 26px 22px 28px;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.75;
}

.answer-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.answer-box strong {
  color: var(--primary-dark);
}

/* =============================================================================
   ОГЛАВЛЕНИЕ (ToC) — компактный навигационный модуль
   ========================================================================== */
.toc {
  margin: 4px 0 0;
  padding: 2px 0 2px 22px;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--line-strong);
  border-radius: 0;
}

.toc-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--soft);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  transition: color 0.18s var(--ease);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  color: var(--primary-dark);
}

/* =============================================================================
   SECTION — секции статьи БЕЗ коробки: воздух + сильный заголовок
   ========================================================================== */
.section-box {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 60px;
}

.section-box h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: clamp(1.5rem, 2.8vw, 1.78rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.25;
  color: #0b1220;
  text-wrap: balance;
}

/* Нейтральный маркер слева. Скрывается, если есть additive .sec-ico. */
.section-box h2::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--highlight);
}

.section-box h2:has(.sec-ico)::before {
  display: none;
}

.section-box h3 {
  margin-top: 0;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-box > p {
  color: var(--muted);
  line-height: 1.78;
  max-width: var(--measure);
}

.section-box .lead {
  margin: -6px 0 28px;
  font-size: 1.14rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: var(--measure);
}

.section-box ul {
  padding-left: 22px;
  margin-bottom: 0;
  max-width: var(--measure);
}

.section-box li {
  color: var(--muted);
  line-height: 1.78;
  margin-bottom: 10px;
}

/* — Семантическая иконка раздела (additive .sec-ico) — */
.sec-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: var(--blue-tint);
  color: var(--blue-ink);
}

.sec-ico svg {
  width: 23px;
  height: 23px;
}

.sec-ico--teal   { background-color: var(--teal-tint);   color: var(--teal-ink); }
.sec-ico--amber  { background-color: var(--amber-tint);  color: var(--amber-ink); }
.sec-ico--violet { background-color: var(--violet-tint); color: var(--violet-ink); }

/* =============================================================================
   ШАГИ — сетка нумерованных карточек
   ========================================================================== */
.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 26px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.card h3 {
  margin: 0 0 9px;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card p {
  color: var(--muted);
  line-height: 1.72;
  margin: 0;
  font-size: 0.96rem;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #c7d8f5;
  box-shadow: var(--shadow-lift);
}

/* Нумерованные шаги (CSS-counters). Счётчик включается ТОЛЬКО на сетках с классом .steps
   (его проставляет additive-скрипт реальным шаговым сеткам), чтобы не-шаговые плитки —
   виды ответственности, категории документов — не получали вводящие в заблуждение номера. */
.section-box .grid.steps {
  counter-reset: step;
  gap: 30px 28px;
}

.section-box .grid.steps > .card {
  counter-increment: step;
  background: transparent;
  border: 0;
  border-top: 2px solid var(--line-strong);
  border-radius: 0;
  padding: 16px 0 0;
}

.section-box .grid.steps > .card:hover {
  transform: none;
  border-color: var(--line-strong);
  box-shadow: none;
}

.section-box .grid.steps > .card::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   CHECKLIST
   ========================================================================== */
.checklist {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checklist .item {
  position: relative;
  padding: 2px 0 2px 44px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.checklist .item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background-color: var(--teal-tint);
  background-image: var(--ico-check);
  background-size: 19px;
  background-repeat: no-repeat;
  background-position: center;
}

.checklist .item h3 {
  margin: 3px 0 6px;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.checklist .item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
  font-size: 0.96rem;
}

/* =============================================================================
   ВРЕЗКИ NOTICE / NOTICE.SUCCESS
   ========================================================================== */
.notice {
  position: relative;
  background: var(--warning);
  border: 1px solid #f6dcb8;
  border-radius: 16px;
  padding: 26px 30px 26px 88px;
  margin-top: 60px;
}

.notice::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: #fbe2c4;
  background-image: var(--ico-warn);
  background-size: 24px;
  background-repeat: no-repeat;
  background-position: center;
}

.notice > h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.3;
  color: #0b1220;
}

.notice > p {
  margin: 0;
  color: #5a4a36;
  line-height: 1.74;
}

.notice.success {
  background: var(--success);
  border-color: #bfe9cf;
}

.notice.success::before {
  background-color: #cdeedd;
  background-image: var(--ico-check);
}

.notice.success > p {
  color: #38614c;
}

/* =============================================================================
   FACTS-TABLE (AEO)
   ========================================================================== */
.facts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 4px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.facts-table th,
.facts-table td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}

.facts-table tr:last-child th,
.facts-table tr:last-child td {
  border-bottom: 0;
}

.facts-table th {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
  background: #f8fafd;
}

.facts-table td {
  color: var(--text);
}

/* =============================================================================
   ИСТОЧНИКИ
   ========================================================================== */
.sources {
  display: grid;
  gap: 10px;
}

.source-link {
  position: relative;
  display: block;
  text-decoration: none;
  padding: 18px 52px 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.source-link strong {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
}

.source-link strong::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: var(--blue-tint);
  background-image: var(--ico-doc);
  background-size: 17px;
  background-repeat: no-repeat;
  background-position: center;
}

.source-link span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.96rem;
}

.source-link::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: var(--ico-link) center / contain no-repeat;
  opacity: 0.55;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.source-link:hover {
  border-color: #c7d8f5;
  background: #fbfcff;
}

.source-link:hover::after {
  opacity: 1;
  transform: translateY(-50%) translate(2px, -2px);
}

.inline-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.muted {
  color: var(--soft);
}

/* =============================================================================
   FAQ — список с разделителями
   ========================================================================== */
.faq-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  padding: 22px 4px;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.18s var(--ease);
}

.faq-item summary:hover {
  color: var(--primary-dark);
}

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

.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background-color: var(--highlight);
  background-image: var(--ico-chev);
  background-size: 17px;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.25s var(--ease);
}

.faq-item[open] summary {
  color: var(--primary-dark);
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item p {
  margin: -4px 0 22px;
  color: var(--muted);
  line-height: 1.78;
  max-width: var(--measure);
}

/* =============================================================================
   ВСЕ МАТЕРИАЛЫ (silo) — без коробки, с верхней линией
   ========================================================================== */
.related-guides {
  margin-top: 64px;
  padding: 44px 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.related-guides > h2 {
  margin: 0 0 26px;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0b1220;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 24px;
}

.related-col-title {
  margin: 0 0 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soft);
}

.related-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-col li {
  margin: 0 0 9px;
  line-height: 1.45;
}

.related-col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 0.18s var(--ease);
}

.related-col a:hover {
  color: var(--primary-dark);
}

.related-col [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  font-size: 0.96rem;
}

/* =============================================================================
   FOOTER
   ========================================================================== */
.footer {
  margin-top: 56px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.72;
}

.footer p {
  margin: 0;
  max-width: 88ch;
}

/* =============================================================================
   ДОСТУПНОСТЬ — видимый фокус
   ========================================================================== */
a:focus-visible,
.button:focus-visible,
.button-secondary:focus-visible,
.button-success:focus-visible,
.top-links a:focus-visible,
.source-link:focus-visible,
.toc a:focus-visible,
.related-col a:focus-visible,
.breadcrumbs a:focus-visible,
.faq-item summary:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.section-box,
.notice {
  scroll-margin-top: 20px;
}

/* =============================================================================
   АДАПТИВ ≤ 900px
   ========================================================================== */
@media (max-width: 900px) {
  .container {
    width: min(940px, calc(100% - 32px));
  }

  .grid-3,
  .grid-2,
  .checklist {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .toc ol {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section-box {
    margin-top: 48px;
  }

  .notice {
    margin-top: 48px;
    padding: 22px 22px 22px 74px;
  }

  .notice::before {
    left: 22px;
    top: 22px;
  }

  .hero {
    padding: 22px 0 32px;
  }

  /* Адаптив контента под узкие экраны: длинные неразрывные токены (реквизиты,
     коды форм, ссылки, номера счетов) переносятся и не ломают вёрстку. Таблицы
     фактов остаются настоящими таблицами (AEO сохранён) — без горизонтального
     скролла; ячейки чуть компактнее для воздуха. */
  .facts-table th,
  .facts-table td,
  .source-link strong,
  .source-link span,
  .answer-box,
  .section-box p,
  .section-box li,
  .card p,
  .checklist .item p,
  .notice > p,
  .faq-item p {
    overflow-wrap: anywhere;
  }

  .facts-table th,
  .facts-table td {
    padding: 12px 13px;
    font-size: 0.95rem;
  }

  /* Длинные слова в заголовках (напр. «несовершеннолетнего») переносятся мягким
     переносом и не выходят за вьюпорт на узких экранах. */
  .hero h1,
  .section-box h2,
  .notice > h2 {
    overflow-wrap: anywhere;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

@media (max-width: 560px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .card:hover,
  .button:hover,
  .button-secondary:hover,
  .button-success:hover {
    transform: none;
  }
}
