.graph-page { min-height: 100vh; overflow: hidden; background: #03121f; }
.graph-header { height: 76px; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(3,18,31,.96); }
.graph-header .brand { justify-self: start; }
.graph-header-copy { text-align: center; }
.graph-header-copy span, .graph-header-copy strong { display: block; }
.graph-header-copy span { margin-bottom: 5px; color: var(--teal); font-size: 8px; letter-spacing: .18em; }
.graph-header-copy strong { font-size: 15px; }
.graph-back { justify-self: end; color: var(--muted); font-size: 11px; }
.graph-back:hover { color: var(--teal); }
.graph-layout { height: calc(100vh - 76px); display: grid; grid-template-columns: 268px minmax(0, 1fr) 310px; }
.graph-controls, .graph-inspector { min-width: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(91,211,204,.25) transparent; background: rgba(4,20,34,.96); }
.graph-controls { padding: 25px 20px 35px; border-right: 1px solid rgba(255,255,255,.08); }
.graph-inspector { padding: 26px 22px; border-left: 1px solid rgba(255,255,255,.08); }
.graph-overview > span, .inspector-empty > span, .inspector-kicker { color: var(--orange); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.graph-overview h1 { margin: 11px 0 9px; font-size: 25px; line-height: 1.18; letter-spacing: -.04em; }
.graph-overview > p, .inspector-empty p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.graph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 20px 0; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.08); }
.graph-stats div { padding: 11px 8px; text-align: center; background: #061a2a; }
.graph-stats strong, .graph-stats span { display: block; }
.graph-stats strong { color: var(--teal); font-size: 16px; }
.graph-stats span { margin-top: 4px; color: var(--muted-2); font-size: 8px; }
.graph-search { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border: 1px solid rgba(91,211,204,.28); background: #031522; }
.graph-search > span { color: var(--teal); font-size: 17px; }
.graph-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.graph-search kbd { padding: 2px 5px; border: 1px solid rgba(255,255,255,.12); color: var(--muted-2); font-size: 8px; }
.graph-search-results { position: relative; z-index: 5; margin-top: 5px; padding: 5px; border: 1px solid rgba(91,211,204,.25); background: #071c2e; }
.graph-search-results[hidden] { display: none; }
.graph-search-results button { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center; padding: 9px 8px; border: 0; border-bottom: 1px solid rgba(255,255,255,.05); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.graph-search-results button:hover { background: rgba(91,211,204,.07); }
.graph-search-results i { width: 7px; height: 7px; border-radius: 50%; }
.graph-search-results strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.graph-search-results small { color: var(--muted-2); font-size: 8px; }
.graph-switch { display: flex; align-items: center; gap: 9px; margin: 15px 0 20px; color: #bfccd2; cursor: pointer; }
.graph-switch input { position: absolute; opacity: 0; }
.graph-switch > span { position: relative; width: 30px; height: 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; background: rgba(255,255,255,.04); }
.graph-switch > span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); transition: .2s ease; }
.graph-switch input:checked + span { border-color: var(--teal); background: rgba(91,211,204,.14); }
.graph-switch input:checked + span::after { left: 16px; background: var(--teal); }
.graph-switch b { font-size: 10px; font-weight: 600; }
.graph-filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.graph-filter-head strong { font-size: 10px; }
.graph-filter-head button { border: 0; background: transparent; color: var(--teal); font-size: 8px; cursor: pointer; }
.graph-categories { display: grid; gap: 3px; }
.graph-category { display: grid; grid-template-columns: 17px 9px 1fr auto; gap: 7px; align-items: center; padding: 8px 7px; border: 1px solid transparent; color: var(--muted); cursor: pointer; }
.graph-category:hover { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.025); }
.graph-category input { accent-color: var(--teal); }
.graph-category i { width: 8px; height: 8px; border-radius: 50%; }
.graph-category strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 600; }
.graph-category small { color: var(--muted-2); font-size: 8px; }
.graph-stage { position: relative; min-width: 0; overflow: hidden; background-color: #020d16; background-image: linear-gradient(rgba(91,211,204,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(91,211,204,.035) 1px, transparent 1px); background-size: 34px 34px; }
#graph-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#graph-canvas.dragging { cursor: grabbing; }
.graph-toolbar { position: absolute; top: 16px; right: 16px; display: flex; border: 1px solid rgba(91,211,204,.25); background: rgba(3,18,31,.86); backdrop-filter: blur(10px); }
.graph-toolbar button { min-width: 36px; height: 35px; padding: 0 10px; border: 0; border-right: 1px solid rgba(255,255,255,.08); background: transparent; color: #cbd8dd; font-size: 12px; cursor: pointer; }
.graph-toolbar button:last-child { border-right: 0; color: var(--teal); font-size: 9px; }
.graph-toolbar button:hover { background: rgba(91,211,204,.1); }
.graph-legend { position: absolute; left: 16px; bottom: 15px; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(3,18,31,.82); color: var(--muted); font-size: 9px; backdrop-filter: blur(10px); }
.graph-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(91,211,204,.1); }
.graph-tooltip { position: absolute; z-index: 8; max-width: 220px; pointer-events: none; padding: 9px 11px; border: 1px solid rgba(91,211,204,.35); background: rgba(3,18,31,.95); box-shadow: 0 15px 35px rgba(0,0,0,.4); }
.graph-tooltip strong, .graph-tooltip span { display: block; }
.graph-tooltip strong { margin-bottom: 4px; font-size: 11px; }
.graph-tooltip span { color: var(--muted); font-size: 8px; }
.inspector-empty { margin-top: 35px; }
.inspector-empty h2 { margin: 12px 0 10px; font-size: 24px; }
.inspector-category { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--teal); font-size: 9px; }
.inspector-category i { width: 8px; height: 8px; border-radius: 50%; }
.graph-inspector h2 { margin: 0 0 10px; font-size: 23px; line-height: 1.3; letter-spacing: -.03em; }
.inspector-summary { margin: 0 0 18px; color: #b8c7ce; font-size: 11px; line-height: 1.8; }
.inspector-path { margin-bottom: 19px; padding: 11px; border-left: 2px solid var(--orange); background: rgba(246,166,35,.06); color: var(--muted); font-size: 9px; line-height: 1.65; overflow-wrap: anywhere; }
.inspector-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.08); }
.inspector-metrics div { padding: 13px; background: #061a2a; }
.inspector-metrics strong, .inspector-metrics span { display: block; }
.inspector-metrics strong { color: var(--orange); font-size: 17px; }
.inspector-metrics span { margin-top: 4px; color: var(--muted-2); font-size: 8px; }
.inspector-guide { display: block; margin-bottom: 22px; padding: 15px; border: 1px solid rgba(91,211,204,.28); background: rgba(91,211,204,.06); }
.inspector-guide small, .inspector-guide strong, .inspector-guide span { display: block; }
.inspector-guide small { color: var(--teal); font-size: 8px; }
.inspector-guide strong { margin: 7px 0; font-size: 13px; }
.inspector-guide span { color: var(--orange); font-size: 9px; }
.inspector-guide:hover { border-color: var(--teal); }
.inspector-links > strong { display: block; margin-bottom: 9px; font-size: 10px; }
.inspector-links button { width: 100%; display: grid; grid-template-columns: 9px 1fr auto; gap: 8px; align-items: center; padding: 10px 5px; border: 0; border-top: 1px solid rgba(255,255,255,.06); background: transparent; color: #c7d3d8; text-align: left; cursor: pointer; }
.inspector-links button:hover { color: var(--teal); }
.inspector-links button i { width: 7px; height: 7px; border-radius: 50%; }
.inspector-links button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.inspector-links button small { color: var(--muted-2); font-size: 8px; }

@media (max-width: 1100px) {
  .graph-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .graph-inspector { position: absolute; z-index: 12; right: 14px; top: 90px; bottom: 14px; width: 285px; border: 1px solid rgba(91,211,204,.25); box-shadow: 0 25px 70px rgba(0,0,0,.5); }
}

@media (max-width: 760px) {
  .graph-page { overflow: auto; }
  .graph-header { height: 68px; grid-template-columns: 1fr auto; padding: 0 14px; }
  .graph-header-copy { display: none; }
  .graph-back { font-size: 9px; }
  .graph-layout { height: auto; display: flex; flex-direction: column; }
  .graph-controls { max-height: none; padding: 20px 17px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .graph-overview h1 { font-size: 26px; }
  .graph-categories { grid-template-columns: 1fr 1fr; }
  .graph-stage { height: 68vh; min-height: 520px; order: 2; }
  .graph-inspector { position: static; width: auto; min-height: 280px; order: 3; border: 0; border-top: 1px solid rgba(255,255,255,.08); box-shadow: none; }
  .graph-legend { right: 12px; left: 12px; justify-content: center; }
}
