:root {
    --a11y-scale: 1;
}

.eco-accessibility {
    --a11y-navy: #151b4e;
    --a11y-soft: #f1f3f7;
    --a11y-border: #dfe4eb;
    --a11y-text: #15172b;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.eco-a11y-toggle {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 49998;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #080b24;
    padding: 10px 18px 10px 10px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 14px 35px rgba(16, 24, 40, .22);
    cursor: pointer;
}

.eco-a11y-toggle-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 6px solid #fff;
    border-radius: 50%;
    background: var(--a11y-navy);
    color: #fff;
    font-size: 28px;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .88);
}

.eco-a11y-toggle-text {
    display: none;
}

body.a11y-panel-open .eco-a11y-toggle {
    left: 178px;
    bottom: 22px;
}

body.a11y-panel-open .eco-a11y-toggle-text {
    display: inline;
}

.eco-a11y-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50000;
    width: min(605px, calc(100vw - 16px));
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--a11y-soft);
    color: var(--a11y-text);
    box-shadow: 18px 0 38px rgba(15, 23, 42, .28);
    transform: translateX(-105%);
    transition: transform .28s ease;
}

body.a11y-panel-open .eco-a11y-panel {
    transform: translateX(0);
}

.eco-a11y-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    background: var(--a11y-navy);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.eco-a11y-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.eco-a11y-icon-btn,
.eco-a11y-font-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--a11y-navy);
    font-size: 20px;
    cursor: pointer;
}

.eco-a11y-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 18px 92px;
}

.eco-a11y-body h3 {
    margin: 20px 0 14px;
    color: #343841;
    font-size: 18px;
    font-weight: 700;
}

.eco-a11y-body h3:first-child {
    margin-top: 0;
}

.eco-a11y-font-box {
    background: #fff;
    padding: 24px 24px;
    margin-bottom: 22px;
}

.eco-a11y-font-title {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #111;
    font-size: 18px;
}

.eco-a11y-font-title span {
    font-size: 26px;
    font-weight: 900;
}

.eco-a11y-font-controls {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
}

.eco-a11y-font-controls strong {
    text-align: center;
    font-size: 22px;
}

.eco-a11y-font-controls button {
    background: #f0f2f6;
    color: #111;
}

.eco-a11y-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.eco-a11y-grid button {
    min-height: 132px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    color: #111;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.12;
    cursor: pointer;
}

.eco-a11y-grid button i {
    font-size: 31px;
}

.eco-a11y-grid button.is-active,
.eco-a11y-grid button:focus-visible,
.eco-a11y-icon-btn:focus-visible,
.eco-a11y-font-controls button:focus-visible,
.eco-a11y-toggle:focus-visible {
    border-color: var(--a11y-navy);
    outline: 3px solid rgba(21, 27, 78, .18);
}

html {
    font-size: calc(16px * var(--a11y-scale));
}

body.a11y-dyslexia,
body.a11y-dyslexia *:not(i) {
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
}

body.a11y-letter-spacing *:not(.eco-accessibility):not(.eco-accessibility *) {
    letter-spacing: .08em !important;
}

body.a11y-line-height *:not(.eco-accessibility):not(.eco-accessibility *) {
    line-height: 1.85 !important;
}

body.a11y-bold *:not(.eco-accessibility):not(.eco-accessibility *) {
    font-weight: 800 !important;
}

body.a11y-headings-marked h1,
body.a11y-headings-marked h2,
body.a11y-headings-marked h3,
body.a11y-headings-marked h4,
body.a11y-headings-marked h5,
body.a11y-headings-marked h6 {
    outline: 3px solid #f6c343 !important;
    outline-offset: 4px;
    background: rgba(246, 195, 67, .16) !important;
}

body.a11y-links-marked a:not(.eco-a11y-toggle) {
    outline: 3px solid #1c75bc !important;
    outline-offset: 3px;
    background: rgba(28, 117, 188, .12) !important;
    text-decoration: underline !important;
}

body.a11y-contrast-dark {
    background: #050505 !important;
    color: #fff !important;
}

body.a11y-contrast-high *:not(.eco-accessibility):not(.eco-accessibility *) {
    background-color: #000 !important;
    color: #ffe600 !important;
    border-color: #ffe600 !important;
}

body.a11y-contrast-dark *:not(.eco-accessibility):not(.eco-accessibility *) {
    background-color: #050505 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.a11y-contrast-dark img,
body.a11y-contrast-dark video {
    filter: contrast(1.18) brightness(.9);
}

body.a11y-contrast-light *:not(.eco-accessibility):not(.eco-accessibility *) {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
}

body.a11y-grayscale > *:not(.eco-accessibility) {
    filter: grayscale(1);
}

body.a11y-high-saturation > *:not(.eco-accessibility) {
    filter: saturate(1.85) contrast(1.08);
}

body.a11y-low-saturation > *:not(.eco-accessibility) {
    filter: saturate(.45);
}

body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
}

body.a11y-big-cursor,
body.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 42 42'%3E%3Cpath d='M6 3l26 24-13 2-6 11z' fill='%23000' stroke='%23fff' stroke-width='3'/%3E%3C/svg%3E") 4 2, auto !important;
}

.eco-a11y-reading-guide-line {
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 49999;
    width: 100vw;
    height: 42px;
    pointer-events: none;
    display: none;
    border-top: 3px solid rgba(21, 27, 78, .85);
    border-bottom: 3px solid rgba(21, 27, 78, .85);
    background: rgba(255, 230, 0, .18);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .16);
}

body.a11y-reading-guide .eco-a11y-reading-guide-line {
    display: block;
}

@media (max-width: 640px) {
    .eco-a11y-panel {
        width: 100vw;
    }

    .eco-a11y-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eco-a11y-grid button {
        min-height: 130px;
        font-size: 16px;
    }

    body.a11y-panel-open .eco-a11y-toggle {
        left: 18px;
    }

    body.a11y-panel-open .eco-a11y-toggle-text {
        display: none;
    }
}
