/* Accessible mode v2: loaded after all public theme styles. */

.a11yEyeBtn,
.a11yMobileBtn,
.a11yPanel,
.a11yPanel *,
.a11yBackdrop {
    box-sizing: border-box;
}

.a11yEyeBtn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    padding: 5px 14px;
    color: #12334c;
    font: 700 13px/1.2 Inter, Arial, sans-serif;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(7, 50, 74, 0.13);
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.a11yEyeBtn:hover,
.a11yEyeBtn.is-active {
    color: #fff;
    background: #0b6f90;
    box-shadow: 0 7px 20px rgba(7, 71, 101, 0.25);
    transform: translateY(-1px);
}

.a11yTriggerIcon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    flex: 0 0 auto;
}

.a11yTriggerIcon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.a11yMobileBtn {
    display: none;
}

.a11yPanel[hidden],
.a11yBackdrop[hidden],
.a11yAdvanced[hidden] {
    display: none !important;
}

.a11yPanel {
    position: relative;
    z-index: 9995;
    width: 100%;
    color: #f7fbff !important;
    font-family: Inter, Arial, sans-serif !important;
    background:
        radial-gradient(circle at 86% -20%, rgba(55, 188, 206, 0.2), transparent 37%),
        linear-gradient(135deg, #092f4d 0%, #0b4567 58%, #0b5876 100%) !important;
    border: 0;
    box-shadow: 0 18px 48px rgba(4, 39, 62, 0.22);
}

.a11yPanelInner {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 20px;
}

.a11yPanelHeader,
.a11yPanelFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.a11yPanelHeader {
    margin-bottom: 20px;
}

.a11yPanelHeading {
    min-width: 0;
}

.a11yEyebrow {
    display: block;
    margin-bottom: 3px;
    color: #84d8df !important;
    font: 800 10px/1.3 Inter, Arial, sans-serif !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase;
}

.a11yPanel h2 {
    margin: 0 !important;
    color: #fff !important;
    font: 800 clamp(22px, 2vw, 30px)/1.12 Inter, Arial, sans-serif !important;
    letter-spacing: -0.025em !important;
}

.a11yPanel h2:focus {
    outline: none;
}

.a11yCloseButton {
    display: inline-grid;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff !important;
    font: 400 30px/1 Inter, Arial, sans-serif !important;
    place-items: center;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px;
    cursor: pointer;
}

.a11yCloseButton:hover {
    background: rgba(255, 255, 255, 0.19) !important;
}

.a11yControlsGrid {
    display: grid;
    grid-template-columns: minmax(270px, 0.72fr) minmax(470px, 1.55fr) minmax(285px, 0.8fr);
    gap: 14px;
}

.a11yControlGroup {
    min-width: 0;
    margin: 0;
    padding: 14px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 16px;
}

.a11yControlGroup legend,
.a11yGroupLabel {
    display: block;
    padding: 0 5px;
    color: #b9d8e5 !important;
    font: 750 12px/1.3 Inter, Arial, sans-serif !important;
    letter-spacing: 0.025em !important;
}

.a11yGroupLabel {
    margin: 0 0 8px;
    padding: 0;
}

.a11ySegmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 7px;
}

.a11ySegmented button,
.a11yThemeButtons button,
.a11yQuickButtons button,
.a11yFooterButton,
.a11yNormalButton {
    min-height: 44px;
    color: #eef9ff !important;
    font-family: Inter, Arial, sans-serif !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 11px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.a11ySegmented button {
    padding: 8px 10px;
    font-size: 15px !important;
}

.a11yFontGroup .a11ySegmented button:nth-child(1) {
    font-size: 14px !important;
}

.a11yFontGroup .a11ySegmented button:nth-child(2) {
    font-size: 17px !important;
}

.a11yFontGroup .a11ySegmented button:nth-child(3) {
    font-size: 20px !important;
}

.a11ySegmented button:hover,
.a11yThemeButtons button:hover,
.a11yQuickButtons button:hover,
.a11yFooterButton:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
}

.a11ySegmented button.is-active,
.a11yThemeButtons button.is-active,
.a11yQuickButtons button.is-active {
    color: #082f4b !important;
    background: #fff !important;
    border-color: #fff !important;
    box-shadow: 0 7px 18px rgba(0, 19, 33, 0.22);
}

.a11yThemeButtons {
    display: grid;
    grid-template-columns: repeat(5, minmax(74px, 1fr));
    gap: 7px;
    margin-top: 7px;
}

.a11yThemeButtons button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 8px;
    font-size: 12px !important;
}

.a11yThemeSwatch {
    display: inline-grid;
    width: 29px;
    height: 29px;
    color: #082f4b !important;
    font: 800 14px/1 Inter, Arial, sans-serif !important;
    place-items: center;
    background: #fff !important;
    border: 1px solid rgba(8, 47, 75, 0.25) !important;
    border-radius: 8px;
    flex: 0 0 auto;
}

.a11yThemeNormal {
    background: linear-gradient(135deg, #fff 0 33%, #15b8a6 33% 66%, #d45300 66%) !important;
}

.a11yThemeWb {
    color: #fff !important;
    background: #000 !important;
    border-color: #fff !important;
}

.a11yThemeBlue {
    color: #082f49 !important;
    background: #b7ddff !important;
}

.a11yThemeBeige {
    color: #3e2f22 !important;
    background: #f7f1df !important;
}

.a11yQuickButtons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.a11yQuickButtons button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px !important;
    text-align: left;
}

.a11yQuickButtons button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.a11yControlIcon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    color: #86e0e5 !important;
    font: 800 17px/1 Inter, Arial, sans-serif !important;
    place-items: center;
    background: rgba(133, 224, 229, 0.12) !important;
    border-radius: 8px;
    flex: 0 0 auto;
}

.a11yQuickButtons button.is-active .a11yControlIcon {
    color: #0b6f90 !important;
    background: #d9f6f5 !important;
}

.a11yAdvanced {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.a11yAdvancedGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr)) minmax(280px, 1fr);
    gap: 12px;
}

.a11ySegmentedText button {
    font-size: 12px !important;
}

.a11ySpeechSettings {
    display: grid;
    gap: 8px;
}

.a11ySpeechSettings label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    align-items: center;
    color: #eaf7fc !important;
    font: 650 12px/1.3 Inter, Arial, sans-serif !important;
}

.a11ySpeechSettings output {
    color: #8de1e5 !important;
    font: 800 12px/1 Inter, Arial, sans-serif !important;
}

.a11ySpeechSettings input[type="range"] {
    width: 100%;
    height: 5px;
    grid-column: 1 / -1;
    accent-color: #5ad0d4;
}

.a11yPanelFooter {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.a11yFooterActions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11yFooterButton,
.a11yNormalButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 12px !important;
}

.a11yNormalButton {
    color: #082f4b !important;
    background: #fff !important;
    border-color: #fff !important;
    box-shadow: 0 7px 18px rgba(0, 19, 33, 0.18);
}

.a11yNormalButton:hover {
    color: #fff !important;
    background: #d45300 !important;
    border-color: #d45300 !important;
}

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

.a11yBackdrop {
    display: none;
}

.a11yPanel :focus-visible,
.a11yEyeBtn:focus-visible,
.a11yMobileBtn:focus-visible {
    outline: 3px solid #ffb259 !important;
    outline-offset: 3px !important;
}

/* Functional display settings. */
html[data-a11y-family="arial"] body :where(h1, h2, h3, h4, h5, h6, p, li, a, button, label, input, textarea, select, td, th, blockquote, figcaption, span):not(.a11yPanel *) {
    font-family: Arial, Helvetica, sans-serif !important;
}

html[data-a11y-family="times"] body :where(h1, h2, h3, h4, h5, h6, p, li, a, button, label, input, textarea, select, td, th, blockquote, figcaption, span):not(.a11yPanel *) {
    font-family: "Times New Roman", Times, serif !important;
}

html[data-a11y-spacing="medium"] body :where(h1, h2, h3, h4, h5, h6, p, li, a, button, label, input, textarea, select, td, th, blockquote, figcaption):not(.a11yPanel *) {
    letter-spacing: 0.07em !important;
}

html[data-a11y-spacing="large"] body :where(h1, h2, h3, h4, h5, h6, p, li, a, button, label, input, textarea, select, td, th, blockquote, figcaption):not(.a11yPanel *) {
    letter-spacing: 0.13em !important;
}

html[data-a11y-line="medium"] body :where(p, li, label, td, th, blockquote, figcaption):not(.a11yPanel *) {
    line-height: 1.75 !important;
}

html[data-a11y-line="large"] body :where(p, li, label, td, th, blockquote, figcaption):not(.a11yPanel *) {
    line-height: 2 !important;
}

html[data-a11y-images="off"] body :where(img, picture, video, canvas):not(.a11yPanel *):not(.navLogoImg):not(.custom-logo) {
    visibility: hidden !important;
}

html[data-a11y-images="off"] body *:not(.a11yPanel):not(.a11yPanel *):not(.a11yEyeBtn):not(.a11yMobileBtn) {
    background-image: none !important;
}

body.a11y-enabled :where(a, button, input, textarea, select):not(.a11yPanel *) {
    min-height: 42px;
}

body.a11y-enabled :where(a, button):not(.a11yPanel *) {
    white-space: normal !important;
}

body.a11y-speech-enabled :where(h1, h2, h3, h4, h5, h6, p, li, td, th, blockquote, figcaption):not(.a11yPanel *) {
    cursor: help;
}

.a11ySpeaking {
    outline: 3px solid #f28a2e !important;
    outline-offset: 4px !important;
    border-radius: 4px;
}

/* High-contrast palettes. The panel itself keeps its own stable palette. */
html[data-a11y-theme="bw"] {
    --a11y-page-bg: #fff;
    --a11y-surface: #fff;
    --a11y-text: #000;
    --a11y-link: #003a8c;
    --a11y-border: #000;
    --a11y-action-bg: #000;
    --a11y-action-text: #fff;
}

html[data-a11y-theme="wb"] {
    --a11y-page-bg: #000;
    --a11y-surface: #000;
    --a11y-text: #fff;
    --a11y-link: #ffe14d;
    --a11y-border: #fff;
    --a11y-action-bg: #fff;
    --a11y-action-text: #000;
}

html[data-a11y-theme="blue"] {
    --a11y-page-bg: #b7ddff;
    --a11y-surface: #cde9ff;
    --a11y-text: #082f49;
    --a11y-link: #002b80;
    --a11y-border: #082f49;
    --a11y-action-bg: #082f49;
    --a11y-action-text: #fff;
}

html[data-a11y-theme="beige"] {
    --a11y-page-bg: #f7f1df;
    --a11y-surface: #fffaf0;
    --a11y-text: #3e2f22;
    --a11y-link: #6b2600;
    --a11y-border: #3e2f22;
    --a11y-action-bg: #3e2f22;
    --a11y-action-text: #fffaf0;
}

html[data-a11y-theme="bw"] body,
html[data-a11y-theme="wb"] body,
html[data-a11y-theme="blue"] body,
html[data-a11y-theme="beige"] body {
    color: var(--a11y-text) !important;
    background: var(--a11y-page-bg) !important;
}

html[data-a11y-theme="bw"] body :where(header, main, footer, nav, section, article, aside, form, table, thead, tbody, tr, ul, ol, div):not(.a11yPanel):not(.a11yPanel *),
html[data-a11y-theme="wb"] body :where(header, main, footer, nav, section, article, aside, form, table, thead, tbody, tr, ul, ol, div):not(.a11yPanel):not(.a11yPanel *),
html[data-a11y-theme="blue"] body :where(header, main, footer, nav, section, article, aside, form, table, thead, tbody, tr, ul, ol, div):not(.a11yPanel):not(.a11yPanel *),
html[data-a11y-theme="beige"] body :where(header, main, footer, nav, section, article, aside, form, table, thead, tbody, tr, ul, ol, div):not(.a11yPanel):not(.a11yPanel *) {
    color: var(--a11y-text) !important;
    background-color: var(--a11y-surface) !important;
    background-image: none !important;
    border-color: var(--a11y-border) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html[data-a11y-theme="bw"] body :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, label, td, th, blockquote, figcaption):not(.a11yPanel *),
html[data-a11y-theme="wb"] body :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, label, td, th, blockquote, figcaption):not(.a11yPanel *),
html[data-a11y-theme="blue"] body :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, label, td, th, blockquote, figcaption):not(.a11yPanel *),
html[data-a11y-theme="beige"] body :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, label, td, th, blockquote, figcaption):not(.a11yPanel *) {
    color: var(--a11y-text) !important;
    text-shadow: none !important;
}

html[data-a11y-theme="bw"] body a:not(.a11yPanel *),
html[data-a11y-theme="wb"] body a:not(.a11yPanel *),
html[data-a11y-theme="blue"] body a:not(.a11yPanel *),
html[data-a11y-theme="beige"] body a:not(.a11yPanel *) {
    color: var(--a11y-link) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

html[data-a11y-theme="bw"] body :where(button, input, textarea, select):not(.a11yPanel *),
html[data-a11y-theme="wb"] body :where(button, input, textarea, select):not(.a11yPanel *),
html[data-a11y-theme="blue"] body :where(button, input, textarea, select):not(.a11yPanel *),
html[data-a11y-theme="beige"] body :where(button, input, textarea, select):not(.a11yPanel *) {
    color: var(--a11y-action-text) !important;
    background: var(--a11y-action-bg) !important;
    border: 2px solid var(--a11y-border) !important;
    box-shadow: none !important;
}

html[data-a11y-theme="wb"] body :where(img, video):not(.a11yPanel *) {
    filter: grayscale(1) contrast(1.16);
}

@media (max-width: 1180px) {
    .a11yControlsGrid {
        grid-template-columns: minmax(250px, 0.8fr) minmax(430px, 1.45fr);
    }

    .a11yQuickGroup {
        grid-column: 1 / -1;
    }

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

    .a11yAdvancedGrid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .a11yMobileBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 48px;
        min-height: 44px;
        margin-left: auto;
        padding: 7px 9px;
        color: #12516e;
        font: 850 12px/1 Inter, Arial, sans-serif;
        background: #edf8fb;
        border: 1px solid #d2e9ef;
        border-radius: 12px;
        cursor: pointer;
    }

    .a11yMobileBtn + .hamburger {
        margin-left: 8px;
    }

    .a11yMobileBtn .a11yTriggerIcon,
    .a11yMobileBtn .a11yTriggerIcon svg {
        width: 18px;
        height: 18px;
    }

    .a11yMobileBtn.is-active {
        color: #fff;
        background: #0b6f90;
        border-color: #0b6f90;
    }

    .a11yPanel {
        position: fixed;
        z-index: 10001;
        inset: 10px;
        width: auto;
        max-height: calc(100dvh - 20px);
        overflow: auto;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 22px;
        box-shadow: 0 24px 70px rgba(0, 22, 38, 0.42);
        overscroll-behavior: contain;
    }

    .a11yBackdrop:not([hidden]) {
        position: fixed;
        z-index: 10000;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(3, 22, 36, 0.66);
        border: 0;
        backdrop-filter: blur(5px);
        cursor: default;
    }

    .a11yPanelInner {
        width: 100%;
        padding: 22px;
    }
}

@media (max-width: 760px) {
    .a11yPanel {
        inset: 6px;
        max-height: calc(100dvh - 12px);
        border-radius: 18px;
    }

    .a11yPanelInner {
        padding: 18px 14px;
    }

    .a11yPanelHeader {
        margin-bottom: 16px;
    }

    .a11yControlsGrid,
    .a11yAdvancedGrid {
        grid-template-columns: 1fr;
    }

    .a11yQuickGroup {
        grid-column: auto;
    }

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

    .a11yThemeButtons button:first-child {
        grid-column: 1 / -1;
    }

    .a11yQuickButtons {
        grid-template-columns: 1fr;
    }

    .a11yPanelFooter {
        align-items: stretch;
        flex-direction: column;
    }

    .a11yFooterActions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .a11yFooterButton,
    .a11yNormalButton {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .a11yMobileBtn {
        min-width: 44px;
    }

    .a11yTriggerCompact {
        display: none;
    }

    .a11ySegmentedText {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .a11yEyeBtn,
    .a11yMobileBtn,
    .a11yPanel button {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media print {
    .a11yPanel,
    .a11yBackdrop,
    .a11yEyeBtn,
    .a11yMobileBtn {
        display: none !important;
    }
}
