/* Версия для слабовидящих — ГОСТ Р 52872-2019 / WCAG 2.1
   Контраст ≥ 4,5:1, увеличенный текст, различимые ссылки, видимый фокус.
   Без декоративных рамок вокруг блоков. */

html.a11y-mode {
  font-size: 24px;
  scroll-behavior: auto;
}

html.a11y-mode body {
  background: #ffffff !important;
  color: #000000 !important;
  line-height: 1.6 !important;
}

html.a11y-mode {
  --text: #000000;
  --text-muted: #1a1a1a;
  --text-light: #333333;
  --bg: #ffffff;
  --bg-white: #ffffff;
  --border: #666666;
  --blue: #004494;
  --blue-dark: #000000;
  --blue-light: #ffffff;
  --blue-mid: #cccccc;
  --shadow-sm: none;
  --shadow-md: none;
}

/* Заголовки */
html.a11y-mode h1,
html.a11y-mode h2,
html.a11y-mode h3,
html.a11y-mode h4,
html.a11y-mode h5,
html.a11y-mode h6,
html.a11y-mode .page-title {
  color: #000000 !important;
  font-weight: 700 !important;
}

html.a11y-mode .page-lead,
html.a11y-mode .breadcrumb {
  color: #1a1a1a !important;
}

/* Ссылки */
html.a11y-mode a {
  color: #0000ee !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

html.a11y-mode a:visited {
  color: #551a8b !important;
}

html.a11y-mode a:hover {
  color: #000000 !important;
  background-color: #ffff00 !important;
}

/* Фокус (клавиатура и указатель) */
html.a11y-mode a:focus-visible,
html.a11y-mode button:focus-visible,
html.a11y-mode summary:focus-visible,
html.a11y-mode input:focus-visible,
html.a11y-mode select:focus-visible,
html.a11y-mode textarea:focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px !important;
  background-color: #ffff00 !important;
  color: #000000 !important;
}

html.a11y-mode .skip-link:focus {
  background: #000000 !important;
  color: #ffffff !important;
  outline: 3px solid #ffff00 !important;
}

/* Шапка и подвал — контраст без «коробок» */
html.a11y-mode .site-header {
  background: #ffffff !important;
  color: #000000 !important;
  border-bottom: 2px solid #000000 !important;
  box-shadow: none !important;
}

html.a11y-mode .site-header a,
html.a11y-mode .site-header button,
html.a11y-mode .logo,
html.a11y-mode .logo-text {
  color: #000000 !important;
}

html.a11y-mode .logo-text {
  border-left-color: #000000 !important;
}

html.a11y-mode .main-nav a {
  color: #000000 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

html.a11y-mode .main-nav a.active {
  background: #000000 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

html.a11y-mode .main-nav.open {
  background: #ffffff !important;
}

html.a11y-mode .btn-hdr {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  font-weight: 700 !important;
  min-height: 44px;
  min-width: 44px;
}

html.a11y-mode .btn-hdr--primary {
  background: #004494 !important;
  color: #ffffff !important;
}

html.a11y-mode #a11y-toggle[aria-pressed="true"] {
  background: #000000 !important;
  color: #ffffff !important;
}

html.a11y-mode .site-footer {
  background: #ffffff !important;
  color: #000000 !important;
  border-top: 2px solid #000000 !important;
}

html.a11y-mode .site-footer * {
  color: inherit;
}

html.a11y-mode .f-link,
html.a11y-mode .f-phone-num {
  color: #0000ee !important;
}

html.a11y-mode .footer-bottom {
  background: #f5f5f5 !important;
  border-top: 1px solid #000000 !important;
}

html.a11y-mode .breadcrumb-wrap {
  background: #ffffff !important;
  border-bottom: 1px solid #666666 !important;
}

/* Аккордеоны — без рамок вокруг всего блока */
html.a11y-mode details.acc,
html.a11y-mode details.acc2 {
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid #666666 !important;
  border-radius: 0 !important;
}

html.a11y-mode details.acc[open],
html.a11y-mode details.acc2[open] {
  border-left: none !important;
}

html.a11y-mode details.acc > summary,
html.a11y-mode details.acc2 > summary {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
  text-decoration: underline;
  min-height: 48px;
  border: none !important;
}

html.a11y-mode details.acc > summary:hover,
html.a11y-mode details.acc2 > summary:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

html.a11y-mode details.acc[open] > summary,
html.a11y-mode details.acc2[open] > summary {
  background: #004494 !important;
  color: #ffffff !important;
  text-decoration: none;
}

html.a11y-mode details.acc[open] > summary .acc-badge {
  background: #ffffff !important;
  color: #004494 !important;
  border: 2px solid #004494 !important;
}

html.a11y-mode .acc-badge {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

html.a11y-mode .acc-body,
html.a11y-mode .acc2-body {
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
}

html.a11y-mode .acc2-dot {
  background: #000000 !important;
}

/* Документы — обычные ссылки, без рамок */
html.a11y-mode .doc-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #cccccc !important;
  border-radius: 0 !important;
  color: #0000ee !important;
  font-weight: 400 !important;
  min-height: 48px;
}

html.a11y-mode .doc-item:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

html.a11y-mode .doc-meta {
  color: #333333 !important;
}

/* Сайдбар */
html.a11y-mode .s-card {
  background: #ffffff !important;
  border: 1px solid #666666 !important;
  box-shadow: none !important;
}

html.a11y-mode .s-card-head {
  background: #000000 !important;
  color: #ffffff !important;
}

html.a11y-mode .s-label {
  color: #333333 !important;
}

html.a11y-mode .btn-feedback,
html.a11y-mode .mobile-cta {
  background: #004494 !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
  font-weight: 700 !important;
  min-height: 48px;
}

html.a11y-mode img {
  max-width: 100%;
  height: auto;
}

html.a11y-mode img:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

html.a11y-mode table {
  border-collapse: collapse;
  width: 100%;
}

html.a11y-mode th,
html.a11y-mode td {
  border: 1px solid #000000;
  padding: 0.5em 0.75em;
}

@media (max-width: 768px) {
  html.a11y-mode {
    font-size: 22px;
  }
}
