:root {
    --a11y-bg: #ffffff;
    --a11y-text: #000000;
    --a11y-link: #0039cc;
    --a11y-border: #000000;
    --a11y-focus: #ffbf00;
}

.skip-link {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 10000;
    transform: translateY(-160%);
    padding: 12px 16px;
    border: 3px solid #fff;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.a11y-toolbar {
    position: fixed;
    top: 50%;
    right: 14px;
    z-index: 20000;
    width: auto;
    font-family: Arial, Verdana, sans-serif;
    color: #000;
    transform: translateY(-50%);
}

.a11y-toolbar,
.a11y-toolbar * {
    box-sizing: border-box;
}

.a11y-toggle,
.a11y-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 56px;
    min-height: 52px;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font: 800 15px/1.2 Arial, Verdana, sans-serif;
    cursor: pointer;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}

.a11y-toggle span:not([aria-hidden="true"]) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.a11y-reset {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #0039cc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.a11y-toolbar.is-active-mode:not(.is-open) {
    width: auto;
}

.a11y-toolbar.is-active-mode:not(.is-open) .a11y-reset {
    display: inline-flex;
}

.a11y-toolbar.is-open {
    top: 0;
    right: 0;
    transform: none;
}

.a11y-panel {
    display: none;
    position: fixed;
    top: 50%;
    right: 84px;
    z-index: 20001;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100svh - 40px);
    overflow: auto;
    padding: 18px;
    border: 3px solid var(--a11y-border);
    border-radius: 8px;
    background: var(--a11y-bg);
    color: var(--a11y-text);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
    transform: translateY(-50%);
}

.a11y-toolbar.is-open .a11y-panel {
    display: block;
}

.a11y-toolbar.is-open .a11y-toggle {
    display: none;
}

.a11y-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--a11y-border);
}

.a11y-panel h2 {
    margin: 0;
    color: var(--a11y-text);
    font-size: 26px;
    line-height: 1.15;
}

.a11y-panel p {
    margin: 6px 0 0;
    color: var(--a11y-text);
    font-size: 15px;
}

.a11y-close {
    width: 44px;
    height: 44px;
    border: 2px solid var(--a11y-border);
    border-radius: 8px;
    background: var(--a11y-bg);
    color: var(--a11y-link);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.a11y-controls {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.a11y-group strong {
    display: block;
    margin-bottom: 8px;
    color: var(--a11y-text);
    font-size: 15px;
}

.a11y-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a11y-option {
    min-height: 42px;
    padding: 9px 12px;
    border: 2px solid var(--a11y-border);
    border-radius: 8px;
    background: var(--a11y-bg);
    color: var(--a11y-link);
    font: 800 15px/1.2 Arial, Verdana, sans-serif;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.a11y-option.is-active {
    background: var(--a11y-link);
    color: var(--a11y-bg);
}

.a11y-toolbar button:focus-visible,
.a11y-toolbar a:focus-visible {
    outline: 4px solid var(--a11y-focus);
    outline-offset: 3px;
}

html.a11y-theme-white {
    --a11y-bg: #ffffff;
    --a11y-text: #000000;
    --a11y-link: #0039cc;
    --a11y-border: #000000;
    --a11y-focus: #ffbf00;
}

html.a11y-theme-black {
    --a11y-bg: #000000;
    --a11y-text: #ffffff;
    --a11y-link: #ffff00;
    --a11y-border: #ffffff;
    --a11y-focus: #ffff00;
}

html.a11y-theme-blue {
    --a11y-bg: #dff0ff;
    --a11y-text: #063462;
    --a11y-link: #001f8f;
    --a11y-border: #063462;
    --a11y-focus: #001f8f;
}

html.a11y-theme-beige {
    --a11y-bg: #f7f3d2;
    --a11y-text: #3b2712;
    --a11y-link: #5c2400;
    --a11y-border: #3b2712;
    --a11y-focus: #5c2400;
}

html.a11y-on {
    scroll-behavior: auto !important;
    background: var(--a11y-bg) !important;
}

html.a11y-size-normal {
    font-size: 18px;
}

html.a11y-size-large {
    font-size: 21px;
}

html.a11y-size-xlarge {
    font-size: 24px;
}

html.a11y-on body {
    min-width: 320px;
    background: var(--a11y-bg) !important;
    color: var(--a11y-text) !important;
    font-family: Arial, Verdana, sans-serif !important;
    line-height: 1.65 !important;
}

html.a11y-on.a11y-font-serif body {
    font-family: Georgia, "Times New Roman", serif !important;
}

html.a11y-on.a11y-spacing-wide body {
    letter-spacing: 0.05em;
}

html.a11y-on.a11y-spacing-wide p,
html.a11y-on.a11y-spacing-wide li,
html.a11y-on.a11y-spacing-wide a,
html.a11y-on.a11y-spacing-wide button,
html.a11y-on.a11y-spacing-wide input,
html.a11y-on.a11y-spacing-wide textarea,
html.a11y-on.a11y-spacing-wide select,
html.a11y-on.a11y-spacing-wide summary {
    line-height: 1.9 !important;
}

html.a11y-on *,
html.a11y-on *::before,
html.a11y-on *::after {
    animation: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
}

html.a11y-on *::before,
html.a11y-on *::after {
    background-image: none !important;
}

html.a11y-on body,
html.a11y-on header,
html.a11y-on nav,
html.a11y-on main,
html.a11y-on section,
html.a11y-on article,
html.a11y-on aside,
html.a11y-on footer,
html.a11y-on div,
html.a11y-on form,
html.a11y-on label,
html.a11y-on details,
html.a11y-on summary,
html.a11y-on table,
html.a11y-on thead,
html.a11y-on tbody,
html.a11y-on tr,
html.a11y-on td,
html.a11y-on th {
    background-color: var(--a11y-bg) !important;
    background-image: none !important;
    color: var(--a11y-text) !important;
}

html.a11y-on h1,
html.a11y-on h2,
html.a11y-on h3,
html.a11y-on h4,
html.a11y-on h5,
html.a11y-on h6,
html.a11y-on p,
html.a11y-on li,
html.a11y-on span,
html.a11y-on strong,
html.a11y-on small,
html.a11y-on b,
html.a11y-on em,
html.a11y-on label {
    color: var(--a11y-text) !important;
}

html.a11y-on h1 {
    font-size: clamp(2.4rem, 7vw, 4.6rem) !important;
    line-height: 1.1 !important;
}

html.a11y-on h2 {
    font-size: clamp(2rem, 5vw, 3.4rem) !important;
    line-height: 1.16 !important;
}

html.a11y-on h3 {
    font-size: clamp(1.35rem, 3.6vw, 2.25rem) !important;
    line-height: 1.22 !important;
}

html.a11y-on a,
html.a11y-on button,
html.a11y-on summary {
    color: var(--a11y-link) !important;
    text-decoration: underline !important;
    text-underline-offset: 0.18em;
}

html.a11y-on a:focus-visible,
html.a11y-on button:focus-visible,
html.a11y-on input:focus-visible,
html.a11y-on textarea:focus-visible,
html.a11y-on select:focus-visible,
html.a11y-on summary:focus-visible {
    outline: 4px solid var(--a11y-focus) !important;
    outline-offset: 4px !important;
}

html.a11y-on button,
html.a11y-on input,
html.a11y-on textarea,
html.a11y-on select,
html.a11y-on .btn,
html.a11y-on .card,
html.a11y-on .symptom-card,
html.a11y-on .route,
html.a11y-on .doctor-card,
html.a11y-on .price-card,
html.a11y-on .modal,
html.a11y-on .quiz-panel,
html.a11y-on .quiz-result,
html.a11y-on .method-card,
html.a11y-on .service-card,
html.a11y-on .info-card,
html.a11y-on .problem-card,
html.a11y-on .diagnostic-card {
    border: 2px solid var(--a11y-border) !important;
    background: var(--a11y-bg) !important;
    color: var(--a11y-text) !important;
}

html.a11y-on input,
html.a11y-on textarea,
html.a11y-on select {
    min-height: 48px;
    padding: 10px 12px;
}

html.a11y-on .site-header {
    position: static !important;
    min-height: auto !important;
    border-bottom: 3px solid var(--a11y-border) !important;
}

html.a11y-on .hero {
    min-height: auto !important;
    padding-top: 48px !important;
}

html.a11y-on .reveal {
    opacity: 1 !important;
    transform: none !important;
}

html.a11y-on.a11y-images-hide img,
html.a11y-on.a11y-images-hide picture,
html.a11y-on.a11y-images-hide svg {
    display: none !important;
}

html.a11y-on.a11y-images-hide .brand::after {
    content: "ЯЖИЗНЬ";
    color: var(--a11y-text);
    font-size: 1.2rem;
    font-weight: 800;
}

html.a11y-on .modal-overlay {
    background: rgba(0, 0, 0, 0.65) !important;
}

html.a11y-on .a11y-toolbar,
html.a11y-on .a11y-toolbar *,
html.a11y-on .a11y-panel,
html.a11y-on .a11y-panel * {
    background-color: var(--a11y-bg) !important;
    color: var(--a11y-text) !important;
}

html.a11y-on .a11y-option,
html.a11y-on .a11y-close,
html.a11y-on .a11y-toggle,
html.a11y-on .a11y-reset {
    color: var(--a11y-link) !important;
}

html.a11y-on .a11y-option.is-active {
    background: var(--a11y-link) !important;
    color: var(--a11y-bg) !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 720px) {
    .a11y-toolbar {
        top: auto;
        right: 10px;
        bottom: 10px;
        transform: none;
    }

    .a11y-panel {
        inset: 10px;
        width: auto;
        max-height: calc(100svh - 20px);
        transform: none;
    }
}
