/* M16 Accessibility – visitor menu */
@font-face { font-family: "M16A Readable"; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "M16A Readable"; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "M16A Dyslexic"; src: url(fonts/OpenDyslexic-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "M16A Dyslexic"; src: url(fonts/OpenDyslexic-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }

/* ---------- the menu itself (never affected by its own settings) ---------- */
.m16x-tb, .m16x-tb * { box-sizing: border-box; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important; letter-spacing: normal !important; word-spacing: normal !important; line-height: 1.35 !important; text-align: left !important; text-transform: none !important; cursor: auto; }
.m16x-tb { position: fixed; z-index: 2147483002; bottom: var(--m16x-tb-bottom, 88px); left: 20px; transition: bottom .2s ease; }
.m16x-tb-right { left: auto; right: 20px; }
.m16x-tb-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff !important; background: var(--m16x-tb-color, #244371) !important; color: #fff !important; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer !important; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.m16x-tb-btn svg { width: 28px; height: 28px; display: block; opacity: 1 !important; }
.m16x-tb-btn:hover { filter: brightness(1.15); }
.m16x-tb button:focus-visible, .m16x-tb a:focus-visible, .m16x-tb [tabindex]:focus-visible { outline: 3px solid #1d4ed8 !important; outline-offset: 2px !important; box-shadow: 0 0 0 5px #fff !important; }

.m16x-tb-panel { position: absolute; bottom: 60px; left: 0; width: 360px; max-width: calc(100vw - 24px); max-height: min(78vh, 680px); overflow-y: auto; background: #fff !important; color: #1d2433 !important; border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.3); border: 1px solid #c3c7cf; font-size: 15px !important; }
.m16x-tb-right .m16x-tb-panel { left: auto; right: 0; }
.m16x-tb-panel[hidden] { display: none !important; }
.m16x-tb-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--m16x-tb-color, #244371) !important; color: #fff !important; border-radius: 14px 14px 0 0; }
.m16x-tb-head h2 { margin: 0 !important; padding: 0 !important; font-size: 17px !important; font-weight: 700 !important; color: #fff !important; background: none !important; }
.m16x-tb-head h2:focus { outline: none; }
.m16x-tb-close { width: 36px; height: 36px; border-radius: 50%; border: 0 !important; background: rgba(255,255,255,.16) !important; color: #fff !important; font-size: 22px !important; line-height: 1 !important; cursor: pointer !important; display: flex; align-items: center; justify-content: center; padding: 0; }
.m16x-tb-body { padding: 6px 16px 16px; }
.m16x-tb-sec { margin: 12px 0 0; }
.m16x-tb-sec h3 { margin: 0 0 8px !important; font-size: 13px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .04em !important; color: #50575e !important; background: none !important; }
.m16x-tb-row { display: flex; gap: 6px; flex-wrap: wrap; }
.m16x-tb-seg { display: flex; border: 1px solid #8c919a; border-radius: 10px; overflow: hidden; width: 100%; }
.m16x-tb-seg button { flex: 1; min-height: 44px; border: 0 !important; border-right: 1px solid #8c919a !important; background: #fff !important; color: #1d2433 !important; font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important; padding: 6px 4px; text-align: center !important; }
.m16x-tb-seg button:last-child { border-right: 0 !important; }
.m16x-tb-seg button[aria-pressed="true"] { background: var(--m16x-tb-color, #244371) !important; color: #fff !important; }
.m16x-tb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m16x-opt { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid #8c919a !important; border-radius: 10px; background: #fff !important; color: #1d2433 !important; font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important; text-align: left !important; width: 100%; }
.m16x-opt svg { flex: 0 0 22px; width: 22px; height: 22px; opacity: 1 !important; }
.m16x-opt[aria-pressed="true"] { background: var(--m16x-tb-color, #244371) !important; color: #fff !important; border-color: var(--m16x-tb-color, #244371) !important; }
.m16x-opt[aria-pressed="true"]::after { content: "\2713"; margin-left: auto; font-weight: 700; }
.m16x-tb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #dcdcde; }
.m16x-tb-reset { min-height: 40px; padding: 6px 14px; border-radius: 8px; border: 1px solid #1d2433 !important; background: #fff !important; color: #1d2433 !important; font-weight: 600 !important; font-size: 14px !important; cursor: pointer !important; }
.m16x-tb-foot a { color: #1d4ed8 !important; text-decoration: underline !important; font-size: 14px !important; background: none !important; }
.m16x-tb-note { width: 100%; margin: 0 !important; font-size: 12px !important; color: #50575e !important; }
.m16x-tb .m16x-sr { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
@media (max-width: 480px) {
	.m16x-tb { left: 12px; }
	.m16x-tb-right { right: 12px; left: auto; }
	.m16x-tb-panel { position: fixed; left: 8px !important; right: 8px !important; bottom: 8px; width: auto; max-width: none; max-height: 85vh; }
}

/* ---------- what the settings do to the page ---------- */
/* Everything below is scoped away from the menu itself. */
html.m16x-lh body :where(p, li, dd, dt, blockquote, td, th, label, figcaption, h1, h2, h3, h4, h5, h6, a, span, div):not(.m16x-tb, .m16x-tb *) { line-height: 1.8 !important; }
html.m16x-sp body :where(p, li, dd, dt, blockquote, td, th, label, figcaption, h1, h2, h3, h4, h5, h6, a, span, div, button, input, textarea):not(.m16x-tb, .m16x-tb *) { letter-spacing: .12em !important; word-spacing: .16em !important; }
html.m16x-align body :where(p, li, dd, dt, blockquote, td, th, figcaption, h1, h2, h3, h4, h5, h6, div):not(.m16x-tb, .m16x-tb *) { text-align: left !important; }

html.m16x-hc-light, html.m16x-hc-light body { background: #fff !important; }
html.m16x-hc-light body *:not(.m16x-tb, .m16x-tb *, img, video, picture, canvas, iframe) { background-color: #fff !important; background-image: none !important; color: #000 !important; border-color: #000 !important; text-shadow: none !important; box-shadow: none !important; }
html.m16x-hc-light body a:not(.m16x-tb *), html.m16x-hc-light body a:not(.m16x-tb *) * { color: #0000c8 !important; text-decoration: underline !important; }
html.m16x-hc-light body :where(button, input, select, textarea):not(.m16x-tb *) { border: 2px solid #000 !important; }
html.m16x-hc-dark, html.m16x-hc-dark body { background: #000 !important; }
html.m16x-hc-dark body *:not(.m16x-tb, .m16x-tb *, img, video, picture, canvas, iframe) { background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; text-shadow: none !important; box-shadow: none !important; }
html.m16x-hc-dark body a:not(.m16x-tb *), html.m16x-hc-dark body a:not(.m16x-tb *) * { color: #ffe94d !important; text-decoration: underline !important; }
html.m16x-hc-dark body :where(button, input, select, textarea):not(.m16x-tb *) { border: 2px solid #fff !important; }

html.m16x-links body a:not(.m16x-tb *) { background-color: #ffe94d !important; color: #000 !important; text-decoration: underline !important; outline: 2px solid #000 !important; outline-offset: 1px; }
html.m16x-links body a:not(.m16x-tb *) * { color: #000 !important; }

html.m16x-cursor, html.m16x-cursor body * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3l30 27H22l8 15-6 3-8-15-10 9z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important; }
html.m16x-cursor body :where(a, button, [role=button], label, select, summary, input[type=checkbox], input[type=radio]), html.m16x-cursor body :where(a, button, [role=button]) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M18 4a4 4 0 0 1 4 4v14l2-1a4 4 0 0 1 5 2l1 1a4 4 0 0 1 5 1 4 4 0 0 1 5 3v9c0 6-5 10-11 10h-6c-4 0-7-2-9-5L6 30a4 4 0 0 1 6-5l2 2V8a4 4 0 0 1 4-4z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 18 4, pointer !important; }

html.m16x-pause body *:not(.m16x-tb, .m16x-tb *), html.m16x-pause body *:not(.m16x-tb, .m16x-tb *)::before, html.m16x-pause body *:not(.m16x-tb, .m16x-tb *)::after { animation-play-state: paused !important; transition: none !important; scroll-behavior: auto !important; }
html.m16x-pause { scroll-behavior: auto !important; }

html.m16x-noimg body :where(img, picture, video, svg[role=img], [role=img]):not(.m16x-tb *) { opacity: 0 !important; }
html.m16x-noimg body *:not(.m16x-tb, .m16x-tb *) { background-image: none !important; }

html.m16x-font-readable body *:not(.m16x-tb, .m16x-tb *, i, svg, svg *, [class*="icon"], [class*="fa-"], [class^="ti-"], [class*=" ti-"], [class*="dashicons"], [class*="material-"], [aria-hidden="true"]) { font-family: "M16A Readable", Verdana, sans-serif !important; }
html.m16x-font-dyslexic body *:not(.m16x-tb, .m16x-tb *, i, svg, svg *, [class*="icon"], [class*="fa-"], [class^="ti-"], [class*=" ti-"], [class*="dashicons"], [class*="material-"], [aria-hidden="true"]) { font-family: "M16A Dyslexic", "Comic Sans MS", sans-serif !important; }

.m16x-guide { position: fixed; left: 0; right: 0; height: 2.6em; z-index: 2147482999; pointer-events: none; background: rgba(255, 233, 77, .28); border-top: 3px solid #1d2433; border-bottom: 3px solid #1d2433; transform: translateY(-50%); top: 50%; }
.m16x-guide[hidden] { display: none; }
