/* ===========================================================
   Версия для слабовидящих
   (специальная версия сайта — по образцу ГОСТ Р 52872-2019)
=========================================================== */

.a11y-toggle{
  position:fixed; top:14px; right:14px; z-index:1000;
  width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--charcoal); border:1px solid var(--line-strong);
  color:var(--white); cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,0.18);
}
.a11y-toggle svg{ width:22px; height:22px; }
.a11y-toggle:hover{ border-color:var(--wood-light); }

.a11y-panel{
  position:fixed; top:66px; right:14px; z-index:1000;
  width:min(320px, calc(100vw - 28px));
  background:var(--charcoal); border:1px solid var(--line-strong);
  border-radius:4px; padding:20px;
  box-shadow:0 14px 40px rgba(0,0,0,0.22);
  display:none;
}
.a11y-panel.open{ display:block; }
.a11y-panel h4{
  font-family:var(--ff-mono); font-size:11px; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--gray-dim); margin:0 0 10px;
}
.a11y-group{ margin-bottom:16px; }
.a11y-row{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.a11y-btn{
  font-family:var(--ff-mono); font-size:12px; padding:8px 12px;
  border:1px solid var(--line-strong); border-radius:2px;
  background:transparent; color:var(--white); cursor:pointer;
}
.a11y-btn.active{ background:var(--wood); border-color:var(--wood); color:#171310; font-weight:600; }
.a11y-reset{ width:100%; text-align:center; }

/* ---------- цветовая схема: чёрным по белому ---------- */
html.a11y-scheme-bw body{ background:#ffffff !important; color:#000000 !important; }
html.a11y-scheme-bw body *{
  background-color:transparent !important;
  background-image:none !important;
  color:#000000 !important;
  border-color:#000000 !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
html.a11y-scheme-bw a{ color:#0000EE !important; text-decoration:underline !important; }
html.a11y-scheme-bw .btn, html.a11y-scheme-bw .btn-solid{ background:#000 !important; color:#fff !important; border:2px solid #000 !important; }
html.a11y-scheme-bw img{ filter:grayscale(1) contrast(1.15); }
html.a11y-scheme-bw .a11y-toggle, html.a11y-scheme-bw .a11y-panel{ background:#fff !important; }
html.a11y-scheme-bw .a11y-btn.active{ background:#000 !important; color:#fff !important; }

/* ---------- цветовая схема: белым по чёрному ---------- */
html.a11y-scheme-wb body{ background:#000000 !important; color:#ffffff !important; }
html.a11y-scheme-wb body *{
  background-color:transparent !important;
  background-image:none !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
html.a11y-scheme-wb a{ color:#ffe27a !important; text-decoration:underline !important; }
html.a11y-scheme-wb .btn, html.a11y-scheme-wb .btn-solid{ background:#fff !important; color:#000 !important; border:2px solid #fff !important; }
html.a11y-scheme-wb img{ filter:invert(1) grayscale(1); }
html.a11y-scheme-wb .a11y-toggle, html.a11y-scheme-wb .a11y-panel{ background:#000 !important; }
html.a11y-scheme-wb .a11y-btn.active{ background:#fff !important; color:#000 !important; }

/* ---------- размер шрифта (влияет на текст, размеченный через --a11y-scale в style.css) ---------- */
:root{ --a11y-scale:1; }
html.a11y-fs-2{ --a11y-scale:1.18; }
html.a11y-fs-3{ --a11y-scale:1.36; }

/* ---------- отключение изображений ---------- */
html.a11y-no-images img{ visibility:hidden !important; }
html.a11y-no-images .photo{ background:var(--charcoal-2, #eee) !important; }
html.a11y-no-images .crate-3d,
html.a11y-no-images .crate-glow{ display:none !important; }

/* на мобильных гамбургер-меню тоже сидит в правом верхнем углу —
   переносим кнопку версии для слабовидящих вниз, чтобы не перекрывались */
@media (max-width:860px){
  .a11y-toggle{
    top:auto; bottom:18px; right:14px;
    width:44px; height:44px;
  }
  .a11y-panel{
    top:auto; bottom:70px; right:14px;
  }
}
@media (max-width:480px){
  .a11y-toggle{ bottom:14px; right:10px; width:40px; height:40px; }
  .a11y-panel{ bottom:64px; right:10px; }
}
