// Home screen — search/browse-focused with categories and map teaser function HomeScreen({ onNav, onSelectEntry, onSelectCategory }) { const [query, setQuery] = React.useState(''); const { ENTRIES, ENCOUNTER_TYPES } = window.ARCHIVE; // Signal Spotlight — the highest-conviction high-credibility record. // Hidden entirely when nothing qualifies (fresh archives start at cred 0). const featured = ENTRIES.filter(e => e.credibility >= 4) .sort((a, b) => (b.believe || 0) - (a.believe || 0))[0] || null; // Don't repeat the featured entry in the recent grid below. const recent = ENTRIES.filter(e => !featured || e.id !== featured.id).slice(0, 6); const sig = (n) => ( {[1,2,3,4,5].map(i => )} ); // Real derived stats const photoCount = ENTRIES.filter(e => e.hasPhoto).length; const countryCount = new Set(ENTRIES.map(e => e.place?.split(',').pop()?.trim()).filter(Boolean)).size; const lastEntry = ENTRIES.length > 0 ? ENTRIES[ENTRIES.length - 1] : null; return (