
:root {
  --bg: #f6f3fb;
  --panel: #ffffff;
  --line: #ddd5ea;
  --text: #2f2540;
  --subtle: #6f6387;
  --accent: #7e5ab7;
  --accent-2: #b587f7;
  --node-old: #7e5ab7;
  --node-2026: #cb8cff;
  --link: #bcb0d1;
  --link-active: #6b50a4;
  --shadow: 0 8px 24px rgba(72, 49, 115, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #faf8fd 0%, #f1ecf9 100%);
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 20px 24px 10px;
}
.topbar h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
}
.subtitle {
  margin: 0;
  color: var(--subtle);
}
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.controls input {
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
}
.controls button, .details a.button-link {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.controls button:hover, .details a.button-link:hover { background: #faf7ff; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 10px 24px 24px;
  min-height: calc(100vh - 90px);
}
.graph-panel, .card {
  background: var(--panel);
  border: 1px solid rgba(126, 90, 183, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.graph-panel {
  position: relative;
  overflow: hidden;
}
.legend {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  display: flex;
  gap: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  font-size: 0.9rem;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-old { background: var(--node-old); }
.dot-2026 { background: var(--node-2026); }
#network {
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 620px;
  display: block;
}
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  padding: 16px 18px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  margin: 0;
}
.stats dt { color: var(--subtle); }
.stats dd { margin: 0; font-weight: 600; }
.details.empty {
  color: var(--subtle);
  line-height: 1.6;
}
.detail-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.meta-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  margin: 0 0 14px;
}
.meta-list dt { color: var(--subtle); }
.meta-list dd { margin: 0; font-weight: 600; }
.help-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.75;
  color: var(--subtle);
}
.link-line {
  stroke: var(--link);
  stroke-opacity: 0.65;
}
.link-line.active {
  stroke: var(--link-active);
  stroke-opacity: 0.9;
}
.node circle {
  stroke: white;
  stroke-width: 1.5px;
}
.node text {
  font-size: 11px;
  fill: #33284a;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.96);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.node.dimmed circle, .node.dimmed text { opacity: 0.18; }
.node.active text { font-weight: 700; }
.node.active circle { stroke: #2e2146; stroke-width: 2.5px; }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  #network { height: 70vh; min-height: 500px; }
}
@media (max-width: 680px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .controls { flex-direction: column; align-items: stretch; }
  .controls input { min-width: 0; width: 100%; }
}
