// Atlas page — top control bar (lens / mode / view), full-bleed visualization, // compact corner legend, marquee strip + editorial frame below. { const { LENSES, STATES, scoreFor, lensMetaFor, isLive } = window.PL_DATA; function Landing({ go, lensId, setLensId, mapStyle, showLabels }) { const lens = LENSES.find(l => l.id === lensId) || LENSES[0]; const [mode, setMode] = React.useState("passed"); const [view, setView] = React.useState("map"); // Counts driven by REAL data const scoredCodes = STATES.map(s => s[0]).filter(c => { const m = lensMetaFor && lensMetaFor(c, lens.id); return m && m.bill_count > 0; }); const scoredTotal = scoredCodes.length; const protective = scoredCodes.filter(c => scoreFor(c, lens.id, mode) >= 55).length; const restrictive = scoredCodes.filter(c => scoreFor(c, lens.id, mode) < 45).length; const neutral = scoredTotal - protective - restrictive; const modeLabels = { passed: "Bills that became law", pressure: "Bills that were attempted", all: "All legislative activity", }; const viewProps = { lensId, mode, onSelect: (code) => { window.__plSelectedState = code; go("state"); }, showLabels, }; return (
{/* CONTROL BAR — replaces floating cards on the map */}
Lens
Show
{[ ["passed", "Became law"], ["pressure", "Attempted"], ["all", "All"], ].map(([k, lbl]) => ( ))}
View
{[ ["map", "Map"], ["treemap", "Population"], ["bars", "Ranked"], ].map(([k, lbl]) => ( ))}
{protective} protective · {neutral} neutral · {restrictive} restrictive
{/* STAGE — full-bleed visualization area */}
{view === "map" && } {view === "treemap" && } {view === "bars" && } {/* Compact legend bottom-right (only on map view — bars and treemap have their own) */} {view === "map" && (
)}
{/* MARQUEE STRIP */}
{scoredTotal} states scored
22 policy lenses
{protective} protective on {lens.short.toLowerCase()}
{restrictive} restrictive on {lens.short.toLowerCase()}
Source: LegiScan + Claude
{isLive() ? "Live data" : "Stub data (offline)"}
{/* EDITORIAL FRAME */}
What you're looking at

Each state's color reflects its {modeLabels[mode].toLowerCase()} on the {lens.label.toLowerCase()} lens this session. Rust = legislature moved away from access. Teal = legislature moved toward access. Slate = no net change. Hatched = no bills scored yet.

Switch view to Population to size states by who lives there (so California's lift counts as much more than Wyoming's). Switch to Ranked to see all states sorted descending — the most-protective state at top, the most-restrictive at bottom. These are legislative-motion scores, not snapshot-of-current-law scores.{" "} go("methodology")} style={{ color: "var(--accent)", cursor: "pointer", textDecoration: "underline" }}> How we score →

); } window.PL_Landing = Landing; }