/* Moshaverr 48 — scoped UX / responsive / accessibility refinements */
:root {
	--msh-v48-focus: #0b57d0;
	--msh-v48-control-min: 44px;
	--msh-v48-readable: 72ch;
}

:where(.site-main, .site-header, .site-footer, .msh-mobile-dock) :where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--msh-v48-focus);
	outline-offset: 3px;
	border-radius: 6px;
}

:where(.site-main, .site-header, .site-footer) :where(button, .button, [role="button"], input[type="submit"], input[type="button"], select) {
	min-height: var(--msh-v48-control-min);
}

:where(.site-main, .site-header, .site-footer) input:not([type="checkbox"]):not([type="radio"]),
:where(.site-main, .site-header, .site-footer) textarea,
:where(.site-main, .site-header, .site-footer) select {
	max-width: 100%;
}

.site-main :where(.entry-content, .article-content, .standard-page-layout .article-main) {
	overflow-wrap: anywhere;
}

.site-main :where(.entry-content, .article-content) > :where(p, ul, ol, blockquote) {
	max-width: var(--msh-v48-readable);
}

.site-main :where(table) {
	max-width: 100%;
}

.site-main :where(.entry-content, .article-content) > table,
.site-main :where(.msh-table-wrap) {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.site-main :where(img, video, iframe, svg) {
	max-width: 100%;
}

.site-main iframe {
	border: 0;
}

.msh-breadcrumb {
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
}
.msh-breadcrumb::-webkit-scrollbar { display: none; }

.article-hero h1,
.service-single h1,
.msh-webinar-single h1,
.standard-page h1 {
	text-wrap: balance;
}

.entry-content :where(h2, h3, h4) {
	scroll-margin-top: calc(var(--theme-header-height, 78px) + 24px);
	text-wrap: balance;
}

.entry-content :where(p, li) {
	text-wrap: pretty;
}

.msh-mobile-dock {
	padding-bottom: max(8px, env(safe-area-inset-bottom));
}

body.msh-keyboard-open .msh-mobile-dock[data-hide-on-keyboard="1"] {
	display: none !important;
}

.msh-search-overlay[hidden] {
	display: none !important;
}

.msh-search-overlay__panel {
	max-height: min(86vh, 760px);
	overflow: auto;
	overscroll-behavior: contain;
}

@media (max-width: 767px) {
	.theme-shell,
	.site-header__inner {
		width: min(100% - 28px, var(--theme-shell));
	}
	.site-main {
		min-width: 0;
	}
	.article-layout,
	.service-content {
		grid-template-columns: minmax(0, 1fr) !important;
	}
	.article-sidebar {
		order: 2;
		min-width: 0;
	}
	.article-main {
		min-width: 0;
	}
	.entry-content :where(h1) { font-size: clamp(1.75rem, 8vw, 2.35rem); line-height: 1.35; }
	.entry-content :where(h2) { font-size: clamp(1.4rem, 6vw, 1.9rem); line-height: 1.45; }
	.entry-content :where(h3) { font-size: clamp(1.18rem, 5vw, 1.55rem); line-height: 1.55; }
	.site-footer__main {
		grid-template-columns: minmax(0, 1fr) !important;
	}
	.site-footer__bottom {
		align-items: flex-start;
		gap: 12px;
	}
}

@media (max-width: 390px) {
	.theme-shell,
	.site-header__inner {
		width: min(100% - 20px, var(--theme-shell));
	}
	.msh-mobile-dock a {
		min-width: 0;
		font-size: 11px;
	}
}

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

@media (forced-colors: active) {
	:where(a, button, input, select, textarea):focus-visible {
		outline: 2px solid CanvasText;
	}
}

/* Print: remove navigation chrome and keep article/service content readable. */
@media print {
	.site-header, .site-footer, .msh-mobile-dock, .article-share, .msh-search-overlay {
		display: none !important;
	}
	.site-main { padding: 0 !important; }
	.theme-shell { width: 100% !important; max-width: none !important; }
	a { color: inherit; text-decoration: underline; }
}
