/* Hallmark · local graph interaction, consuming the existing Riso tokens. */
.graph-stage .graph-node.node-topic.context{opacity:.72}.graph-stage .graph-node.node-topic.context:hover,.graph-stage .graph-node.node-topic.context:focus-visible{opacity:1}
.graph-stage .graph-viewport{scrollbar-width:none;background-color:var(--color-graph-paper)}.graph-viewport::-webkit-scrollbar{display:none}.graph-stage .graph-node.context{opacity:.68}.graph-stage .graph-node.context .node-kind,.graph-stage .graph-node.context .node-date{fill:var(--color-ink)}.graph-stage .graph-node.context:hover,.graph-stage .graph-node.context:focus-visible{opacity:1}.graph-stage .explorer-svg{background:var(--color-transparent)}
.graph-ghosts{pointer-events:none;animation:graph-branch-out 240ms var(--ease-out) forwards}.graph-ghosts *{pointer-events:none!important}@keyframes graph-branch-out{from{opacity:.65}to{opacity:0}}@media(prefers-reduced-motion:reduce){.graph-ghosts{display:none;animation:none}}
.graph-stage{--color-graph-paper:oklch(95% .018 75);background:var(--color-graph-paper)}.graph-stage .graph-viewport{background-color:var(--color-graph-paper);background-image:radial-gradient(var(--color-rule) .65px,var(--color-transparent) .65px);background-size:24px 24px}.graph-node.context{opacity:.48}.graph-node.context:hover,.graph-node.context:focus-visible{opacity:1}.graph-node.adjacent{opacity:1}.graph-edge.context{opacity:.32}.graph-edge.selected{opacity:1}.graph-node{transition:opacity 180ms var(--ease-out)}.graph-legend .legend-context{border-style:dashed;opacity:.65}.graph-stage .edge-label-bg{fill:var(--color-graph-paper);stroke:var(--color-rule);stroke-width:.5}.graph-stage .node-surface{stroke-width:1.4}.graph-stage .graph-node.selected .node-surface{stroke-width:2.6}.graph-pagination{flex-wrap:wrap}.graph-viewport{cursor:grab}.graph-viewport:active{cursor:grabbing}.graph-node{cursor:pointer}
.graph-limit-form{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-xs);padding-block:var(--space-sm);border-top:1px solid var(--color-rule)}.graph-limit-form label{font-weight:600;font-size:var(--text-sm)}.graph-limit-form input{width:76px;min-height:44px;padding:var(--space-xs);background:var(--color-paper);border:1px solid var(--color-rule-2)}.graph-limit-form button,.graph-pagination button{min-height:44px;padding:var(--space-xs) var(--space-sm);border:1px solid var(--color-rule-2);font-size:var(--text-xs)}.graph-limit-form span{font-size:var(--text-xs);color:var(--color-muted)}.graph-limit-form input[aria-invalid=true]{border-color:var(--color-error)}.graph-trail{font-size:var(--text-xs);color:var(--color-muted);margin-bottom:var(--space-md);overflow-wrap:anywhere}.graph-pagination{display:flex;align-items:center;justify-content:space-between;gap:var(--space-xs);padding:var(--space-xs);border-top:1px solid var(--color-rule);font-size:var(--text-xs)}.graph-page-count{text-align:center}.graph-count{font-weight:600}
.node-poster{fill:var(--color-accent);stroke:none}.node-poster-rule{stroke:var(--color-ink);stroke-width:2;fill:none}.node-event:nth-of-type(2n) .node-poster{fill:var(--color-accent-2)}.node-date{font:400 11px var(--font-body);fill:var(--color-muted)}.graph-node.selected .node-date{fill:var(--color-paper)}.node-symbol{fill:none;stroke:var(--color-accent-dark);stroke-width:1.8}.graph-node.selected .node-symbol{stroke:var(--color-paper)}.node-expand-bg{fill:var(--color-paper);stroke:var(--color-ink);stroke-width:1}.node-expand-label{font:600 10px var(--font-body);fill:var(--color-ink)}.graph-node.adjacent .node-surface{stroke:var(--color-accent-dark);stroke-width:2}.graph-node.node-district .node-surface,.graph-node.node-city .node-surface{fill:var(--color-paper);stroke-dasharray:3 3}.graph-node.node-district.selected .node-surface,.graph-node.node-city.selected .node-surface{fill:var(--color-ink)}
.connections{padding-block:var(--space-xl)}.graph-heading{display:flex;flex-direction:column;gap:var(--space-md);margin-bottom:var(--space-lg)}.graph-heading h2{font-size:var(--text-xl)}.graph-heading p{margin-top:var(--space-xs);font-size:var(--text-sm);color:var(--color-muted)}.graph-history{display:flex;align-items:center;gap:var(--space-sm)}.graph-history button,.graph-selection-actions button{border:1px solid var(--color-rule-2);padding:var(--space-xs) var(--space-sm);font-size:var(--text-sm);min-height:44px}.graph-legend{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-xs) var(--space-md);font-size:var(--text-xs);padding-bottom:var(--space-md)}.graph-legend>span{padding:var(--space-2xs) var(--space-xs);border:1px solid var(--color-rule-2)}.legend-topic{border-radius:20px;background:var(--color-accent-2);color:var(--color-ink)}.legend-event{background:var(--color-ink);color:var(--color-paper)}.graph-legend p{flex-basis:100%;color:var(--color-muted)}.graph-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-lg)}.graph-stage{min-width:0;border:1px solid var(--color-rule-2)}.graph-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-xs);padding:var(--space-xs) var(--space-sm);border-bottom:1px solid var(--color-rule-2);font-size:var(--text-xs)}.graph-toolbar>div{display:flex;align-items:center;gap:var(--space-2xs);flex-wrap:wrap}.graph-toolbar button{font-size:var(--text-xs);padding-inline:var(--space-xs);min-width:44px;min-height:44px;border:1px solid var(--color-rule)}.graph-toolbar button[data-action=center]{padding-inline:var(--space-sm)}.graph-zoom{min-width:36px;text-align:center}.graph-viewport{height:430px;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;background:var(--color-paper);color:var(--color-ink);scrollbar-color:var(--color-rule-2) var(--color-paper-2)}.explorer-svg{display:block;max-width:none;overflow:visible}.graph-edge{fill:none;stroke:var(--color-rule-2);stroke-width:1.3}.graph-edge.selected{stroke:var(--color-accent-dark);stroke-width:2.6}.edge-label-bg{fill:var(--color-paper)}.edge-label{font:500 12px var(--font-body);fill:var(--color-accent-dark)}.graph-node{cursor:pointer;outline:none}.node-surface{fill:var(--color-paper-2);stroke:var(--color-rule-2);stroke-width:1.2}.node-title{font:600 14px var(--font-body);fill:var(--color-ink)}.node-kind{font:400 11px var(--font-body);fill:var(--color-muted)}.node-event .node-surface{fill:var(--color-paper);stroke:var(--color-ink)}.node-topic .node-surface{fill:var(--color-accent-2)}.node-topic .node-kind{fill:var(--color-ink)}.node-city .node-surface{stroke-dasharray:4 2}.graph-node.selected .node-surface{fill:var(--color-ink);stroke:var(--color-ink);stroke-width:2}.graph-node.selected .node-title,.graph-node.selected .node-kind{fill:var(--color-paper)}.graph-node:focus-visible .node-surface{stroke:var(--color-focus);stroke-width:5}.graph-node:active .node-surface{stroke:var(--color-accent-dark);stroke-width:3}.graph-pan-help{font-size:var(--text-xs);color:var(--color-muted);padding:var(--space-sm);border-top:1px solid var(--color-rule)}.graph-selection{min-width:0;border-top:2px solid var(--color-ink);padding-top:var(--space-md)}.selection-kind{font-size:var(--text-xs);color:var(--color-accent-dark)}.graph-selection h3{font-size:var(--text-lg);margin-block:var(--space-sm)}.selection-description{font-size:var(--text-sm);color:var(--color-muted);max-width:55ch}.graph-selection-actions{display:flex;flex-wrap:wrap;gap:var(--space-xs);margin-block:var(--space-lg)}.graph-selection-actions [data-focus]{background:var(--color-ink);color:var(--color-paper)}.graph-selection h4{font:600 var(--text-sm) var(--font-body);margin-block:var(--space-lg) var(--space-sm)}.graph-reasons{list-style:none;padding:0;margin:0;display:grid;gap:var(--space-xs)}.graph-reasons li{display:flex;flex-direction:column;align-items:start;border-bottom:1px solid var(--color-rule);padding-block:var(--space-xs)}.graph-reasons span{font-size:var(--text-xs);color:var(--color-muted)}.graph-reasons button{font-size:var(--text-sm);font-weight:600;text-align:start;padding:var(--space-xs) 0;text-decoration:underline;text-underline-offset:2px;min-height:44px;max-width:100%}.graph-status{min-height:var(--space-xl);font-size:var(--text-sm);color:var(--color-accent-dark);padding-top:var(--space-xs)}.graph-source{font-size:var(--text-xs);color:var(--color-muted)}
@media(min-width:60rem){.graph-heading{flex-direction:row;justify-content:space-between;align-items:center}.graph-workspace{grid-template-columns:minmax(0,1fr) 260px}.graph-viewport{height:560px}.graph-selection{border-top:0;border-left:1px solid var(--color-rule-2);padding-top:0;padding-left:var(--space-lg)}.graph-selection-actions{flex-direction:column;align-items:start}.graph-selection-actions button{font-size:var(--text-xs)}.graph-legend p{flex-basis:auto;margin-left:auto}}
@media(hover:hover){.graph-node:not(.selected):hover .node-surface{stroke:var(--color-ink);stroke-width:2.2}.graph-selection-actions [data-focus]:hover{background:var(--color-ink-2);color:var(--color-paper)}}
@media(prefers-reduced-motion:reduce){.explorer-svg *{animation:none!important;transition:none!important}}.graph-trail{height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.graph-count{min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.graph-toolbar{min-height:108px;align-content:center}.graph-workspace{align-items:stretch}.graph-stage{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;height:660px;min-width:0}.graph-stage .graph-viewport{height:100%;min-height:0}.graph-selection{height:320px;max-height:320px;overflow:auto;overscroll-behavior:contain}.graph-pagination{min-height:66px}.graph-pan-help{min-height:48px}.graph-history{flex-shrink:0}
@media(min-width:60rem){.graph-workspace{height:clamp(600px,72svh,860px);grid-template-columns:minmax(0,1fr) 260px}.graph-stage{height:100%;min-height:0}.graph-selection{height:100%;max-height:100%;overflow:auto}.graph-toolbar{height:84px;min-height:84px}.graph-stage .graph-viewport{height:100%}.graph-pan-help{min-height:42px}}
/* The graph is the main workspace; controls occupy two compact rows. */
.connections{margin-top:0;padding-block:var(--space-xs)}.graph-heading{flex-direction:row;align-items:center;flex-wrap:wrap;gap:var(--space-sm);margin-bottom:var(--space-xs)}.graph-heading h2{font-size:var(--text-lg);white-space:nowrap}.graph-heading .graph-legend{padding:0;gap:var(--space-xs);margin:0}.graph-heading .graph-legend>span{padding:2px 6px;font-size:var(--text-xs)}.graph-history{margin-left:auto}.graph-toolbar .graph-limit-form{border:0;padding:0;flex-wrap:nowrap;gap:var(--space-2xs);flex-shrink:0}.graph-toolbar .graph-limit-form input{width:54px}.graph-toolbar .graph-limit-form label{font-size:var(--text-xs);white-space:nowrap}.graph-toolbar .graph-limit-form button{padding-inline:var(--space-xs)}.graph-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.graph-toolbar{height:156px;min-height:156px;padding:var(--space-2xs);gap:var(--space-2xs);align-content:center}.graph-toolbar .graph-count{font-size:var(--text-xs);flex:1 1 100%}.graph-toolbar .graph-camera{display:flex;flex-wrap:wrap;gap:var(--space-2xs)}.graph-toolbar .graph-camera button{padding-inline:var(--space-xs)}.graph-trail{height:20px;margin-bottom:var(--space-sm)}.graph-stage{height:600px}.graph-pan-help{font-size:var(--text-xs);padding:var(--space-xs);min-height:0}.graph-pagination{min-height:48px;padding:var(--space-2xs)}
@media(min-width:60rem){.connections .graph-heading{height:44px;min-height:44px;flex-wrap:nowrap;margin-bottom:0}.graph-heading h2{font-size:var(--text-md)}.graph-heading .graph-legend{margin-left:var(--space-sm)}.graph-workspace{height:clamp(500px,calc(100svh - 260px),820px)}.graph-stage{height:100%}.graph-toolbar{height:48px;min-height:48px;flex-wrap:nowrap;justify-content:flex-start}.graph-toolbar .graph-count{flex:1 1 120px;max-width:180px}.graph-toolbar .graph-camera{margin-left:auto;flex-wrap:nowrap;flex-shrink:0}.graph-toolbar .graph-camera button{font-size:var(--text-xs)}.graph-toolbar .graph-limit-form{margin:0}.graph-pan-help{display:none}.graph-stage{grid-template-rows:48px minmax(0,1fr) 48px}.graph-selection{padding-top:var(--space-xs)}}
@media(min-width:60rem){.graph-workspace{height:clamp(560px,calc(100svh - 200px),900px)}}
