:root {
  color-scheme: dark;
  --node-width: 294px;
  --bg: #0c1014;
  --panel: #10151b;
  --line: #252d36;
  --muted: #8794a5;
  --text: #e9eef3;
  --c: #a4c6fa;
  --ts: #c7a8fb;
  --wasm: #edba72;
  --lib: #77d6b3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 11px;
  cursor: pointer;
}
button:hover {
  background: #222c35;
  border-color: #526270;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lib);
  outline-offset: 3px;
}
header {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
}
.brand > span:last-child {
  color: var(--muted);
}
.logo {
  font: 27px monospace;
  letter-spacing: -5px;
  background: #1b2b27;
  color: var(--lib);
  width: 39px;
  height: 37px;
  border: 1px solid #385349;
  border-radius: 7px;
  padding-left: 5px;
}
.slash {
  color: #425160;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.header-right button {
  margin-left: 16px;
  font: 12px system-ui;
  letter-spacing: 0;
}
.live {
  width: 6px;
  height: 6px;
  background: var(--lib);
  border-radius: 50%;
}
.app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 527px;
  height: calc(100dvh - 72px);
  min-height: 600px;
}
.sidebar {
  padding: 28px 18px 16px;
  border-right: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0f141a;
  overflow: auto;
}
.eyebrow,
.section-label {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 1.6px;
  color: var(--muted);
}
h1 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 14px 0 10px;
  font-weight: 550;
}
.intro {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 25px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #303a46;
  border-radius: 7px;
  padding: 8px;
  margin-bottom: 30px;
}
.search span {
  font-size: 22px;
  color: var(--muted);
  line-height: 16px;
}
input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
  color: var(--text);
}
kbd {
  font: 10px monospace;
  border: 1px solid #34404a;
  border-radius: 3px;
  padding: 0 4px;
  color: var(--muted);
}
.section-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  border-color: transparent;
  text-align: left;
  padding: 11px 9px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
nav button span {
  font: 10px monospace;
  color: #647185;
}
nav button.active {
  background: #1a2d29;
  border-color: #34584b;
  color: #a4e4cc;
}
nav button.active span {
  color: var(--lib);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.legend {
  font-size: 10px;
  line-height: 2.5;
  color: #a9b4c2;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  margin-right: 6px;
  background: var(--c);
}
.dot.ts {
  background: var(--ts);
  margin-left: 13px;
}
.dot.wasm {
  background: var(--wasm);
}
.dot.lib {
  background: var(--lib);
  margin-left: 8px;
}
.snapshot {
  font: 9px/1.8 monospace;
  color: #718093;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
}
.sidebar-bottom button {
  border: 0;
  padding: 8px 0;
  font-size: 10px;
  color: #a2b0c0;
}
main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.map-heading {
  padding: 25px 27px 22px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 154px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 500;
  margin: 8px 0;
}
.map-heading p {
  font-size: 12px;
  max-width: 650px;
  margin: 0;
  color: var(--muted);
}
.map-heading button {
  align-self: center;
  font-size: 11px;
  white-space: nowrap;
}
#viewport {
  position: relative;
  overflow: hidden;
  flex: 1;
  background-color: #0c1117;
  background-image: radial-gradient(#34404d70 0.7px, transparent 0.7px);
  background-size: 20px 20px;
  cursor: grab;
  touch-action: none;
}
#viewport:active {
  cursor: grabbing;
}
#world {
  position: absolute;
  transform-origin: 0 0;
  will-change: transform;
}
#edges {
  position: absolute;
  inset: 0;
  overflow: visible;
}
#nodes {
  position: absolute;
  inset: 0;
}
.node {
  position: absolute;
  width: var(--node-width);
  height: 102px;
  background: #151d26;
  border: 1px solid #344354;
  border-radius: 9px;
  text-align: left;
  padding: 13px 14px;
  box-shadow: 0 5px 20px #0002;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  --color: var(--c);
}
.node.ts {
  --color: var(--ts);
}
.node.wasm {
  --color: var(--wasm);
}
.node.lib {
  --color: var(--lib);
}
.node:hover,
.node.selected {
  border-color: var(--color);
  background: #1b2731;
}
.node.selected {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color) 12%, transparent);
}
.node small {
  font: 9px monospace;
  color: var(--color);
  letter-spacing: 0.8px;
  display: block;
  margin-bottom: 7px;
}
.node strong {
  display: block;
  font:
    12px ui-monospace,
    monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e6edf6;
}
.node .path {
  display: block;
  font: 9px monospace;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 6px;
}
.node.dim {
  opacity: 0.2;
}
.wire {
  fill: none;
  stroke: #6d8192;
  stroke-width: 1.4;
  opacity: 0.65;
  cursor: pointer;
}
.wire.import {
  stroke-dasharray: 5 5;
}
.wire:hover,
.wire.selected {
  stroke: var(--lib);
  stroke-width: 2.5;
  opacity: 1;
}
.wire.dim {
  opacity: 0.08;
}
.hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  cursor: pointer;
}
.canvas-label {
  position: absolute;
  top: 20px;
  left: 26px;
  font: 8px monospace;
  letter-spacing: 1.2px;
  color: #667686;
  z-index: 1;
  pointer-events: none;
}
.canvas-label span {
  padding: 0 16px;
}
.controls {
  position: absolute;
  bottom: 23px;
  right: 23px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121a22;
  padding: 4px;
  z-index: 2;
}
.controls button {
  border: 0;
  font-size: 13px;
}
.controls span {
  font: 10px monospace;
  width: 35px;
  text-align: center;
  color: var(--muted);
}
.controls i {
  height: 20px;
  border-left: 1px solid var(--line);
}
.map-hint {
  position: absolute;
  bottom: 29px;
  left: 23px;
  font: 9px monospace;
  color: #718093;
  pointer-events: none;
}
.map-hint span {
  padding: 0 5px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font: 9px monospace;
  color: var(--muted);
}
footer button {
  border: 0;
  padding: 0 0 0 12px;
  font: 9px monospace;
}
.dashed {
  color: var(--lib);
  padding-left: 8px;
}
.inspector {
  border-left: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
  padding: 22px 19px;
}
.inspector:focus {
  outline: 2px solid var(--lib);
  outline-offset: -2px;
}
.inspector-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 9px monospace;
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 19px;
  margin-bottom: 23px;
}
.inspector-label span {
  color: var(--lib);
}
#details h3 {
  font: 18px/1.4 monospace;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
#details .filepath {
  font: 10px/1.7 monospace;
  color: var(--muted);
  overflow-wrap: anywhere;
}
#details p {
  font-size: 12px;
  color: #a8b5c3;
  line-height: 1.8;
}
#details h4 {
  font: 9px monospace;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 27px;
}
#details .actions {
  display: flex;
  gap: 8px;
  margin: 17px 0;
}
#details a {
  color: var(--lib);
  text-decoration: none;
  font-size: 11px;
}
#details .pill {
  display: inline-block;
  border: 1px solid #384554;
  padding: 3px 7px;
  border-radius: 4px;
  font: 9px monospace;
  color: var(--muted);
}
.symbol,
.neighbor {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  font: 10px/1.6 monospace;
  padding: 10px 0;
  overflow-wrap: anywhere;
}
.symbol span {
  float: right;
  color: #758498;
  font-size: 9px;
}
.snippet {
  font: 10px/1.7 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b3c6d8;
  background: #090e13;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 300px;
  overflow: auto;
}
.file-stats {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}
.evidence {
  border-left: 2px solid var(--lib);
  padding: 0 0 0 12px;
  margin-bottom: 18px;
}
.evidence code {
  font-size: 10px;
  overflow-wrap: anywhere;
  color: #b1d9c9;
}
.eyebrow.accent {
  color: var(--lib);
}
#results {
  position: absolute;
  top: 224px;
  left: 14px;
  right: 14px;
  max-height: 400px;
  overflow: auto;
  background: #1a222d;
  border: 1px solid #405064;
  border-radius: 7px;
  z-index: 10;
  box-shadow: 0 12px 30px #0008;
}
#results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  font: 10px monospace;
  overflow-wrap: anywhere;
  padding: 12px;
}
#results small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
dialog {
  max-width: 620px;
  background: #151d26;
  border: 1px solid #3a4c59;
  border-radius: 12px;
  color: var(--text);
  padding: 35px;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(4px);
}
dialog p {
  color: #aab9c9;
  font-size: 13px;
  line-height: 1.8;
}
#close-modal {
  float: right;
  font-size: 20px;
  padding: 0 8px;
}
#empty {
  position: absolute;
  top: 60%;
  left: 20%;
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1800px) {
  .app {
    grid-template-columns: 250px minmax(0, 1fr) 595px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 195px minmax(0, 1fr) 442px;
  }
  .sidebar {
    padding: 22px 12px;
  }
  h1 {
    font-size: 23px;
  }
  .map-hint {
    display: none;
  }
  .canvas-label {
    font-size: 7px;
  }
  .canvas-label span {
    padding: 0 7px;
  }
  .map-heading {
    padding: 20px;
  }
  .inspector {
    padding: 18px 14px;
  }
}
@media (max-width: 760px) {
  header {
    height: 58px;
    padding: 0 15px;
  }
  .header-right {
    font-size: 0;
  }
  .header-right button {
    font-size: 10px;
    margin: 0;
  }
  .brand {
    gap: 8px;
    font-size: 13px;
  }
  .app {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - 58px);
  }
  .sidebar {
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .sidebar h1,
  .intro,
  .sidebar > .eyebrow,
  .sidebar-bottom,
  .section-label {
    display: none;
  }
  .search {
    margin: 0 0 12px;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    padding: 8px;
  }
  #results {
    top: 50px;
    max-height: 260px;
  }
  main {
    height: 65dvh;
    min-height: 470px;
  }
  .map-heading {
    min-height: 130px;
    padding: 16px;
  }
  .map-heading h2 {
    font-size: 21px;
  }
  .map-heading p {
    font-size: 11px;
  }
  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 60dvh;
  }
  footer {
    font-size: 8px;
    padding: 9px;
  }
  .canvas-label {
    font-size: 6px;
  }
  .controls {
    bottom: 14px;
    right: 14px;
  }
}
#nodes {
  pointer-events: none;
}
.node {
  pointer-events: auto;
}
.node strong {
  font-size: 16px;
}
.node small {
  font-size: 11px;
}
.node .path {
  font-size: 11px;
}
.node.dim {
  opacity: 0.48;
}
.wire.dim {
  opacity: 0.18;
}
body.expanded .app {
  grid-template-columns: 185px minmax(0, 1fr);
}
body.expanded .inspector {
  display: none;
}
body.expanded .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}
body.expanded .sidebar h1 {
  font-size: 23px;
}
body.expanded .node.selected {
  border-width: 2px;
}
#tooltip {
  position: fixed;
  width: 285px;
  background: #202d38;
  border: 1px solid #536a79;
  border-radius: 8px;
  box-shadow: 0 12px 30px #0006;
  padding: 13px;
  z-index: 40;
  pointer-events: none;
  font-size: 11px;
}
#tooltip strong {
  font: 10px monospace;
  overflow-wrap: anywhere;
  color: var(--lib);
}
#tooltip p {
  margin: 8px 0;
  color: #c7d3df;
}
#tooltip small {
  font: 9px monospace;
  color: var(--muted);
}
body.expanded.inspect-open .inspector {
  display: block;
  position: absolute;
  right: 12px;
  top: 82px;
  width: 527px;
  max-height: 80dvh;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 10px;
}
#detail-close {
  display: block;
  padding: 0 5px;
  font: 14px monospace;
}
body.expanded #detail-close {
  display: block;
}
.inspector-label {
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}

body.inspector-closed .inspector {
  display: none;
}
body.inspector-closed:not(.expanded) .app {
  grid-template-columns: 230px minmax(0, 1fr);
}

@media (max-width: 760px) {
  body.inspector-closed:not(.expanded) .app {
    grid-template-columns: minmax(0, 1fr);
  }
  body.expanded .app {
    grid-template-columns: minmax(0, 1fr);
  }
  body.inspect-open .inspector,
  body.expanded.inspect-open .inspector {
    display: block;
    position: fixed;
    top: 65px;
    right: 12px;
    width: min(527px, 90vw);
    max-height: calc(100dvh - 80px);
    z-index: 20;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  body.inspect-open #detail-close {
    display: block;
  }
}
.snippet.shiki code {
  font: inherit;
  white-space: pre-wrap;
}
.snippet.shiki .line {
  white-space: pre-wrap;
}
.snippet {
  max-height: none;
}
.sidebar {
  overflow: hidden;
  padding-top: 22px;
}
.sidebar h1 {
  font-size: 23px;
  margin: 10px 0;
}
.intro {
  font-size: 11px;
  margin-bottom: 17px;
}
.search {
  margin-bottom: 20px;
}
nav {
  display: block;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}
nav button {
  width: 100%;
  padding: 9px 8px;
  margin-bottom: 3px;
  gap: 9px;
  font-size: 11px;
}
nav .guide-name {
  font: inherit;
  color: inherit;
}
nav .guide-arrow {
  margin-left: auto;
}
nav button span:first-child {
  min-width: 15px;
}
.guide-group {
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #798c9d;
  margin: 17px 7px 8px;
}
.guide-group:first-child {
  margin-top: 0;
}
.sidebar-bottom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.snapshot {
  margin-top: 12px;
  padding-top: 10px;
}
.heading-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.heading-actions button {
  font-size: 10px;
}
.map-heading {
  min-height: 137px;
  padding-top: 22px;
  padding-bottom: 17px;
}
#chapter-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex-shrink: 0;
  background: #10161d;
}
#chapter-tabs button {
  font-size: 10px;
  white-space: nowrap;
  border-color: transparent;
  color: #92a2b5;
  padding: 7px 9px;
}
#chapter-tabs button span {
  font: 9px monospace;
  margin-right: 7px;
  opacity: 0.7;
}
#chapter-tabs button.active {
  background: #1a3029;
  border-color: #365b4c;
  color: #a4e4cc;
}
.canvas-label {
  max-width: calc(100% - 42px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 8px;
}
#details .guide-question {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.5px;
}
#details > p {
  font-size: 13px;
}
.guide-outcome {
  margin: 22px 0;
  border-left: 2px solid var(--lib);
  padding-left: 15px;
}
.guide-outcome h4 {
  margin: 0 !important;
}
.guide-outline {
  display: grid;
  gap: 10px;
}
.guide-outline button {
  padding: 14px;
  text-align: left;
  background: #141f28;
  border-color: #30414e;
}
.guide-outline button > span {
  font: 10px monospace;
  color: var(--lib);
  margin-right: 9px;
}
.guide-outline button strong {
  font-size: 13px;
  font-weight: 500;
}
.guide-outline button p {
  margin: 8px 0 !important;
  font-size: 12px !important;
}
.guide-outline button small {
  font: 9px monospace;
  color: var(--lib);
}
.guide-checkpoints {
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: checkpoint;
}
.guide-checkpoints li {
  counter-increment: checkpoint;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.guide-checkpoints h4 {
  margin: 0 !important;
  font: 14px/1.5 system-ui !important;
  color: #d7e3ee !important;
  letter-spacing: 0 !important;
}
.guide-checkpoints h4:before {
  content: counter(checkpoint, decimal-leading-zero);
  font: 10px monospace;
  color: var(--lib);
  margin-right: 10px;
}
.guide-checkpoints p {
  margin: 8px 0 12px !important;
  font-size: 12px !important;
}
.guide-reference {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #17232b;
  border-color: #304654;
}
.guide-reference strong {
  font: 11px monospace;
  color: #b6dfcd;
  display: block;
  overflow-wrap: anywhere;
}
.guide-reference small {
  display: block;
  font: 10px/1.6 monospace;
  color: #899eaf;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.guide-diagnostic {
  background: #1c242b;
  border: 1px solid #3b484f;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 26px;
}
.guide-diagnostic h4 {
  margin: 0 !important;
  color: #edba72 !important;
}
.guide-diagnostic p {
  margin: 8px 0 0 !important;
  font-size: 12px !important;
}
.guide-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0;
}
.guide-pager button,
.guide-related button {
  font-size: 11px;
}
.guide-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
#reference-trace {
  margin-left: 12px;
}
@media (max-width: 1100px) {
  .map-heading {
    padding-left: 18px;
    padding-right: 18px;
  }
  .map-heading h2 {
    font-size: 22px;
  }
  .header-right {
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    overflow: visible;
    padding: 14px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    min-height: 0;
    max-height: none;
  }
  .guide-group {
    display: none;
  }
  nav button {
    width: auto;
    margin: 0;
    font-size: 11px;
    flex-shrink: 0;
  }
  .sidebar .search {
    margin-bottom: 11px;
  }
  #chapter-tabs {
    padding: 8px 12px;
  }
  .map-heading {
    min-height: 125px;
    padding: 15px;
  }
  .heading-actions {
    max-width: 100px;
  }
  .map-hint {
    display: none;
  }
  #details .guide-question {
    font-size: 22px;
  }
  .sidebar-bottom {
    display: none;
  }
}
.wire.resource {
  stroke-dasharray: 3 5;
}
.guide-checkpoints .guide-reference:hover {
  border-color: var(--lib);
}

#viewport,
#viewport * {
  -webkit-user-select: none;
  user-select: none;
}
