/* ═══════════════════════════════════════════════════════════════════════════
   Режим слабовидящих — применяется при html.a11y-custom (см. wwwroot/js/rejim.js)
   Переменные: --a11y-bg, --a11y-text, --a11y-link, --a11y-font
   ═══════════════════════════════════════════════════════════════════════════ */

html.a11y-custom {
    /* Усиленный контраст фокуса */
    scroll-behavior: auto;
}

html.a11y-custom *:focus-visible {
    outline: 3px solid var(--a11y-link, #1d4ed8) !important;
    outline-offset: 2px !important;
}

html.a11y-custom body {
    font-family: var(--a11y-font, inherit) !important;
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
    line-height: 1.65 !important;
}

html.a11y-custom .top-navbar,
html.a11y-custom #header-container header .navbar,
html.a11y-custom #header-container .navbar.navbar-expand-lg {
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom #header-container .navbar .nav-link,
html.a11y-custom #header-container header .navbar .nav-link,
html.a11y-custom .navbar .navbar-brand {
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom #header-container .navbar .nav-link.active,
html.a11y-custom #header-container .navbar .nav-link:hover {
    color: var(--a11y-link, #0a5c28) !important;
    opacity: 1 !important;
}

html.a11y-custom .navbar-toggler-icon {
    filter: none !important;
}

html.a11y-custom main.page-shell,
html.a11y-custom main[role="main"] {
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom .au-section,
html.a11y-custom .au-hero,
html.a11y-custom .au-media-block,
html.a11y-custom .au-rector-blog,
html.a11y-custom .au-home-spotlight-host,
html.a11y-custom .au-rector-hero-card,
html.a11y-custom .au-rector-dialog__shell {
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom .au-btn--secondary,
html.a11y-custom .au-btn--ghost {
    border-color: currentColor !important;
    color: var(--a11y-text, #111) !important;
    background: transparent !important;
}

html.a11y-custom .au-btn--primary {
    background: var(--a11y-link, #05612a) !important;
    color: #fff !important;
    border-color: transparent !important;
}

html.a11y-custom .rb-page,
html.a11y-custom .rb-page-hero,
html.a11y-custom .rb-hero,
html.a11y-custom .rb-card,
html.a11y-custom .rb-card__body,
html.a11y-custom .rb-faq-item,
html.a11y-custom .rb-aside {
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
    border-color: rgba(100, 100, 100, 0.35) !important;
}

html.a11y-custom .rb-card__title,
html.a11y-custom .rb-faq-item__q,
html.a11y-custom .rb-faq-item__a,
html.a11y-custom .rb-nav-top__link {
    color: inherit !important;
}

html.a11y-custom .au-nav-lang {
    background: rgba(120, 120, 120, 0.12) !important;
    border-color: rgba(100, 100, 100, 0.35) !important;
}

html.a11y-custom .au-nav-lang__btn {
    color: var(--a11y-text, #111) !important;
    text-decoration: none !important;
}

html.a11y-custom .au-nav-lang__btn.active {
    background: var(--a11y-link, #05612a) !important;
    color: #fff !important;
}

html.a11y-custom a {
    color: var(--a11y-link, #05612a) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

html.a11y-custom #a11y-overlay a,
html.a11y-custom .navbar-brand,
html.a11y-custom .navbar-brand img {
    color: inherit !important;
    text-decoration: none !important;
}

html.a11y-custom footer.premium-footer,
html.a11y-custom .footer-content,
html.a11y-custom .footer-top {
    background-color: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom .m-bottom-nav {
    background: var(--a11y-bg, #fff) !important;
    color: var(--a11y-text, #111) !important;
    border-top: 1px solid rgba(100, 100, 100, 0.35) !important;
}

html.a11y-custom .au-chatbot-window {
    background: var(--a11y-bg, #fafafa) !important;
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom .au-chatbot-messages {
    background: rgba(240, 240, 240, 0.95) !important;
}

html.a11y-custom .au-chatbot-message__text {
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom .content-text,
html.a11y-custom .au-richtext,
html.a11y-custom .rb-article__body {
    color: var(--a11y-text, #111) !important;
}

html.a11y-custom table,
html.a11y-custom .au-richtext th,
html.a11y-custom .au-richtext td {
    border-color: rgba(100, 100, 100, 0.45) !important;
    color: inherit !important;
}

html.a11y-custom a.btn,
html.a11y-custom .btn-topnav-ai,
html.a11y-custom .btn-topnav-platonus,
html.a11y-custom #vakusadun_modul {
    text-decoration: none !important;
}

/* Модальное окно настроек остаётся светлым для предсказуемости UI */
html.a11y-custom #a11y-overlay .a11y-modal {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #cbd5e1 !important;
}

html.a11y-custom #a11y-overlay .a11y-modal a,
html.a11y-custom #a11y-overlay .a11y-modal button {
    text-decoration: none !important;
}
