/**
 * Shuster Accessibility — visitor-facing widget styles.
 *
 * Class list (namespace .shuster-a11y-):
 *   Structure : .shuster-a11y-root .shuster-a11y-trigger .shuster-a11y-panel
 *               .shuster-a11y-panel__header/__title/__header-actions/__body/__footer
 *               .shuster-a11y-section/__title .shuster-a11y-grid
 *               .shuster-a11y-feat/__icon/__label/__steps/__dot
 *               .shuster-a11y-iconbtn .shuster-a11y-live .shuster-a11y-branding
 *               .shuster-a11y-substructure (page-structure sub-dialog)
 *               .shuster-a11y-mask-top/.shuster-a11y-mask-bottom .shuster-a11y-guide
 *               .shuster-a11y-sr-bar (screen reader controls)
 *   Root state classes (applied to <html>):
 *     is-open (on .shuster-a11y-root)
 *     shuster-a11y-hidden-widget
 *     (bigger-text scaling is applied per-element in widget.js, not via a class)
 *     shuster-a11y-lineheight (uses --shuster-a11y-line)
 *     shuster-a11y-align-right/-center/-left/-justify
 *     shuster-a11y-readablefont shuster-a11y-dyslexiafont
 *     shuster-a11y-letterspacing (uses --shuster-a11y-letter)
 *     shuster-a11y-grayscale shuster-a11y-saturation (uses --shuster-a11y-sat)
 *     shuster-a11y-contrast-high/-invert/-light/-dark
 *     shuster-a11y-hideimages shuster-a11y-pauseanim shuster-a11y-bigcursor
 *     shuster-a11y-highlightlinks shuster-a11y-highlighttitles
 *     shuster-a11y-focusoutline shuster-a11y-stopblink shuster-a11y-readingmask
 *
 * All colors/sizes consume the :root custom properties printed by PHP.
 */

/* ----------------------------------------------------------------------------
 * Dynamic-property fallbacks (in case the inline <style> is stripped by cache).
 * ------------------------------------------------------------------------- */
/* Fallback defaults live on :root, NOT on .shuster-a11y-root. A property declared
 * on .shuster-a11y-root would SHADOW the same property inherited from an ancestor
 * — so the dynamic values (set on :root by the enqueued inline style on the
 * front-end, or on the .shuster-a11y-preview__stage wrapper in admin) would never
 * reach the widget, and colour/size/radius/offset changes wouldn't apply. Keeping
 * the fallbacks on :root lets the dynamic block (emitted right after this
 * stylesheet via wp_add_inline_style) override them, and lets the preview wrapper
 * (a closer ancestor) override them inside the admin preview. See Round-3 BUG 1. */
:root {
	--shuster-a11y-trigger-color: #2563eb;
	--shuster-a11y-accent: #2563eb;
	--shuster-a11y-trigger-size: 56px;
	--shuster-a11y-radius: 32px;
	--shuster-a11y-offset-x: 20px;
	--shuster-a11y-offset-y: 20px;
	--shuster-a11y-panel-bg: #ffffff;
	--shuster-a11y-panel-fg: #1f2430;
	--shuster-a11y-z: 2147483000;
}

/* ----------------------------------------------------------------------------
 * Root container + trigger button
 * ------------------------------------------------------------------------- */
.shuster-a11y-root {
	position: fixed;
	z-index: var(--shuster-a11y-z);
	font-family: -apple-system, "Segoe UI", Rubik, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	direction: rtl;
}

/* Anchor positions (desktop). */
.shuster-a11y-root[data-position-desktop="bottom-right"] { bottom: var(--shuster-a11y-offset-y); right: var(--shuster-a11y-offset-x); }
.shuster-a11y-root[data-position-desktop="bottom-left"]  { bottom: var(--shuster-a11y-offset-y); left: var(--shuster-a11y-offset-x); }
.shuster-a11y-root[data-position-desktop="top-right"]    { top: var(--shuster-a11y-offset-y); right: var(--shuster-a11y-offset-x); }
.shuster-a11y-root[data-position-desktop="top-left"]     { top: var(--shuster-a11y-offset-y); left: var(--shuster-a11y-offset-x); }
.shuster-a11y-root[data-position-desktop="center-right"] { top: 50%; right: var(--shuster-a11y-offset-x); transform: translateY(-50%); }
.shuster-a11y-root[data-position-desktop="center-left"]  { top: 50%; left: var(--shuster-a11y-offset-x); transform: translateY(-50%); }

.shuster-a11y-trigger {
	width: var(--shuster-a11y-trigger-size);
	height: var(--shuster-a11y-trigger-size);
	border: none;
	border-radius: var(--shuster-a11y-radius);
	background: var(--shuster-a11y-trigger-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	padding: 0;
}
.shuster-a11y-trigger:hover { transform: scale(1.06); }
.shuster-a11y-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--shuster-a11y-trigger-color);
}
.shuster-a11y-trigger__img { max-width: 60%; max-height: 60%; }

/* Hidden-widget state (visitor chose "hide"): show a small restore affordance instead. */
html.shuster-a11y-hidden-widget .shuster-a11y-trigger,
html.shuster-a11y-hidden-widget .shuster-a11y-panel { display: none !important; }
.shuster-a11y-restore {
	position: fixed;
	bottom: 0;
	inset-inline-start: 0;
	z-index: var(--shuster-a11y-z);
	background: var(--shuster-a11y-trigger-color);
	color: #fff;
	border: none;
	padding: 4px 10px;
	font-size: 12px;
	cursor: pointer;
	border-start-end-radius: 6px;
}

/* ----------------------------------------------------------------------------
 * Panel — reveal pattern: NEVER animate display. Use visibility/opacity/transform.
 *
 * BUG-1 fix: the panel is VIEWPORT-fixed, anchored with PHYSICAL properties
 * (right/left/top/bottom) + offset vars — NOT `position:absolute` with
 * `inset-inline-*`, which in the RTL root resolved to `left` and pushed the
 * panel off the right edge (only a sliver showed). The slide is a small
 * cosmetic shift (--shuster-a11y-closed-shift, ~16px toward the anchored edge);
 * visibility/opacity do the real show/hide. The panel is never translated fully
 * off-screen. `--shuster-a11y-panel-ty` carries the vertical-centering offset
 * for center positions so the open/close rules don't fight the centering.
 * ------------------------------------------------------------------------- */
.shuster-a11y-panel {
	position: fixed;
	/* Default anchor: bottom-right (overridden per data-position-desktop below). */
	right: var(--shuster-a11y-offset-x);
	bottom: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px);
	--shuster-a11y-closed-shift: 16px;
	--shuster-a11y-panel-ty: 0px;
	width: min(460px, calc(100vw - 32px));
	max-height: min(82vh, 760px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	background: var(--shuster-a11y-panel-bg);
	color: var(--shuster-a11y-panel-fg);
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translate(var(--shuster-a11y-closed-shift), var(--shuster-a11y-panel-ty));
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.shuster-a11y-root.is-open .shuster-a11y-panel {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: translate(0px, var(--shuster-a11y-panel-ty));
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* Per-position anchoring (physical props; direction-agnostic). */
.shuster-a11y-root[data-position-desktop="bottom-right"] .shuster-a11y-panel {
	right: var(--shuster-a11y-offset-x); left: auto;
	bottom: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px); top: auto;
	--shuster-a11y-closed-shift: 16px;
}
.shuster-a11y-root[data-position-desktop="bottom-left"] .shuster-a11y-panel {
	left: var(--shuster-a11y-offset-x); right: auto;
	bottom: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px); top: auto;
	--shuster-a11y-closed-shift: -16px;
}
.shuster-a11y-root[data-position-desktop="top-right"] .shuster-a11y-panel {
	right: var(--shuster-a11y-offset-x); left: auto;
	top: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px); bottom: auto;
	--shuster-a11y-closed-shift: 16px;
}
.shuster-a11y-root[data-position-desktop="top-left"] .shuster-a11y-panel {
	left: var(--shuster-a11y-offset-x); right: auto;
	top: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px); bottom: auto;
	--shuster-a11y-closed-shift: -16px;
}
.shuster-a11y-root[data-position-desktop="center-right"] .shuster-a11y-panel {
	right: calc(var(--shuster-a11y-offset-x) + var(--shuster-a11y-trigger-size) + 12px); left: auto;
	top: 50%; bottom: auto;
	--shuster-a11y-closed-shift: 16px;
	--shuster-a11y-panel-ty: -50%;
}
.shuster-a11y-root[data-position-desktop="center-left"] .shuster-a11y-panel {
	left: calc(var(--shuster-a11y-offset-x) + var(--shuster-a11y-trigger-size) + 12px); right: auto;
	top: 50%; bottom: auto;
	--shuster-a11y-closed-shift: -16px;
	--shuster-a11y-panel-ty: -50%;
}

.shuster-a11y-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 16px 20px;
	background: var(--shuster-a11y-accent);
	color: #fff;
}
.shuster-a11y-panel__title { margin: 0; font-size: 19px; font-weight: 700; color: #fff; }
.shuster-a11y-panel__header-actions { display: flex; gap: 6px; }
.shuster-a11y-iconbtn {
	width: 34px; height: 34px;
	border: none; border-radius: 8px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff; cursor: pointer;
	line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.shuster-a11y-iconbtn svg { width: 18px; height: 18px; }
.shuster-a11y-iconbtn:hover { background: rgba(255, 255, 255, 0.32); }
.shuster-a11y-iconbtn:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }

.shuster-a11y-panel__body { padding: 18px; overflow-y: auto; }
.shuster-a11y-section { margin-bottom: 24px; }
.shuster-a11y-section:last-child { margin-bottom: 4px; }
.shuster-a11y-section__title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: #3a4150;
	text-transform: none;
}

/* Feature grid — column count driven by --shuster-a11y-cols (2 or 3; default 2). */
.shuster-a11y-grid {
	display: grid;
	grid-template-columns: repeat(var(--shuster-a11y-cols, 2), 1fr);
	gap: 12px;
}
.shuster-a11y-feat {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 10px;
	min-height: 104px;
	border: 1px solid #e5e8ee;
	border-radius: 14px;
	background: #f6f8fc;
	color: #1f2430;
	cursor: pointer;
	text-align: center;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.shuster-a11y-feat:hover { border-color: var(--shuster-a11y-accent); box-shadow: 0 3px 10px rgba(16, 24, 40, 0.1); }
.shuster-a11y-feat:focus-visible { outline: 3px solid var(--shuster-a11y-accent); outline-offset: 2px; }
.shuster-a11y-feat[aria-pressed="true"] {
	border-color: var(--shuster-a11y-accent);
	background: color-mix(in srgb, var(--shuster-a11y-accent) 12%, #fff);
}
/* Feature icon: inline Lucide SVG in a soft circle, recolors with the accent. */
.shuster-a11y-feat__icon {
	width: 44px; height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e5e8ee;
	color: var(--shuster-a11y-accent);
	flex: none;
}
.shuster-a11y-feat__icon svg { width: 24px; height: 24px; }
.shuster-a11y-feat[aria-pressed="true"] .shuster-a11y-feat__icon {
	background: var(--shuster-a11y-accent);
	color: #fff;
	border-color: var(--shuster-a11y-accent);
}
.shuster-a11y-feat__label { font-size: 13px; font-weight: 600; line-height: 1.3; color: #1f2430; }
.shuster-a11y-feat__steps { display: flex; gap: 4px; margin-top: 2px; }
.shuster-a11y-feat__dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: #cbd2de;
}
.shuster-a11y-feat[data-current-step="1"] .shuster-a11y-feat__dot:nth-child(-n+1),
.shuster-a11y-feat[data-current-step="2"] .shuster-a11y-feat__dot:nth-child(-n+2),
.shuster-a11y-feat[data-current-step="3"] .shuster-a11y-feat__dot:nth-child(-n+3),
.shuster-a11y-feat[data-current-step="4"] .shuster-a11y-feat__dot:nth-child(-n+4) {
	background: var(--shuster-a11y-accent);
}

.shuster-a11y-panel__footer {
	padding: 14px 20px;
	border-top: 1px solid #eef0f4;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
}
.shuster-a11y-statement-link { color: var(--shuster-a11y-accent); font-weight: 600; text-decoration: underline; }
.shuster-a11y-branding { color: #99a1b0; }

/* Visually-hidden live region. */
.shuster-a11y-live {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------------------
 * FEATURE EFFECTS — keyed off root (<html>) classes.
 * ------------------------------------------------------------------------- */

/* Content: bigger text — TEXT-ONLY scaling handled in widget.js (Round-6).
 *
 * No CSS rule here: page `zoom` (Round 5) scaled layout/images too, which is
 * wrong. Instead widget.js stores each text element's original computed
 * font-size ONCE and sets font-size = original × scale (1.25/1.5/1.75/2.0), so
 * only text grows, layout/images/icons stay put, and nothing compounds on
 * nested elements. The widget itself is excluded. */

/* Line height. */
html.shuster-a11y-lineheight body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	line-height: var(--shuster-a11y-line, 1.6) !important;
}

/* Letter spacing. */
html.shuster-a11y-letterspacing body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	letter-spacing: var(--shuster-a11y-letter, 0.05em) !important;
	word-spacing: calc(var(--shuster-a11y-letter, 0.05em) * 2) !important;
}

/* Text alignment. */
html.shuster-a11y-align-right  body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) { text-align: right !important; }
html.shuster-a11y-align-center body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) { text-align: center !important; }
html.shuster-a11y-align-left   body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) { text-align: left !important; }
html.shuster-a11y-align-justify body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) { text-align: justify !important; }

/* Readable font. */
html.shuster-a11y-readablefont body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	font-family: Arial, "Segoe UI", Rubik, "Helvetica Neue", sans-serif !important;
}

/* Dyslexia font (bundled OpenDyslexic; @font-face declared below). */
html.shuster-a11y-dyslexiafont body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	font-family: "OpenDyslexic", "Comic Sans MS", Arial, sans-serif !important;
}

/* Visual: grayscale / saturation / contrast use a filter on <html>. */
html.shuster-a11y-grayscale { filter: grayscale(1); }
html.shuster-a11y-saturation { filter: saturate(var(--shuster-a11y-sat, 1.6)); }
html.shuster-a11y-grayscale.shuster-a11y-saturation { filter: grayscale(1) saturate(var(--shuster-a11y-sat, 1.6)); }

/* Contrast modes. */
html.shuster-a11y-contrast-high body { background: #000 !important; }
html.shuster-a11y-contrast-high body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}
html.shuster-a11y-contrast-high a:not(.shuster-a11y-root *) { color: #ffff00 !important; }

html.shuster-a11y-contrast-invert { filter: invert(1) hue-rotate(180deg); }
/* Keep media un-inverted so photos/videos look normal. */
html.shuster-a11y-contrast-invert img,
html.shuster-a11y-contrast-invert video,
html.shuster-a11y-contrast-invert picture,
html.shuster-a11y-contrast-invert iframe,
html.shuster-a11y-contrast-invert [style*="background-image"],
html.shuster-a11y-contrast-invert .shuster-a11y-trigger,
html.shuster-a11y-contrast-invert .shuster-a11y-panel,
html.shuster-a11y-contrast-invert .shuster-a11y-restore {
	/* Re-invert media and our own widget so they render normally under invert.
	 * NB: applied to the trigger/panel directly, NOT to .shuster-a11y-root — a
	 * filter on root would become the containing block for the fixed panel and
	 * re-break its viewport anchoring (see BUG-1 fix). */
	filter: invert(1) hue-rotate(180deg);
}

html.shuster-a11y-contrast-light body,
html.shuster-a11y-contrast-light body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	background-color: #ffffff !important;
	color: #000000 !important;
}
html.shuster-a11y-contrast-dark body,
html.shuster-a11y-contrast-dark body *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	background-color: #16181d !important;
	color: #e7e9ee !important;
	border-color: #3a3f4a !important;
}
html.shuster-a11y-contrast-dark a:not(.shuster-a11y-root *) { color: #7db3ff !important; }

/* Hide images. */
html.shuster-a11y-hideimages img,
html.shuster-a11y-hideimages picture,
html.shuster-a11y-hideimages svg:not(.shuster-a11y-root svg) {
	visibility: hidden !important;
}
html.shuster-a11y-hideimages [style*="background-image"] { background-image: none !important; }
.shuster-a11y-alt-text {
	display: inline-block;
	padding: 2px 6px;
	border: 1px dashed #888;
	font-size: 0.85em;
	color: #333;
	background: #f2f2f2;
}

/* Pause animations. */
html.shuster-a11y-pauseanim *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* Big cursor. */
html.shuster-a11y-bigcursor,
html.shuster-a11y-bigcursor * {
	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 fill='%23fff' stroke='%23000' stroke-width='2' d='M8 4l30 18-13 3 8 15-6 3-8-15-11 8z'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* Highlight links / titles. */
html.shuster-a11y-highlightlinks a:not(.shuster-a11y-root *) {
	outline: 2px solid #ff8a00 !important;
	background: rgba(255, 138, 0, 0.12) !important;
	text-decoration: underline !important;
}
html.shuster-a11y-highlighttitles :is(h1,h2,h3,h4,h5,h6):not(.shuster-a11y-root *) {
	outline: 2px dashed #6d28d9 !important;
	background: rgba(109, 40, 217, 0.08) !important;
}

/* Strong focus outline site-wide. */
html.shuster-a11y-focusoutline *:focus-visible {
	outline: 3px solid #1d4ed8 !important;
	outline-offset: 2px !important;
}

/* Stop blinking (seizure-safety). */
html.shuster-a11y-stopblink blink,
html.shuster-a11y-stopblink marquee,
html.shuster-a11y-stopblink *:not(.shuster-a11y-root):not(.shuster-a11y-root *) {
	animation-iteration-count: 1 !important;
}
html.shuster-a11y-stopblink [class*="blink"],
html.shuster-a11y-stopblink [class*="flash"] { animation: none !important; }

/* Reading mask overlays (positions set inline by JS — allowed scoped exception). */
.shuster-a11y-mask-top,
.shuster-a11y-mask-bottom {
	position: fixed;
	left: 0;
	width: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: calc(var(--shuster-a11y-z) - 2);
	pointer-events: none;
}

/* Reading guide ruler. */
.shuster-a11y-guide {
	position: fixed;
	left: 0;
	width: 100%;
	height: 3px;
	background: #ff3b30;
	z-index: calc(var(--shuster-a11y-z) - 1);
	pointer-events: none;
}

/* Page-structure sub-dialog. */
.shuster-a11y-substructure {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	z-index: calc(var(--shuster-a11y-z) + 1);
}
.shuster-a11y-substructure.is-open { display: flex; }
.shuster-a11y-substructure__box {
	background: #fff;
	color: #1f2430;
	width: min(560px, 92vw);
	max-height: 80vh;
	overflow: auto;
	border-radius: 12px;
	padding: 18px 20px;
	direction: rtl;
}
.shuster-a11y-substructure__box h3 { margin: 0 0 6px; }
.shuster-a11y-substructure__list { list-style: none; margin: 0 0 14px; padding: 0; }
.shuster-a11y-substructure__list li { margin: 0; }
.shuster-a11y-substructure__list a,
.shuster-a11y-substructure__list button {
	display: block;
	width: 100%;
	text-align: right;
	background: none;
	border: none;
	border-bottom: 1px solid #eee;
	padding: 7px 4px;
	cursor: pointer;
	color: #1f2430;
	font: inherit;
}
.shuster-a11y-substructure__list a:hover,
.shuster-a11y-substructure__list button:hover { background: #f2f5fb; }
.shuster-a11y-lvl-2 { padding-inline-start: 14px; }
.shuster-a11y-lvl-3 { padding-inline-start: 28px; }
.shuster-a11y-lvl-4 { padding-inline-start: 42px; }
.shuster-a11y-lvl-5 { padding-inline-start: 56px; }
.shuster-a11y-lvl-6 { padding-inline-start: 70px; }

/* Screen-reader control bar. */
.shuster-a11y-sr-bar {
	position: fixed;
	bottom: 0;
	inset-inline: 0;
	display: none;
	gap: 10px;
	align-items: center;
	justify-content: center;
	padding: 8px;
	background: #16181d;
	color: #fff;
	z-index: calc(var(--shuster-a11y-z) + 2);
	direction: rtl;
}
.shuster-a11y-sr-bar.is-open { display: flex; flex-wrap: wrap; }
.shuster-a11y-sr-bar button,
.shuster-a11y-sr-bar select {
	background: #2a2f3a;
	color: #fff;
	border: 1px solid #3a3f4a;
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	font: inherit;
}
.shuster-a11y-sr-bar button:focus-visible,
.shuster-a11y-sr-bar select:focus-visible { outline: 3px solid #7db3ff; }

/* Element being read by the on-page reader. */
.shuster-a11y-reading {
	outline: 3px solid #22c55e !important;
	outline-offset: 2px !important;
	background: rgba(34, 197, 94, 0.12) !important;
}

/* ----------------------------------------------------------------------------
 * Bundled fonts (local — never hotlink Google Fonts).
 * ------------------------------------------------------------------------- */
@font-face {
	font-family: "OpenDyslexic";
	src: url("../fonts/OpenDyslexic-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ----------------------------------------------------------------------------
 * Responsive / mobile
 * ------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.shuster-a11y-root[data-position-mobile="bottom-right"] { bottom: var(--shuster-a11y-offset-y); right: var(--shuster-a11y-offset-x); left: auto; top: auto; transform: none; }
	.shuster-a11y-root[data-position-mobile="bottom-left"]  { bottom: var(--shuster-a11y-offset-y); left: var(--shuster-a11y-offset-x); right: auto; top: auto; transform: none; }
	.shuster-a11y-root[data-position-mobile="top-right"]    { top: var(--shuster-a11y-offset-y); right: var(--shuster-a11y-offset-x); left: auto; bottom: auto; transform: none; }
	.shuster-a11y-root[data-position-mobile="top-left"]     { top: var(--shuster-a11y-offset-y); left: var(--shuster-a11y-offset-x); right: auto; bottom: auto; transform: none; }
	/* Mobile: span the width, anchored to both edges. `[data-position-mobile]`
	 * matches every root, giving these rules the specificity to override the
	 * desktop per-position left/right above. */
	.shuster-a11y-root[data-position-mobile] .shuster-a11y-panel {
		width: auto;
		left: 12px;
		right: 12px;
		--shuster-a11y-closed-shift: 0px;
	}
	.shuster-a11y-root[data-position-mobile="top-right"] .shuster-a11y-panel,
	.shuster-a11y-root[data-position-mobile="top-left"] .shuster-a11y-panel {
		top: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px);
		bottom: auto;
	}
	.shuster-a11y-root[data-position-mobile="bottom-right"] .shuster-a11y-panel,
	.shuster-a11y-root[data-position-mobile="bottom-left"] .shuster-a11y-panel,
	.shuster-a11y-root[data-position-mobile="center-right"] .shuster-a11y-panel,
	.shuster-a11y-root[data-position-mobile="center-left"] .shuster-a11y-panel {
		bottom: calc(var(--shuster-a11y-offset-y) + var(--shuster-a11y-trigger-size) + 12px);
		top: auto;
		--shuster-a11y-panel-ty: 0px;
	}
	.shuster-a11y-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Respect reduced-motion for our own transitions. */
@media (prefers-reduced-motion: reduce) {
	.shuster-a11y-panel,
	.shuster-a11y-trigger { transition: none !important; }
}

/* ============================================================================
 * HOST-THEME ISOLATION (Round-7)
 *
 * On some builders — notably Elementor + its global kit — broad global rules
 * like `body.elementor-kit-N button`, `... a`, `... input`, `... svg`
 * (specificity ~0,1,2) leak into the widget and OUT-SPECIFY our single-class
 * rules (0,1,0): stray pink/red borders on tiles & buttons, wrong colours,
 * shifted padding, broken trigger/close icons. Bricks has no such globals, so
 * it looked perfect — same plugin, different host CSS.
 *
 * We neutralise the bleed WITHOUT changing any layout/functionality: (a)
 * box-sizing every descendant; (b) re-declaring ONLY the affected paint
 * properties on our own elements under a `.shuster-a11y-root` namespace chain
 * (0,2,x) so ours win by specificity. `!important` is used solely on
 * `border`/`border-color` — the property Elementor themes most often force,
 * sometimes themselves with `!important` — and is noted inline. Every value
 * mirrors the base rules above, so hosts WITHOUT bleed (Bricks) render
 * byte-identically. (The trigger's position:fixed vs a transformed Elementor
 * wrapper is already handled by the portal-to-body guard in widget.js.)
 * ========================================================================== */
.shuster-a11y-root,
.shuster-a11y-root *,
.shuster-a11y-root *::before,
.shuster-a11y-root *::after,
.shuster-a11y-restore,
.shuster-a11y-sr-bar,
.shuster-a11y-sr-bar *,
.shuster-a11y-substructure,
.shuster-a11y-substructure * {
	box-sizing: border-box;
}

/* Trigger (FAB) — counter global button border/background/appearance. */
.shuster-a11y-root .shuster-a11y-trigger {
	border: 0 !important; /* counters theme/Elementor global `button { border }` */
	outline: 0;
	margin: 0;
	padding: 0;
	background: var(--shuster-a11y-trigger-color, #2563eb);
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	border-radius: var(--shuster-a11y-radius, 32px);
	text-decoration: none;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.shuster-a11y-root .shuster-a11y-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--shuster-a11y-trigger-color, #2563eb);
}
.shuster-a11y-root .shuster-a11y-trigger__img { border: 0; box-shadow: none; border-radius: 0; }

/* Header action buttons (reset / hide / close). */
.shuster-a11y-root .shuster-a11y-iconbtn {
	border: 0 !important;
	outline: 0;
	margin: 0;
	padding: 0;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	box-shadow: none;
	border-radius: 8px;
	line-height: 1;
	text-decoration: none;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.shuster-a11y-root .shuster-a11y-iconbtn:hover { background: rgba(255, 255, 255, 0.32); }
.shuster-a11y-root .shuster-a11y-iconbtn:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }

/* Feature tiles — the reported pink-border culprit. Our border wins explicitly. */
.shuster-a11y-root .shuster-a11y-feat {
	border: 1px solid #e5e8ee !important; /* counters Elementor global button border */
	outline: 0;
	margin: 0;
	padding: 16px 10px;
	background: #f6f8fc;
	color: #1f2430;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	border-radius: 14px;
	text-decoration: none;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.shuster-a11y-root .shuster-a11y-feat:hover {
	border-color: var(--shuster-a11y-accent, #2563eb) !important;
	box-shadow: 0 3px 10px rgba(16, 24, 40, 0.1);
}
.shuster-a11y-root .shuster-a11y-feat:focus-visible {
	outline: 3px solid var(--shuster-a11y-accent, #2563eb);
	outline-offset: 2px;
}
.shuster-a11y-root .shuster-a11y-feat[aria-pressed="true"] {
	border-color: var(--shuster-a11y-accent, #2563eb) !important;
	background: color-mix(in srgb, var(--shuster-a11y-accent, #2563eb) 12%, #fff);
}

/* Feature icon circle + its inline (stroke-based) SVG. */
.shuster-a11y-root .shuster-a11y-feat__icon {
	border: 1px solid #e5e8ee;
	background: #fff;
	color: var(--shuster-a11y-accent, #2563eb);
}
.shuster-a11y-root .shuster-a11y-feat[aria-pressed="true"] .shuster-a11y-feat__icon {
	border-color: var(--shuster-a11y-accent, #2563eb);
	background: var(--shuster-a11y-accent, #2563eb);
	color: #fff;
}
/* Guard icons against host `svg { fill/stroke }` bleed. Children that carry their
 * own fill/stroke attribute (e.g. the palette dots) keep it — this only sets the
 * svg element itself, which our icons declare as fill:none stroke:currentColor. */
.shuster-a11y-root .shuster-a11y-trigger svg,
.shuster-a11y-root .shuster-a11y-iconbtn svg,
.shuster-a11y-root .shuster-a11y-feat__icon svg {
	fill: none;
	stroke: currentColor;
	box-shadow: none;
	vertical-align: middle;
}

/* Panel container + header/section/label colours (counter global typography). */
.shuster-a11y-root .shuster-a11y-panel {
	border: 0;
	background: var(--shuster-a11y-panel-bg, #ffffff);
	color: var(--shuster-a11y-panel-fg, #1f2430);
}
.shuster-a11y-root .shuster-a11y-panel__header { background: var(--shuster-a11y-accent, #2563eb); color: #fff; }
.shuster-a11y-root .shuster-a11y-panel__title { color: #fff; margin: 0; line-height: 1.2; }
.shuster-a11y-root .shuster-a11y-section__title { color: #3a4150; line-height: 1.3; }
.shuster-a11y-root .shuster-a11y-feat__label { color: #1f2430; line-height: 1.3; }
/* Counter extreme global line-height bleed on the panel's running text. */
.shuster-a11y-root .shuster-a11y-panel { line-height: 1.4; }

/* Footer statement link — counter global `a` colour/decoration. */
.shuster-a11y-root .shuster-a11y-statement-link {
	color: var(--shuster-a11y-accent, #2563eb);
	background: none;
	border: 0;
	text-decoration: underline;
	box-shadow: none;
}
.shuster-a11y-root .shuster-a11y-branding { color: #99a1b0; }

/* Restore affordance + screen-reader bar controls are appended to <body> (not
 * inside .shuster-a11y-root), so they can't use the root chain. The doubled
 * class raises specificity to 0,2,0 to beat host globals without !important. */
.shuster-a11y-restore.shuster-a11y-restore {
	border: 0;
	outline: 0;
	background: var(--shuster-a11y-trigger-color, #2563eb);
	color: #fff;
	box-shadow: none;
	text-decoration: none;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.shuster-a11y-sr-bar.shuster-a11y-sr-bar button,
.shuster-a11y-sr-bar.shuster-a11y-sr-bar select {
	border: 1px solid #3a3f4a;
	outline: 0;
	background: #2a2f3a;
	color: #fff;
	box-shadow: none;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}

/* ============================================================================
 * HOST-THEME ISOLATION — HOVER / FOCUS / ACTIVE STATES (Round-8)
 *
 * Elementor's global kit colours bare `button` / `a` on :hover, :focus and
 * :active with its accent (often pink), and our feature icons are drawn with
 * `currentColor`. So leaving ANY state value to inherit lets that accent bleed
 * onto our tiles, icons and header buttons — which is exactly the remaining
 * Elementor-only pinking (Bricks has no such global states, so it stays clean).
 *
 * Fix: declare EVERY state (default / :hover / :focus-visible / pressed)
 * explicitly for every interactive element, PINNING background/color/border and
 * the icon colour, at an extra-deep namespace (`.shuster-a11y-root
 * .shuster-a11y-panel …`, 0,3–0,5,x) that out-specifies even Elementor's
 * `button:hover svg`. `!important` is used ONLY on the accent background/colour
 * pair Elementor forces, each noted inline. Values mirror the Bricks look.
 * ========================================================================== */

/* --- Feature tile: default background/colour MUST be !important too, because
 * Elementor forces `button { background/color }` with its own !important, which
 * beats any non-important rule regardless of specificity. --- */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat {
	background: #f6f8fc !important;   /* counters Elementor global button background */
	color: #1f2430 !important;        /* counters Elementor global button colour */
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat:hover {
	background: #f6f8fc !important;
	color: #1f2430 !important;                                   /* counters Elementor button:hover colour */
	border-color: var(--shuster-a11y-accent, #2563eb) !important;
	box-shadow: 0 3px 10px rgba(16, 24, 40, 0.1);
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat:focus-visible {
	background: #f6f8fc !important;
	color: #1f2430 !important;
	outline: 3px solid var(--shuster-a11y-accent, #2563eb);
	outline-offset: 2px;
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"],
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"]:hover,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"]:focus-visible {
	/* The ONE place we intentionally use our accent — force it over Elementor's
	 * global active/hover accent (its pink). */
	background: color-mix(in srgb, var(--shuster-a11y-accent, #2563eb) 12%, #fff) !important;
	border-color: var(--shuster-a11y-accent, #2563eb) !important;
	color: #1f2430 !important;
}

/* --- Feature icon circle: exact size + FORCED flex-centering (independent of any
 * inherited line-height / vertical-align / text-align / margin / display that
 * Elementor bleeds in). !important on the centering + sizing props so the glyph
 * sits dead-centre on Elementor exactly as on Bricks. --- */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat__icon {
	box-sizing: border-box !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
	text-align: center !important;
	vertical-align: middle !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 1px solid #e5e8ee;
	border-radius: 50%;
	background: #fff;
	color: var(--shuster-a11y-accent, #2563eb) !important; /* icon (currentColor) never inherits host hover accent */
	flex: none;
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat__icon svg {
	width: 24px !important;
	height: 24px !important;
	display: block !important;   /* block + flex centering kills the inline-baseline offset */
	margin: 0 !important;        /* counters Elementor global `svg { margin }` (the off-centre cause) */
	padding: 0 !important;
	vertical-align: middle !important; /* counters inherited baseline shift */
	line-height: 1 !important;
	fill: none !important;                 /* counters Elementor global `svg { fill }` */
	stroke: currentColor !important;       /* follows the pinned wrapper colour, not host accent */
	color: inherit !important;             /* counters Elementor `svg { color }` so currentColor = our colour */
}
/* Hover: icon stays on OUR accent (white circle), never host pink. */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat:hover .shuster-a11y-feat__icon,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat:focus-visible .shuster-a11y-feat__icon {
	background: #fff;
	border-color: #e5e8ee;
	color: var(--shuster-a11y-accent, #2563eb) !important;
}
/* Pressed (and pressed while hovered/focused): white icon on the accent circle. */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"] .shuster-a11y-feat__icon,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"]:hover .shuster-a11y-feat__icon,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat[aria-pressed="true"]:focus-visible .shuster-a11y-feat__icon {
	background: var(--shuster-a11y-accent, #2563eb) !important;
	border-color: var(--shuster-a11y-accent, #2563eb) !important;
	color: #fff !important;
}

/* --- Header action buttons: pin our translucent-white background + white icon
 * in every state (Elementor forces `button { background/color }` !important). --- */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn:focus-visible,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn:active {
	background: rgba(255, 255, 255, 0.18) !important; /* counters Elementor global button background */
	color: #fff !important;                           /* keeps reset/hide/close icons white, not host accent */
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn:hover {
	background: rgba(255, 255, 255, 0.32) !important;
	color: #fff !important;
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn svg {
	fill: none !important;
	stroke: currentColor !important;
	color: inherit !important; /* counters Elementor `svg { color }` — icons stay white */
	display: block;
}

/* --- Trigger: pin our background + white icon in every state --- */
.shuster-a11y-root .shuster-a11y-trigger,
.shuster-a11y-root .shuster-a11y-trigger:hover,
.shuster-a11y-root .shuster-a11y-trigger:focus-visible,
.shuster-a11y-root .shuster-a11y-trigger:active {
	background: var(--shuster-a11y-trigger-color, #2563eb) !important; /* counters host button:hover bg */
	color: #fff !important;
}
.shuster-a11y-root .shuster-a11y-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--shuster-a11y-trigger-color, #2563eb);
}
.shuster-a11y-root .shuster-a11y-trigger svg {
	fill: none !important;
	stroke: currentColor !important;
	color: inherit !important; /* counters Elementor `svg { color }` — trigger icon stays white */
}

/* --- Statement link: OUR accent in every state (counter Elementor a:hover) --- */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-statement-link,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-statement-link:hover,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-statement-link:focus,
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-statement-link:active {
	color: var(--shuster-a11y-accent, #2563eb) !important;
	text-decoration: underline;
	background: none;
}

/* --- Item 5: svg fill/stroke inheritance guard across the widget + its states.
 * Children that carry their own fill/stroke attribute (e.g. the palette dots)
 * keep it — this only sets the svg element, which our icons declare fill:none. */
.shuster-a11y-root svg,
.shuster-a11y-root :hover > svg,
.shuster-a11y-root :focus > svg,
.shuster-a11y-root :active > svg {
	fill: none;
	stroke: currentColor;
}

/* ============================================================================
 * HOST-THEME ISOLATION — FEATURE CARD INTERNAL LAYOUT (Round-9)
 *
 * Elementor's global kit sets flex / align-items / text-align on `button`, which
 * overrode our card's column centring: on Elementor the icon was pushed to the
 * side instead of sitting top-centre (Bricks renders it correctly because it has
 * no such globals). Force the exact Bricks column stack — icon → label → dots,
 * all centred — independent of any inherited value. Values copied from the base
 * `.shuster-a11y-feat` rule so Bricks is byte-identical; `!important` only on the
 * layout props Elementor forces (flex-direction / align-items / justify-content
 * / text-align), each noted inline.
 * ========================================================================== */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat {
	display: flex !important;
	flex-direction: column !important;   /* counters Elementor global button flex-direction */
	align-items: center !important;      /* counters Elementor global align-items — the side-pushed icon */
	justify-content: center !important;
	text-align: center !important;       /* counters Elementor global text-align */
	gap: 10px;                           /* matches Bricks */
	padding: 16px 10px;                  /* matches Bricks */
	margin: 0;
	box-sizing: border-box;
	float: none !important;
}
/* Every direct child: normal order, un-floated, centred on the cross axis. */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat > * {
	float: none !important;
	order: 0;
	align-self: center !important;       /* counters any Elementor per-child align-self */
}
/* Label centres full-width under the icon (not to a side). */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat > .shuster-a11y-feat__label {
	width: 100%;
	max-width: 100%;
	margin: 0;
	text-align: center !important;
}
/* Step-dots centred in a row below the label. */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat > .shuster-a11y-feat__steps {
	display: flex !important;
	justify-content: center !important;
	align-items: center;
	width: 100%;
	gap: 4px;
	margin-top: 2px;
	padding: 0;
}
/* Icon circle: keep it centred in the column (size/inner-centring already set). */
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-feat > .shuster-a11y-feat__icon {
	align-self: center !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ============================================================================
 * HOST-THEME ISOLATION — TRIGGER + HEADER BUTTON ICON CENTRING (Round-10)
 *
 * Same Elementor global-kit bleed the card icons had, but on two elements the
 * card fix didn't cover: the floating trigger button and the three header action
 * buttons (close / hide / reset). Elementor's global `button` / `svg`
 * padding / line-height / box-sizing pushed those icons off-centre. Force
 * explicit flex-centring + the exact Bricks svg size, independent of any
 * inherited value. !important only on the props Elementor forces (padding /
 * line-height / box-sizing / display / svg size), each noted. Sizes are the
 * measured Bricks values (trigger 56/svg 24, header button 34/svg 18).
 * ========================================================================== */
.shuster-a11y-root .shuster-a11y-trigger {
	display: flex !important;
	align-items: center !important;        /* centres the icon in the button */
	justify-content: center !important;
	/* Round-11 REAL fix: pin a square box. Width was collapsing to the svg's
	   content width on the live flex host (rendered 24x56), because only height
	   was enforced. Pin width == height from the size variable and forbid shrink. */
	width: var(--shuster-a11y-trigger-size, 56px) !important;
	height: var(--shuster-a11y-trigger-size, 56px) !important;
	min-width: var(--shuster-a11y-trigger-size, 56px) !important;
	flex: 0 0 auto !important;             /* never shrink below the pinned square in a flex host */
	padding: 0 !important;                 /* size comes from the pinned box, not padding */
	margin: 0 !important;
	line-height: 1 !important;             /* counters inherited line-height offset */
	text-align: center !important;
	box-sizing: border-box !important;     /* width/height are the outer box */
}
.shuster-a11y-root .shuster-a11y-trigger svg {
	display: block !important;             /* block + flex centring kills the inline baseline gap */
	width: 24px !important;                /* Bricks-rendered trigger icon size (fits inside the box) */
	height: 24px !important;
	flex: 0 0 auto !important;             /* svg keeps its size; never stretches/overflows the button */
	margin: 0 !important;
	padding: 0 !important;
	vertical-align: middle !important;
	line-height: 1 !important;
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	/* Round-11 REAL fix: header-actions is display:flex, so each button shrank
	   width-wise to its svg content (rendered 18x34). Pin an equal square and
	   forbid shrink so width == height == 34 and the 18px svg centres inside. */
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	flex: 0 0 auto !important;
	padding: 0 !important;                 /* size comes from the pinned box, not padding */
	margin: 0 !important;
	line-height: 1 !important;
	text-align: center !important;
	box-sizing: border-box !important;
	border: 0 !important;
}
.shuster-a11y-root .shuster-a11y-panel .shuster-a11y-iconbtn svg {
	display: block !important;
	width: 18px !important;                /* Bricks-rendered header-icon size (fits inside 34px box) */
	height: 18px !important;
	flex: 0 0 auto !important;             /* svg keeps its size; never stretches/overflows the button */
	margin: 0 !important;
	padding: 0 !important;
	vertical-align: middle !important;
	line-height: 1 !important;
}
