.kg-entry,.kg-toolbar,.kg-controls,.kg-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.kg-entry{margin-left:auto}.kg-entry .btn{color:#2457a7;background:#edf4ff}.kg-toolbar{justify-content:space-between;margin:20px 0}.kg-controls{gap:4px;background:#edf1f6;padding:4px;border-radius:12px}.kg-controls button{border:0;background:transparent;border-radius:8px;padding:10px 16px;min-height:44px;color:#42536b;cursor:pointer}.kg-controls button[aria-pressed=true]{background:#fff;color:#174f9d;box-shadow:0 2px 8px #23395815}.kg-subtitle,.kg-muted{color:#59697f;font-size:13px;line-height:1.7}.kg-select{display:flex;align-items:center;gap:8px;font-size:13px}.kg-select select{max-width:240px;min-height:44px;border:1px solid #d7e0ec;border-radius:8px;background:white;padding:8px}.kg-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.kg-canvas,.kg-detail{border:1px solid #dce5ef;background:#fff;border-radius:18px;padding:24px;min-width:0}.kg-canvas{background:radial-gradient(#d7e2ef 1px,transparent 1px) 0 0/18px 18px,#f8fbff}.kg-detail{position:sticky;top:20px}.kg-detail h2{font-size:21px;margin:14px 0}.kg-detail p{line-height:1.8}.kg-detail>small{color:#59697f}.kg-resources{display:grid;gap:10px;margin-top:22px}.kg-node{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;border:1px solid #d3deec;border-left:4px solid #8997a8;border-radius:12px;background:#fff;padding:14px;min-height:78px;width:100%;cursor:pointer;color:#20364e;font:inherit}.kg-node b{font-size:14px;line-height:1.5}.kg-node small{font-size:12px;color:#59697f}.kg-node.good{border-left-color:#21816b}.kg-node.weak{border-left-color:#bd6a21}.kg-node.learning{border-left-color:#3478c1}.kg-node[aria-pressed=true]{outline:2px solid #285eaa;outline-offset:2px;background:#eff5ff}.kg-node:focus-visible,.kg-controls button:focus-visible{outline:3px solid #285eaa;outline-offset:3px}.kg-legend{font-size:13px;color:#53667c;margin-bottom:24px}.kg-network{padding:10px 0 26px;display:grid;grid-template-columns:1fr 1.25fr;align-items:center;gap:32px}.kg-neighbors{display:grid;gap:16px;border-left:2px solid #bacce2;padding-left:24px}.kg-edge>span{display:block;font-size:12px;color:#486489;margin-bottom:8px}.kg-node-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.kg-all-points{border-top:1px solid #dce5ef;padding-top:20px}.kg-canvas summary{cursor:pointer;min-height:44px;line-height:1.7;font-weight:600}.kg-root{background:#245aa0;color:white;padding:18px;border-radius:12px;text-align:center;font-weight:600}.kg-tree{border-left:2px solid #bfcfe3;margin:24px 0 0 15px;padding-left:22px}.kg-tree details{margin-bottom:16px}.kg-tree summary small{color:#59697f;font-weight:400}.kg-status{display:inline-block;background:#edf2f7;border-radius:20px;padding:6px 12px;font-size:13px}.kg-status.good{color:#176950;background:#e6f5ed}.kg-status.weak{color:#935016;background:#fff1e2}@media(max-width:900px){.kg-layout{grid-template-columns:1fr}.kg-detail{position:static}.kg-toolbar{align-items:flex-start}.kg-node-list{grid-template-columns:1fr}.kg-canvas,.kg-detail{padding:18px}.kg-network{grid-template-columns:1fr;gap:20px}.kg-select{width:100%}.kg-select select{max-width:100%;min-width:0;flex:1}.kg-entry{gap:8px}.kg-entry>span{display:none}.kg-workspace .kg-detail{display:block}}
/* Native SVG workspaces: explicit relationship edges and hierarchical branches. */
.kg-workspace{max-width:1600px!important}.kg-layout{grid-template-columns:minmax(0,1fr) 280px}.kg-canvas{padding:16px;overflow:hidden}.kg-diagram-tools{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.kg-diagram-tools .btn{min-height:40px;padding:7px 12px;font-size:12px}.kg-viewport{height:580px;position:relative;overflow:hidden;border:1px solid #e0e8f1;border-radius:12px}.kg-svg{width:100%;height:100%;display:block;touch-action:none;cursor:grab;user-select:none}.kg-svg:active{cursor:grabbing}.kg-svg text{font-family:inherit;font-size:14px;fill:#263e59;pointer-events:none}.kg-vnode{cursor:pointer}.kg-vnode circle,.kg-vnode rect{fill:#fff;stroke:#9dacbf;stroke-width:2;filter:drop-shadow(0 4px 6px #1a355810)}.kg-vnode.good circle,.kg-vnode.good rect{fill:#ecf8f0;stroke:#348469}.kg-vnode.weak circle,.kg-vnode.weak rect{fill:#fff5e9;stroke:#bf7b36}.kg-vnode.learning circle,.kg-vnode.learning rect{fill:#ecf4ff;stroke:#648ec2}.kg-vnode.selected circle,.kg-vnode.selected rect,.kg-vnode:focus circle,.kg-vnode:focus rect{stroke:#215bd1;stroke-width:4;fill:#edf4ff}.kg-vnode:focus,.kg-branch:focus{outline:none}.kg-branch:focus rect{stroke:#215bd1;stroke-width:4}.kg-svg .kg-vstatus{font-size:11px;fill:#53677d}.kg-link path{fill:none;stroke:#859ab4;stroke-width:2}.kg-link.mix path{stroke:#b38651;stroke-dasharray:7 6}.kg-link.rel path{stroke:#8397a9}.kg-link.active path{stroke-width:3}.kg-link text{font-size:12px;fill:#536d8b;paint-order:stroke;stroke:#f8fbff;stroke-width:5px;stroke-linejoin:round}.kg-svg .kg-cluster-title{font-size:20px;fill:#617998;font-weight:600}.kg-tree-link{fill:none;stroke:#8baacc;stroke-width:2.5}.kg-branch{cursor:pointer}.kg-branch rect{fill:#eaf2ff;stroke:#a6bfdf;stroke-width:1.5}.kg-subject rect{fill:#245aa0}.kg-subject text{fill:white;font-weight:600}.kg-canvas-help{font-size:12px;color:#61758d;margin:12px 0}.kg-accessible-list{border-top:1px solid #dce5ef;padding-top:12px}.kg-legend{margin-bottom:12px}.kg-detail{max-height:740px;overflow:auto}@media(max-width:1000px){.kg-layout{grid-template-columns:1fr}.kg-viewport{height:500px}.kg-detail{position:static;max-height:none}.kg-resources{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:500px){.kg-viewport{height:440px}.kg-resources{grid-template-columns:1fr}.kg-canvas{padding:10px}.kg-diagram-tools{gap:4px}.kg-diagram-tools .btn{min-height:44px}}
/* Canvas-first composition; details are an optional overlay. */
.kg-layout{display:block;position:relative}.kg-canvas{border-radius:16px;padding:16px 20px;background-color:#fcfdff}.kg-viewport{height:clamp(520px,65vh,780px);border:0;background:transparent}.kg-detail{position:absolute;z-index:5;right:18px;top:72px;width:300px;max-width:calc(100% - 36px);max-height:calc(100% - 100px);box-shadow:0 16px 55px #233c6526;border-color:#dce4ee;padding:22px;background:#fffffff5;backdrop-filter:blur(12px)}.kg-close{display:block;margin:0 0 16px auto;font-size:12px}.kg-detail>small{display:block}.kg-toolbar{justify-content:flex-start;gap:18px;margin:16px 0}.kg-toolbar>.kg-select{margin-left:auto}.kg-diagram-tools{justify-content:flex-end;margin-bottom:0}.kg-diagram-tools .btn{background:white;border:1px solid #e1e7ef;box-shadow:none}.kg-svg .kg-vstatus{font-size:12px}.kg-branch rect{fill:#f0f5fd;stroke:#c3d3e6}.kg-tree-link{stroke:#b1c6df;stroke-width:2}.kg-vnode rect{stroke:#d3deeb;stroke-width:1;filter:none}.kg-vnode circle{filter:drop-shadow(0 3px 5px #21436a0c)}.kg-link.dim{opacity:.24}.kg-link.active path{stroke:#416da4;stroke-width:2.5}.kg-canvas-help{margin-top:4px}.kg-accessible-list{padding-top:8px}.kg-accessible-list summary{font-size:12px;color:#65758a;min-height:30px}.kg-resources{grid-template-columns:1fr}@media(max-width:700px){.kg-toolbar{gap:8px}.kg-toolbar>.kg-select{margin-left:0;width:100%}.kg-viewport{height:500px}.kg-canvas{padding:12px}.kg-detail{top:90px;right:12px;width:280px;max-height:440px}.kg-controls button{padding:8px 12px}}
.kg-layer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 4px 12px;color:#324d71}.kg-layer-heading span{font-size:12px;color:#6e8097}.kg-layered{height:clamp(580px,74vh,850px);background:white;border-radius:10px}.kg-entity{cursor:pointer}.kg-entity circle{stroke-width:1.3;fill:#f2f7ff;stroke:#85a9e2}.kg-entity.resource circle{fill:#edf9f8;stroke:#7cbec0}.kg-entity:focus{outline:none}.kg-entity:focus circle,.kg-entity:hover circle{stroke-width:3}.kg-layer-point circle{fill:#f3effc;stroke:#af98de;stroke-width:1.5;filter:none}.kg-layer-point.selected circle{fill:#ede5fc;stroke:#9471cd;stroke-width:2.5}.kg-semantic-edge path{fill:none;stroke:#b0c3de;stroke-width:1.2}.kg-semantic-edge text{font-size:12px;fill:#7b8ca2;paint-order:stroke;stroke:#fff;stroke-width:5px}.kg-semantic-edge.point-relation path{stroke:#ac98d1}.kg-semantic-edge.confusable path{stroke-dasharray:5 4}.kg-svg .kg-column-label{font-size:15px;font-weight:600;fill:#6b91ca}.kg-svg .kg-column-label.p{fill:#9a7cc7}.kg-svg .kg-column-label.r{fill:#559fa4}.kg-svg .kg-no-bank{font-size:12px;fill:#8898ab}.kg-cross-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 0}.kg-cross-links>span{font-size:12px;color:#718298}.kg-cross-links .btn{font-size:12px;padding:6px 10px}.kg-entity .kg-vstatus{font-size:11px}@media(max-width:700px){.kg-layer-heading{align-items:flex-start;flex-direction:column}.kg-layered{height:620px}}
.kg-vnode .kg-topic-hit{fill:transparent;stroke:transparent;filter:none}.kg-vnode .kg-topic-line{fill:none;stroke:#99b3d2;stroke-width:1.7}.kg-vnode.selected .kg-topic-hit,.kg-vnode:focus .kg-topic-hit{fill:#eff5ff;stroke:#b5cbee;stroke-width:1}.kg-vnode.good .kg-topic-line{stroke:#348469}.kg-vnode.weak .kg-topic-line{stroke:#bf7b36}.kg-tree-link{stroke-width:1.7}.kg-branch rect{fill:#eaf2ff;stroke:transparent}.kg-subject rect{fill:#315f9a}.kg-layered{height:70vh;min-height:550px}.kg-semantic-edge path{stroke-opacity:.6}.kg-semantic-edge:hover path{stroke-opacity:1;stroke-width:2.5}
.kg-concrete-detail section{border-top:1px solid #e2e9f1;padding-top:14px;margin-top:18px}.kg-concrete-detail h3{font-size:14px;color:#355371;margin:0 0 10px}.kg-related-item{display:block;width:100%;text-align:left;padding:12px;border:1px solid #e1e8f0;background:#f8fbff;border-radius:9px;margin:8px 0;cursor:pointer;color:#2d4c6c}.kg-related-item b,.kg-related-item span{display:block;font-size:13px;line-height:1.7}.kg-related-item span{font-size:12px;color:#64778e;margin-top:5px}.kg-question-preview{font-size:13px;background:#f6f8fc;padding:12px;border-radius:8px}.kg-detail{width:350px}.kg-link text{font-size:11px}.kg-link.active text{fill:#315f92}.kg-concrete-detail .primary{width:100%}
/* XMind-style reading hierarchy, scoped exclusively to the mind map. */
body[data-view="mindmap"] .kg-canvas{background:#fff;border-color:#e6eaf0;box-shadow:0 6px 24px #233c6506}
body[data-view="mindmap"] .kg-viewport{background:#fff;height:clamp(520px,68vh,760px)}
body[data-view="mindmap"] .kg-diagram-tools{padding:0 0 14px;border-bottom:1px solid #f0f2f5}
body[data-view="mindmap"] .kg-canvas-help{color:#8a96a5}
.kg-mind-bough{fill:none;stroke-width:3;stroke-linecap:round;opacity:.8}.kg-mind-twig{fill:none;stroke-width:1.5;stroke-linecap:round;opacity:.5}
.kg-mind-root rect{fill:#456c9f;stroke:none;filter:drop-shadow(0 5px 10px #35578018)}.kg-mind-root text{fill:white;font-size:17px;font-weight:600}.kg-mind-root .kg-mind-root-caption{font-size:11px;font-weight:400;fill:#dde8f7}
.kg-mind-chapter{cursor:pointer}.kg-mind-chapter rect{fill:#f5f8fc;stroke:var(--branch);stroke-width:1}.kg-mind-chapter>text{font-size:14px;font-weight:500;fill:#364e6a}.kg-mind-chapter .kg-mind-count{font-size:10px;font-weight:400;fill:#7e8ea2}.kg-mind-chapter circle{fill:white;stroke:var(--branch);stroke-width:1}.kg-mind-chapter .kg-mind-toggle{fill:var(--branch);font-size:15px}
.kg-mind-topic{cursor:pointer}.kg-mind-topic rect{fill:transparent;stroke:none}.kg-mind-topic>text{font-size:15px;fill:#36465c}.kg-mind-topic:hover rect,.kg-mind-topic.selected rect{fill:#f1f6fc}.kg-mind-topic .kg-mind-state{font-size:10px;fill:#8693a3}.kg-mind-dot{fill:#acb7c5}.kg-mind-dot.good{fill:#51a58a}.kg-mind-dot.weak{fill:#c39054}.kg-mind-dot.learning{fill:#638fc7}.kg-mind-topic:focus,.kg-mind-chapter:focus{outline:none}.kg-mind-topic:focus rect,.kg-mind-chapter:focus rect{stroke:#688ebd;stroke-width:2}

.kg-mind-resource{cursor:pointer}.kg-mind-resource rect{fill:#f7f9fc;stroke:#e0e7f0;stroke-width:1}.kg-mind-resource>text{font-size:13px;fill:#3f5773}.kg-mind-resource .kg-mind-state{font-size:10px;fill:#8693a3}.kg-mind-resource .kg-mind-resource-arrow{font-size:20px;fill:#91a4ba}.kg-mind-resource:hover rect{fill:#eef4fc;stroke:#b6c9e1}.kg-mind-resource:focus{outline:none}.kg-mind-resource:focus rect{stroke:#688ebd;stroke-width:2}

.kg-mind-summary rect{fill:#f7f9fc;stroke:#e0e8f2;stroke-width:1}.kg-mind-summary .kg-summary-title{font-size:14px;font-weight:600;fill:#395675}.kg-mind-summary .kg-summary-body{font-size:13px;fill:#61738a}.kg-svg .kg-summary-resource-label{font-size:11px;fill:#7d8ca0}

/* Keep the connector, chapter label and learning card in one branch color. */
body[data-view="mindmap"] .kg-canvas{border-color:#e2e7ee;box-shadow:none}
body[data-view="mindmap"] .kg-viewport{background:#fdfefd}
.kg-mind-bough{stroke-width:2.6;opacity:.88}
.kg-mind-twig{stroke-width:1.8;opacity:.76}
.kg-mind-root rect{fill:#203c59;filter:none}
.kg-mind-root>text{font-size:18px;fill:#f9fafc;font-weight:700}
.kg-mind-root .kg-mind-root-caption{fill:#cddbea;font-size:12px}
.kg-mind-chapter rect{fill:var(--branch);stroke:transparent;stroke-width:2}
.kg-mind-chapter>text{fill:#f9fafc;font-size:14px;font-weight:650}
.kg-mind-chapter .kg-mind-number,.kg-mind-chapter .kg-mind-count{fill:#f9fafc;opacity:.8;font-size:11px}
.kg-mind-chapter circle{fill:#ffffff23;stroke:none}
.kg-mind-chapter .kg-mind-toggle{fill:#f9fafc;font-size:14px}
.kg-mind-chapter:hover rect{fill:color-mix(in srgb,var(--branch) 88%,#f9fafc)}
.kg-mind-topic rect,.kg-mind-summary rect{fill:color-mix(in srgb,var(--branch) 4%,#fdfefd);stroke:color-mix(in srgb,var(--branch) 19%,#fdfefd);stroke-width:1}
.kg-mind-topic:hover rect,.kg-mind-topic.selected rect{fill:color-mix(in srgb,var(--branch) 10%,#fdfefd);stroke:var(--branch)}
.kg-mind-topic .kg-mind-accent,.kg-mind-summary .kg-mind-accent{fill:none;stroke:var(--branch);stroke-width:1;stroke-linecap:round}
.kg-mind-topic>text{fill:#233951;font-size:16px;font-weight:600}
.kg-mind-topic .kg-mind-state{fill:#4a6177;font-size:11px;font-weight:400}
.kg-mind-topic .kg-mind-disclose{fill:var(--branch);font-size:15px;font-weight:600}
.kg-mind-summary .kg-summary-title{fill:var(--branch);font-size:15px;font-weight:700}
.kg-mind-summary .kg-summary-body{fill:#303f50;font-size:14px}
.kg-svg .kg-summary-resource-label{fill:#556d84;font-size:12px}
.kg-mind-resource>text{font-weight:600}
.kg-mind-chapter:focus-visible rect{stroke:#9fbded;stroke-width:3}
.kg-mind-topic:focus-visible rect,.kg-mind-resource:focus-visible rect{stroke:#285d9e;stroke-width:2}

/* The focused map reads from the point to named groups and individual rules. */
.kg-focus-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 0 12px}
.kg-focus-heading>div{display:grid;gap:3px;min-width:0}
.kg-focus-heading span{color:#4f6780;font-size:12px}
.kg-focus-heading strong{font-size:18px;color:#203c59;line-height:1.4;overflow-wrap:anywhere}
.kg-focus-heading button{min-height:44px;flex:none}
.kg-mind-content-group rect{fill:var(--branch)}
.kg-svg .kg-mind-group-label,.kg-svg .kg-mind-content-index{fill:#f9fafc;font-weight:650}
.kg-svg .kg-mind-content-index{font-size:11px}
.kg-svg .kg-mind-mobile-group{fill:#284e74;font-size:15px;font-weight:700}
.kg-svg .kg-mind-content-card .kg-summary-body{font-size:15px;font-weight:500}
.kg-mind-content-root>text.kg-mind-content-title{font-size:17px}
body[data-surface=mini].rm-map-active .kg-focus-heading{padding:10px 12px 8px;border-bottom:1px solid #e3eaf0}
body[data-surface=mini].rm-map-active .kg-focus-heading strong{font-size:15px}
body[data-surface=mini].rm-map-active .kg-focus-heading button{font-size:12px;padding:6px 8px}
