/* The original demo canvas, with navigation for the saved sentence pair. */
#question-sidebar,.article-navigation-options,.reading-mode,
.canvas-toolbar>label:has(#show-details),.canvas-toolbar>label:has(#stack-mode),
.canvas-toolbar>label:has(#show-logic-checks),
.compact-view-note,#flex-inspector,#computed-group-evidence,#meaning-check-details,
#meaning-panel,#prediction-details,#structures,.content>details { display:none; }
main { grid-template-columns:220px minmax(0,1fr); }
.sidebar-collapsed main { grid-template-columns:minmax(0,1fr); }
#article-sidebar { display:block; }
.sidebar-collapsed #article-sidebar { display:none; }
.source-text p { margin:4px 0 8px; }
#graph>text.section-label { font-size:13px; }
#graph-scroll { min-height:500px; }
@media(max-width:700px) {
  main { display:block; }
  #article-sidebar { position:absolute; }
}

/* Pink dots reuse the old demo's meaning colour. The dotted verticals are
   alignment guides; arrows show measured incoming relationships only. */
.incoming-column-guide { fill:none; stroke:var(--line); stroke-dasharray:3 5; stroke-width:1; pointer-events:none; }
.incoming-line { fill:none; stroke:#bd7c9f; stroke-width:1.15; opacity:1; }
.incoming-hit { fill:none; stroke:transparent; stroke-width:12; pointer-events:stroke; }
.incoming-arrow path { fill:#bd7c9f; }
.incoming-wire:hover .incoming-line,.incoming-wire.selected .incoming-line { opacity:1; stroke-width:2; }
.incoming-node-hit { fill:transparent; }
.incoming-point { fill:#bb7b9f; stroke:#ecc2db; stroke-width:1.2; }
.incoming-meaning:hover .incoming-point,.incoming-meaning.selected .incoming-point { fill:#ffdaef; stroke:var(--meaning); stroke-width:2.5; }

.incoming-label-background { fill:var(--panel-soft); fill-opacity:.94; }
.incoming-chunk-name { fill:var(--meaning); font-size:10px; font-weight:600; }

/* Click selection keeps all links visible. Only temporary hover dims others. */
#graph .edge.dim { opacity:1; }
#graph .edge .line { opacity:1; }
#graph .edge.hover-muted,.incoming-wire.hover-muted { opacity:.12; }

/* Compact concepts annotate the existing diagram; its pink labels stay unchanged. */
.concept-extraction { display:grid; gap:8px; margin:0 0 18px; padding:14px; border:1px solid var(--line); }
.concept-extraction textarea { width:100%; box-sizing:border-box; color:var(--ink); background:var(--panel-soft); border:1px solid var(--line); border-radius:4px; padding:8px; font:inherit; }
.concept-extraction p { margin:0; color:var(--muted); font-size:12px; }
.concept-groups { padding:14px; overflow:auto; }
.concept-groups h3,.concept-groups h4 { margin:10px 0; }
.concept-groups p { color:var(--muted); font-size:12px; }
.concept-groups table { width:100%; border-collapse:collapse; font-size:12px; }
.concept-groups th,.concept-groups td { text-align:left; vertical-align:top; border-bottom:1px solid var(--line); padding:8px; }
.concept-groups button { text-align:left; }

#toggle-extract { margin-bottom:12px; }
.live-question { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 20px; }
.live-question input { flex:1; min-width:180px; padding:9px; color:var(--ink); background:var(--panel-soft); border:1px solid var(--line); border-radius:5px; font:inherit; }
.live-question span { font-size:11px; color:var(--muted); }
.live-question span.error { color:var(--error,#ed8e9a); }
.answer-plan { margin:4px 20px 12px; }
.answer-plan p { font-size:12px; color:var(--muted); }
.answer-plan pre { max-height:320px; overflow:auto; font-size:11px; }
.incoming-score { fill:var(--ink); stroke:var(--panel-soft); stroke-width:3px; paint-order:stroke; font-size:10px; pointer-events:none; }
.neo4j-panel { margin:4px 20px 12px; }
.neo4j-panel a { color:var(--meaning); display:inline-block; margin:12px 0 0; }
.neo4j-panel p { font-size:12px; color:var(--muted); }
.neo4j-panel textarea { box-sizing:border-box; width:100%; margin:8px 0; padding:8px; color:var(--ink); background:var(--panel-soft); border:1px solid var(--line); font:11px/1.5 ui-monospace,monospace; }

.concept-stem { fill:none; stroke:#a893c4; stroke-width:1; stroke-dasharray:3 4; opacity:.65; pointer-events:none; }
.compact-concepts { cursor:pointer; }
.compact-concept-frame { fill:var(--panel-soft); stroke:#8e70b3; stroke-width:1; }
.compact-concept-text { fill:#cbb2e9; font-size:10px; font-weight:600; }
.compact-concepts.provisional .compact-concept-text { fill:#d1b481; }
.compact-concepts.provisional .compact-concept-frame { stroke:#bc9d68; stroke-dasharray:3 3; }
.compact-concepts:hover .compact-concept-frame,.compact-concepts:focus .compact-concept-frame,.compact-concepts.in-neighbourhood .compact-concept-frame { stroke:#ccb0ed; stroke-width:2; }
.concept-legend { margin:6px 22px; color:var(--muted); font-size:11px; }
.neighbourhood-ring { fill:none; stroke:#b394e8; stroke-width:2; pointer-events:none; }
.neighbourhood-ring.hop-0 { stroke:#e2caff; stroke-width:3; }
.neighbourhood-ring.hop-2 { stroke-dasharray:3 3; }
#toggle-concepts[aria-pressed=true] { border-color:#a893c4; color:#cfb4ff; }
.selection { overflow:auto; }
.selection td { white-space:normal; }
