/* Accessibility helper — widget + the modes it switches on (classes on <html>) */

/* ---------- Widget ---------- */
.a11y { position: fixed; left: 18px; bottom: 18px; z-index: 960; font-family: var(--font-b); }
.a11y__btn {
	width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(0, 245, 255, .55);
	background: #0E1416; color: var(--cyan); cursor: pointer; display: grid; place-items: center;
	box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .9), 0 0 24px -6px rgba(0, 245, 255, .55);
	transition: transform .3s var(--ease), background .2s, color .2s;
}
.a11y__btn svg { width: 28px; height: 28px; fill: currentColor; }
.a11y__btn:hover, .a11y__btn[aria-expanded="true"] { background: var(--cyan); color: #001214; transform: scale(1.06); }
.a11y__btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.a11y__panel {
	position: absolute; left: 0; bottom: 68px; width: min(380px, calc(100vw - 36px));
	max-height: min(640px, calc(100svh - 110px)); overflow-y: auto; overscroll-behavior: contain;
	padding: 18px; border-radius: 22px; background: #111115; border: 1px solid var(--border-hi);
	box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .95), 0 0 60px -28px rgba(0, 245, 255, .6);
	transform-origin: 0 100%; animation: a11y-in .3s var(--ease);
}
.a11y__panel[hidden] { display: none; }
@keyframes a11y-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.a11y__head h2 { margin: 0; font: 800 19px var(--font-h); letter-spacing: -.02em; color: var(--text); }
.a11y__close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.a11y__close:hover { color: #fff; }

.a11y__size { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; color: var(--text); font-weight: 600; font-size: 14px; }
.a11y__stepper { display: flex; align-items: center; gap: 6px; }
.a11y__stepper button { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--border-hi); background: #18181D; color: var(--text); font: 800 14px var(--font-h); cursor: pointer; }
.a11y__stepper button:hover { border-color: var(--cyan); color: var(--cyan); }
.a11y__stepper button:disabled { opacity: .35; cursor: default; }
.a11y__stepper output { min-width: 48px; text-align: center; font: 700 13px var(--font-m); color: var(--cyan); }

.a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y__opt {
	display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
	padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface);
	color: var(--text); cursor: pointer; transition: border-color .2s, background .2s;
}
.a11y__opt svg { width: 22px; height: 22px; color: var(--cyan); margin-bottom: 4px; }
.a11y__opt b { font: 700 13px/1.25 var(--font-h); }
.a11y__opt small { font-size: 11px; line-height: 1.35; color: var(--muted); }
.a11y__opt:hover { border-color: var(--border-hi); }
.a11y__opt[aria-pressed="true"] { border-color: var(--lime); background: rgba(188, 255, 0, .08); }
.a11y__opt[aria-pressed="true"] svg { color: var(--lime); }
.a11y__opt:focus-visible, .a11y__stepper button:focus-visible, .a11y__reset:focus-visible, .a11y__close:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.a11y__reset { width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border-hi); background: transparent; color: var(--text); font: 700 14px var(--font-h); cursor: pointer; }
.a11y__reset:hover { border-color: var(--cyan); color: var(--cyan); }

.a11y-guidebar { display: none; position: fixed; top: 0; left: 0; right: 0; height: 46px; margin-top: -23px; pointer-events: none; z-index: 955;
	background: rgba(188, 255, 0, .08); border-top: 2px solid rgba(188, 255, 0, .8); border-bottom: 2px solid rgba(188, 255, 0, .8);
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); transform: translateY(var(--gy, -100px)); }
html.a11y-guide .a11y-guidebar { display: block; }

@media (max-width: 600px) {
	.a11y { left: 10px; bottom: 10px; }
	.a11y__btn { width: 48px; height: 48px; }
	.a11y__btn svg { width: 24px; height: 24px; }
	.a11y__panel { bottom: 60px; }
}

/* ---------- Modes ---------- */
/* Text size: zoom the page content (header, main, footer) so px-based layouts scale too */
html.a11y-text-1 main, html.a11y-text-1 .site-header, html.a11y-text-1 .site-footer { zoom: 1.12; }
html.a11y-text-2 main, html.a11y-text-2 .site-header, html.a11y-text-2 .site-footer { zoom: 1.25; }
html.a11y-text-3 main, html.a11y-text-3 .site-header, html.a11y-text-3 .site-footer { zoom: 1.4; }
html.a11y-text--1 main, html.a11y-text--1 .site-header, html.a11y-text--1 .site-footer { zoom: .9; }

/* High contrast */
html.a11y-contrast { --muted: #E6E6EC; --border: rgba(255, 255, 255, .45); --border-hi: rgba(255, 255, 255, .7); --surface: #000; --surface-2: #111; --bg-2: #000; }
html.a11y-contrast body { background: #000; }
html.a11y-contrast .hero__bg, html.a11y-contrast .cursor-glow, html.a11y-contrast .orb, html.a11y-contrast .pcard__glow { opacity: .25 !important; }
html.a11y-contrast p, html.a11y-contrast li, html.a11y-contrast small, html.a11y-contrast span, html.a11y-contrast label { color: #fff; }
html.a11y-contrast .grad, html.a11y-contrast .grad .w > span { background: none !important; -webkit-background-clip: initial !important; color: #FFF200 !important; }
html.a11y-contrast a:not(.btn) { color: #FFF200; }
html.a11y-contrast .btn--primary { background: #FFF200; color: #000; }

/* Grayscale (applied to content, not the helper itself) */
html.a11y-grayscale main, html.a11y-grayscale .site-header, html.a11y-grayscale .site-footer, html.a11y-grayscale .buddy { filter: grayscale(1); }

/* Underline links */
html.a11y-links main a:not(.btn), html.a11y-links .site-footer a, html.a11y-links .nav a { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }
html.a11y-links main a.btn, html.a11y-links .site-header__cta { outline: 2px dashed currentColor; outline-offset: 3px; }

/* Readable font */
html.a11y-readable body, html.a11y-readable body * { font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important; letter-spacing: .02em !important; word-spacing: .08em; }
html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3 { letter-spacing: 0 !important; }

/* Line spacing */
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing .section-lead, html.a11y-spacing .prose { line-height: 2 !important; }
html.a11y-spacing p + p { margin-top: 1.1em; }

/* Stop motion */
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-nomotion .cursor-glow, html.a11y-nomotion .hero__particles { display: none !important; }
html.a11y-nomotion [data-reveal], html.a11y-nomotion [data-split] .w > span { opacity: 1 !important; transform: none !important; }
html.a11y-nomotion .marquee__track { transform: none !important; }

/* Big cursor */
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='M4 2l16 9-7 2-3 7z' fill='%23000' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, auto !important; }
html.a11y-cursor a, html.a11y-cursor button, html.a11y-cursor [role="button"], html.a11y-cursor label { 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='M4 2l16 9-7 2-3 7z' fill='%2300F5FF' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, pointer !important; }

/* Strong focus + hover highlight */
html.a11y-focus *:focus { outline: 4px solid #FFF200 !important; outline-offset: 3px !important; box-shadow: 0 0 0 8px rgba(0, 0, 0, .8) !important; }
html.a11y-focus main a:hover, html.a11y-focus main button:hover { outline: 3px solid rgba(255, 242, 0, .8); outline-offset: 2px; }

/* Keep the helper above the CookieYes banner and out of its way */
.a11y { z-index: 10000001; }
.cky-consent-container.cky-box-bottom-left { left: 86px !important; }
.cky-btn-revisit-wrapper { left: 25px !important; bottom: 84px !important; }
@media (max-width: 600px) {
	.cky-consent-container { left: 0 !important; }
	.cky-btn-revisit-wrapper { left: 16px !important; bottom: 70px !important; }
}
