.a11y-toolbar {
	position: fixed;
	inset-block-end: 1rem;
	inset-inline-start: 1rem;
	z-index: 900;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	font-family: system-ui, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
	font-size: 0.95rem;
	line-height: 1.5;
}

.a11y-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-block-size: 2.75rem;
	min-inline-size: 2.75rem;
	padding-block: 0.55rem;
	padding-inline: 0.9rem;
	border: 2px solid #10253f;
	border-radius: 999px;
	background: #fff;
	color: #10253f;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
}

.a11y-toggle:hover {
	background: #10253f;
	color: #fff;
}

.a11y-panel[hidden] {
	display: none !important;
}

.a11y-panel {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	inline-size: 16rem;
	max-block-size: calc(100vh - 6rem);
	overflow-y: auto;
	padding: 0.75rem;
	border: 2px solid #10253f;
	border-radius: 10px;
	background: #fff;
	color: #10253f;
	box-shadow: 0 4px 16px rgb(0 0 0 / 30%);
}

.a11y-option {
	display: block;
	inline-size: 100%;
	min-block-size: 2.5rem;
	padding-block: 0.45rem;
	padding-inline: 0.6rem;
	border: 1px solid #8c9bad;
	border-radius: 6px;
	background: #f4f7fb;
	color: #10253f;
	font: inherit;
	text-align: start;
	cursor: pointer;
}

.a11y-option:hover {
	background: #e3ebf5;
}

.a11y-option[aria-pressed="true"]::before {
	content: "✓ ";
	font-weight: 700;
}

.a11y-option[aria-pressed="true"] {
	border-color: #10253f;
	background: #d6e4f5;
	font-weight: 600;
}

.a11y-reset {
	margin-block-start: 0.35rem;
	border-color: #10253f;
	background: #fff;
	font-weight: 600;
}

.a11y-statement-link {
	display: block;
	margin-block-start: 0.5rem;
	padding-block: 0.35rem;
	color: #10253f;
	text-decoration: underline;
}

.a11y-status {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

:root[data-a11y-text="1"] { font-size: 112.5%; }
:root[data-a11y-text="2"] { font-size: 125%; }
:root[data-a11y-text="3"] { font-size: 150%; }
:root[data-a11y-text="4"] { font-size: 175%; }

:root[data-a11y-contrast="on"] body {
	background: #fff;
	color: #000;
}

:root[data-a11y-contrast="on"] :where(p, li, td, th, dd, dt, label, legend, figcaption, small) {
	color: #000;
}

:root[data-a11y-contrast="on"] :where(h1, h2, h3, h4, h5, h6) {
	color: #000;
}

:root[data-a11y-contrast="on"] :where(a) {
	color: #00308f;
	text-decoration: underline;
}

:root[data-a11y-contrast="on"] :where(button, input, select, textarea) {
	border: 2px solid #000;
	background: #fff;
	color: #000;
}

:root[data-a11y-focus="on"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 4px solid #a4100f;
	outline-offset: 3px;
}

:root[data-a11y-links="on"] :where(a) {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

:root[data-a11y-font="on"] :where(body, button, input, select, textarea) {
	font-family: "Noto Sans Hebrew", "Arial Hebrew", Arial, Verdana, system-ui, sans-serif;
	letter-spacing: 0.01em;
}

:root[data-a11y-spacing="on"] :where(p, li, dd, dt, blockquote, figcaption) {
	margin-block-end: 2em;
	line-height: 1.8;
	letter-spacing: 0.12em;
	word-spacing: 0.16em;
}

:root[data-a11y-motion="on"] *,
:root[data-a11y-motion="on"] *::before,
:root[data-a11y-motion="on"] *::after {
	transition-duration: 0.01ms !important;
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	scroll-behavior: auto !important;
}

:root[data-a11y-gray="on"] {
	filter: grayscale(100%);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}

@media (width <= 30rem) {
	.a11y-toolbar {
		inset-block-end: 0.5rem;
		inset-inline-start: 0.5rem;
	}

	.a11y-panel {
		inline-size: calc(100vw - 1.5rem);
		max-inline-size: 20rem;
	}
}

@media print {
	.a11y-toolbar {
		display: none;
	}
}
