A unifying framework for continuity and complexity in higher types (Logical Methods in Computer Science, 2020)