/* Saved Lean proof state, shared by graphs, code and summaries. */
:root {
  --proof-own-fill: #ffdde3; --proof-own-stroke: #ef476f; --proof-own-text: #a91d42;
  --proof-inherited-fill: #fbebcf; --proof-inherited-stroke: #df8a16; --proof-inherited-text: #92540c;
  --proof-proved-fill: #dcf3e7; --proof-proved-stroke: #63b58a; --proof-proved-text: #216748;
}
[data-proof-state="own"], .color-status-own { --proof-fill: var(--proof-own-fill); --proof-stroke: var(--proof-own-stroke); --proof-text: var(--proof-own-text); --source-rgb: 239, 71, 111; }
[data-proof-state="inherited"], .color-status-inherited { --proof-fill: var(--proof-inherited-fill); --proof-stroke: var(--proof-inherited-stroke); --proof-text: var(--proof-inherited-text); --source-rgb: 223, 138, 22; }
[data-proof-state="proved"], .color-status-proved { --proof-fill: var(--proof-proved-fill); --proof-stroke: var(--proof-proved-stroke); --proof-text: var(--proof-proved-text); }
[data-proof-state="unknown"] { --proof-fill: #e4ecf4; --proof-stroke: #b5c0cd; --proof-text: #64748b; }

/* File cards have the same light body, compact typography and fine border as Open work. */
.graph-node-group[data-proof-state]:not([data-completeness-source="author"]) > .graph-node-shape:not(.study-chip):not(.folder-node-shape) {
  fill: var(--proof-fill) !important; stroke: var(--proof-stroke) !important;
  stroke-width: 1 !important; stroke-dasharray: none !important; vector-effect: non-scaling-stroke;
}
.graph-node-group[data-proof-state]:not([data-completeness-source="author"]) > .graph-node-shape:is(.focus, .selected-node):not(.study-chip):not(.file-node-shape) {
  stroke: #182739 !important; stroke-width: 2.4px !important;
}
/* A Blueprint node with no Lean code has no proof state to show: it stays white. */
.graph-node-group[data-proof-state="unknown"]:not([data-completeness-source="author"]) > .graph-node-shape.blueprint-node.no-lean-code:not(.study-chip):not(.folder-node-shape) {
  fill: #ffffff !important;
}
/* Author flags are a separate presentation, including while selecting related nodes. */
.graph-node-group[data-completeness-source="author"] > .graph-node-shape.blueprint-node {
  fill: var(--blueprint-author-fill) !important;
}
.graph-node-group[data-completeness-source="author"] > .graph-node-shape.blueprint-node:not(.divergent) {
  stroke: var(--blueprint-author-stroke) !important; stroke-dasharray: none !important;
}
.file-focus-managed .graph-node-group .graph-label.file-title {
  font: 550 16px var(--mono, monospace) !important; fill: var(--proof-text) !important;
}
.file-focus-managed .graph-node-group :is(.file-card-path, .file-decl-projection) {
  font: 11px var(--sans, system-ui) !important; fill: #718096 !important;
}
.file-focus-managed .graph-node-group .file-summary {
  font: 10px var(--sans, system-ui) !important; fill: #64748b !important;
}
.file-count-own, .sh-name.red { fill: var(--proof-own-text) !important; }
.file-count-inherited, .sh-name.inherited { fill: var(--proof-inherited-text) !important; }
.graph-shell[data-graph-type="file_graph"] > .graph-toolbar {
  min-height: 40px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 5px 12px; padding: 5px 12px;
}
.graph-shell[data-graph-type="file_graph"] .graph-toolbar-right { margin-left: auto; justify-content: flex-end; }
.graph-shell[data-graph-type="file_graph"] .graph-meta-row { gap: 6px; }
.graph-shell[data-graph-type="file_graph"] .graph-canvas { background: #fff; }

/* Status fills survive selection; the neutral outline conveys the interaction. */
.study-chip.state-hole .study-chip-body { fill: var(--proof-own-fill); stroke: var(--proof-own-stroke); stroke-dasharray: none; }
.study-chip.state-hole .study-chip-label { fill: var(--proof-own-text); }
.study-chip.state-blocked .study-chip-body { fill: var(--proof-inherited-fill); stroke: var(--proof-inherited-stroke); }
.study-chip.state-blocked .study-chip-label { fill: var(--proof-inherited-text); }
.study-chip.state-proved .study-chip-body { fill: var(--proof-proved-fill); stroke: var(--proof-proved-stroke); }
.study-chip:is(.is-root, .is-selected) .study-chip-body { stroke: #182739; }
.study-key-dot.state-hole { background: var(--proof-own-fill); border-color: var(--proof-own-stroke); border-style: solid; }
.study-key-dot.state-blocked { background: var(--proof-inherited-fill); border-color: var(--proof-inherited-stroke); }

.file-line:is(.color-status-own, .color-status-inherited) { background: rgba(var(--source-rgb), .07); border-left-color: var(--proof-stroke); }
.source-editor-table .file-line.color-status-own { --source-rgb: 239, 71, 111; }
.source-editor-table .file-line.color-status-inherited { --source-rgb: 223, 138, 22; }
.file-outline-item:is(.color-status-own, .color-status-inherited),
.source-decl-info-row:is(.color-status-own, .color-status-inherited) .inline-decl-card { border-left-color: var(--proof-stroke); }
.source-minimap-segment:is(.color-status-own, .color-status-inherited) { background: var(--proof-stroke); }
.source-summary-token:is(.color-status-own, .color-status-inherited),
.file-color-chip:is(.color-status-own, .color-status-inherited),
.compact-stat:is(.color-status-own, .color-status-inherited) { color: var(--proof-text); }
.compact-stat:is(.color-status-own, .color-status-inherited) { border-color: var(--proof-stroke); background: var(--proof-fill); }
.meta-chip:is(.color-status-own, .color-status-inherited) { color: var(--proof-text); border-color: var(--proof-stroke); background: var(--proof-fill); }
.sh-kern-own { fill: var(--proof-own-stroke); }
.sh-kern-inh { fill: var(--proof-inherited-stroke); stroke: none; }
.ref-mark.ref-red { color: var(--proof-own-text); background: #ef476f20; box-shadow: inset 0 -2px 0 var(--proof-own-stroke); }
.ref-mark.ref-inherited { color: var(--proof-inherited-text); background: #df8a1620; box-shadow: inset 0 -2px 0 var(--proof-inherited-stroke); }
.file-line.focused .ref-mark.ref-inherited { background: #df8a1630; }
.ref-mark.ref-ok { color: var(--proof-proved-text); background: #63b58a20; box-shadow: inset 0 -2px 0 var(--proof-proved-stroke); }
.file-line.focused .ref-mark.ref-ok { background: #63b58a30; }
.inline-decl-chip.ref-marks-inherited { color: var(--proof-inherited-text); background: var(--proof-inherited-fill); border-color: var(--proof-inherited-stroke); }
.source-panel-summary-compact .source-compact-title-block { min-width: 0; flex: 1; }
.source-panel-summary-compact .source-summary-text { white-space: normal; overflow: visible; text-overflow: clip; }

/* Import edges stay neutral; their weight distinguishes re-exports. Color is reserved for
   the proof state of cards, with a violet path for the current focus as in Open work. */
#context-preview .graph-svg.file-focus-managed .graph-edge.file-import-edge {
  stroke: #a3b0c2 !important; stroke-opacity: .65 !important; stroke-width: .7px !important; vector-effect: non-scaling-stroke;
}
#context-preview .graph-svg.file-focus-managed .graph-edge.file-import-edge.public-import-edge { stroke: #8999af !important; stroke-width: 1px !important; }
#context-preview .graph-svg.file-focus-managed .graph-edge.file-import-edge.map-related-edge:is(.public-import-edge, .private-import-edge) {
  stroke: #8070b7 !important; stroke-width: 1.25px !important; stroke-opacity: 1 !important;
}
.file-focus-managed :is(#arrowhead-public-import, #arrowhead-file-import) path { fill: #9aa8bf; }
.graph-legend-modal .legend-line.public-import-preview { border-top-color: #8999af !important; }
.graph-legend-modal .legend-dot.proved-code-preview { background: var(--proof-proved-fill); border: 1px solid var(--proof-proved-stroke); }

/* Syntax/examples share the green presentation without being counted as proved. */
.color-status-syntax { --source-rgb: 99, 181, 138; }
.source-editor-table .file-line.color-status-syntax { --source-rgb: 99, 181, 138; }
.file-line.color-status-syntax { background: rgba(99, 181, 138, .07); border-left-color: var(--proof-proved-stroke); }
.source-minimap-segment.color-status-syntax { background: var(--proof-proved-stroke); }
.source-summary-token.color-status-syntax, .file-color-chip.color-status-syntax { color: var(--proof-proved-text); }
.source-summary-token.color-status-inherited { color: #b56a08; }

/* The shared color control belongs to Structure and Lean source, not the center. */
.structure-color-control { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: .72rem; }
.structure-color-control .compact-select { width: 108px; min-width: 0; height: 25px; padding: 0 4px; font-size: .72rem; }
.repo-panel .filter-row { gap: 6px; padding: 8px 10px; }
.repo-panel .filter-chip { gap: 4px; padding: 3px 6px; font-size: .78rem; }
#context-preview .graph-svg.file-focus-managed .graph-edge.file-import-edge.private-import-edge { stroke-dasharray: 4 3 !important; }
#context-preview .graph-svg.file-focus-managed .graph-edge.file-import-edge.public-import-edge { stroke-dasharray: none !important; }
.graph-legend-modal .legend-line.private-import-preview { border-top: 1px dashed #a3b0c2; }
.graph-legend-modal .legend-line.public-import-preview { border-top: 2px solid #8999af; }
/* Let the summary breathe below the title instead of clipping its third line. */
.source-panel-summary.source-panel-summary-compact {
  position: relative; height: auto; min-height: 44px; overflow: visible; gap: 4px;
}
.source-panel-summary-compact .source-compact-title-block { grid-column: 1 / -1; }
.source-panel-summary-compact .source-file-name { padding-right: 146px; }
.source-panel-summary-compact .source-summary-controls { position: absolute; top: 7px; right: 10px; }
