/**
 * FINCAP device-responsiveness and theme-control isolation.
 * Loaded last so theme and Elementor defaults cannot reintroduce overflow,
 * misplaced fixed controls or compressed mobile layouts.
 */

/* Remove third-party back-to-top squares only on FINCAP-generated pages. */
body.fincap-elementor-page #ast-scroll-top,
body.fincap-elementor-page .ast-scroll-top-icon,
body.fincap-elementor-page .ast-scroll-to-top-right,
body.fincap-elementor-page .ast-scroll-to-top-left,
body.fincap-elementor-page #scroll-top,
body.fincap-elementor-page #scrollToTop,
body.fincap-elementor-page #scroll-to-top,
body.fincap-elementor-page .scroll-top,
body.fincap-elementor-page .scrollup,
body.fincap-elementor-page .scroll-to-top,
body.fincap-elementor-page #back-to-top,
body.fincap-elementor-page .back-to-top,
body.fincap-elementor-page #e-back-to-top,
body.fincap-elementor-page .e-back-to-top,
body.fincap-elementor-page .elementor-back-to-top,
body.fincap-elementor-page .elementor-scroll-to-top,
body.fincap-elementor-page .hfe-scroll-to-top,
body.fincap-elementor-page .generate-back-to-top,
body.fincap-elementor-page .kadence-scroll-to-top,
body.fincap-elementor-page .ct-back-to-top,
body.fincap-elementor-page .zakra-scroll-to-top,
body.fincap-elementor-page [class*="scroll-to-top"],
body.fincap-elementor-page [id*="scroll-to-top"],
body.fincap-elementor-page [class*="back-to-top"],
body.fincap-elementor-page [id*="back-to-top"] {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Global sizing safeguards for Elementor containers and content grids. */
body.fincap-elementor-page,
body.fincap-elementor-page .fincap-page-document,
body.fincap-elementor-page .fincap-root-container,
body.fincap-elementor-page main,
body.fincap-elementor-page section {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-wrap: break-word;
}

body.fincap-elementor-page {
	overflow-x: hidden !important;
	overflow-x: clip !important;
}

body.fincap-elementor-page .container,
body.fincap-elementor-page .narrow {
	max-width: calc(100% - 24px);
}

body.fincap-elementor-page :where(
	.hero-split,
	.page-hero-grid,
	.section-heading,
	.coordination-grid,
	.suite-grid,
	.founder-trust-grid,
	.story-grid,
	.belief-grid,
	.services-index,
	.lifecycle-feature,
	.detail-section,
	.benefit-grid,
	.threshold-grid,
	.calculator-intro,
	.calculator-grid,
	.education-grid,
	.process-stage,
	.review-cadence,
	.disclosure-layout,
	.escalation-grid,
	.contact-grid,
	.form-grid,
	.mode-grid,
	.footer-main
) > * {
	min-width: 0;
}

body.fincap-elementor-page img,
body.fincap-elementor-page video,
body.fincap-elementor-page iframe {
	max-width: 100%;
}

body.fincap-elementor-page canvas {
	max-width: 100% !important;
}

body.fincap-elementor-page .floating-cta {
	right: max(16px, env(safe-area-inset-right)) !important;
	bottom: max(16px, env(safe-area-inset-bottom)) !important;
	max-width: calc(100vw - 32px) !important;
	white-space: nowrap;
}

@media (max-width: 1100px) {
	body.fincap-elementor-page .site-header .nav-row {
		gap: 16px;
	}

	body.fincap-elementor-page .brand-copy strong {
		letter-spacing: .14em;
	}

	body.fincap-elementor-page .hero-split {
		gap: 32px;
	}

	body.fincap-elementor-page .footer-main {
		gap: 32px;
	}
}

@media (max-width: 900px) {
	body.fincap-elementor-page .belief-grid,
	body.fincap-elementor-page .threshold-grid,
	body.fincap-elementor-page .education-grid,
	body.fincap-elementor-page .review-cadence,
	body.fincap-elementor-page .escalation-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	body.fincap-elementor-page .threshold-card,
	body.fincap-elementor-page .belief-card,
	body.fincap-elementor-page .cadence-item {
		min-height: 0;
	}
}

@media (max-width: 820px) {
	body.fincap-elementor-page .announcement {
		height: auto !important;
		min-height: 40px;
		padding: 8px 12px;
		line-height: 1.35;
	}

	body.fincap-elementor-page .site-header .nav-row {
		height: 72px;
		gap: 12px;
	}

	body.fincap-elementor-page .brand,
	body.fincap-elementor-page .menu-toggle {
		position: relative;
		z-index: 3;
	}

	body.fincap-elementor-page .brand {
		max-width: calc(100% - 56px);
	}

	body.fincap-elementor-page .brand-copy {
		min-width: 0;
	}

	body.fincap-elementor-page .menu-toggle {
		flex: 0 0 48px;
		margin-left: auto;
	}

	body.fincap-elementor-page .primary-nav {
		z-index: 2;
		width: min(384px, 100vw);
		max-width: 100vw;
		padding: 128px 20px 32px;
		overscroll-behavior: contain;
	}

	body.fincap-elementor-page .mega-menu {
		max-width: 100%;
	}

	body.fincap-elementor-page .home-hero--split {
		min-height: 0;
		padding: 160px 0 64px;
	}

	body.fincap-elementor-page .hero-split,
	body.fincap-elementor-page .founder-trust-grid,
	body.fincap-elementor-page .lifecycle-feature,
	body.fincap-elementor-page .quote-panel,
	body.fincap-elementor-page .story-grid,
	body.fincap-elementor-page .detail-section,
	body.fincap-elementor-page .calculator-grid,
	body.fincap-elementor-page .process-stage,
	body.fincap-elementor-page .disclosure-layout,
	body.fincap-elementor-page .contact-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body.fincap-elementor-page .page-hero {
		min-height: 0 !important;
		padding: 160px 0 72px !important;
	}

	body.fincap-elementor-page .section {
		padding: 88px 0;
	}

	body.fincap-elementor-page .quote-block,
	body.fincap-elementor-page .founder-card,
	body.fincap-elementor-page .process-step {
		min-height: 0;
	}

	body.fincap-elementor-page .hero-architecture,
	body.fincap-elementor-page .hero-architecture img,
	body.fincap-elementor-page .founder-trust-visual,
	body.fincap-elementor-page .founder-trust-visual img,
	body.fincap-elementor-page .image-frame img {
		min-height: clamp(320px, 60vw, 480px);
	}

	body.fincap-elementor-page .calculator-shell,
	body.fincap-elementor-page .calculator-panel,
	body.fincap-elementor-page .chart-wrap,
	body.fincap-elementor-page .consultation-form {
		min-width: 0;
		max-width: 100%;
	}

	body.fincap-elementor-page .footer-main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 36px 24px;
	}

	body.fincap-elementor-page .footer-brand,
	body.fincap-elementor-page .footer-col:last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	body.fincap-elementor-page .suite-grid,
	body.fincap-elementor-page .belief-grid,
	body.fincap-elementor-page .recognition-grid,
	body.fincap-elementor-page .threshold-grid,
	body.fincap-elementor-page .benefit-grid,
	body.fincap-elementor-page .education-grid,
	body.fincap-elementor-page .review-cadence,
	body.fincap-elementor-page .escalation-grid,
	body.fincap-elementor-page .mode-grid,
	body.fincap-elementor-page .institution-grid,
	body.fincap-elementor-page .services-threshold-bento,
	body.fincap-elementor-page .lifecycle-track,
	body.fincap-elementor-page .result-cards,
	body.fincap-elementor-page .footer-main {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body.fincap-elementor-page .services-threshold-bento article:first-child,
	body.fincap-elementor-page .result-card:last-child,
	body.fincap-elementor-page .footer-brand,
	body.fincap-elementor-page .footer-col:last-child {
		grid-column: auto !important;
	}

	body.fincap-elementor-page .service-index-card {
		grid-template-columns: 40px minmax(0, 1fr) !important;
		gap: 16px !important;
		padding: 20px !important;
	}

	body.fincap-elementor-page .service-index-card .arrow {
		grid-column: 2;
	}

	body.fincap-elementor-page .yield-summary {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body.fincap-elementor-page .yield-summary__head,
	body.fincap-elementor-page .yield-summary > p {
		grid-column: auto !important;
	}
}

@media (max-width: 560px) {
	body.fincap-elementor-page .container,
	body.fincap-elementor-page .narrow {
		width: calc(100% - 24px) !important;
		max-width: calc(100% - 24px) !important;
	}

	body.fincap-elementor-page .announcement {
		min-height: 42px;
		padding: 8px 12px;
		font-size: 10px;
	}

	body.fincap-elementor-page .site-header .nav-row {
		height: 68px;
	}

	body.fincap-elementor-page .brand-mark {
		width: 46px;
		height: 46px;
	}

	body.fincap-elementor-page .brand-copy strong {
		font-size: 13px;
		letter-spacing: .12em;
	}

	body.fincap-elementor-page .primary-nav {
		width: 100vw;
		padding: 120px 16px 28px;
	}

	body.fincap-elementor-page .home-hero--split {
		padding: 144px 0 52px;
	}

	body.fincap-elementor-page .page-hero {
		padding: 144px 0 56px !important;
	}

	body.fincap-elementor-page .section,
	body.fincap-elementor-page .visual-story-section {
		padding: 72px 0;
	}

	body.fincap-elementor-page .hero-actions,
	body.fincap-elementor-page .form-actions {
		width: 100%;
	}

	body.fincap-elementor-page .hero-actions .button,
	body.fincap-elementor-page .form-actions .button,
	body.fincap-elementor-page .cta-layout .button {
		width: 100%;
	}

	body.fincap-elementor-page .hero-architecture,
	body.fincap-elementor-page .hero-architecture img,
	body.fincap-elementor-page .founder-trust-visual,
	body.fincap-elementor-page .founder-trust-visual img,
	body.fincap-elementor-page .image-frame img {
		min-height: 280px;
	}

	body.fincap-elementor-page .portfolio-preview__top,
	body.fincap-elementor-page .portfolio-preview__value,
	body.fincap-elementor-page .portfolio-preview__legend,
	body.fincap-elementor-page .yield-summary__head,
	body.fincap-elementor-page .footer-bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	body.fincap-elementor-page .portfolio-preview__value strong {
		font-size: clamp(30px, 10vw, 42px);
	}

	body.fincap-elementor-page .calculator-panel,
	body.fincap-elementor-page .consultation-form,
	body.fincap-elementor-page .process-step,
	body.fincap-elementor-page .quote-block,
	body.fincap-elementor-page .founder-card,
	body.fincap-elementor-page .lifecycle-card {
		padding: 20px !important;
	}

	body.fincap-elementor-page .chart-wrap {
		min-height: 272px;
		padding: 8px;
	}

	body.fincap-elementor-page .control-head {
		align-items: stretch;
	}

	body.fincap-elementor-page .number-wrap,
	body.fincap-elementor-page .number-wrap input {
		width: 100%;
	}

	body.fincap-elementor-page .mode-option span {
		min-height: 72px;
	}

	body.fincap-elementor-page .entity-table th,
	body.fincap-elementor-page .entity-table td {
		overflow-wrap: anywhere;
	}

	body.fincap-elementor-page .map-preview {
		height: 208px;
	}

	body.fincap-elementor-page .map-pin {
		left: 12px;
		right: 12px;
		width: auto;
	}

	body.fincap-elementor-page .site-footer {
		padding-bottom: 76px;
	}

	body.fincap-elementor-page .footer-main {
		padding: 64px 0 36px;
	}

	body.fincap-elementor-page .floating-cta {
		width: auto !important;
		height: auto !important;
		min-height: 48px;
		right: max(12px, env(safe-area-inset-right)) !important;
		bottom: max(12px, env(safe-area-inset-bottom)) !important;
		justify-content: center;
		padding: 11px 16px !important;
		border-radius: 999px !important;
		font-size: 13px !important;
		line-height: 1.2;
	}

	body.fincap-elementor-page .floating-cta::before {
		font-size: 14px;
	}
}

@media (max-width: 782px) {
	body.admin-bar.fincap-elementor-page .primary-nav {
		top: 46px;
		bottom: auto;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}
}

@media (max-width: 380px) {
	body.fincap-elementor-page .brand-copy strong {
		font-size: 12px;
		letter-spacing: .09em;
	}

	body.fincap-elementor-page .floating-cta {
		max-width: calc(100vw - 24px) !important;
		font-size: 12px !important;
	}
}
