/* Only the added facts popup is styled here. Original canvas styles stay intact. */
.fact-popup{position:fixed;left:12px;bottom:12px;pointer-events:none;z-index:10;width:480px;max-width:calc(100vw - 24px);max-height:40vh;overflow:auto;padding:0;border:1px solid var(--line);border-radius:5px;background:var(--panel);color:var(--ink);box-shadow:0 8px 30px #0005;font:12px system-ui,sans-serif;box-sizing:border-box}
.fact-popup[hidden]{display:none}.fact-popup-heading{position:sticky;top:0;background:var(--panel);display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 16px;border-bottom:1px solid var(--line);font-size:13px}.fact-popup-heading button{padding:0 3px;background:none;border:0;color:var(--muted);font-size:18px}.fact-popup-content{padding:14px 16px}.fact-group{margin-bottom:14px}.fact-group:last-child{margin-bottom:0}.fact-inputs{margin:6px 0 0 8px;padding-left:14px;border-left:1px solid #bbaad544}.fact-breakdown{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.85 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted)}.fact-syntax-head{color:#d2d7a8}.fact-syntax-role{color:#bbaad5}.fact-syntax-entity{color:#92c6b4}.fact-syntax-literal{color:#a7c3a1}.fact-syntax-muted{color:#758171}.fact-popup [data-fact-chunk]{cursor:pointer;outline:none}.fact-popup [data-fact-chunk]:hover,.fact-popup [data-fact-chunk]:focus-visible{background:#354331}.fact-source-trace .box-text{filter:brightness(1.25);text-decoration:underline}
.fact-source-wires{position:fixed;inset:0;width:100%;height:100%;z-index:11;pointer-events:none;overflow:visible}.fact-source-wire{fill:none;stroke:#a7c3a1;stroke-width:1;stroke-dasharray:2 5;stroke-linecap:round;opacity:.5}

@media(min-width:1200px){.fact-popup{left:auto;right:16px;bottom:auto;top:var(--fact-popup-top,50%);width:340px}}
