*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--bg:#0d0d0d;--panel:#1a1a1a;--ink:#e8e8e8;--dim:#888;--accent:#2a9d8f;--line:#262626}
body{background:var(--bg);color:var(--ink);font-family:"JetBrains Mono",ui-monospace,monospace;min-height:100vh;display:flex;flex-direction:column}
header{padding:2rem 2rem 1rem;border-bottom:1px solid var(--line)}
header h1{font-family:"Bebas Neue",Impact,sans-serif;font-size:2.4rem;letter-spacing:.05em;color:var(--accent);margin-bottom:.2rem}
header p{color:var(--dim);font-size:.85rem}
.three-panel{flex:1;display:grid;grid-template-columns:320px 1fr 360px;gap:1px;background:var(--line);min-height:0}
.panel{background:var(--panel);padding:1rem 1.2rem;overflow:auto;display:flex;flex-direction:column;min-width:0}
.panel h3{font-family:"Bebas Neue",sans-serif;letter-spacing:.06em;color:#ccc;margin-bottom:.8rem;font-size:1rem;font-weight:400}
.panel h3 span{color:var(--dim);font-size:.75rem;margin-left:.5rem}
#tree{flex:1;min-height:400px}
#tree svg{width:100%;height:100%;display:block}
#tree .node circle{fill:#333;stroke:#555;stroke-width:1;cursor:pointer;transition:fill .15s}
#tree .node.active circle{fill:var(--accent);stroke:var(--accent);r:5}
#tree .node text{fill:#aaa;font-size:10px;font-family:"JetBrains Mono",monospace}
#tree .link{fill:none;stroke:#333;stroke-width:1}
#structure{flex:1;min-height:400px;background:#000;border-radius:4px;position:relative}
#narrative p{line-height:1.55;font-size:.85rem;color:#ddd;margin-bottom:.8rem}
#narrative .meta{color:var(--dim);font-size:.72rem;margin-bottom:.6rem;letter-spacing:.03em;text-transform:uppercase}
#narrative .confidence{display:inline-block;padding:2px 6px;background:#222;border-radius:3px;color:var(--accent)}
.muted{color:var(--dim)!important;font-style:italic}
details{margin-top:1rem;border-top:1px solid var(--line);padding-top:.8rem}
summary{color:var(--dim);font-size:.72rem;cursor:pointer;letter-spacing:.05em;text-transform:uppercase}
pre{font-size:.7rem;color:#999;margin-top:.6rem;white-space:pre-wrap;word-break:break-all}
footer{padding:.6rem 2rem;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:.7rem;color:var(--dim)}
@media(max-width:900px){.three-panel{grid-template-columns:1fr;grid-template-rows:auto auto auto}}
