:root {
  color-scheme: dark;
  --bg: #101c20;
  --text: #dce5dc;
  --muted: #91a8a5;
  --green: #95d7b0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.7 "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
}
header {
  height: 136px;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #304448;
}
small {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--green);
}
h1,
h2 {
  font-family: "Songti SC", serif;
  font-weight: 500;
}
h1 {
  font-size: 30px;
  margin: 0;
}
header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  height: calc(100dvh - 136px);
}
main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
aside {
  padding: 22px;
  background: #152429;
  border-left: 1px solid #304448;
  overflow: auto;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  flex-wrap: wrap;
}
button,
select {
  font: inherit;
  color: var(--text);
  border: 1px solid #405c5c;
  background: #1e3439;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
}
button:hover {
  border-color: var(--green);
}
input[type="search"] {
  width: 100%;
  font: inherit;
  padding: 11px;
  background: #101c20;
  border: 1px solid #405c5c;
  color: var(--text);
  border-radius: 5px;
  margin: 22px 0 12px;
}
.toolbar label {
  font-size: 12px;
  color: var(--muted);
}
#graph {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 180px;
  touch-action: none;
  cursor: grab;
  background: radial-gradient(ellipse, #1a3032, transparent 75%);
}
#graph:active {
  cursor: grabbing;
}
.node {
  cursor: pointer;
}
.node rect {
  fill: #172c30;
  stroke-width: 1.4;
}
.node text {
  fill: #e0e9df;
  font-size: 12px;
  pointer-events: none;
}
.node:focus rect,
.node:hover rect {
  stroke: white;
  stroke-width: 2.5;
}
.node.selected rect {
  fill: #304c46;
  stroke: white;
  stroke-width: 2.5;
}
.edge {
  fill: none;
  stroke: #6d9891;
  stroke-width: 1.2;
  opacity: 0.38;
  marker-end: url(#arrow);
}
.edge.active {
  opacity: 0.9;
  stroke-width: 2;
}
.dim {
  opacity: 0.09;
}
.layer {
  fill: #78978e;
  font-size: 11px;
  letter-spacing: 2px;
}
footer {
  padding: 12px 22px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid #304448;
}
h2 {
  font-size: 24px;
  line-height: 1.5;
}
h3 {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
}
aside p {
  color: #b6c8c3;
  font-size: 13px;
}
#results {
  max-height: 180px;
  overflow: auto;
}
#results button,
.links button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
}
#legend {
  border-top: 1px solid #304448;
  margin-top: 26px;
  padding-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
#legend span {
  display: inline-block;
  margin: 5px 8px 5px 0;
}
#legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.read {
  display: block;
  border: 1px solid #56796a;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  margin: 18px 0;
}
.note {
  color: #e3b66f;
}
@media (max-width: 800px) {
  header {
    height: 120px;
    padding: 16px;
  }
  header h1 {
    font-size: 25px;
  }
  header > a {
    font-size: 12px;
  }
  .workspace {
    height: auto;
    display: block;
  }
  main {
    height: 62dvh;
  }
  aside {
    border-left: 0;
    border-top: 1px solid #304448;
    max-height: 55dvh;
    padding: 18px;
  }
  .toolbar {
    padding: 10px;
    gap: 5px;
  }
  button,
  select {
    font-size: 12px;
  }
  footer {
    padding: 8px 12px;
  }
  #graph {
    min-height: 180px;
  }
}
