/* =========================================================
   РЦОИ · Доступность · Стили панели ОВЗ
   ========================================================= */

/* ============ RUNTIME VARIABLES ============ */
:root{
  --a11y-font-size:100%;
  --a11y-line-height:inherit;
  --a11y-letter-spacing:inherit;
  --a11y-word-spacing:inherit;
  --a11y-font-family:'Inter',system-ui,sans-serif;
}
body{
  font-size:var(--a11y-font-size);
  font-family:var(--a11y-font-family);
  line-height:var(--a11y-line-height);
  letter-spacing:var(--a11y-letter-spacing);
  word-spacing:var(--a11y-word-spacing);
}
h1,h2,h3,h4,h5,.hero h1,.hero h2,.sec-head h2,.cell-head h3,
.tl-title,.faq-q,.aTitle,.dr-title,.nr-body h4,.quote-name,
.f-name,.brand-text .l2,.stat-mini .sm-num,.cloud-hero h2,
.cloud-action h4,.leg-title,.hp-info .t,.fn-title,.nl-title,
.a11y-title,.a11y-preset-name,.a11y-section-title{
  font-family:var(--a11y-font-family);
}
body[data-font="dyslexia"]{--a11y-font-family:'Lexend',system-ui,sans-serif}
body[data-font="serif"]{--a11y-font-family:Georgia,'Times New Roman',serif}
body[data-font="sans"]{--a11y-font-family:'Inter',system-ui,sans-serif}
body[data-font="mono"]{--a11y-font-family:'JetBrains Mono',monospace}
body[data-spacing="wide"]{--a11y-letter-spacing:.05em;--a11y-word-spacing:.15em}
body[data-spacing="wider"]{--a11y-letter-spacing:.1em;--a11y-word-spacing:.25em}
body[data-lh="1.5"]{--a11y-line-height:1.5}
body[data-lh="1.8"]{--a11y-line-height:1.8}
body[data-lh="2"]{--a11y-line-height:2}
body[data-lh="2.4"]{--a11y-line-height:2.4}

/* ============ READING MASK ============ */
.a11y-reading-mask{position:fixed;inset:0;pointer-events:none;z-index:500;display:none}
body.a11y-reading .a11y-reading-mask{display:block}
.a11y-reading-mask::before{content:'';position:absolute;left:0;right:0;top:0;height:calc(var(--a11y-mask-y,50vh) - 60px);background:rgba(0,0,0,.55);transition:height .1s linear}
.a11y-reading-mask::after{content:'';position:absolute;left:0;right:0;bottom:0;top:calc(var(--a11y-mask-y,50vh) + 60px);background:rgba(0,0,0,.55);transition:top .1s linear}

/* ============ CONTENT MODES ============ */
body.a11y-grayscale{filter:grayscale(1)}
body.a11y-no-images .brand-logo,
body.a11y-no-images .hero-preview::before,
body.a11y-no-images .aurora .blob,
body.a11y-no-images .featured-news .f-pattern,
body.a11y-no-images .hero-preview::before,
body.a11y-no-images .f-pattern{opacity:0 !important;visibility:hidden}
body.a11y-no-images .brand-logo{background:var(--ink-9) !important}
body.a11y-no-images .brand-logo::before{display:none}
body.a11y-highlight-links a:not(.btn):not(.nav-link):not(.link-arrow){
  background:#fff59d !important;color:#000 !important;
  padding:2px 4px;border-radius:4px;text-decoration:underline;
}
body.a11y-highlight-links a:hover{background:#ffe082 !important}
body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after{animation:none !important;transition:none !important}
body.a11y-reduce-motion .blob{animation:none !important}
body.a11y-reduce-motion .ticker-track,
body.a11y-reduce-motion .marquee-track{animation:none !important}

/* Large cursor */
body.a11y-large-cursor *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 12h-8l-2 8z' fill='%23000' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 2,auto !important
}
body.a11y-large-cursor a,
body.a11y-large-cursor button,
body.a11y-large-cursor .cell{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M9 5v14l4-4h6z' fill='%232563eb' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 9 5,pointer !important
}

/* ============ TRIGGER FAB ============ */
.a11y-trigger{
  position:fixed;bottom:24px;right:24px;z-index:600;
  width:62px;height:62px;border-radius:50%;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  color:#fff;display:grid;place-items:center;
  box-shadow:0 20px 44px -12px rgba(37,99,235,.55),0 4px 14px -4px rgba(37,99,235,.35),inset 0 1px 0 rgba(255,255,255,.25);
  transition:.4s cubic-bezier(.34,1.56,.64,1);
  cursor:pointer;
  border:2px solid rgba(255,255,255,.2);
}
.a11y-trigger:hover{transform:scale(1.08) translateY(-3px);box-shadow:0 28px 56px -12px rgba(37,99,235,.7),0 6px 18px -4px rgba(37,99,235,.4)}
.a11y-trigger svg{width:26px;height:26px;stroke-width:2;transition:.3s cubic-bezier(.22,1,.36,1)}
.a11y-trigger::before{
  content:'';position:absolute;inset:-6px;border-radius:50%;
  border:2px solid rgba(37,99,235,.4);
  animation:fabRing 2.5s infinite;
}
.a11y-trigger::after{
  content:'';position:absolute;top:-2px;right:-2px;
  width:14px;height:14px;border-radius:50%;
  background:#10b981;border:2px solid var(--bg);
  box-shadow:0 0 0 0 rgba(16,185,129,.6);
  animation:tp 2s infinite;
}
.a11y-trigger .a11y-badge{
  position:absolute;top:2px;left:2px;
  background:#fff;color:#2563eb;
  font-size:9px;font-weight:800;letter-spacing:.3px;
  padding:3px 6px;border-radius:8px;
  box-shadow:0 2px 6px rgba(0,0,0,.15);
}

/* ============ OVERLAY ============ */
.a11y-overlay{
  position:fixed;inset:0;background:rgba(8,14,31,.55);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  z-index:1000;opacity:0;visibility:hidden;
  transition:.3s cubic-bezier(.22,1,.36,1);
}
.a11y-overlay.open{opacity:1;visibility:visible}

/* ============ DRAWER ============ */
.a11y-drawer{
  position:fixed;top:0;right:0;bottom:0;
  width:100%;max-width:480px;
  background:var(--surface);
  border-left:1px solid var(--border);
  box-shadow:-40px 0 100px -20px rgba(8,14,31,.35);
  z-index:1001;
  transform:translateX(105%);
  transition:transform .5s cubic-bezier(.22,1,.36,1);
  display:flex;flex-direction:column;
  overflow:hidden;
}
.a11y-drawer.open{transform:translateX(0)}
@media(max-width:560px){.a11y-drawer{max-width:none}}

/* ============ DRAWER HEAD ============ */
.a11y-head{
  padding:22px 24px 18px;
  background:linear-gradient(135deg,#0b1530 0%,#1a2540 55%,#25304b 100%);
  color:#fff;
  position:relative;overflow:hidden;flex-shrink:0;
}
.a11y-head::before{
  content:'';position:absolute;inset:0;
  background:
    radial-gradient(circle at 85% 20%,rgba(34,211,238,.35),transparent 45%),
    radial-gradient(circle at 10% 90%,rgba(139,92,246,.3),transparent 45%),
    radial-gradient(circle at 50% 50%,rgba(37,99,235,.2),transparent 60%);
  pointer-events:none;
}
.a11y-head::after{
  content:'';position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size:40px 40px;
  mask-image:radial-gradient(ellipse at 30% 30%,black,transparent 80%);
  -webkit-mask-image:radial-gradient(ellipse at 30% 30%,black,transparent 80%);
  pointer-events:none;
}
.a11y-head-top{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  position:relative;z-index:1;margin-bottom:14px;
}
.a11y-title-block{display:flex;align-items:center;gap:12px}
.a11y-title-icon{
  width:44px;height:44px;border-radius:13px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter:blur(10px);
  display:grid;place-items:center;
  color:#fff;flex-shrink:0;
}
.a11y-title-icon svg{width:22px;height:22px;stroke-width:2}
.a11y-title{font-size:19px;font-weight:700;letter-spacing:-.02em;line-height:1.15;color:#fff;font-family:'Space Grotesk',sans-serif}
.a11y-subtitle{font-size:12px;color:rgba(255,255,255,.65);margin-top:3px;font-weight:500}
.a11y-close{
  width:36px;height:36px;border-radius:10px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;display:grid;place-items:center;
  transition:.25s cubic-bezier(.22,1,.36,1);flex-shrink:0;
}
.a11y-close:hover{background:rgba(255,255,255,.22);transform:rotate(90deg)}
.a11y-close svg{width:16px;height:16px;stroke-width:2.2}
.a11y-head-actions{
  display:flex;gap:8px;position:relative;z-index:1;flex-wrap:wrap;
}
.a11y-head-btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 13px;border-radius:10px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
  color:#fff;font-size:12px;font-weight:600;
  transition:.25s cubic-bezier(.22,1,.36,1);cursor:pointer;
}
.a11y-head-btn:hover{background:rgba(255,255,255,.2);transform:translateY(-1px)}
.a11y-head-btn svg{width:13px;height:13px;stroke-width:2.2}
.a11y-head-btn.primary{background:rgba(34,211,238,.2);border-color:rgba(34,211,238,.35);color:#a5f3fc}
.a11y-head-btn.primary:hover{background:rgba(34,211,238,.3)}

/* ============ DRAWER BODY ============ */
.a11y-body{
  flex:1;overflow-y:auto;padding:20px;
  scrollbar-width:thin;
}
.a11y-body::-webkit-scrollbar{width:6px}
.a11y-body::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:99px}

/* ============ SECTIONS ============ */
.a11y-section{margin-bottom:26px}
.a11y-section-head{
  display:flex;align-items:center;gap:10px;margin-bottom:12px;
}
.a11y-section-head .a11y-num{
  width:22px;height:22px;border-radius:7px;
  background:var(--grad-brand);color:#fff;
  display:grid;place-items:center;
  font-size:11px;font-weight:800;font-family:'Space Grotesk',sans-serif;
  flex-shrink:0;
  box-shadow:0 4px 10px -2px rgba(37,99,235,.4);
}
.a11y-section-title{
  font-size:12.5px;font-weight:700;
  text-transform:uppercase;letter-spacing:1.3px;
  color:var(--text-3);
}
.a11y-section-hint{
  font-size:11.5px;color:var(--text-3);
  margin:-4px 0 12px;line-height:1.5;
}

/* ============ THEMES ============ */
.a11y-themes{
  display:grid;grid-template-columns:repeat(5,1fr);gap:8px;
}
.a11y-theme{
  aspect-ratio:1;border-radius:14px;
  border:2px solid var(--border);background:var(--surface);
  position:relative;overflow:hidden;cursor:pointer;
  transition:.25s cubic-bezier(.22,1,.36,1);
  padding:8px;
  display:flex;flex-direction:column;justify-content:space-between;
}
.a11y-theme:hover{transform:translateY(-2px);box-shadow:var(--sh-sm);border-color:var(--border-2)}
.a11y-theme.active{
  border-color:var(--acc-1);
  box-shadow:0 0 0 3px rgba(37,99,235,.15),var(--sh-sm);
}
.a11y-theme.active::after{
  content:'';position:absolute;top:6px;right:6px;
  width:16px;height:16px;border-radius:50%;
  background:var(--acc-1);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size:10px;background-position:center;background-repeat:no-repeat;
}
.a11y-theme-preview{
  height:22px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;gap:3px;padding:3px;
}
.a11y-theme-preview .dot{
  width:6px;height:6px;border-radius:50%;
}
.a11y-theme-label{
  font-size:9.5px;font-weight:700;
  letter-spacing:.3px;text-align:center;
  color:var(--text-2);text-transform:uppercase;
  line-height:1.1;
}
.a11y-theme[data-theme-pick="light"] .a11y-theme-preview{background:#fbfcfe;border:1px solid #e8ecf4}
.a11y-theme[data-theme-pick="light"] .dot{background:#2563eb}
.a11y-theme[data-theme-pick="dark"] .a11y-theme-preview{background:#0d1425;border:1px solid rgba(255,255,255,.08)}
.a11y-theme[data-theme-pick="dark"] .dot{background:#67e8f9}
.a11y-theme[data-theme-pick="hc"] .a11y-theme-preview{background:#000;border:1px solid #fff}
.a11y-theme[data-theme-pick="hc"] .dot{background:#ffff00}
.a11y-theme[data-theme-pick="dchc"] .a11y-theme-preview{background:#000;border:1px solid #ccc}
.a11y-theme[data-theme-pick="dchc"] .dot{background:#66ccff}
.a11y-theme[data-theme-pick="sepia"] .a11y-theme-preview{background:#fbf3e3;border:1px solid #e0d0a8}
.a11y-theme[data-theme-pick="sepia"] .dot{background:#8b6f1f}

/* ============ PRESETS ============ */
.a11y-presets{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
}
.a11y-preset{
  padding:14px;border-radius:14px;
  background:var(--surface-2);
  border:1.5px solid var(--border);
  cursor:pointer;transition:.3s cubic-bezier(.22,1,.36,1);
  display:flex;flex-direction:column;gap:8px;
  text-align:left;
  position:relative;overflow:hidden;
}
.a11y-preset:hover{
  border-color:var(--border-2);
  transform:translateY(-2px);
  box-shadow:var(--sh-sm);
}
.a11y-preset.active{
  border-color:var(--acc-1);
  background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(6,182,212,.04));
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
.a11y-preset.active .a11y-preset-ico{background:var(--grad-brand);color:#fff;box-shadow:0 6px 18px -4px rgba(37,99,235,.5)}
.a11y-preset-ico{
  width:34px;height:34px;border-radius:10px;
  background:var(--ink-2);
  display:grid;place-items:center;
  color:var(--acc-1);flex-shrink:0;
  transition:.3s cubic-bezier(.22,1,.36,1);
}
.a11y-preset-ico svg{width:17px;height:17px;stroke-width:2}
.a11y-preset-name{
  font-size:13px;font-weight:700;letter-spacing:-.01em;
  color:var(--text);line-height:1.2;
}
.a11y-preset-desc{
  font-size:11px;color:var(--text-3);line-height:1.4;
}

/* ============ SETTING ROWS ============ */
.a11y-row{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:12px 14px;
  background:var(--surface-2);border:1px solid var(--border);
  border-radius:12px;margin-bottom:8px;
  transition:.2s cubic-bezier(.22,1,.36,1);
}
.a11y-row:hover{border-color:var(--border-2)}
.a11y-row-info{display:flex;align-items:center;gap:11px;min-width:0;flex:1}
.a11y-row-ico{
  width:32px;height:32px;border-radius:9px;
  background:var(--ink-2);color:var(--text-2);
  display:grid;place-items:center;flex-shrink:0;
}
.a11y-row-ico svg{width:15px;height:15px;stroke-width:2}
.a11y-row-label{font-size:13.5px;font-weight:600;color:var(--text);letter-spacing:-.005em}
.a11y-row-hint{font-size:11px;color:var(--text-3);margin-top:1px}

/* ============ TOGGLE ============ */
.a11y-toggle{
  position:relative;width:42px;height:24px;
  background:var(--border-2);border-radius:99px;
  cursor:pointer;transition:.3s cubic-bezier(.22,1,.36,1);flex-shrink:0;
}
.a11y-toggle::after{
  content:'';position:absolute;top:3px;left:3px;
  width:18px;height:18px;border-radius:50%;
  background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2);
  transition:.3s cubic-bezier(.34,1.56,.64,1);
}
.a11y-toggle.on{background:var(--grad-brand)}
.a11y-toggle.on::after{transform:translateX(18px)}

/* ============ SEGMENTED ============ */
.a11y-seg{
  display:flex;gap:2px;background:var(--ink-2);
  border:1px solid var(--border);border-radius:10px;padding:3px;
  flex-shrink:0;
}
.a11y-seg button{
  padding:5px 11px;border-radius:7px;
  font-size:11.5px;font-weight:700;
  color:var(--text-3);transition:.2s cubic-bezier(.22,1,.36,1);
  white-space:nowrap;cursor:pointer;
}
.a11y-seg button:hover:not(.active){color:var(--text-2)}
.a11y-seg button.active{
  background:var(--surface);color:var(--text);
  box-shadow:var(--sh-xs);
}
[data-theme="dark"] .a11y-seg button.active{background:var(--ink-5);color:#fff}

/* ============ SLIDER ============ */
.a11y-slider-row{
  padding:14px;
  background:var(--surface-2);border:1px solid var(--border);
  border-radius:12px;margin-bottom:8px;
}
.a11y-slider-top{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:12px;
}
.a11y-slider-label{
  font-size:13.5px;font-weight:600;color:var(--text);
  display:flex;align-items:center;gap:8px;
}
.a11y-slider-label .a11y-row-ico{
  width:26px;height:26px;border-radius:8px;
}
.a11y-slider-label .a11y-row-ico svg{width:13px;height:13px}
.a11y-slider-value{
  font-family:'JetBrains Mono',monospace;
  font-size:12px;font-weight:700;
  color:var(--acc-1);
  background:rgba(37,99,235,.1);
  padding:3px 9px;border-radius:7px;
}
.a11y-slider{
  -webkit-appearance:none;appearance:none;
  width:100%;height:6px;
  background:var(--border-2);border-radius:99px;
  outline:none;cursor:pointer;
}
.a11y-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:22px;height:22px;border-radius:50%;
  background:var(--grad-brand);
  border:2px solid #fff;
  box-shadow:0 4px 12px rgba(37,99,235,.4);
  cursor:grab;
  transition:.15s;
}
.a11y-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}
.a11y-slider::-moz-range-thumb{
  width:22px;height:22px;border-radius:50%;
  background:var(--grad-brand);border:2px solid #fff;
  box-shadow:0 4px 12px rgba(37,99,235,.4);
  cursor:grab;
}
.a11y-slider-marks{
  display:flex;justify-content:space-between;
  margin-top:8px;font-size:10px;
  color:var(--text-3);font-weight:600;
  font-family:'JetBrains Mono',monospace;
}

/* ============ PREVIEW ============ */
.a11y-preview{
  background:var(--surface-2);border:1px solid var(--border);
  border-radius:12px;padding:14px;margin-bottom:8px;
  position:relative;
}
.a11y-preview-tag{
  position:absolute;top:8px;right:10px;
  font-size:9px;font-weight:800;
  color:var(--acc-1);letter-spacing:.8px;
  text-transform:uppercase;
  background:rgba(37,99,235,.1);
  padding:2px 6px;border-radius:5px;
}
.a11y-preview-text{
  font-size:15px;line-height:1.5;
  color:var(--text);letter-spacing:0;
}
.a11y-preview-text strong{color:var(--acc-1)}

/* ============ RESET ============ */
.a11y-reset{
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;padding:13px 18px;
  background:var(--surface-2);border:1.5px solid var(--border);
  border-radius:14px;font-size:13.5px;font-weight:600;
  color:var(--text-2);transition:.25s cubic-bezier(.22,1,.36,1);
  margin-top:10px;cursor:pointer;
}
.a11y-reset:hover{border-color:#ef4444;color:#ef4444;background:rgba(239,68,68,.06)}
.a11y-reset svg{width:15px;height:15px;stroke-width:2.2}

/* ============ ACTIVE CHIPS ============ */
.a11y-active{
  display:flex;flex-wrap:wrap;gap:6px;
  padding:12px;
  background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(6,182,212,.04));
  border:1px dashed rgba(37,99,235,.25);
  border-radius:12px;
  margin-bottom:20px;
}
.a11y-active:empty{display:none}
.a11y-active .chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;border-radius:8px;
  background:var(--surface);
  border:1px solid var(--border);
  font-size:11.5px;font-weight:600;color:var(--text-2);
}
.a11y-active .chip svg{width:11px;height:11px;color:var(--acc-1)}
.a11y-active-label{
  font-size:11px;font-weight:700;color:var(--text-3);
  text-transform:uppercase;letter-spacing:1px;
  margin-bottom:6px;
}

/* ============ RESPONSIVE ============ */
@media(max-width:480px){
  .a11y-themes{grid-template-columns:repeat(5,1fr);gap:6px}
  .a11y-presets{grid-template-columns:1fr}
  .a11y-head{padding:18px 18px 14px}
  .a11y-title{font-size:17px}
  .a11y-body{padding:16px}
}