/* =========================================================
   Версия для слабовидящих (inc/a11y.php, js/a11y.js)
   Классы на <html>: a11y, a11y-fs1..3, a11y-c1..4, a11y-img1..3, a11y-ls1..3, a11y-lh1..3, a11y-serif
   ========================================================= */

/* Кнопка включения */
.a11y-btn{
  display:inline-flex;align-items:center;gap:8px;padding:0;border:0;background:none;cursor:pointer;
  font:inherit;color:inherit;
}
.a11y-btn svg{flex:none}
.a11y-btn--icon{
  width:40px;height:40px;justify-content:center;border-radius:50%;color:var(--navy);
}
.a11y-btn--icon:hover{background:var(--bg);color:var(--blue)}
.a11y-btn--nav{margin:0 0 var(--s2);font-size:14px;font-weight:700;color:var(--navy)}
.a11y-btn--nav svg{color:var(--blue)}
.a11y-btn--footer{font-size:inherit;text-decoration:underline;text-underline-offset:3px}
.a11y-btn--footer:hover{color:var(--blue)}
@media (max-width:760px){.a11y-btn--icon{display:none}}

/* Панель настроек: видна только в режиме */
.a11y-bar{display:none}
html.a11y .a11y-bar{display:block;position:relative;z-index:61;border-bottom:2px solid var(--a-fg)}
html.a11y .a11y-bar__inner{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 22px;
  max-width:var(--container);margin:0 auto;padding:12px 16px;
}
html.a11y .a11y-bar__group{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
html.a11y .a11y-bar *{font-size:16px!important;line-height:1.3!important;letter-spacing:0!important}
html.a11y .a11y-bar__label{font-weight:700}
html.a11y .a11y-bar__opt,html.a11y .a11y-bar__off{
  min-width:40px;min-height:40px;padding:6px 12px;cursor:pointer;
  border:2px solid var(--a-fg)!important;border-radius:6px;font-family:inherit;font-weight:700;
}
html.a11y .a11y-bar__opt[aria-pressed="true"]{outline:3px solid var(--a-fg);outline-offset:2px}
html.a11y .a11y-bar__opt[data-a11y-set="fs"][data-v="2"]{font-size:19px!important}
html.a11y .a11y-bar__opt[data-a11y-set="fs"][data-v="3"]{font-size:22px!important}
html.a11y .a11y-bar__opt--c1{color:#000!important;background:#fff!important;border-color:#000!important}
html.a11y .a11y-bar__opt--c2{color:#fff!important;background:#000!important;border-color:#fff!important;box-shadow:0 0 0 1px #000!important}
html.a11y .a11y-bar__opt--c3{color:#063462!important;background:#9DD1FF!important;border-color:#063462!important}
html.a11y .a11y-bar__opt--c4{color:#4D4B43!important;background:#F7F3D6!important;border-color:#4D4B43!important}
html.a11y .a11y-bar__off{margin-left:auto}

/* Цветовые схемы */
html.a11y-c1{--a-fg:#000;--a-bg:#fff}
html.a11y-c2{--a-fg:#fff;--a-bg:#000}
html.a11y-c3{--a-fg:#063462;--a-bg:#9DD1FF}
html.a11y-c4{--a-fg:#4D4B43;--a-bg:#F7F3D6}

html.a11y,html.a11y body,
html.a11y body *:not(svg):not(svg *):not(img):not([class*="a11y-bar__opt--c"]){
  color:var(--a-fg)!important;background-color:var(--a-bg)!important;background-image:none!important;
  border-color:var(--a-fg)!important;box-shadow:none!important;text-shadow:none!important;
}
html.a11y body svg{color:var(--a-fg)!important}
html.a11y body svg [fill]:not([fill="none"]){fill:currentColor!important}
html.a11y body svg [stroke]:not([stroke="none"]){stroke:currentColor!important}
html.a11y body a{text-decoration:underline!important;text-underline-offset:3px}
html.a11y body :focus-visible{outline:3px solid var(--a-fg)!important;outline-offset:3px}
/* кнопки и карточки — рамкой, раз фона больше нет */
html.a11y body .btn,html.a11y body input[type=submit],
html.a11y body .card,html.a11y body .scard,html.a11y body .doccard{border:2px solid var(--a-fg)!important}
/* без анимаций и «прыжков» при наведении */
html.a11y *,html.a11y *::before,html.a11y *::after{transition:none!important;animation:none!important}
html.a11y body *:hover{transform:none!important}
/* декоративные подложки, затемнения и градиенты */
html.a11y .hero__media::after,html.a11y .nav-overlay{display:none!important}

/* Размер шрифта */
html.a11y-fs1{--a-fs:19px}
html.a11y-fs2{--a-fs:23px}
html.a11y-fs3{--a-fs:28px}
html.a11y body *:not(svg):not(svg *){font-size:var(--a-fs)!important;overflow-wrap:break-word}
html.a11y.a11y body h1,html.a11y.a11y body h1 *{font-size:calc(var(--a-fs) * 1.6)!important}
html.a11y.a11y body h2,html.a11y.a11y body h2 *{font-size:calc(var(--a-fs) * 1.35)!important}
html.a11y.a11y body h3,html.a11y.a11y body h3 *,html.a11y.a11y body h4{font-size:calc(var(--a-fs) * 1.15)!important}
html.a11y.a11y body :is(h1,h2,h3,h4){line-height:1.25!important}

/* Интервалы */
html.a11y-ls1 body *{letter-spacing:0!important}
html.a11y-ls2 body *{letter-spacing:.06em!important}
html.a11y-ls3 body *{letter-spacing:.12em!important}
html.a11y-lh1 body *:not(h1):not(h2):not(h3):not(h4){line-height:1.5!important}
html.a11y-lh2 body *:not(h1):not(h2):not(h3):not(h4){line-height:1.85!important}
html.a11y-lh3 body *:not(h1):not(h2):not(h3):not(h4){line-height:2.2!important}

/* Шрифт */
html.a11y-serif body *:not(svg):not(svg *){font-family:Georgia,'Times New Roman',serif!important}

/* Изображения */
html.a11y-img2 img,html.a11y-img2 video,html.a11y-img2 iframe{filter:grayscale(1)!important}
html.a11y-img3 img,html.a11y-img3 picture,html.a11y-img3 video,html.a11y-img3 .hero__media{display:none!important}

/* Раскладка при крупном тексте: меньше колонок, без обрезки */
html.a11y body [class*="__title"],html.a11y body [class*="__name"],html.a11y .nav a,html.a11y .header__phone{white-space:normal!important}
html.a11y.a11y-fs2 body :is(.cards,.scards,.doccards,.services,.doctors,.checkups,.cats,.news__list),
html.a11y.a11y-fs3 body :is(.cards,.scards,.doccards,.services,.doctors,.checkups,.cats,.news__list){grid-template-columns:repeat(auto-fill,minmax(300px,1fr))!important}
html.a11y.a11y-fs3 body :is(.cards,.scards,.doccards,.services,.doctors,.checkups,.cats,.news__list){grid-template-columns:minmax(0,1fr)!important}
/* «Записаться», чат и cookie-плашка не должны закрывать крупный текст */
html.a11y .fab{display:none!important}

/* Шапка при крупном тексте: не липнет, меню переносится на вторую строку */
html.a11y .header{position:relative!important;backdrop-filter:none!important}
@media (min-width:1201px){
  html.a11y .header__inner{flex-wrap:wrap;row-gap:10px;padding:10px 0}
  html.a11y .header .nav{order:10;flex:1 1 100%}
  html.a11y .nav__links{flex-wrap:wrap;gap:6px 26px!important}
}
html.a11y .header__inner{flex-wrap:wrap;row-gap:8px}
html.a11y .hcall__panel{width:min(420px,calc(100vw - 32px))}
@media (max-width:760px){
  html.a11y.a11y body .header__phone{font-size:0!important}
  html.a11y .a11y-bar__inner{gap:8px 14px;padding:10px 12px}
  html.a11y .a11y-bar__off{margin-left:0}
}
/* нижняя панель на телефоне — компактно, иначе не помещается */
html.a11y.a11y body .mobar,html.a11y.a11y body .mobar *{font-size:14px!important;letter-spacing:0!important;line-height:1.2!important}
@media (max-width:760px){
  html.a11y body :is(.cards,.scards,.doccards,.services,.doctors,.checkups,.cats,.news__list,.reviews__track){
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-flow:row!important;overflow:visible!important;transform:none!important
  }
}
html.a11y body{overflow-x:clip}
html.a11y.a11y body .mobar__item{flex:none!important;min-width:auto!important;white-space:nowrap!important}
/* крупный текст не должен растягивать страницу: переносы везде, блоки не шире родителя */
html.a11y body *:not(svg):not(svg *){white-space:normal!important;max-width:100%}
html.a11y body :is(input,select,textarea){min-width:0}
html.a11y .cookie{left:8px!important;right:8px!important;width:auto!important}
html.a11y body :is([class*="__head"],[class*="__contact"],[class*="__actions"],[class*="__meta"],[class*="__row"],[class*="__foot"]){flex-wrap:wrap!important}
html.a11y body *:not(svg):not(svg *):not(img){min-width:0}
/* логотип оставляем и при выключенных изображениях */
html.a11y-img3 .logo img,html.a11y-img3 .footer__logo{display:block!important}
html.a11y body table{width:100%!important;table-layout:fixed}
html.a11y body :is(td,th){overflow-wrap:break-word}
@media (max-width:760px){
  html.a11y body :is(table,thead,tbody,tr,td,th){display:block!important;width:auto!important;text-align:left!important}
  html.a11y body thead{display:none!important}
  html.a11y body tr{padding:8px 0;border-bottom:1px solid var(--a-fg)}
  html.a11y body td{padding:2px 0!important;border:0!important}
}
