/* V6 canvas: scope all effects to explorer-host. Directory styles remain independent. */
.explorer-host{isolation:isolate;touch-action:none;contain:layout paint}
.explorer-host .graph-world{overflow:visible;transform-origin:0 0;will-change:auto;backface-visibility:visible}
.explorer-host .graph-node.document-card{box-sizing:border-box;width:256px;min-width:0;max-width:256px;height:192px;aspect-ratio:4/3;padding:16px;display:flex;flex-direction:column;gap:10px;overflow:visible;color:#fff;text-align:left;transition:none;border-radius:0}
.explorer-host .document-card .card-header{display:flex;height:16px;min-height:16px;align-items:center;font-size:10px;gap:8px;overflow:hidden}
.explorer-host .card-topic{display:flex;flex:1;align-items:center;gap:6px;min-width:0;overflow:hidden}.explorer-host .card-topic>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.explorer-host .card-topic>.ui-icon{flex-shrink:0}.explorer-host .card-distance{margin-left:auto;flex-shrink:0}
.explorer-host .document-card .card-body{display:flex;flex:1;min-height:0;padding:0;gap:8px;justify-content:flex-start;overflow:hidden}
.explorer-host .graph-node.document-card strong.card-title,.explorer-host .graph-node.document-card.long-title strong.card-title{font-size:21px;line-height:1.25;max-height:2.5em;-webkit-line-clamp:2;color:#fff;transform:none}
.explorer-host .document-card .card-summary{display:-webkit-box;font-size:12px;line-height:1.5;-webkit-line-clamp:2;max-height:3em;color:#fff}
.explorer-host .document-card .card-footer{display:flex;align-items:center;justify-content:space-between;min-height:24px;padding-top:8px;border-top:1px solid #ffffff18;font-size:10px;color:#fff}
.explorer-host .card-metrics,.explorer-host .card-actions{display:flex;gap:8px;align-items:center}.explorer-host .card-connections{display:flex;align-items:center;gap:4px}.explorer-host .card-open{display:flex;padding:3px;cursor:pointer}.explorer-host .card-open:hover{background:#ffffff20}
.explorer-host.explorer-medium .document-card .card-header,.explorer-host.explorer-medium .document-card .card-summary,.explorer-host.explorer-medium .document-card .card-footer{display:none}
.explorer-host.explorer-medium .document-card .card-body{justify-content:center;align-items:stretch}
.explorer-host.explorer-medium .graph-node.document-card strong.card-title,.explorer-host.explorer-medium .graph-node.document-card.long-title strong.card-title{font-size:30px;line-height:1.25;-webkit-line-clamp:4;max-height:5em}
.explorer-host .document-card::after,.explorer-host .explorer-group::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:0 0 var(--glow-radius,9px) var(--glow-spread,1px) rgb(153 192 255 / var(--glow-alpha,.4));opacity:0}
.explorer-host .document-card.is-lit::after,.explorer-host .explorer-group.is-lit::after{opacity:1}.explorer-host .document-card.is-lit,.explorer-host .explorer-group.is-lit{border-color:#c7ddff;z-index:3}
.explorer-host .document-card.is-muted,.explorer-host .explorer-group.is-muted{opacity:.32}.explorer-host .document-card.is-pinned:before{content:'●';position:absolute;right:8px;top:6px;color:#fff;font-size:9px}
.explorer-host .graph-lines{overflow:visible;pointer-events:none}.explorer-host .graph-line{stroke:#7794bb;stroke-width:1.2;opacity:.52;fill:none;vector-effect:non-scaling-stroke}.explorer-host .graph-line.comparison{stroke-dasharray:5 5}.explorer-host .graph-line.is-lit{stroke:#b7d7ff;stroke-width:calc(.8px + var(--relation-strength)*1.1px);opacity:calc(.3 + var(--relation-strength)*.5)}.explorer-host .graph-line.is-muted{opacity:.12}
.explorer-host .graph-edge-label{z-index:5;position:absolute;transform:translate(-50%,-50%) scale(var(--label-scale,1));max-width:112px;width:max-content;background:#121a25;color:#d4e6ff;border:1px solid #34475d;border-radius:0;padding:5px 7px;font-size:11px;line-height:1.45;white-space:normal;word-break:normal}.explorer-host .graph-edge-label.is-lit{border-color:#88a9d7;color:#fff}.explorer-host [hidden]{display:none!important}
.explorer-group{position:absolute;box-sizing:border-box;width:256px;height:192px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;text-align:left;padding:18px;background:#17202a;border:1px solid #536782;border-top:2px solid #85aaff;color:#fff;border-radius:0}.explorer-group>small{color:#aabbd0;font-size:11px}.explorer-group>strong{font-size:24px;line-height:1.3}.explorer-group>span{font-size:13px}.explorer-group footer{font-size:12px;display:flex;justify-content:space-between;width:100%;border-top:1px solid #ffffff18;padding-top:10px}.explorer-group footer small{color:#9eb1cc;font-size:10px}
.explorer-modes{display:flex;background:#141c28;border:1px solid #314156;padding:3px;gap:3px}.explorer-modes button{flex:1;padding:8px 12px;white-space:nowrap}.explorer-modes button[aria-pressed=true]{background:#304a71;color:#fff}.explorer-range{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;margin-top:8px;font-size:12px}.explorer-range button{border:1px solid #344459;background:#17202b;padding:6px 9px;color:#fff;white-space:nowrap}.explorer-range button small{color:#acc4e5;margin-left:4px}.explorer-range button:disabled{opacity:.35}.explorer-range>span{color:#b9cce6;margin-right:4px}
.canvas-top{pointer-events:none}.canvas-top>div{pointer-events:auto}.canvas-range-panel{max-width:min(540px,64%)}.canvas-filters[hidden]{display:none!important}
.explorer-detail{position:absolute;right:14px;top:132px;bottom:72px;width:280px;box-sizing:border-box;padding:16px;overflow:auto;background:#151b24f5;border:1px solid #3a4a60;z-index:12;color:#fff;font-size:13px;line-height:1.6;box-shadow:0 8px 24px #0005}.explorer-detail[hidden]{display:none}.explorer-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:#b8cbe6}.explorer-detail button{padding:6px 8px;border:1px solid #3c4c63;background:#1d2a3d;color:#fff;font-size:12px;text-align:left;border-radius:0;line-height:1.45;max-width:100%;overflow-wrap:anywhere}.explorer-detail h3{font-size:18px;line-height:1.5;margin:16px 0 10px}.explorer-detail p{font-size:12px;color:#c4cfdf;margin:6px 0 14px}.explorer-actions{display:flex;gap:6px;flex-wrap:wrap}.explorer-relation-row{border-top:1px solid #ffffff12;padding:12px 0}.explorer-relation-row>button{width:100%}.explorer-relation-row>small{display:block;color:#91accf;font-size:10px;margin-top:6px}.explorer-detail ol{padding-left:20px}.explorer-detail li{margin:12px 0}.inline-explorer-detail{top:58px;bottom:60px;right:12px}.mini-explorer-detail{top:72px;bottom:8px;right:8px;width:calc(100% - 16px)}
.explorer-path-picker{position:absolute;top:130px;left:24px;right:316px;display:flex;align-items:end;gap:8px;flex-wrap:wrap;z-index:10;background:#121923ed;padding:12px;border:1px solid #314056}.explorer-path-picker[hidden]{display:none}.explorer-path-picker label{display:flex;flex-direction:column;gap:4px;font-size:11px;flex:1;min-width:100px;color:#aebfd4}.explorer-path-picker select{width:100%;max-width:230px;padding:7px;background:#192332;border:1px solid #3a4a60;color:#fff;font-size:12px}.explorer-path-picker button{padding:8px;background:#345783;color:#fff}.explorer-path-picker+*{pointer-events:auto}
.explorer-empty{position:absolute;inset:45% 20% auto;text-align:center;color:#9bb0cf;line-height:1.8;font-size:15px;pointer-events:none}
.semantic-hidden{visibility:hidden}.semantic-overview{position:absolute;inset:145px 32px 78px;overflow:auto;background:#111417;z-index:7;padding:14px}.semantic-heading{display:flex;justify-content:space-between;font-size:14px;color:#fff;margin-bottom:18px;gap:12px}.semantic-heading span{font-size:12px;color:#8fa8cb}.semantic-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.semantic-groups button{aspect-ratio:4/3;min-height:115px;padding:14px;border:1px solid #4a607c;border-top:2px solid #89acdf;background:#1b2533;color:#fff;text-align:left;display:flex;flex-direction:column;justify-content:space-between}.semantic-groups strong{font-size:18px;line-height:1.4}.semantic-groups span{font-size:11px;color:#aac0df}.semantic-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:20px}.semantic-links button{padding:5px 7px;background:#182130;color:#aac0df;font-size:11px}.mini-graph .semantic-overview,.article-graph .semantic-overview{inset:12px}.mini-graph .semantic-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mini-graph .semantic-groups button{padding:8px}.mini-graph .semantic-groups strong{font-size:13px}.mini-graph .semantic-heading{font-size:11px}.mini-graph .semantic-heading span,.mini-graph .semantic-links{display:none}
@media(max-width:1050px){.canvas-top{padding:12px}.canvas-top h2{font-size:16px}.canvas-range-panel{max-width:70%}.explorer-modes button{padding:7px 8px;font-size:12px}.explorer-detail{width:255px}.explorer-path-picker{right:24px;top:142px}.explorer-detail:has(ol){top:264px}.semantic-overview{inset:145px 16px 70px}}
@media(max-width:600px){.canvas-top{display:flex;flex-direction:column;align-items:stretch;gap:8px}.canvas-top .map-distance-key{font-size:9px;gap:8px}.canvas-range-panel{max-width:100%;width:100%}.explorer-modes button{font-size:12px}.explorer-range{justify-content:flex-start;font-size:10px;gap:4px}.explorer-range button{padding:5px 7px}.explorer-detail{left:10px;right:10px;top:auto;bottom:66px;width:auto;max-height:40%}.explorer-path-picker{top:178px;left:10px;right:10px;gap:6px;padding:8px}.explorer-path-picker label{min-width:90px}.explorer-path-picker select{max-width:100%}.semantic-overview{inset:180px 8px 68px;padding:8px}.semantic-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.semantic-groups button{padding:10px;min-height:104px}.semantic-groups strong{font-size:15px}.semantic-heading{font-size:12px}.semantic-heading span{display:none}.inline-explorer-detail{top:auto;max-height:55%;bottom:58px}.mini-explorer-detail{top:64px;bottom:8px;max-height:none;left:8px}.explorer-empty{inset:52% 12px auto;font-size:13px}}
@media(prefers-reduced-motion:reduce){.explorer-host *{animation:none!important;transition:none!important}}

.semantic-groups button{min-width:0;overflow-wrap:anywhere}.mini-graph .semantic-groups button{min-height:100px}.explorer-detail button:disabled{opacity:.45;cursor:default}.semantic-links button{border:1px solid #304159;text-align:left}.semantic-links button:hover{background:#263b57}

@media(min-width:601px) and (max-width:1050px){.semantic-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.mini-graph .semantic-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Group grids follow their actual canvas width, including narrow tablet work areas. */
.explorer-host{container-type:inline-size}.semantic-groups button,.mini-graph .semantic-groups button{width:100%;min-height:0}
@container(max-width:620px){.semantic-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mini-graph .semantic-internal{display:none}
