✨ Optimize
{#if !store.activeId || !store.content.trim()}
Open a diagram to analyse it.
{:else if !a.supported}
Decluttering is built for flowcharts & state diagrams.

This looks like a {a.kind || 'different'} diagram, which can't be analysed here yet.

{:else if a.metrics && a.graph}
{a.score}
{a.rating}
readability score
{#if a.graph.usesElk}
ELK layout on
{/if}
{a.metrics.nodes}nodes
{a.metrics.edges}edges
{a.metrics.density.toFixed(1)}edges/node
{a.metrics.maxDegree}busiest hub
{a.metrics.interGroupEdges}cross-group
{a.metrics.subgraphs}groups
Direction
{#each DIRECTIONS as d} {/each}
Suggestions
{#each a.fixes as f (f.id)}
{f.title} {#if f.apply} {:else} tip {/if}

{f.detail}

{/each} {#if a.fixes.length === 0}
✓ Nothing to declutter — this reads cleanly.
{/if}
Focus a node {#if store.focusNode} {/if}

Spotlight one node and its neighbours in the preview.

{#each focusable.slice(0, 12) as n (n.id)} {/each}
{/if}