/* ontology/ontology.css — shared dark design system for the Agentic Ontology section.
   Base extracted verbatim from 부장님's example.html <style> so the new demos match it;
   additions below (nav, prototype banner, cypher/trace panels) are shared chrome the
   new demos need. Demo-specific visuals live inline in each page. */

:root{
  --bg:#0d1117; --panel:#141b24; --panel2:#1a232e; --line:#243040;
  --ink:#e6edf3; --ink2:#9aa7b4; --ink3:#5d6b7a;
  --semi:#5DCAA5; --fin:#7F77DD; --re:#EF9F27; --bio:#E0997B; --bat:#85B7EB;
  --edge:#2c3a4a; --accent:#378ADD;
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; background:var(--bg); color:var(--ink); overflow:hidden;}
a{color:inherit; text-decoration:none;}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:6px;}

.app{display:grid; grid-template-rows:auto 1fr; height:100vh;}
header{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 18px; background:var(--panel); border-bottom:1px solid var(--line);}
.brand{font-size:13px; font-weight:600; white-space:nowrap;}
.brand b{color:var(--accent);}
.brand span{color:var(--ink3); font-weight:400; margin-left:6px;}
.hbadge{font-size:10px; font-weight:600; color:#fff; background:#30363d; padding:3px 8px; border-radius:5px; white-space:nowrap;}

/* ---- shared nav (new) ---- */
.onav{display:flex; align-items:center; gap:3px; margin-left:auto; flex-wrap:wrap; justify-content:flex-end;}
.onav a{font-size:12px; color:var(--ink2); padding:4px 9px; border-radius:6px; transition:background .12s,color .12s; white-space:nowrap;}
.onav a:hover{background:var(--panel2); color:var(--ink);}
.onav a.on{background:#1f2d3d; color:#fff; box-shadow:inset 0 -2px 0 var(--accent);}
.onav .home{color:var(--ink3);}

.body{display:grid; grid-template-columns:284px 1fr; min-height:0;}

/* ---- LEFT: tree ---- */
.tree{background:var(--panel); border-right:1px solid var(--line); overflow-y:auto; padding:10px 0;}
.tree-title{font-size:11px; font-weight:600; color:var(--ink3); letter-spacing:.06em; text-transform:uppercase; padding:6px 16px 10px;}
.sec{margin-bottom:2px;}
.sec-row{display:flex; align-items:center; gap:7px; padding:7px 14px; cursor:pointer; font-size:13px; font-weight:600; border-radius:0; transition:background .12s;}
.sec-row:hover{background:var(--panel2);}
.sec-row .caret{font-size:9px; color:var(--ink3); width:9px; transition:transform .15s;}
.sec-row.open .caret{transform:rotate(90deg);}
.dot{width:9px; height:9px; border-radius:50%; flex:none;}
.sec-row .cnt{margin-left:auto; font-size:11px; color:var(--ink3); font-weight:400;}
.pol-list{display:none; padding:2px 0 6px;}
.sec.open .pol-list{display:block;}
.pol{display:flex; align-items:center; gap:8px; padding:5px 14px 5px 34px; cursor:pointer; font-size:12px; color:var(--ink2); transition:background .12s,color .12s;}
.pol:hover{background:var(--panel2); color:var(--ink);}
.pol.active{background:#1f2d3d; color:#fff; box-shadow:inset 3px 0 0 var(--accent);}
.pol .pc{font-size:10px; color:var(--ink3); font-family:ui-monospace,monospace;}
.pol .pr{margin-left:auto; font-size:10px; padding:1px 6px; border-radius:4px; font-weight:600;}

/* ---- RIGHT: graph stage ---- */
.stage{position:relative; min-height:0; background:radial-gradient(circle at 50% 40%, #111923 0%, #0d1117 70%);}
svg{width:100%; height:100%; display:block;}
.node circle{cursor:pointer; transition:stroke-width .12s;}
.node text{font-size:11px; fill:var(--ink); pointer-events:none; font-weight:500;}
.node.dim{opacity:.18;}
.link{stroke:var(--edge); stroke-opacity:.7;}
.link.dim{stroke-opacity:.08;}
.link.hot{stroke:var(--accent); stroke-opacity:.9;}

.legend{position:absolute; left:16px; bottom:16px; background:rgba(20,27,36,.9); border:1px solid var(--line); border-radius:10px; padding:11px 13px; font-size:11px; backdrop-filter:blur(6px);}
.legend .lt{color:var(--ink3); margin-bottom:7px; font-weight:600; letter-spacing:.04em;}
.lrow{display:flex; align-items:center; gap:7px; margin:4px 0; color:var(--ink2);}
.lrow .ls{width:11px; height:11px; border-radius:3px;}

.depth-ctrl{position:absolute; right:16px; top:16px; background:rgba(20,27,36,.92); border:1px solid var(--line); border-radius:10px; padding:10px 12px; backdrop-filter:blur(6px);}
.depth-ctrl .dl{font-size:11px; color:var(--ink3); font-weight:600; margin-bottom:8px; letter-spacing:.04em;}
.seg{display:flex; gap:4px;}
.seg button{font-size:12px; color:var(--ink2); background:#1a232e; border:1px solid var(--line); padding:5px 11px; border-radius:6px; cursor:pointer; font-weight:500; transition:all .12s;}
.seg button:hover{color:var(--ink); border-color:#3a4a5c;}
.seg button.on{background:var(--accent); color:#fff; border-color:var(--accent);}

.info{position:absolute; right:16px; bottom:16px; width:268px; background:rgba(20,27,36,.94); border:1px solid var(--line); border-radius:12px; padding:16px; backdrop-filter:blur(8px);}
.info .ik{font-size:10px; font-weight:600; color:var(--accent); letter-spacing:.06em; text-transform:uppercase;}
.info h3{font-size:16px; font-weight:700; margin:4px 0 10px; letter-spacing:-.01em;}
.info .meta{display:flex; flex-direction:column; gap:7px;}
.info .mrow{display:flex; justify-content:space-between; font-size:12px; gap:10px;}
.info .mrow .k{color:var(--ink3);}
.info .mrow .v{color:var(--ink); font-weight:500; text-align:right;}
.info .grade{display:inline-block; font-size:11px; font-weight:600; padding:2px 9px; border-radius:5px; margin-top:2px;}
.info .hint{font-size:11px; color:var(--ink3); margin-top:11px; line-height:1.5; border-top:1px solid var(--line); padding-top:10px;}

.tip{position:absolute; pointer-events:none; background:#000; color:#fff; font-size:11px; padding:5px 9px; border-radius:6px; opacity:0; transition:opacity .1s; white-space:nowrap; z-index:20;}

/* ---- prototype disclaimer banner (new, shared) ---- */
.proto-banner{position:absolute; left:16px; top:16px; max-width:420px; background:rgba(20,27,36,.92); border:1px solid var(--line); border-left:3px solid var(--re); border-radius:8px; padding:8px 12px; font-size:11px; line-height:1.5; color:var(--ink2); backdrop-filter:blur(6px); z-index:15;}
.proto-banner b{color:var(--re);}

/* ---- openCypher + agent-trace panels (new, shared by demos ②③) ---- */
.cypher{background:#0b0f16; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-family:ui-monospace,'SF Mono',monospace; font-size:11px; line-height:1.55; color:#b7c6d6; white-space:pre-wrap; overflow-x:auto;}
.cypher .kw{color:#7F77DD; font-weight:600;}
.cypher .fn{color:#5DCAA5;}
.cypher .st{color:#E0997B;}
.cypher-head{display:flex; align-items:center; justify-content:space-between; font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink3); font-weight:600; margin-bottom:6px;}
.cypher-head .lat{color:var(--semi); text-transform:none; letter-spacing:0;}

.trace{display:flex; flex-direction:column; gap:6px;}
.trace-step{display:flex; gap:9px; align-items:flex-start; font-size:12px; padding:7px 10px; background:var(--panel2); border:1px solid var(--line); border-radius:8px;}
.trace-step .ts-ic{width:20px; height:20px; border-radius:5px; display:grid; place-items:center; font-size:11px; font-weight:700; color:#fff; flex:none;}
.trace-step .ts-b{color:var(--ink2); line-height:1.45;}
.trace-step .ts-b b{color:var(--ink); font-weight:600;}
.ts-planner{background:#7F77DD;} .ts-graph{background:#5DCAA5;} .ts-analyst{background:#378ADD;} .ts-editor{background:#EF9F27;}

/* ---- generic small helpers ---- */
.pill{display:inline-block; font-size:10px; font-weight:600; padding:2px 8px; border-radius:999px; border:1px solid var(--line); color:var(--ink2);}
.pill.real{color:var(--semi); border-color:#1f4d3d;}
.pill.illus{color:var(--re); border-color:#4d3a1f;}
.muted{color:var(--ink3);}
