* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #19354b;
  background: #f6f8fa;
  font-family: system-ui, "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
}
header {
  padding: 20px 24px 12px;
  background: white;
  border-bottom: 1px solid #dce3e9;
}
h1 {
  font-size: 23px;
  margin: 0 0 6px;
}
p {
  margin: 6px 0;
  line-height: 1.6;
}
.muted {
  color: #5c6d79;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}
label {
  display: grid;
  gap: 5px;
}
select,
button {
  font: inherit;
  border: 1px solid #b9c8d3;
  border-radius: 5px;
  background: white;
  color: inherit;
  padding: 7px 10px;
}
select {
  max-width: 360px;
}
button {
  cursor: pointer;
}
button:hover {
  background: #eaf1f7;
}
button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #2c7abb;
  outline-offset: 2px;
}
.legend {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}
.swatch {
  display: grid;
  place-items: center;
  width: 60px;
  height: 28px;
  font-size: 12px;
}
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 690px;
}
.canvas {
  position: relative;
  height: calc(100vh - 220px);
  min-height: 600px;
  background: white;
  overflow: hidden;
  touch-action: none;
}
.canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}
.canvas .export-header {
  display: none;
}
.canvas .node {
  cursor: pointer;
  transition: opacity 0.15s;
}
.canvas .edge {
  transition: opacity 0.15s;
}
.canvas.dragging {
  cursor: grabbing;
}
.zoom {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: flex;
  gap: 6px;
}
.hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  max-width: 260px;
  font-size: 12px;
  color: #5c6d79;
  pointer-events: none;
}
.details {
  background: white;
  border-left: 1px solid #dce3e9;
  padding: 18px;
  overflow: auto;
  max-height: calc(100vh - 220px);
  min-height: 600px;
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
  line-height: 1.5;
}
h3 {
  font-size: 14px;
  margin: 18px 0 7px;
}
.counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.counts b {
  font-size: 25px;
  display: block;
}
.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
a {
  color: #17699d;
  text-underline-offset: 3px;
}
.neighbors {
  display: grid;
  gap: 5px;
}
.neighbors button {
  text-align: left;
  border: 0;
  padding: 5px 0;
  border-radius: 0;
  font-size: 13px;
}
.evidence {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.foot {
  padding: 14px 24px;
  border-top: 1px solid #dce3e9;
  color: #5c6d79;
  font-size: 12px;
}
.empty {
  color: #667780;
}
@media (max-width: 800px) {
  .main {
    grid-template-columns: 1fr;
  }
  .canvas {
    height: 620px;
    min-height: 0;
  }
  .details {
    border-left: 0;
    border-top: 1px solid #dce3e9;
    max-height: none;
    min-height: 0;
  }
  header {
    padding: 16px;
  }
  select {
    max-width: calc(100vw - 40px);
  }
  .hint {
    display: none;
  }
}
