/* Global public-header repair. Desktop layout remains owned by the active theme. */
@media (max-width: 800px) {
	header.wp-block-template-part .nfd-py-sm.wp-block-group.is-nowrap {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		gap: 8px !important;
	}

	header.wp-block-template-part .wp-block-site-logo,
	header.wp-block-template-part .custom-logo-link {
		min-width: 0;
		flex: 1 1 auto;
	}

	header.wp-block-template-part .custom-logo {
		display: block;
		width: min(40vw, 180px) !important;
		max-width: 100% !important;
		height: auto !important;
	}

	header.wp-block-template-part .nfd-gap-2xl {
		min-width: 0;
		gap: 8px !important;
	}

	header.wp-block-template-part .wp-block-navigation,
	header.wp-block-template-part .wp-block-navigation__responsive-container-open,
	header.wp-block-template-part .wp-block-buttons,
	header.wp-block-template-part .wp-block-button {
		flex: 0 0 auto;
	}

	header.wp-block-template-part .wp-block-button__link {
		box-sizing: border-box;
		display: inline-flex !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		min-height: 44px;
		align-items: center;
		justify-content: center;
		padding: 10px 12px !important;
		font-size: clamp(.72rem, 3vw, .9rem) !important;
		line-height: 1.15 !important;
		text-align: center;
		white-space: nowrap !important;
		word-break: normal !important;
		overflow-wrap: normal !important;
		hyphens: none !important;
	}

	/* WordPress block-navigation modal. */
	header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open {
		box-sizing: border-box;
		position: fixed;
		inset: 0;
		z-index: 100000;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		overflow-x: hidden;
		overflow-y: auto;
		padding: 72px 22px max(34px, env(safe-area-inset-bottom));
		background: #fff;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container-close {
		position: fixed;
		top: max(18px, env(safe-area-inset-top));
		right: 20px;
		z-index: 100002;
		width: 44px;
		height: 44px;
		padding: 8px;
		color: #17375e;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container-content,
	header.wp-block-template-part .wp-block-navigation__responsive-dialog,
	header.wp-block-template-part .wp-block-navigation__container {
		box-sizing: border-box;
		width: 100%;
		max-width: 560px;
		margin: 0 auto;
		padding: 0 !important;
		align-items: stretch !important;
		justify-content: flex-start !important;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container-content {
		display: block !important;
	}

	header.wp-block-template-part .wp-block-navigation__container {
		display: flex !important;
		gap: 4px !important;
		flex-direction: column !important;
	}

	header.wp-block-template-part .wp-block-navigation-item {
		box-sizing: border-box;
		width: 100%;
		align-items: stretch !important;
	}

	header.wp-block-template-part .wp-block-navigation-item__content {
		box-sizing: border-box;
		display: block;
		width: 100%;
		min-height: 44px;
		padding: 10px 12px !important;
		border-radius: 8px;
		color: #17375e !important;
		font-size: 1.08rem !important;
		font-weight: 750;
		line-height: 1.35 !important;
		text-align: left !important;
		text-decoration: none !important;
	}

	header.wp-block-template-part .wp-block-navigation-item__content:hover,
	header.wp-block-template-part .wp-block-navigation-item__content:focus-visible {
		background: #eef5fb;
		outline: none;
	}

	header.wp-block-template-part .wp-block-navigation__submenu-container {
		box-sizing: border-box !important;
		position: static !important;
		visibility: visible !important;
		width: 100% !important;
		height: auto !important;
		min-width: 0 !important;
		opacity: 1 !important;
		overflow: visible !important;
		gap: 2px !important;
		margin: 0 0 8px !important;
		padding: 0 0 0 16px !important;
		border: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	header.wp-block-template-part .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		min-height: 40px;
		padding: 8px 12px !important;
		font-size: .98rem !important;
		font-weight: 650;
	}

	header.wp-block-template-part .wp-block-navigation-submenu__toggle,
	header.wp-block-template-part .wp-block-navigation__submenu-icon {
		display: none !important;
	}

	body.pio-mobile-nav-open {
		position: fixed;
		width: 100%;
		overflow: hidden !important;
	}
}

@media (max-width: 600px) {
	/* Preserve access to the Assistant without covering mobile page content. */
	.pio-core-floating-assistant {
		right: 12px !important;
		bottom: max(12px, env(safe-area-inset-bottom)) !important;
	}

	.pio-core-floating-assistant__open {
		box-sizing: border-box;
		width: 54px;
		height: 54px;
		padding: 0 !important;
		border-width: 3px !important;
		font-size: 0 !important;
		line-height: 1 !important;
	}

	.pio-core-floating-assistant__open::before {
		font-size: 21px;
		content: "\1F50E";
	}

	.pio-core-floating-assistant__panel {
		width: calc(100vw - 20px) !important;
		max-height: calc(100dvh - 20px) !important;
	}
}

@media (max-width: 390px) {
	header.wp-block-template-part .custom-logo {
		width: min(38vw, 150px) !important;
	}

	header.wp-block-template-part .wp-block-button__link {
		padding-right: 10px !important;
		padding-left: 10px !important;
		font-size: .72rem !important;
	}
}
