/* ==========================================================================
   ARKAY accessibility menu + the adjustments it applies (see assets/js/a11y.js).
   The menu itself is excluded from every adjustment so it always stays usable.
   ========================================================================== */

.a11y-toolbar { display: none !important; } /* WP Accessibility plugin's own toolbar: replaced by this menu. */

/* ---------- Button ---------- */
.arkay-a11y { position: fixed; left: 1rem; bottom: 1rem; z-index: 99990; font-family: var(--arkay-sans, system-ui, sans-serif); font-size: 16px; line-height: 1.4; letter-spacing: normal; text-align: left; }
.arkay-a11y.is-hidden:not(.is-open) .arkay-a11y__button { display: none; }
.arkay-a11y__button { width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 2px solid #a8977b; background: #010101; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.28); transition: transform 0.15s ease; padding: 0; }
.arkay-a11y__button:hover { transform: scale(1.06); }
.arkay-a11y.has-active .arkay-a11y__button { background: #a8977b; color: #010101; border-color: #010101; }
.arkay-a11y button:focus-visible, .arkay-a11y a:focus-visible, .arkay-a11y select:focus-visible { outline: 3px solid #a8977b !important; outline-offset: 2px; }

/* ---------- Panel ---------- */
.arkay-a11y__panel { position: absolute; left: 0; bottom: calc(100% + 0.75rem); width: 24rem; max-height: min(78vh, 46rem); overflow: auto; overscroll-behavior: contain; background: #f6f3ee; color: #111; border-radius: 1.1rem; box-shadow: 0 18px 50px rgba(0,0,0,0.3); }
.arkay-a11y__panel[hidden] { display: none; }
.arkay-a11y__top { background: #010101; color: #fff; padding: 1rem 1.1rem 1.1rem; position: sticky; top: 0; z-index: 1; }
.arkay-a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.arkay-a11y__title { margin: 0; font-family: var(--arkay-serif, Georgia, serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; color: #fff; letter-spacing: 0; }
.arkay-a11y__close { background: none; border: 0; color: #fff; cursor: pointer; padding: 0.35rem; border-radius: 50%; display: grid; place-items: center; }
.arkay-a11y__close:hover { background: rgba(255,255,255,0.12); }
.arkay-a11y__actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.arkay-a11y__action { flex: 1 1 auto; text-align: center; background: transparent; color: #fff !important; border: 1px solid #a8977b; border-radius: 999px; padding: 0.45rem 0.8rem; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.arkay-a11y__action:hover { background: #a8977b; color: #010101 !important; }
.arkay-a11y__body { padding: 0.5rem 1rem 1rem; }
.arkay-a11y__sec { background: #fff; border-radius: 0.9rem; padding: 0.9rem; margin-top: 0.75rem; }
.arkay-a11y__sec h3 { margin: 0 0 0.6rem; font-family: inherit; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: #6b5e4b; line-height: 1.3; }

/* Profiles */
.arkay-a11y__profiles { list-style: none; margin: 0; padding: 0; }
.arkay-a11y__profile { width: 100%; display: flex; align-items: center; gap: 0.85rem; background: none; border: 0; border-bottom: 1px solid #eee8de; padding: 0.7rem 0.1rem; font: inherit; color: #111; cursor: pointer; text-align: left; }
.arkay-a11y__profiles li:last-child .arkay-a11y__profile { border-bottom: 0; }
.arkay-a11y__ptext { display: flex; flex-direction: column; gap: 0.1rem; }
.arkay-a11y__pname { font-weight: 600; font-size: 0.95rem; }
.arkay-a11y__pdesc { font-size: 0.8rem; color: #5c5246; }
.arkay-a11y__switch { flex: none; width: 2.5rem; height: 1.4rem; border-radius: 1rem; background: #cfc8bc; position: relative; transition: background 0.15s; }
.arkay-a11y__switch::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
[aria-pressed="true"] > .arkay-a11y__switch { background: #010101; }
[aria-pressed="true"] > .arkay-a11y__switch::after { transform: translateX(1.1rem); }

/* Steppers */
.arkay-a11y__stepper { background: #f6f3ee; border-radius: 0.75rem; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.arkay-a11y__slabel { font-size: 0.9rem; font-weight: 600; color: #111; display: block; }
.arkay-a11y__srow { display: flex; align-items: center; gap: 0.4rem; }
.arkay-a11y__srow button { width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: #010101; color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.arkay-a11y__srow button:disabled { background: #cfc8bc; cursor: default; }
.arkay-a11y__sval { min-width: 5.2rem; text-align: center; font-size: 0.82rem; color: #5c5246; }

/* Tiles */
.arkay-a11y__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.arkay-a11y__tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; min-height: 5rem; padding: 0.6rem 0.3rem; background: #f6f3ee; color: #111; border: 2px solid transparent; border-radius: 0.75rem; font: inherit; font-size: 0.76rem; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.arkay-a11y__tile:hover { border-color: #cfc8bc; }
.arkay-a11y__tile[aria-pressed="true"] { background: #010101; color: #fff; border-color: #010101; }
.arkay-a11y__select { width: 100%; margin-top: 0.4rem; padding: 0.6rem 0.7rem; border: 1px solid #cfc8bc; border-radius: 0.6rem; background: #fff; color: #111; font: inherit; font-size: 0.9rem; }
.arkay-a11y__sec > .arkay-a11y__slabel { margin-top: 0.85rem; }
.arkay-a11y__note { margin: 0.9rem 0 0; font-size: 0.78rem; color: #5c5246; text-align: center; }
.arkay-a11y__note kbd { font: inherit; font-weight: 700; background: #fff; border: 1px solid #cfc8bc; border-radius: 4px; padding: 0 0.3rem; }

@media (max-width: 600px) {
	.arkay-a11y { left: 0.75rem; bottom: 0.75rem; }
	.arkay-a11y__panel { position: fixed; left: 0.5rem; right: 0.5rem; bottom: 4.6rem; width: auto; max-height: 76vh; }
}

/* ---------- Reading guide / mask ---------- */
.arkay-a11y-guide { position: fixed; left: 0; right: 0; height: 12px; background: rgba(168,151,123,0.35); border-top: 3px solid #010101; border-bottom: 3px solid #010101; pointer-events: none; z-index: 99980; }
.arkay-a11y-mask { position: fixed; left: 0; right: 0; background: rgba(0,0,0,0.6); pointer-events: none; z-index: 99980; }
.arkay-a11y-guide[hidden], .arkay-a11y-mask[hidden] { display: none; }

/* ==========================================================================
   Adjustments. ":not(.arkay-a11y *)" keeps the menu itself unchanged.
   ========================================================================== */
html.a11y-size { font-size: var(--a11y-size) !important; }
html.a11y-size body { overflow-x: clip; }
html.a11y-zoom .wp-site-blocks { zoom: var(--a11y-zoom); }
html.a11y-zoom body { overflow-x: clip; }
html.a11y-lh body :is(p, li, dd, dt, td, th, blockquote, label, figcaption, span, a, h1, h2, h3, h4, h5, h6):not(.arkay-a11y *) { line-height: var(--a11y-lh) !important; }
html.a11y-ls body :is(p, li, dd, dt, td, th, blockquote, label, figcaption, span, a, h1, h2, h3, h4, h5, h6, button):not(.arkay-a11y *) { letter-spacing: var(--a11y-ls) !important; word-spacing: calc(var(--a11y-ls) * 2) !important; }
html.a11y-font body *:not(.arkay-a11y):not(.arkay-a11y *):not(svg):not(svg *) { font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif !important; font-style: normal !important; }
html.a11y-titles :is(h1, h2, h3, h4, h5, h6):not(.arkay-a11y *) { outline: 2px dashed #a8977b !important; outline-offset: 4px; }
html.a11y-links a:not(.arkay-a11y *) { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px solid #f0b400 !important; outline-offset: 2px; }
html.a11y-align-left body :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption):not(.arkay-a11y *) { text-align: left !important; }
html.a11y-align-center body :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption):not(.arkay-a11y *) { text-align: center !important; }
html.a11y-align-right body :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption):not(.arkay-a11y *) { text-align: right !important; }

/* Saturation: applied to page sections, not <html>, so the sticky header and menu keep working. */
html.a11y-sat-mono .wp-site-blocks > :not(header), html.a11y-sat-mono .wp-site-blocks > header .arkay-announce { filter: grayscale(1); }
html.a11y-sat-low .wp-site-blocks > :not(header), html.a11y-sat-low .wp-site-blocks > header .arkay-announce { filter: saturate(0.45); }
html.a11y-sat-high .wp-site-blocks > :not(header), html.a11y-sat-high .wp-site-blocks > header .arkay-announce { filter: saturate(1.9); }

/* Contrast modes */
html:is(.a11y-contrast-dark, .a11y-contrast-light, .a11y-contrast-high) body *:not(.arkay-a11y):not(.arkay-a11y *):not(img):not(video):not(svg):not(svg *):not(.arkay-a11y-guide):not(.arkay-a11y-mask) { box-shadow: none !important; text-shadow: none !important; }
html.a11y-contrast-dark body, html.a11y-contrast-dark body *:not(.arkay-a11y):not(.arkay-a11y *):not(img):not(video):not(svg):not(svg *):not(.arkay-a11y-guide):not(.arkay-a11y-mask) { background-color: #141414 !important; color: #f3f3f3 !important; border-color: #5a5a5a !important; }
html.a11y-contrast-dark a:not(.arkay-a11y *), html.a11y-contrast-dark a:not(.arkay-a11y *) * { color: #9ecbff !important; }
html.a11y-contrast-light body, html.a11y-contrast-light body *:not(.arkay-a11y):not(.arkay-a11y *):not(img):not(video):not(svg):not(svg *):not(.arkay-a11y-guide):not(.arkay-a11y-mask) { background-color: #ffffff !important; color: #111111 !important; border-color: #666 !important; }
html.a11y-contrast-light a:not(.arkay-a11y *), html.a11y-contrast-light a:not(.arkay-a11y *) * { color: #0b3fa8 !important; }
html.a11y-contrast-high body, html.a11y-contrast-high body *:not(.arkay-a11y):not(.arkay-a11y *):not(img):not(video):not(svg):not(svg *):not(.arkay-a11y-guide):not(.arkay-a11y-mask) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast-high a:not(.arkay-a11y *), html.a11y-contrast-high a:not(.arkay-a11y *) * { color: #ffeb3b !important; }
html.a11y-contrast-high :is(button, .wp-element-button, input, select, textarea):not(.arkay-a11y *) { border: 2px solid #fff !important; }
html:is(.a11y-contrast-dark, .a11y-contrast-light, .a11y-contrast-high) img { mix-blend-mode: normal !important; }
html:is(.a11y-contrast-dark, .a11y-contrast-high) svg:not(.arkay-a11y svg) { color: #fff; }

/* Orientation */
html.a11y-hideImg body :is(img, picture, video, iframe[src*="youtube"]):not(.arkay-a11y *) { visibility: hidden !important; }
html.a11y-hideImg body *:not(.arkay-a11y *) { background-image: none !important; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation-play-state: paused !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2v17l4.2-4.2 2.6 6.2 2.8-1.2-2.6-6H18z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 6 2, auto !important; }
html.a11y-cursor :is(a, button, [role="button"], select, label, summary), html.a11y-cursor :is(a, button, [role="button"], select, label, summary) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M9 2a1.5 1.5 0 0 1 1.5 1.5V10l1-.2a1.5 1.5 0 0 1 1.7 1l.1.4 1-.2a1.5 1.5 0 0 1 1.7 1l.1.3.8-.1A1.5 1.5 0 0 1 18.5 14v3.5A4.5 4.5 0 0 1 14 22h-2.5a4.5 4.5 0 0 1-3.7-2l-3-4.5a1.5 1.5 0 0 1 2.3-1.9l1.4 1.3V3.5A1.5 1.5 0 0 1 9 2z' fill='%23000' stroke='%23fff' stroke-width='1.1'/%3E%3C/svg%3E") 14 4, pointer !important; }
html.a11y-focus *:focus, html.a11y-focus *:focus-visible { outline: 4px solid #f0b400 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #010101 !important; }
