     if (!cachedContent || cachedContent !== freshContent) {
                    displayContent(freshContent);
                }
            } catch (error) {
                console.error('Load error:', error);
                if (!cachedContent) {
                    showError(error.message);
                }
            }
        }

        // --- Initialization ---
        document.addEventListener('DOMContentLoaded', () => {
            loadContent();

            const debouncedSearch = debounce(perf