:root {
  --bg: #07101f; --panel: #0f172a; --panel-2: #111c32; --ink: #e5e7eb; --muted: #94a3b8;
  --line: #2b3a55; --accent: #60a5fa; --danger: #fb7185; --ok: #34d399; --warn: #fbbf24;
  --project:#7dd3fc; --component:#c084fc; --workflow:#34d399; --repo:#f472b6; --document-set:#facc15;
  --plan:#fb923c; --artifact:#94a3b8; --default:#a3e635;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 10% 0%, #172554, #07101f 38%, #030712); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
.topbar { display: flex; justify-content: space-between; gap: 24px; padding: 22px 28px; border-bottom: 1px solid rgba(148,163,184,.22); background: rgba(15,23,42,.82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
h1, h2, h3, p { margin-top: 0; } h1 { margin-bottom: 6px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.04em; } h2 { font-size: 15px; letter-spacing: -.01em; } h3 { font-size: 14px; margin-bottom: 8px; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.lede { margin-bottom: 0; max-width: 900px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 8px; min-width: 250px; }
.stats span, .pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; background: rgba(15,23,42,.7); color: #cbd5e1; font-size: 12px; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: calc(100vh - 118px); }
.workspace { position: relative; min-width: 0; }
.toolbar, .kgv-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; padding: 14px 18px; border-bottom: 1px solid rgba(148,163,184,.16); background: rgba(2,6,23,.25); }
.field { display: grid; gap: 5px; min-width: 150px; } .field.wide { flex: 1 1 360px; }
.field span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
input, select, button, .fileBtn, textarea { border: 1px solid var(--line); background: #07111f; color: var(--ink); border-radius: 12px; min-height: 40px; padding: 9px 11px; font: inherit; }
button, .fileBtn { cursor: pointer; font-weight: 700; } button:hover, .fileBtn:hover { border-color: var(--accent); }
.fileBtn.primary { background: linear-gradient(135deg, #2563eb, #7c3aed); border-color: rgba(255,255,255,.22); box-shadow: 0 10px 30px rgba(37,99,235,.25); }
.fileBtn input { display: none; } .kgv-toggle { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; color: #cbd5e1; }
.message { margin: 12px 18px 0; border: 1px solid rgba(96,165,250,.35); background: rgba(37,99,235,.14); padding: 10px 12px; border-radius: 12px; color: #dbeafe; }
.inspector, .kgv-inspector { border-left: 1px solid rgba(148,163,184,.2); background: rgba(15,23,42,.72); padding: 16px; overflow: auto; }
.inspector { max-height: calc(100vh - 118px); }
.panel { border: 1px solid rgba(148,163,184,.18); border-radius: 18px; padding: 14px; margin-bottom: 14px; background: rgba(15,23,42,.72); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.muted, .small, .small-list, .kgv-muted, .kgv-small { color: var(--muted); } .small, .small-list, .kgv-small { font-size: 12px; } code { color: #bfdbfe; }
.kgv-widget { min-height: 680px; }
.kgv-canvas-row { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 640px; }
.kgv-svg { display: block; width: 100%; height: calc(100vh - 294px); min-height: 560px; }
.kgv-node { cursor: pointer; } .kgv-node circle { stroke: rgba(255,255,255,.9); stroke-width: 1.2; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); } .kgv-node text { fill: var(--ink); paint-order: stroke; stroke: #020617; stroke-width: 4px; stroke-linejoin: round; font-size: 12px; pointer-events: none; } .kgv-node.dim { opacity: .18; } .kgv-node.selected circle { stroke: #fff; stroke-width: 3.2; }
.kgv-link { stroke: #64748b; stroke-opacity: .64; stroke-width: 1.6; marker-end: url(#kgv-arrow); } .kgv-link.dim { stroke-opacity: .08; }
.kgv-kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px; margin: 10px 0; } .kgv-k { color: var(--muted); } .kgv-v { overflow-wrap: anywhere; }
.kgv-edge { border-top: 1px solid rgba(148,163,184,.16); padding: 8px 0; } .kgv-edge:first-child { border-top: 0; }
.kgv-legend-row { display: inline-flex; align-items: center; gap: 7px; margin: 0 6px 8px 0; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); }
.kgv-swatch { width: 11px; height: 11px; border-radius: 50%; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink); width: min(880px, calc(100vw - 28px)); } dialog::backdrop { background: rgba(0,0,0,.65); } .dialog-card textarea { width: 100%; min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } menu { display: flex; justify-content: flex-end; gap: 10px; padding: 0; }
@media (max-width: 1100px) { .shell, .kgv-canvas-row { grid-template-columns: 1fr; } .intro { display:none; } .kgv-inspector { border-left:0; border-top:1px solid rgba(148,163,184,.2); } }
@media (max-width: 760px) { .topbar { display:block; } .stats { justify-content:flex-start; margin-top:12px; } .optional-url { flex-basis:100%; } .kgv-svg { height: 68vh; } }
