.kg-module{--kg-ink:var(--text-primary);--kg-muted:var(--text-secondary);font-size:14px;min-width:0}.kg-module .btn,.kg-modal .btn{font-size:14px}.kg-module .tabs button{font-size:14px;padding:8px 14px}.kg-module .badge,.kg-modal .badge{font-size:12px}.kg-module .panel-head h2{font-size:16px}.kg-module .panel-head p{font-size:14px}.kg-module .empty p{font-size:14px}.kg-overview-strip{display:flex;justify-content:space-between;gap:22px;border:1px solid var(--brand-border);border-radius:12px;background:linear-gradient(100deg,var(--brand-soft),var(--brand-tint));padding:18px 22px;margin-bottom:12px}.kg-overview-strip>div:first-child{display:flex;gap:13px;align-items:center}.kg-overview-strip strong{font-size:16px;font-weight:600;color:var(--text-primary)}.kg-overview-strip p{font-size:14px;color:var(--text-secondary);margin-top:5px}.kg-overview-icon{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:12px;background:var(--brand-soft);color:var(--text-secondary)}.kg-overview-numbers{display:flex;gap:24px;align-items:center;flex-shrink:0}.kg-overview-numbers span{font-size:12px;color:var(--text-secondary)}.kg-overview-numbers b{display:block;font-size:24px;font-weight:600;color:var(--text-primary)}.kg-mode-note{font-size:12px;color:var(--text-secondary);margin:0 1px 18px;line-height:1.8}.kg-workspace{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,1fr);gap:18px;align-items:stretch}.kg-graph-panel,.kg-chat{border:1px solid var(--brand-border);border-radius:12px;background:#fff;min-width:0;overflow:hidden}.kg-graph-head,.kg-chat-head{padding:20px 20px 14px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.kg-graph-head h2,.kg-chat-head h2{font-size:16px;font-weight:600;color:var(--text-primary)}.kg-graph-head p,.kg-chat-head p{font-size:14px;color:var(--text-secondary);margin-top:5px}.kg-graph-controls{display:flex;gap:8px;align-items:center;color:var(--text-secondary);font-size:12px}.kg-graph-controls>.btn{padding:5px 9px;min-width:29px}.kg-graph-controls>.quiet{min-width:0}.kg-graph-filter{padding:0 20px 12px;display:flex;gap:10px;flex-wrap:wrap}.kg-graph-filter .search-field{flex:1;min-width:155px}.kg-graph-filter .search-field input{width:100%;font-size:14px;min-width:0}.kg-graph-filter select{font-size:14px;max-width:100%;border:1px solid var(--brand-border);border-radius:8px;padding:7px 9px}.kg-canvas{position:relative;min-height:350px;background:var(--brand-tint);border-top:1px solid var(--brand-border);border-bottom:1px solid var(--brand-border)}.kg-network{width:100%;height:auto;display:block;max-height:555px;min-height:350px}.kg-edge{cursor:pointer}.kg-edge-hit{stroke:transparent;stroke-width:17}.kg-edge-visible{stroke:var(--brand-border);stroke-width:1.4}.kg-edge text{fill:var(--brand);font-size:12px;paint-order:stroke;stroke:var(--brand-border);stroke-width:4;stroke-linejoin:round;pointer-events:none}.kg-edge:hover .kg-edge-visible,.kg-edge.active .kg-edge-visible{stroke:var(--brand);stroke-width:3}.kg-edge.active text{fill:var(--brand)}.kg-edge.conflict .kg-edge-visible{stroke:#d7a4ac;stroke-dasharray:5 4}.kg-node{cursor:pointer}.kg-node-type{font-size:14px;font-weight:600;pointer-events:none}.kg-node-label{font-size:12px;fill:var(--brand);pointer-events:none}.kg-node:hover .kg-node-ring,.kg-node.active .kg-node-ring{stroke-opacity:1;stroke-width:3;fill-opacity:.20}.kg-node.conflict .kg-node-ring{stroke:#c4858e;stroke-dasharray:4 3}.kg-node:focus-visible .kg-node-ring,.kg-edge:focus-visible .kg-edge-visible{stroke:var(--brand);stroke-width:3;outline:none}.kg-legend{display:flex;flex-wrap:wrap;gap:10px;padding:15px 18px;border-bottom:1px solid var(--brand-border)}.kg-legend button{background:none;border:0;display:inline-flex;gap:5px;align-items:center;color:var(--text-secondary);font-size:12px;padding:3px 4px;border-radius:4px}.kg-legend button.active{background:var(--brand-soft);color:var(--brand)}.kg-legend i{width:7px;height:7px;border-radius:50%;display:inline-block}.kg-selection{padding:19px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:127px;background:#fff}.kg-selection>div{min-width:0}.kg-kicker{display:block;font-size:12px;letter-spacing:.8px;color:var(--text-secondary);margin-bottom:5px}.kg-selection h3{font-size:14px;line-height:1.8;color:var(--text-primary);overflow-wrap:anywhere}.kg-selection h3 em{font-style:normal;color:var(--text-primary)}.kg-selection p{font-size:14px;color:var(--text-secondary);line-height:1.8;margin-top:4px;overflow-wrap:anywhere}.kg-selection-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end;max-width:230px;flex-shrink:0}.kg-selection-actions .btn{font-size:12px}.kg-selection-empty{align-items:center}.kg-chat{display:flex;flex-direction:column;min-height:600px;max-height:900px}.kg-chat-head{border-bottom:1px solid var(--brand-border);flex-wrap:wrap}.kg-chat-head .badge{font-size:12px}.kg-chat-messages{padding:16px;flex:1;min-height:290px;overflow:auto;background:linear-gradient(#fff,var(--brand-tint));scroll-behavior:smooth}.kg-chat-empty{text-align:center;padding:42px 6px}.kg-chat-empty>span{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--brand-soft);color:var(--text-secondary)}.kg-chat-empty h3{font-size:15px;margin-top:18px;color:var(--text-primary);font-weight:550}.kg-chat-empty p{font-size:14px;line-height:1.9;color:var(--text-secondary);max-width:285px;margin:10px auto 20px}.kg-prompts{display:flex;flex-direction:column;align-items:stretch;gap:9px}.kg-prompts .btn{font-size:14px;white-space:normal;color:var(--text-secondary);background:var(--brand-tint);text-align:left;justify-content:flex-start;border-color:var(--brand-border)}.kg-chat-turn{margin-bottom:20px}.kg-user-msg{padding:11px 13px;background:var(--brand-soft);border-radius:11px 11px 3px 11px;color:var(--text-secondary);font-size:14px;margin-left:15px;line-height:1.8;overflow-wrap:anywhere}.kg-answer-msg{font-size:14px;line-height:1.95;color:var(--text-secondary);white-space:pre-wrap;padding:14px 1px 7px;overflow-wrap:anywhere}.kg-citations{display:flex;flex-wrap:wrap;gap:6px}.kg-citations .btn{font-size:12px;padding:5px 7px;white-space:normal;text-align:left;justify-content:flex-start;color:var(--text-secondary);background:var(--brand-tint)}.kg-chat-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}.kg-chat-actions .btn{font-size:12px}.kg-chat-compose{padding:15px 17px;border-top:1px solid var(--brand-border);background:#fff}.kg-chat-compose label{display:block;font-size:12px;color:var(--text-secondary);margin-bottom:8px}.kg-chat-compose textarea{font:inherit;font-size:14px;line-height:1.7;width:100%;min-width:0;resize:vertical;border:1px solid var(--brand-border);border-radius:8px;background:var(--brand-tint);padding:10px;color:var(--text-secondary)}.kg-chat-compose textarea::placeholder{color:var(--text-secondary)}.kg-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.kg-compose-footer span{font-size:12px;color:var(--text-secondary)}.kg-compose-footer .btn{font-size:12px}.kg-source-grid{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(270px,1fr);gap:20px}.kg-source-grid>*{min-width:0}.kg-source-card{display:flex;align-items:flex-start;gap:13px;padding:19px 0;border-bottom:1px solid var(--brand-border)}.kg-source-card:last-child{border:0}.kg-source-icon{display:grid;place-items:center;flex-shrink:0;width:36px;height:42px;border:1px solid var(--brand-border);border-radius:8px;color:var(--text-secondary);background:var(--brand-tint)}.kg-source-card>div:nth-child(2){flex:1;min-width:0}.kg-source-card h3{font-size:14px;color:var(--text-primary);font-weight:550;line-height:1.8;overflow-wrap:anywhere}.kg-source-card p{font-size:12px;color:var(--text-secondary);line-height:1.8;margin-top:4px;overflow-wrap:anywhere}.kg-source-actions{display:flex;align-items:flex-end;gap:10px;flex-direction:column}.kg-intake-help{border:1px solid var(--brand-border);background:#fff;border-radius:12px;padding:25px;height:fit-content}.kg-intake-help h2{font-size:16px;color:var(--text-primary)}.kg-intake-help ol{padding-left:22px;margin:22px 0;color:var(--text-secondary)}.kg-intake-help li{margin-bottom:19px;padding-left:5px;font-size:14px}.kg-intake-help strong{font-size:14px;font-weight:550;color:var(--text-primary)}.kg-intake-help p{font-size:12px;margin-top:5px;line-height:1.8;color:var(--text-secondary)}.kg-intake-help .callout{font-size:12px}.kg-muted{font-size:12px;color:var(--text-secondary);line-height:1.8;margin-top:12px;overflow-wrap:anywhere}.kg-candidate{border:1px solid var(--brand-border);border-radius:12px;padding:18px;margin-bottom:13px;background:var(--brand-tint)}.kg-candidate-triple{display:flex;gap:12px;align-items:center;flex-wrap:wrap;line-height:1.8;color:var(--text-secondary);font-size:14px}.kg-candidate-triple strong{font-weight:550;color:var(--text-primary);overflow-wrap:anywhere}.kg-candidate-triple span{color:var(--text-secondary)}.kg-candidate-quote{margin-top:13px;border-left:2px solid var(--brand-border);padding:8px 12px;background:var(--brand-soft);color:var(--text-secondary);font-size:12px;line-height:1.8;overflow-wrap:anywhere}.kg-candidate-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:15px}.kg-candidate-footer>span{font-size:12px;color:var(--text-secondary);overflow-wrap:anywhere}.kg-candidate-footer>div{display:flex;gap:9px;flex-wrap:wrap;flex-shrink:0}.kg-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--text-secondary);margin-bottom:15px}.kg-source-full{max-height:420px;overflow:auto;border:1px solid var(--brand-border);border-radius:8px;background:var(--brand-tint);margin:15px 0}.kg-source-line{display:flex;gap:15px;padding:8px 13px;font-size:14px;color:var(--text-secondary);border-bottom:1px solid var(--brand-border)}.kg-source-line>span{width:35px;flex-shrink:0;color:var(--text-secondary);padding-top:2px}.kg-source-line pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-family:inherit;font-size:14px;line-height:1.8;margin:0;min-width:0;flex:1}.kg-source-line.highlight{background:var(--brand-soft);border-left:3px solid var(--brand-border)}.kg-modal .field{font-size:14px}.kg-modal input,.kg-modal textarea{font-size:14px;line-height:1.7}.kg-modal .callout{font-size:14px}.kg-import-result{font-size:14px;color:var(--text-secondary);line-height:1.8;overflow-wrap:anywhere}.kg-module table{font-size:14px}.kg-module td strong,.kg-module .table-wrap .text-link{font-size:14px}.kg-module td small{font-size:12px;line-height:1.8}.kg-module th{font-size:12px}.kg-module button:disabled{opacity:.45;cursor:default}.kg-module .table-wrap{width:100%}
@media(max-width:1280px){.kg-workspace{grid-template-columns:minmax(0,1.5fr) minmax(290px,1fr)}.kg-overview-numbers{gap:16px}.kg-graph-head{flex-wrap:wrap}.kg-selection{flex-direction:column}.kg-selection-actions{max-width:none;justify-content:flex-start}.kg-network{min-height:320px}.kg-canvas{min-height:320px}.kg-source-grid{grid-template-columns:minmax(0,1.6fr) minmax(245px,1fr)}.kg-candidate-footer{flex-direction:column;align-items:flex-start}}
@media(max-width:1030px){.kg-workspace{grid-template-columns:1fr}.kg-chat{max-height:720px;min-height:530px}.kg-chat-messages{max-height:430px}.kg-network{max-height:520px}.kg-overview-strip{flex-wrap:wrap}.kg-overview-numbers{gap:30px}.kg-source-grid{grid-template-columns:1fr}.kg-intake-help ol{display:grid;grid-template-columns:1fr 1fr;gap:14px}.kg-intake-help li{margin:0}.kg-intake-help .callout{margin-top:20px}}
@media(max-width:600px){.kg-module .toolbar-left{width:100%;flex-wrap:wrap}.kg-module .toolbar-left .btn{flex:1;white-space:normal}.kg-module .tabs{width:100%}.kg-module .tabs button{flex:1;padding:8px;font-size:12px;white-space:nowrap}.kg-overview-strip{padding:16px}.kg-overview-strip strong{font-size:14px}.kg-overview-strip p{font-size:14px}.kg-overview-numbers{justify-content:space-between;width:100%;gap:10px}.kg-overview-numbers b{font-size:22px}.kg-mode-note{font-size:12px}.kg-graph-head,.kg-chat-head{padding:17px 15px 12px}.kg-graph-filter{padding:0 15px 12px}.kg-graph-filter .search-field{width:100%;flex-basis:100%}.kg-graph-filter select{flex:1}.kg-network{min-height:300px;height:330px;max-height:none}.kg-canvas{min-height:300px}.kg-legend{gap:6px;padding:12px}.kg-legend button{font-size:12px}.kg-selection{padding:16px}.kg-selection h3{font-size:14px}.kg-chat-messages{padding:15px}.kg-source-card{flex-wrap:wrap}.kg-source-actions{width:100%;flex-direction:row;justify-content:flex-end}.kg-source-card h3{font-size:14px}.kg-intake-help{padding:20px}.kg-intake-help ol{grid-template-columns:1fr}.kg-candidate{padding:15px}.kg-candidate-footer>div{width:100%;flex-wrap:wrap;gap:6px}.kg-candidate-footer .btn{font-size:12px}.kg-source-line{gap:7px;padding:7px}.kg-source-line>span{width:27px}.kg-source-line pre{font-size:14px}.kg-meta{font-size:12px}.kg-modal input[type=file]{max-width:100%;font-size:12px}.kg-modal .form-actions{flex-wrap:wrap}.kg-modal .btn{white-space:normal}.kg-graph-controls{gap:6px}.kg-selection-actions .badge{white-space:normal}.kg-module .btn,.kg-modal .btn{max-width:100%}}
/* Layered layout reserves a separate row for every node, including imported entities. */
.kg-canvas{max-height:640px;overflow:auto;overscroll-behavior:contain;max-width:100%}.kg-network.kg-network-layered{width:100%;height:auto;min-width:760px;min-height:0;max-height:none}.kg-lane text{font-size:14px;fill:var(--brand);font-weight:550}.kg-network-layered .kg-edge-hit,.kg-network-layered .kg-edge-visible{fill:none}.kg-network-layered .kg-edge-visible{stroke-width:1.8;stroke-opacity:.72}.kg-network-layered .kg-edge text{opacity:0;font-size:12px;stroke-width:5}.kg-network-layered .kg-edge:hover text,.kg-network-layered .kg-edge.active text,.kg-network-layered .kg-edge:focus-visible text{opacity:1}.kg-card-node .kg-node-type{font-size:14px;font-weight:550}.kg-card-node .kg-node-label{font-size:14px;fill:var(--brand);font-weight:500}.kg-card-node:hover .kg-node-ring,.kg-card-node.active .kg-node-ring{fill:white;fill-opacity:1;stroke-width:3;stroke-opacity:1}.kg-card-node.active .kg-node-label{fill:var(--brand)}.kg-network-layered .kg-node.conflict .kg-node-ring{stroke-dasharray:5 3}.kg-network-layered .kg-node-ring{stroke-width:1.4}.kg-network-layered .kg-edge.active .kg-edge-visible{stroke-opacity:1;stroke-width:3}.kg-graph-panel{max-width:100%}
@media(max-width:1030px){.kg-canvas{max-height:630px}.kg-network.kg-network-layered{min-width:740px}}@media(max-width:600px){.kg-canvas{max-height:540px;min-height:360px}.kg-network.kg-network-layered{min-width:760px}}
