:root { font-family:system-ui,sans-serif; }
body { margin:0; color:var(--ink); background:var(--paper); }
header { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:16px 24px; border-bottom:1px solid var(--line); background:var(--panel); }
h1 { margin:0; font-size:21px; } header p { margin:3px 0 0; }
h2 { margin:0 0 12px; font-size:17px; } h3,h4 { margin:16px 0 7px; }
p { font-size:13px; line-height:1.5; }
a { color:var(--deep); font-size:13px; }
button,select,textarea { font:inherit; font-size:13px; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:6px; padding:8px; }
button { cursor:pointer; } button:hover { border-color:var(--deep); } button:disabled { cursor:wait; opacity:.6; }
label { font-size:13px; } textarea { display:block; box-sizing:border-box; width:100%; resize:vertical; min-height:67px; margin:7px 0; }
#extract { color:white; background:#674497; border-color:#674497; font-weight:600; }
.input-panel { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); gap:25px; padding:16px 24px; }
.input-actions { display:flex; align-items:center; gap:12px; }
#status { font-size:13px; } #status.error,.failed { color:var(--error,#b33444); }
.example-panel select { display:block; width:100%; margin-top:7px; }
.example-panel p { margin:8px 0; }
main { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; padding:0 18px 18px; }
.diagram,aside { min-width:0; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
aside { max-height:80vh; overflow:auto; }
#chunk { width:100%; margin:7px 0; }
.controls { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.controls label { display:inline-flex; align-items:center; gap:4px; }
.controls input[type=range] { width:90px; }
#source-text { white-space:pre-wrap; padding:8px 0; font-size:15px; }
#graph-scroll { overflow:auto; height:57vh; min-height:400px; border:1px solid var(--line); border-radius:6px; background:var(--panel-soft); }
#graph { display:block; max-width:none; touch-action:none; }
#graph-status,.note,footer { color:var(--muted); font-size:12px; }
#selection { overflow-wrap:anywhere; font-size:13px; }
#selection button { text-align:left; margin:3px 0; font-size:12px; }
.link-list button { display:block; width:100%; }
.annotation { margin:9px 0; padding:8px 9px; background:var(--panel-soft); border-left:3px solid #a185c3; border-radius:4px; }
.annotation p { margin:3px 0; }.badge { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.evidence { color:var(--muted); font-size:11px; }
mark { color:var(--ink); background:var(--mark-soft,#eddcfb); }
details { margin:12px 0; }summary { cursor:pointer; font-size:13px; font-weight:600; }
#types,#concept-groups { overflow:auto; max-height:500px; }
table { border-collapse:collapse; font-size:12px; width:100%; }td,th { padding:7px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); }
#failures { max-height:180px; overflow:auto; }#failures button { text-align:left; display:block; width:100%; margin:4px 0; }
pre { overflow:auto; max-height:300px; font-size:11px; white-space:pre-wrap; }
footer { padding:0 24px 18px; }
.compact-concept-text { fill:#795317; }
.inspect-heading { margin-top:22px; padding-top:16px; border-top:1px solid var(--line); }
#connections { --head-colour:#7952a6; --tentacle-colour:#177b78; overflow-wrap:anywhere; }
#connections h3 { margin-top:0; } #connections h4 { font-size:12px; }
.connection-list.heads h4 { color:var(--head-colour); }.connection-list.tentacles h4 { color:var(--tentacle-colour); }
.connection-list button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; margin:4px 0; text-align:left; }
.connection-list small { display:block; margin-top:3px; font-size:10px; color:var(--muted); }
.connection-score { flex-shrink:0; font:12px ui-monospace,monospace; font-variant-numeric:tabular-nums; }
#graph { --head-colour:#7952a6; --tentacle-colour:#177b78; }
#graph.connection-hover .box { opacity:.25; }
#graph.connection-hover .hover-origin,#graph.connection-hover .hover-head,#graph.connection-hover .hover-tentacle { opacity:1; }
#graph .hover-origin .frame,#graph .hover-origin .incoming-point { stroke:var(--ink); stroke-width:3; }
#graph .hover-head .frame,#graph .hover-head .incoming-point { stroke:var(--head-colour); stroke-width:3; }
#graph .hover-tentacle .frame,#graph .hover-tentacle .incoming-point { stroke:var(--tentacle-colour); stroke-width:3; }
#graph .hover-head.hover-tentacle .frame,#graph .hover-head.hover-tentacle .incoming-point { stroke:var(--head-colour); stroke-dasharray:4 2; }
@media(prefers-color-scheme:dark) { .compact-concept-text { fill:#d1b481; } }
@media(prefers-color-scheme:dark) { #connections,#graph { --head-colour:#c6a3f1; --tentacle-colour:#75d0c7; } }
@media(max-width:950px) { main { grid-template-columns:minmax(0,1fr) 290px; } }
@media(max-width:720px) { main,.input-panel { grid-template-columns:1fr; } aside { max-height:none; } header { align-items:flex-start; } }
