/* ==========================================================================
   Accessibility mode — version for visually impaired users
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.a11y-panel {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #1a1a1a;
    color: #fff;
    border-bottom: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

html.a11y .a11y-panel {
    display: block;
}

.a11y-panel[hidden] {
    display: none !important;
}

.a11y-panel__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding-block: 10px;
    min-height: 52px;
}

.a11y-panel__group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.a11y-panel__group--exit {
    margin-inline-start: auto;
}

.a11y-panel__label {
    font-family: var(--font-body, sans-serif);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    margin-inline-end: 4px;
}

.a11y-panel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 6px 12px;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    font-family: var(--font-body, sans-serif);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.a11y-panel__btn:hover,
.a11y-panel__btn:focus-visible {
    background: #fff;
    color: #000;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.a11y-panel__btn[aria-pressed='true'] {
    background: #fff;
    color: #000;
}

.a11y-panel__btn--font-lg {
    font-size: 18px;
}

.a11y-panel__btn--font-xl {
    font-size: 20px;
}

.a11y-panel__swatch {
    padding: 0;
    width: 40px;
    height: 40px;
}

.a11y-panel__swatch-letter {
    font-weight: 700;
    font-size: 16px;
}

.a11y-panel__swatch--normal {
    background: #fff;
    color: #1a1a1a;
    border-color: #fff;
}

.a11y-panel__swatch--bw {
    background: #000;
    color: #fff;
    border-color: #fff;
}

.a11y-panel__swatch--blue {
    background: #9cf;
    color: #000066;
    border-color: #9cf;
}

.a11y-panel__btn--images {
    padding-inline: 14px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.a11y-panel__btn--exit {
    padding-inline: 16px;
    background: #fff;
    color: #000;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.a11y-panel__btn--exit:hover,
.a11y-panel__btn--exit:focus-visible {
    background: #e8e8e8;
    color: #000;
}

/* ---- Active a11y skin ---- */

html.a11y {
    --a11y-font-scale: 1;
}

html.a11y.a11y-font-normal {
    --a11y-font-scale: 1;
}

html.a11y.a11y-font-large {
    --a11y-font-scale: 1.25;
}

html.a11y.a11y-font-xlarge {
    --a11y-font-scale: 1.5;
}

html.a11y body {
    font-size: calc(18px * var(--a11y-font-scale));
    line-height: 1.5;
}

html.a11y .btn {
    font-size: calc(18px * var(--a11y-font-scale));
    min-height: calc(40px * min(var(--a11y-font-scale), 1.35));
    padding-inline: calc(24px * min(var(--a11y-font-scale), 1.25));
}

html.a11y a:focus-visible,
html.a11y button:focus-visible,
html.a11y input:focus-visible,
html.a11y select:focus-visible,
html.a11y textarea:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* Normal a11y theme keeps brand tokens; reinforce contrast */
html.a11y.a11y-theme-normal {
    --color-primary: #2a4a4b;
    --color-text: #1f3839;
    --color-border: #2a4a4b;
}

/* Black / white */
html.a11y.a11y-theme-bw {
    --color-primary: #000000;
    --color-accent: #000000;
    --color-white: #ffffff;
    --color-border: #000000;
    --color-text: #000000;
}

html.a11y.a11y-theme-bw body,
html.a11y.a11y-theme-bw .site-wrapper {
    background: #fff !important;
    color: #000 !important;
}

html.a11y.a11y-theme-bw .site-header,
html.a11y.a11y-theme-bw .site-footer__panel,
html.a11y.a11y-theme-bw .mobile-menu__panel,
html.a11y.a11y-theme-bw .btn--filled {
    background: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
}

html.a11y.a11y-theme-bw .btn--filled {
    background: #000 !important;
    color: #fff !important;
}

html.a11y.a11y-theme-bw .btn--outline,
html.a11y.a11y-theme-bw .site-footer__link,
html.a11y.a11y-theme-bw .site-footer__phone,
html.a11y.a11y-theme-bw .site-footer__messenger {
    border-color: #000 !important;
    color: #000 !important;
    background: #fff !important;
}

html.a11y.a11y-theme-bw .site-footer__panel::before {
    background: #000 !important;
}

/* Blue scheme (classic RU a11y) */
html.a11y.a11y-theme-blue {
    --color-primary: #000066;
    --color-accent: #000066;
    --color-white: #9cf;
    --color-border: #000066;
    --color-text: #000066;
}

html.a11y.a11y-theme-blue body,
html.a11y.a11y-theme-blue .site-wrapper {
    background: #9cf !important;
    color: #000066 !important;
}

html.a11y.a11y-theme-blue .site-header,
html.a11y.a11y-theme-blue .site-footer__panel,
html.a11y.a11y-theme-blue .mobile-menu__panel {
    background: #9cf !important;
    color: #000066 !important;
    border-color: #000066 !important;
}

html.a11y.a11y-theme-blue .btn--filled {
    background: #000066 !important;
    color: #9cf !important;
    border-color: #000066 !important;
}

html.a11y.a11y-theme-blue .btn--outline,
html.a11y.a11y-theme-blue .site-footer__link,
html.a11y.a11y-theme-blue .site-footer__phone,
html.a11y.a11y-theme-blue .site-footer__messenger {
    border-color: #000066 !important;
    color: #000066 !important;
    background: #9cf !important;
}

html.a11y.a11y-theme-blue .site-footer__panel::before {
    background: #000066 !important;
}

html.a11y.a11y-theme-bw a,
html.a11y.a11y-theme-blue a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Images off */
html.a11y.a11y-images-off img,
html.a11y.a11y-images-off picture,
html.a11y.a11y-images-off video,
html.a11y.a11y-images-off .hero__visual,
html.a11y.a11y-images-off .hero__media,
html.a11y.a11y-images-off [class*='__photo'],
html.a11y.a11y-images-off [class*='__image'],
html.a11y.a11y-images-off [class*='__img'],
html.a11y.a11y-images-off [style*='background-image'] {
    visibility: hidden !important;
}

html.a11y.a11y-images-off .a11y-panel img,
html.a11y.a11y-images-off .a11y-panel svg,
html.a11y.a11y-images-off .site-footer__phone-icon,
html.a11y.a11y-images-off .site-footer__messenger-icon,
html.a11y.a11y-images-off .scroll-top__icon,
html.a11y.a11y-images-off .contacts-fab__icon,
html.a11y.a11y-images-off .contacts-fab__link-icon {
    visibility: visible !important;
}

@media (max-width: 767px) {
    .a11y-panel__inner {
        gap: 10px 12px;
        padding-block: 12px;
    }

    .a11y-panel__group--exit {
        margin-inline-start: 0;
        width: 100%;
    }

    .a11y-panel__btn--exit {
        width: 100%;
    }

    .a11y-panel__label {
        font-size: 12px;
    }
}
