/* ============================================================
   Версия для слабовидящих (ГОСТ Р 52872-2019)
   Классы навешиваются на <html> и переопределяют базовые стили.
   ============================================================ */

/* ---------- Кнопка-переключатель в топ-баре ---------- */
.a11y-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.a11y-toggle:hover { background: rgba(255,255,255,.3); }
.a11y-toggle__icon { font-size: 14px; line-height: 1; }

/* ---------- Панель настроек ---------- */
.a11y-panel {
  background: #fff;
  border-bottom: 2px solid var(--green-primary, #5A9A2E);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  padding: 16px 20px;
  position: relative;
}
.a11y-group { min-width: 180px; }
.a11y-group__title { font-size: 12.5px; font-weight: 700; color: var(--text-gray); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .02em; }
.a11y-group__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.a11y-btn {
  border: 1.5px solid var(--border-color, #ddd);
  background: #fff;
  color: var(--text-dark, #333);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.a11y-btn:hover { border-color: var(--green-primary, #5A9A2E); }
.a11y-btn[aria-pressed="true"] {
  background: var(--green-primary, #5A9A2E);
  border-color: var(--green-primary, #5A9A2E);
  color: #fff;
}
.a11y-btn--fs2 { font-size: 15px; }
.a11y-btn--fs3 { font-size: 17px; }
.a11y-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.a11y-swatch--normal { background: linear-gradient(135deg,#fff 50%, #333 50%); }
.a11y-swatch--bw { background: #fff; border-color: #000; }
.a11y-swatch--wb { background: #000; }
.a11y-swatch--yellow { background: #000; box-shadow: inset 0 0 0 3px #FFE600; }

.a11y-panel__reset {
  align-self: center;
  margin-left: auto;
  background: var(--bg-mint, #f2f5ee);
  border: 1.5px solid var(--border-color, #ddd);
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.a11y-panel__reset:hover { background: #eaeee4; }
.a11y-panel__close {
  position: absolute;
  top: 10px; right: 14px;
  border: none; background: none;
  font-size: 16px; color: var(--text-gray);
  cursor: pointer;
}

@media (max-width: 640px) {
  .a11y-panel__inner { flex-direction: column; gap: 16px; padding-right: 40px; }
  .a11y-panel__reset { margin-left: 0; align-self: flex-start; }
}

/* ============================================================
   Размер шрифта — абсолютные значения (без накопления при вложенности)
   ============================================================ */
html.a11y-fs-2 body, html.a11y-fs-2 p, html.a11y-fs-2 a, html.a11y-fs-2 li,
html.a11y-fs-2 span, html.a11y-fs-2 label, html.a11y-fs-2 button,
html.a11y-fs-2 input, html.a11y-fs-2 td, html.a11y-fs-2 th, html.a11y-fs-2 h4 {
  font-size: 17px !important; line-height: 1.6 !important;
}
html.a11y-fs-2 h3 { font-size: 21px !important; }
html.a11y-fs-2 h2 { font-size: 26px !important; }
html.a11y-fs-2 h1 { font-size: 32px !important; }

html.a11y-fs-3 body, html.a11y-fs-3 p, html.a11y-fs-3 a, html.a11y-fs-3 li,
html.a11y-fs-3 span, html.a11y-fs-3 label, html.a11y-fs-3 button,
html.a11y-fs-3 input, html.a11y-fs-3 td, html.a11y-fs-3 th, html.a11y-fs-3 h4 {
  font-size: 20px !important; line-height: 1.7 !important;
}
html.a11y-fs-3 h3 { font-size: 25px !important; }
html.a11y-fs-3 h2 { font-size: 30px !important; }
html.a11y-fs-3 h1 { font-size: 36px !important; }

/* ============================================================
   Шрифт для чтения: без засечек, увеличенные интервалы
   ============================================================ */
html.a11y-readable body, html.a11y-readable * {
  font-family: Verdana, Arial, sans-serif !important;
  letter-spacing: .02em !important;
  word-spacing: .05em !important;
}
html.a11y-readable p, html.a11y-readable li { line-height: 1.8 !important; }

/* ============================================================
   Цветовые схемы
   ============================================================ */

/* Чёрным по белому: максимальный контраст на белом фоне */
html.a11y-scheme-bw body,
html.a11y-scheme-bw .site-header, html.a11y-scheme-bw .topbar,
html.a11y-scheme-bw .section, html.a11y-scheme-bw .site-footer,
html.a11y-scheme-bw .card, html.a11y-scheme-bw .doctor-card,
html.a11y-scheme-bw .footer-bottom, html.a11y-scheme-bw .cta-box,
html.a11y-scheme-bw .a11y-panel, html.a11y-scheme-bw .carousel {
  background: #fff !important; color: #000 !important; border-color: #000 !important;
}
html.a11y-scheme-bw * { text-shadow: none !important; box-shadow: none !important; }
html.a11y-scheme-bw a { color: #0000EE !important; text-decoration: underline !important; }
html.a11y-scheme-bw a:visited { color: #551A8B !important; }
html.a11y-scheme-bw .btn, html.a11y-scheme-bw button, html.a11y-scheme-bw input, html.a11y-scheme-bw select {
  background: #fff !important; color: #000 !important; border: 2px solid #000 !important;
}
html.a11y-scheme-bw .carousel__slide::after { display: none !important; }
html.a11y-scheme-bw .carousel__content { color: #000 !important; }
html.a11y-scheme-bw .footer-col p, html.a11y-scheme-bw .footer-col a,
html.a11y-scheme-bw .logo__text, html.a11y-scheme-bw .card__text,
html.a11y-scheme-bw .section__lead, html.a11y-scheme-bw .card__date { color: #000 !important; }

/* Белым по чёрному: инверсия */
html.a11y-scheme-wb body,
html.a11y-scheme-wb .site-header, html.a11y-scheme-wb .topbar,
html.a11y-scheme-wb .section, html.a11y-scheme-wb .site-footer,
html.a11y-scheme-wb .card, html.a11y-scheme-wb .doctor-card,
html.a11y-scheme-wb .footer-bottom, html.a11y-scheme-wb .cta-box,
html.a11y-scheme-wb .a11y-panel, html.a11y-scheme-wb .carousel {
  background: #000 !important; color: #fff !important; border-color: #fff !important;
}
html.a11y-scheme-wb * { text-shadow: none !important; box-shadow: none !important; }
html.a11y-scheme-wb a { color: #4EA1FF !important; text-decoration: underline !important; }
html.a11y-scheme-wb a:visited { color: #C58AF9 !important; }
html.a11y-scheme-wb .btn, html.a11y-scheme-wb button, html.a11y-scheme-wb input, html.a11y-scheme-wb select {
  background: #000 !important; color: #fff !important; border: 2px solid #fff !important;
}
html.a11y-scheme-wb .carousel__slide::after { display: none !important; }
html.a11y-scheme-wb .carousel__content { color: #fff !important; }
html.a11y-scheme-wb .footer-col p, html.a11y-scheme-wb .footer-col a,
html.a11y-scheme-wb .logo__text, html.a11y-scheme-wb .card__text,
html.a11y-scheme-wb .section__lead, html.a11y-scheme-wb .card__date { color: #fff !important; }

/* Жёлтым по чёрному: усиленная видимость */
html.a11y-scheme-yellow body,
html.a11y-scheme-yellow .site-header, html.a11y-scheme-yellow .topbar,
html.a11y-scheme-yellow .section, html.a11y-scheme-yellow .site-footer,
html.a11y-scheme-yellow .card, html.a11y-scheme-yellow .doctor-card,
html.a11y-scheme-yellow .footer-bottom, html.a11y-scheme-yellow .cta-box,
html.a11y-scheme-yellow .a11y-panel, html.a11y-scheme-yellow .carousel {
  background: #000 !important; color: #FFE600 !important; border-color: #FFE600 !important;
}
html.a11y-scheme-yellow * { text-shadow: none !important; box-shadow: none !important; }
html.a11y-scheme-yellow a { color: #fff !important; text-decoration: underline !important; }
html.a11y-scheme-yellow .btn, html.a11y-scheme-yellow button, html.a11y-scheme-yellow input, html.a11y-scheme-yellow select {
  background: #000 !important; color: #FFE600 !important; border: 2px solid #FFE600 !important;
}
html.a11y-scheme-yellow .carousel__slide::after { display: none !important; }
html.a11y-scheme-yellow .carousel__content { color: #FFE600 !important; }
html.a11y-scheme-yellow .footer-col p, html.a11y-scheme-yellow .footer-col a,
html.a11y-scheme-yellow .logo__text, html.a11y-scheme-yellow .card__text,
html.a11y-scheme-yellow .section__lead, html.a11y-scheme-yellow .card__date { color: #FFE600 !important; }

/* ============================================================
   Изображения: скрыть декоративные картинки, оставить текст
   ============================================================ */
html.a11y-noimg img { display: none !important; }
html.a11y-noimg .carousel__slide { background-image: none !important; background: #eef2ea !important; }
html.a11y-noimg .doctor-card__photo { background: #eef2ea !important; }
