/* Shared refinements for the editorial, guides and calculator templates. */
body.vb-kadence-portal {
	--vb-subtle: #62686d;
	--vbph-subtle: #62686d;
}

/* A two-colour indicator remains visible on light and dark panels. */
body.vb-kadence-portal :is(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid #f9ab00;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #202124;
}

body.vb-kadence-portal :is(.vb-portal-search, .vb-brand-finder__search, .vbnr-section-search):focus-within {
	outline: 3px solid #996b00;
	outline-offset: 3px;
}

@media (max-width: 800px) {
	/* Keep focused fields readable without automatic iPhone form zoom. */
	body.vb-kadence-portal :is(input[type="number"], input[type="date"], input[type="search"], input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input[type="url"], input:not([type]), select, textarea) {
		font-size: 16px;
	}

	.vb-home-hero,
	.vb-home-hero__inner { min-height: 0; }
	.vb-home-hero__inner { padding-block: 44px 40px; }
	body.vb-kadence-portal .vb-home-hero h1 {
		font-size: clamp(34px, 10.5vw, 48px);
		letter-spacing: -.035em;
		line-height: 1.12;
		overflow-wrap: break-word;
	}
	.vb-home-hero__lede { margin-block: 20px 24px; }
	body.page.vb-kadence-portal .entry-hero-container-inner {
		min-height: 0;
		padding-block: 32px;
	}
	body.page.vb-kadence-portal .entry-hero .entry-header { margin-bottom: 0; min-height: 0; }

	/* Reach the actual tools sooner while preserving the introduction. */
	body.vb-kadence-portal :is(.vb-tools-hero, .vb-tool-hero) { padding-block: 24px 36px; }
	body.vb-kadence-portal :is(.vb-tools-hero, .vb-tool-hero) h1 {
		font-size: clamp(32px, 8.7vw, 42px);
		letter-spacing: -.03em;
		line-height: 1.15;
		overflow-wrap: break-word;
	}
	.vb-tools-breadcrumbs { margin-bottom: 26px; }
	.vb-tools-hero__grid,
	.vb-tool-hero__grid { gap: 24px; }
	.vb-tool-hero__icon {
		border-radius: 14px;
		min-height: 72px;
		padding: 12px 18px;
	}
	.vb-tool-hero__icon svg { height: 40px; width: 40px; flex: 0 0 40px; }
	.vb-tool-hero__icon small { margin-top: 0; text-align: left; }
	.vb-tool-hero__trust { margin-top: 20px; }

	/* Standalone navigation links and disclosure controls need usable targets. */
	body.vb-kadence-portal :is(.vb-brand-finder__search button, .vbnr-section-search button, .vb-mobile-search-panel form button, .vb-mobile-search-panel__close) {
		min-height: 44px;
		min-width: 44px;
	}
	body.vb-kadence-portal .vbnr-section-search input { min-height: 44px; }
	body.vb-kadence-portal .site-branding a { display: inline-flex; align-items: center; min-height: 44px; }
	body.vb-kadence-portal .site-footer .widget_nav_menu a { display: inline-flex; align-items: center; min-height: 44px; }
	body.vb-kadence-portal :is(.vb-tool, .vb-tool-prompt) summary { padding-block: 10px; min-height: 44px; }
	body.vb-kadence-portal .vb-tools-guides a { min-height: 44px; }

	/* Scrollable navigation keeps its contents; expose the scroll affordance. */
	.vb-tool-anchor-nav .vb-tools-shell,
	.vb-tools-directory__filters {
		scrollbar-width: thin;
		scroll-padding-inline: 20px;
		overscroll-behavior-x: contain;
	}
	.vb-tool-anchor-nav a { scroll-margin-inline: 20px; }
	.vb-tool-anchor-nav:focus-within { z-index: 26; }
	.vb-mobile-search-panel {
		max-height: calc(100dvh - 76px - env(safe-area-inset-bottom));
		overflow-y: auto;
	}
	.vb-mobile-search-panel form > div:focus-within {
		outline: 3px solid #f9ab00;
		outline-offset: 3px;
	}
	body.vb-kadence-portal .vb-mobile-search-panel input:focus-visible { box-shadow: none; outline: 0; }
	.vb-mobile-search-panel label { padding-right: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
