:root {
	--mraa-accent: #114b7a;
}

.mraa-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 2147483647;
	padding: 12px 16px;
	background: #fff;
	color: #111;
	border: 3px solid #111;
	transform: translateY(-150%);
}

.mraa-skip-link:focus {
	transform: translateY(0);
}

.mraa-root {
	position: fixed;
	bottom: 20px;
	z-index: 2147483000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: 0;
	color: #17212b;
}

.mraa-root [hidden] {
	display: none !important;
}

.mraa-position-right { right: 20px; }
.mraa-position-left { left: 20px; }

.mraa-launcher-row {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 8px;
}

.mraa-launcher {
	min-height: 48px;
	border: 2px solid #fff;
	border-radius: 6px;
	background: var(--mraa-accent);
	color: #fff;
	box-shadow: 0 3px 14px rgba(0, 0, 0, .3);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	touch-action: none;
	user-select: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px 7px 7px;
}

.mraa-dragging .mraa-launcher {
	cursor: grabbing;
}

.mraa-launcher-icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-size: 15px;
}

.mraa-panel {
	position: absolute;
	z-index: 3;
	bottom: 60px;
	width: min(390px, calc(100vw - 28px));
	max-height: min(720px, calc(100vh - 100px));
	overflow: auto;
	border: 2px solid #29343e;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.mraa-position-right .mraa-panel { right: 0; }
.mraa-position-left .mraa-panel { left: 0; }
.mraa-align-right .mraa-panel { right: 0; left: auto; }
.mraa-align-left .mraa-panel { left: 0; right: auto; }
.mraa-panel-below .mraa-panel { top: 60px; bottom: auto; }

.mraa-header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	background: var(--mraa-accent);
	color: #fff;
}

.mraa-header h2 {
	margin: 0;
	color: inherit;
	font: 700 20px/1.2 Arial, Helvetica, sans-serif;
}

.mraa-icon-button {
	width: 38px;
	height: 38px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
}

.mraa-body { padding: 4px 16px 16px; }
.mraa-section { padding: 14px 0; border-bottom: 1px solid #cbd2d8; }
.mraa-section h3 { margin: 0 0 10px; color: #17212b; font: 700 16px/1.3 Arial, Helvetica, sans-serif; }

.mraa-control-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.mraa-toggle {
	display: flex;
	min-height: 58px;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 10px;
	border: 2px solid #68747e;
	border-radius: 5px;
	background: #fff;
	color: #17212b;
	font: 700 14px/1.25 Arial, Helvetica, sans-serif;
	text-align: left;
	cursor: pointer;
}

.mraa-toggle.is-active {
	border-color: var(--mraa-accent);
	background: #e7f1f8;
}

.mraa-switch {
	flex: 0 0 auto;
	width: 28px;
	height: 16px;
	border-radius: 9px;
	background: #69757f;
	box-shadow: inset 0 0 0 2px #46515a;
}

.mraa-switch::after {
	display: block;
	width: 12px;
	height: 12px;
	margin: 2px;
	border-radius: 50%;
	background: #fff;
	content: "";
	transition: transform .15s ease;
}

.mraa-toggle.is-active .mraa-switch { background: var(--mraa-accent); }
.mraa-toggle.is-active .mraa-switch::after { transform: translateX(12px); }

.mraa-stepper,
.mraa-speech {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	margin-bottom: 9px;
}

.mraa-stepper button,
.mraa-speech button,
.mraa-reset {
	min-height: 42px;
	border: 1px solid #5d6973;
	background: #f7f8f9;
	color: #17212b;
	font: 700 15px Arial, Helvetica, sans-serif;
	cursor: pointer;
}

.mraa-stepper span {
	display: grid;
	place-items: center;
	border-block: 1px solid #5d6973;
	background: #fff;
	font-weight: 700;
}

.mraa-speech { grid-template-columns: 2fr 1fr; margin: 10px 0 0; gap: 8px; }
.mraa-footer-actions { display: grid; gap: 9px; padding-top: 14px; }
.mraa-footer-actions a { color: #064f87; font-weight: 700; text-decoration: underline; }

.mraa-sponsor {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #cbd2d8;
	color: #3f4b55;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.mraa-sponsor a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #064f87;
	font-size: inherit;
	font-weight: 700;
	text-decoration: underline;
}

.mraa-sponsor img {
	display: inline-block;
	width: auto;
	height: 18px;
	max-height: 18px;
	object-fit: contain;
}

.mraa-sponsor img[hidden] {
	display: none !important;
}

.mraa-version {
	margin-top: 8px;
	color: #4b5862;
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
}

.mraa-reading-guide {
	position: fixed;
	left: 0;
	z-index: 1;
	width: 100vw;
	height: 36px;
	border-top: 3px solid #111;
	border-bottom: 3px solid #111;
	background: rgba(255, 238, 80, .28);
	pointer-events: none;
}

html.mraa-readable-font body,
html.mraa-readable-font body *:not([class*="icon"]):not([class*="et-pb-icon"]) {
	font-family: Arial, Helvetica, sans-serif !important;
}

html.mraa-text-spacing body { letter-spacing: .12em !important; word-spacing: .16em !important; }
html.mraa-line-height body { line-height: 1.8 !important; }
html.mraa-underline-links body a:not(.mraa-launcher) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: .18em !important; }
html.mraa-large-cursor body, html.mraa-large-cursor body * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='white' stroke='black' stroke-width='2' d='M2 2l20 17-9 1 5 9-5 2-5-10-6 6z'/%3E%3C/svg%3E") 2 2, auto !important; }

html.mraa-high-contrast body,
html.mraa-high-contrast body main,
html.mraa-high-contrast body header,
html.mraa-high-contrast body footer,
html.mraa-high-contrast body section,
html.mraa-high-contrast body article,
html.mraa-high-contrast body nav {
	background: #000 !important;
	color: #fff !important;
	background-image: none !important;
}

html.mraa-high-contrast body *:not(.mraa-panel):not(.mraa-panel *) { color: #fff !important; border-color: #fff !important; }
html.mraa-high-contrast body a:not(.mraa-panel a) { color: #ffea00 !important; }
html.mraa-light-background body, html.mraa-light-background body *:not(.mraa-panel):not(.mraa-panel *) { background-color: #fff !important; color: #111 !important; background-image: none !important; }
html.mraa-dark-background body, html.mraa-dark-background body *:not(.mraa-panel):not(.mraa-panel *) { background-color: #171717 !important; color: #f5f5f5 !important; background-image: none !important; }
html.mraa-dark-background body a:not(.mraa-panel a) { color: #8fd4ff !important; }
html.mraa-greyscale body > *:not(.mraa-root) { filter: grayscale(1) !important; }
html.mraa-hide-images body img:not(.mraa-panel img), html.mraa-hide-images body picture:not(.mraa-panel picture), html.mraa-hide-images body svg:not(.mraa-panel svg) { visibility: hidden !important; }

html.mraa-reduce-motion *,
html.mraa-reduce-motion *::before,
html.mraa-reduce-motion *::after {
	scroll-behavior: auto !important;
	animation-duration: .001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: .001ms !important;
}

html.mraa-highlight-focus *:focus {
	outline: 4px solid #ffbf00 !important;
	outline-offset: 4px !important;
}

html.mraa-focus-mode body > *:not(.mraa-root) { opacity: .22; transition: opacity .12s linear; }
html.mraa-focus-mode .mraa-reading-active { position: relative; z-index: 3; opacity: 1 !important; background: #fff !important; color: #111 !important; box-shadow: 0 0 0 12px #fff; }

.mraa-root, .mraa-root * { font-size: initial; }

.mraa-launcher:focus-visible,
.mraa-panel button:focus-visible,
.mraa-panel a:focus-visible {
	outline: 4px solid #ffbf00;
	outline-offset: 3px;
}

@media (max-width: 520px) {
	.mraa-root { bottom: 10px; }
	.mraa-position-right { right: 10px; }
	.mraa-position-left { left: 10px; }
	.mraa-launcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.mraa-launcher { padding: 6px; }
	.mraa-panel { bottom: 56px; max-height: calc(100vh - 80px); }
	.mraa-control-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.mraa-switch::after { transition: none; }
}
