#connect{max-width:760px;margin:36px auto}
#login{display:grid;gap:16px;margin:24px 0}
#login button{justify-self:start;min-width:190px}
label{display:flex;flex-direction:column;gap:6px}
.heading{display:flex;justify-content:space-between;align-items:center;gap:24px}
.heading #counts{font:12px/1.6 var(--mono)}
.toolbar{display:flex;align-items:end;gap:16px;flex-wrap:wrap}
.search{flex:1;min-width:200px}
.check{flex-direction:row;align-items:center;gap:8px;min-height:44px}
fieldset{border:0;border-top:1px solid var(--line);padding:12px 0;display:flex;gap:20px;flex-wrap:wrap;margin:20px 0 0}
legend{font:12px/1.5 var(--mono);color:var(--muted);padding-right:12px}
details{border-top:1px solid var(--line)}
details .toolbar{padding-top:8px}
#status{padding-top:16px;color:var(--body);font:12px/1.7 var(--mono);overflow-wrap:anywhere}
#processing{font-size:13px;margin:8px 0 20px}
.explorer{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}
.map{padding:0;position:relative;min-width:0}
.map-tools{padding:12px;border-bottom:1px solid var(--line);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.map-tools button{padding:8px 12px;min-width:44px}
.map-tools span{font-size:12px;color:var(--muted);margin-left:4px}
#graph{width:100%;height:600px;display:block;background:var(--bg);touch-action:none;cursor:grab}
#scene .edge{stroke:var(--muted);stroke-width:1.7;fill:none;marker-end:url(#arrow)}
#arrow path{fill:var(--muted)}
#scene .edge.history{stroke:var(--muted);stroke-dasharray:5 5}
#scene .edge.selected{stroke:var(--text);stroke-width:4}
#scene .edge-hit{stroke:transparent;stroke-width:18;fill:none;cursor:pointer}
.edge-label{fill:var(--body);font-size:13px;paint-order:stroke;stroke:var(--bg);stroke-width:5px;stroke-linejoin:round;cursor:pointer}
.node{cursor:pointer}
.node circle{fill:var(--text);stroke:var(--text);stroke-width:2}
.node.literal circle{fill:var(--bg);stroke:var(--text);stroke-dasharray:3 2}
.node text{fill:var(--text);font-size:14px;text-anchor:middle;paint-order:stroke;stroke:var(--bg);stroke-width:5px;stroke-linejoin:round}
.node:focus{outline:none}
.node:focus circle,.node.selected circle{stroke-width:6;stroke-dasharray:none;fill:var(--raised)}
.legend{display:flex;align-items:center;gap:8px;font-size:12px;padding:12px;color:var(--muted);flex-wrap:wrap;border-top:1px solid var(--line)}
.legend i{width:10px;height:10px;border-radius:50%;display:inline-block}
.entity-dot{background:var(--text)}
.literal-dot{border:1px dashed var(--text)}
.legend .history-dot{height:0;width:16px;border-top:2px dashed var(--muted);border-radius:0}
#empty{position:absolute;top:45%;left:10%;right:10%;text-align:center;color:var(--muted);background:var(--bg);padding:16px}
#detail{overflow-wrap:anywhere;max-height:780px;overflow:auto}
#detail p{font-size:14px}
#detail dl{font-size:13px}
dt{color:var(--muted);margin-top:8px;font:12px/1.6 var(--mono)}
dd{margin:0}
.source{padding:12px 0;border-top:1px solid var(--line);font-size:13px}
blockquote{margin:8px 0;padding-left:12px;border-left:2px solid var(--control);white-space:pre-wrap}
.lower{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:16px}
.relation{display:block;width:100%;text-align:left;margin-bottom:8px;overflow-wrap:anywhere;font:15px/1.5 "Space Grotesk",Arial,sans-serif;letter-spacing:0;background:var(--bg)}
.relation small{display:block;color:var(--muted);font:12px/1.6 var(--mono);margin-top:4px}
.change{font:12px/1.8 var(--mono);border-top:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}
.lower>div{min-width:0;max-height:440px;overflow:auto}
#error{color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
#error:not(:empty){border-left:3px solid var(--signal);padding:12px}

@media(max-width:1100px){.explorer{grid-template-columns:1fr}
.map #graph{height:520px}
#detail{max-height:none}
.lower{grid-template-columns:1fr}
}

@media(max-width:540px){.heading{display:block}
.toolbar{align-items:stretch;gap:12px}
.toolbar>label{flex:1;min-width:120px}
.toolbar>.search{flex-basis:100%}
.toolbar button{width:100%}
.map{padding:0}
.map #graph{height:440px}
.map-tools span{width:100%}
.lower>div{max-height:400px}
h1{margin-bottom:16px}
.brand span{display:block}
#connect{margin:12px auto}
.map-tools{padding:12px}
fieldset{gap:8px 16px}
}
