/* ============================================================================
   Accessibility v1.0 — Plugin CSS
   Scoped with cm-a11y-* classes and #accessibility-menu to avoid collisions.
   ============================================================================ */

/* Plugin/system font hook */
body.cm-a11y-system-font #accessibility-menu,
body.cm-a11y-system-font #accessibility-menu *,
body.cm-a11y-system-font #cm-a11y-reading-guide,
body.cm-a11y-system-font #cm-a11y-reading-guide-toast,
body.cm-a11y-system-font #cm-a11y-reading-guide-toast * {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

#accessibility-menu,
#accessibility-menu *,
#accessibility-menu *::before,
#accessibility-menu *::after,
#cm-a11y-reading-guide-toast,
#cm-a11y-reading-guide-toast *,
#cm-a11y-reading-guide-toast *::before,
#cm-a11y-reading-guide-toast *::after {
    box-sizing: border-box !important;
}

#accessibility-menu,
#cm-a11y-reading-guide-toast {
    color-scheme: dark;
    font-size: 14px !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-transform: none !important;
}

#accessibility-menu :where(h2, h3, p, fieldset, legend, button, a, span, div, section, header, footer),
#cm-a11y-reading-guide-toast :where(h2, h3, p, fieldset, legend, button, a, span, div, section, header, footer) {
    margin: 0;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-transform: none !important;
}

#accessibility-menu button,
#accessibility-menu a,
#accessibility-menu input,
#accessibility-menu label,
#cm-a11y-reading-guide-toast button,
#cm-a11y-reading-guide-toast a,
#cm-a11y-reading-guide-toast input,
#cm-a11y-reading-guide-toast label {
    font: inherit !important;
}

body.cm-a11y-body-overflow-locked {
    overflow: hidden !important;
}

/* Prevent global theme hover scale/shadow effects leaking into plugin UI */
#accessibility-menu :where(button, a, .btn):hover,
#accessibility-menu :where(button, a, .btn):focus-visible,
#cm-a11y-reading-guide-toast :where(button, a, .btn):hover,
#cm-a11y-reading-guide-toast :where(button, a, .btn):focus-visible {
    transform: none !important;
    -webkit-filter: none !important;
    filter: none !important;
}

#accessibility-menu :where(button, a, .btn),
#cm-a11y-reading-guide-toast :where(button, a, .btn) {
    transition-property: border-color, color, background, opacity !important;
}

/* --------------------------------------------------------------------------
   Site-wide accessibility modifiers. These intentionally avoid the modal.
   -------------------------------------------------------------------------- */
body.cm-a11y-text-lg > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary),
body.cm-a11y-text-lg > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary) {
    font-size: 1.15em !important;
}

body.cm-a11y-text-xl > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary),
body.cm-a11y-text-xl > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary) {
    font-size: 1.3em !important;
}

body.cm-a11y-text-xxl > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary),
body.cm-a11y-text-xxl > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, td, th, figcaption, summary) {
    font-size: 1.45em !important;
}

body.cm-a11y-line-relaxed > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, blockquote, figcaption, summary, label, input, textarea, select),
body.cm-a11y-line-relaxed > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, blockquote, figcaption, summary, label, input, textarea, select) {
    line-height: 1.75 !important;
}

body.cm-a11y-line-spacious > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, blockquote, figcaption, summary, label, input, textarea, select),
body.cm-a11y-line-spacious > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, blockquote, figcaption, summary, label, input, textarea, select) {
    line-height: 2 !important;
}

body.cm-a11y-letter-wide > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary),
body.cm-a11y-letter-wide > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary) {
    letter-spacing: 0.04em !important;
}

body.cm-a11y-letter-wider > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary),
body.cm-a11y-letter-wider > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary) {
    letter-spacing: 0.08em !important;
}

body.cm-a11y-word-wide > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary),
body.cm-a11y-word-wide > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary) {
    word-spacing: 0.12em !important;
}

body.cm-a11y-word-wider > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary),
body.cm-a11y-word-wider > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(p, li, a, button, label, input, textarea, select, blockquote, figcaption, summary) {
    word-spacing: 0.22em !important;
}

body.cm-a11y-underline-links > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) a {
    text-decoration: underline !important;
    text-decoration-thickness: 0.08em !important;
    text-underline-offset: 0.16em !important;
}

body.cm-a11y-dyslexia-font > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast),
body.cm-a11y-dyslexia-font > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) * {
    font-family: OpenDyslexic, Arial, sans-serif !important;
}

body.cm-a11y-hide-images > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast),
body.cm-a11y-hide-images > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) * {
    background-image: none !important;
}

body.cm-a11y-hide-images:not(.cm-a11y-show-alt-text) > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast):where(img),
body.cm-a11y-hide-images:not(.cm-a11y-show-alt-text) > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) img {
    display: none !important;
}

.cm-a11y-image-alt-wrap {
    position: relative !important;
    display: inline-block !important;
    max-width: 100% !important;
    vertical-align: middle !important;
}

.cm-a11y-image-alt-wrap--block {
    display: block !important;
}

body.cm-a11y-show-alt-text .cm-a11y-image-alt-wrap img {
    opacity: 0.2 !important;
}

body.cm-a11y-hide-images.cm-a11y-show-alt-text .cm-a11y-image-alt-wrap img {
    opacity: 0 !important;
}

.cm-a11y-alt-text {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 1 !important;
    max-width: calc(100% - 16px) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background: #000 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    overflow-wrap: break-word !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) !important;
}

body.cm-a11y-pause-animations > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) *,
body.cm-a11y-pause-animations > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) *::before,
body.cm-a11y-pause-animations > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
}

body.cm-a11y-highlight-focus > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 3px !important;
}

body.cm-a11y-highlight-focus > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(a, button, input, textarea, select, img, p, h1, h2, h3, h4, h5, h6, label, summary):hover,
body.cm-a11y-highlight-focus > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) .cm-a11y-hover-highlight {
    outline: 3px solid #FF1493 !important;
    outline-offset: 3px !important;
    border-radius: 2px !important;
    box-shadow: 0 0 10px #FF1493, 0 0 20px #FF1493 !important;
}

@media (hover: hover) and (pointer: fine) {
    body.cm-a11y-highlight-focus-cursor > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast),
    body.cm-a11y-highlight-focus-cursor > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) * {
        cursor: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><circle cx="32" cy="32" r="16" fill="%23FF1493"/></svg>') 32 32, auto !important;
    }
}

@keyframes cmA11yFocusGlow {
    0%   { box-shadow: 0 0 5px #FF1493; }
    50%  { box-shadow: 0 0 35px #FF1493; }
    100% { box-shadow: 0 0 5px #FF1493; }
}

body.cm-a11y-highlight-focus > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) *:focus-visible {
    animation: cmA11yFocusGlow 1.5s infinite ease-in-out;
}

body.cm-a11y-contrast-grayscale > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) {
    filter: grayscale(100%) !important;
}

body.cm-a11y-contrast-invert > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) {
    filter: invert(1) hue-rotate(180deg) !important;
}

body.cm-a11y-cb-protanopia > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) {
    filter: contrast(1.08) sepia(0.55) saturate(0.78) hue-rotate(-20deg) !important;
}

body.cm-a11y-cb-deuteranopia > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) {
    filter: contrast(1.08) sepia(0.45) saturate(0.72) hue-rotate(-15deg) !important;
}

body.cm-a11y-cb-tritanopia > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) {
    filter: contrast(1.08) sepia(0.6) saturate(0.86) hue-rotate(48deg) !important;
}

body.cm-a11y-contrast-high > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast),
body.cm-a11y-contrast-high > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(header, main, footer, nav, aside, article, section, div) {
    background-color: #000 !important;
    color: #fff !important;
}

body.cm-a11y-contrast-high > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) a {
    color: #ffeb3b !important;
}

body.cm-a11y-contrast-high > :not(#accessibility-menu):not(#cm-a11y-reading-guide):not(#cm-a11y-reading-guide-toast) :where(button, input, textarea, select) {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

.cm-a11y-reading-guide {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99998;
    width: 100vw;
    height: 46px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-9999px);
    background: transparent;
    border-top: 2px solid rgba(255, 255, 255, 0.96);
    border-bottom: 2px solid rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.32);
    transition: opacity 160ms ease, height 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cm-a11y-reading-guide::before,
.cm-a11y-reading-guide::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.56);
    transition: opacity 160ms ease;
}

.cm-a11y-reading-guide::before {
    bottom: 100%;
}

.cm-a11y-reading-guide::after {
    top: 100%;
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--active {
    opacity: 1;
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--active.cm-a11y-reading-guide--darken::before,
.cm-a11y-reading-guide.cm-a11y-reading-guide--active.cm-a11y-reading-guide--darken::after {
    opacity: 1;
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--pink {
    border-top-color: rgba(255, 88, 184, 0.94);
    border-bottom-color: rgba(255, 88, 184, 0.94);
    box-shadow: 0 0 18px rgba(255, 88, 184, 0.32);
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--white {
    border-top-color: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.32);
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--yellow {
    border-top-color: rgba(255, 220, 0, 0.94);
    border-bottom-color: rgba(255, 220, 0, 0.94);
    box-shadow: 0 0 18px rgba(255, 220, 0, 0.28);
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--black {
    border-top-color: rgba(0, 0, 0, 0.96);
    border-bottom-color: rgba(0, 0, 0, 0.96);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(0, 0, 0, 0.42);
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--slim {
    height: 36px;
}

.cm-a11y-reading-guide.cm-a11y-reading-guide--tall {
    height: 66px;
}

.cm-a11y-reading-guide-toast {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 99999 !important;
    width: min(340px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: auto !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px !important;
    background: #071421 !important;
    color: #f8fbff !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(14px) !important;
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease !important;
}

.cm-a11y-reading-guide-toast.cm-a11y-reading-guide-toast--active {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.cm-a11y-reading-guide-toast-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #071421 !important;
}

.cm-a11y-reading-guide-toast-title {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.cm-a11y-reading-guide-toast-minimise {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #edf4fc !important;
    cursor: pointer !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.cm-a11y-reading-guide-toast-minimise:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 3px !important;
}

.cm-a11y-reading-guide-toast-body {
    display: grid !important;
    gap: 14px !important;
    padding: 14px 18px 18px !important;
}

.cm-a11y-reading-guide-toast--minimised .cm-a11y-reading-guide-toast-header {
    border-bottom: 0 !important;
}

.cm-a11y-reading-guide-toast--minimised .cm-a11y-reading-guide-toast-body {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.cm-a11y-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    background: rgba(7, 24, 42, 0.64) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 160ms ease, visibility 160ms ease !important;
}

.cm-a11y-overlay::before {
    content: none !important;
    display: none !important;
}

.cm-a11y-overlay.cm-a11y-overlay--active {
    opacity: 1 !important;
    visibility: visible !important;
}

.cm-a11y-modal {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(100%, 620px) !important;
    max-height: min(90vh, 760px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px !important;
    background: #071421 !important;
    color: #f8fbff !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.44) !important;
    transform: translateY(12px) !important;
    transition: transform 160ms ease !important;
}

.cm-a11y-overlay.cm-a11y-overlay--active .cm-a11y-modal {
    transform: translateY(0) !important;
}

@media (prefers-reduced-motion: reduce) {
    .cm-a11y-overlay,
    .cm-a11y-modal,
    .cm-a11y-reading-guide,
    .cm-a11y-reading-guide::before,
    .cm-a11y-reading-guide::after,
    .cm-a11y-reading-guide-toast {
        transition: none !important;
    }
}

.cm-a11y-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #071421 !important;
}

.cm-a11y-modal-title {
    flex: 1 1 auto !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.cm-a11y-title-icon {
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    object-fit: contain !important;
}

.cm-a11y-title-icon--hidden {
    display: none !important;
}

.cm-a11y-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

.cm-a11y-esc-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    height: 30px !important;
    margin-right: 10px !important;
    background: linear-gradient(180deg, #17283b 0%, #091725 100%) !important;
    cursor: pointer !important;
    padding: 0 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    border-radius: 7px !important;
    color: #edf4fc !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 0 rgba(0, 0, 0, 0.74) !important;
}

.cm-a11y-icon-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
}

.cm-a11y-esc-badge:focus-visible,
.cm-a11y-icon-button:focus-visible,
.cm-a11y-footer-button:focus-visible,
.cm-a11y-switch-row:focus-visible,
.cm-a11y-radio:focus-visible + .cm-a11y-radio-label {
    outline: 3px solid #fff !important;
    outline-offset: 3px !important;
}

.cm-a11y-modal-body {
    overflow: auto !important;
    padding: 16px 22px 14px !important;
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent !important;
    scrollbar-width: thin !important;
}

.cm-a11y-section {
    padding: 0 0 18px !important;
}

.cm-a11y-section + .cm-a11y-section {
    padding-top: 18px !important;
    border-top: 0 !important;
}

.cm-a11y-section-title,
.cm-a11y-fieldset-legend {
    margin: 0 0 10px !important;
    color: #d8e3f2 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.cm-a11y-section-title {
    margin-bottom: 14px !important;
}

.cm-a11y-control-stack {
    display: grid !important;
    gap: 14px !important;
}

.cm-a11y-control-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 14px !important;
}

.cm-a11y-fieldset {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.cm-a11y-segmented {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
}

.cm-a11y-radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.cm-a11y-radio-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    padding: 8px 13px !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #f2f6fb !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    user-select: none !important;
}

.cm-a11y-radio:checked + .cm-a11y-radio-label {
    border-color: #fff !important;
    background: #fff !important;
    color: #071421 !important;
}

.cm-a11y-switch-list {
    display: grid !important;
    gap: 0 !important;
}

.cm-a11y-switch-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 18px !important;
}

.cm-a11y-switch-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer !important;
    text-align: left !important;
    gap: 16px !important;
}

.cm-a11y-switch-row:last-child {
    border-bottom: 0 !important;
}

.cm-a11y-switch-grid--paired .cm-a11y-switch-row:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
}

.cm-a11y-switch-label {
    color: #edf4fc !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

.cm-a11y-switch-track {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 48px !important;
    height: 27px !important;
    border: 1px solid rgba(255, 255, 255, 0.52) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.cm-a11y-switch-thumb {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 19px !important;
    height: 19px !important;
    border-radius: 999px !important;
    background: #fff !important;
    transform: translateX(0) !important;
    transition: transform 160ms ease, background 160ms ease !important;
}

.cm-a11y-switch-row[aria-checked="true"] .cm-a11y-switch-track {
    border-color: #fff !important;
    background: #fff !important;
}

.cm-a11y-switch-row[aria-checked="true"] .cm-a11y-switch-thumb {
    background: #071421 !important;
    transform: translateX(21px) !important;
}

.cm-a11y-modal-footer {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    padding: 12px 22px 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #071421 !important;
    justify-content: flex-start !important;
}

.cm-a11y-footer-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    flex-wrap: wrap !important;
}

.cm-a11y-save-hint {
    margin: 14px 0 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: rgba(237, 244, 252, 0.86) !important;
}

.cm-a11y-footer-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #edf4fc !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.cm-a11y-footer-button--reset {
    border-color: rgba(255, 90, 90, 0.72) !important;
    color: #ffd9d9 !important;
    text-transform: none !important;
}

.cm-a11y-footer-button--reset:hover {
    border-color: rgba(255, 110, 110, 0.92) !important;
    background: rgba(150, 0, 0, 0.14) !important;
    color: #ffe6e6 !important;
}

@media (max-width: 620px) {
    .cm-a11y-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .cm-a11y-reading-guide-toast {
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-height: calc(100vh - 24px) !important;
    }

    .cm-a11y-reading-guide-toast-header,
    .cm-a11y-reading-guide-toast-body {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    .cm-a11y-modal {
        width: 100% !important;
        max-height: 94vh !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        border-radius: 18px 18px 0 0 !important;
    }

    .cm-a11y-modal-header,
    .cm-a11y-modal-body,
    .cm-a11y-modal-footer {
        padding-right: 18px !important;
        padding-left: 18px !important;
    }

    .cm-a11y-control-grid,
    .cm-a11y-switch-grid {
        grid-template-columns: 1fr !important;
    }

    .cm-a11y-switch-grid--paired .cm-a11y-switch-row:nth-last-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .cm-a11y-switch-grid .cm-a11y-switch-row:last-child {
        border-bottom: 0 !important;
    }

    .cm-a11y-footer-button {
        flex: 1 1 auto !important;
    }

    .cm-a11y-footer-button--reset {
        margin-left: 0 !important;
    }
}
