/* Atlas v2: a quiet, fixed 3D knowledge map. Public semantics remain in DOM controls. */
:root {
  --atlas-node-strong:var(--re-ink);
  --atlas-node:var(--re-muted);
  --atlas-node-neighbor:var(--re-ink-soft);
  --atlas-node-muted:var(--re-line);
  --atlas-canvas:var(--re-surface);
  --atlas-chrome:rgba(var(--rw-rgb-air),.94);
}

@media (min-width:721px) {
  body.re-atlas>.re-shell { display:none; }
  .re-atlas .atlas,
  .re-atlas .detail-panel { height:100dvh; }
}

.re-atlas .atlas,
.re-atlas .map-pane,
.re-atlas .map-canvas.has-force-atlas .atlas-force-graph { background:var(--atlas-canvas); }
.re-atlas .map-header {
  top:18px;
  left:18px;
  right:18px;
  align-items:flex-start;
  padding:0;
  border:0;
  background:transparent;
  pointer-events:none;
}
.re-atlas .map-header>* { pointer-events:auto; }
.re-atlas .brand {
  min-height:44px;
  padding:7px 10px 7px 8px;
  border:1px solid rgba(var(--rw-rgb-text),.18);
  border-radius:8px;
  background:var(--atlas-chrome);
}
.re-atlas .brand-mark { width:30px; height:30px; border-radius:50%; font-size:9px; background:var(--atlas-node-strong); }
.re-atlas .brand strong { font-size:12px; }
.re-atlas .atlas-scope-crumb { font-size:9px; }
.re-atlas .map-tools { padding:3px; border:1px solid rgba(var(--rw-rgb-text),.18); border-radius:8px; background:var(--atlas-chrome); }
.re-atlas .map-tools .read-link { min-height:36px; padding:9px 10px; }
.re-atlas .round-button,.re-atlas .info-button { border-radius:6px; }
.re-atlas .round-button { width:36px; height:36px; background:transparent; color:var(--atlas-node-strong); font-size:19px; transform:none; }
.re-atlas .round-button:hover { background:rgba(var(--rw-rgb-text),.08); transform:none; }
.re-atlas .info-button { border:0; background:transparent; color:var(--atlas-node-strong); }

.re-atlas .relation-controls {
  top:80px;
  left:18px;
  width:min(270px,calc(100% - 36px));
  padding:0 12px 12px;
  border:1px solid rgba(var(--rw-rgb-text),.18);
  border-radius:8px;
  background:var(--atlas-chrome);
}
.re-atlas .relation-controls:not([open]) { width:auto; padding:0 12px; }
.re-atlas .relation-controls summary { min-height:40px; padding-block:10px; font-size:11px; }
.re-atlas .relation-controls fieldset label { min-height:38px; }
.re-atlas .guide { top:72px; right:18px; border:1px solid rgba(var(--rw-rgb-text),.24); border-radius:8px; background:var(--atlas-chrome); box-shadow:none; }

.re-atlas .map-footer {
  right:18px;
  bottom:18px;
  left:auto;
  width:auto;
  min-height:46px;
  display:flex;
  gap:14px;
  padding:5px;
  border:1px solid rgba(var(--rw-rgb-text),.18);
  border-radius:8px;
  background:var(--atlas-chrome);
}
.re-atlas .map-footer>div:first-child { display:none; }
.re-atlas .map-actions { gap:3px; }
.re-atlas .map-actions .reset-view { min-height:36px; min-width:36px; padding-inline:9px; border:0; border-radius:6px; background:transparent; font-size:10px; }
.re-atlas .map-actions .reset-view:hover { background:rgba(var(--rw-rgb-text),.08); color:var(--atlas-node-strong); }
.re-atlas .map-actions #rotate-mode[aria-pressed="true"],
.re-atlas .map-actions #layout-mode[aria-pressed="true"] { color:var(--re-white); background:var(--atlas-node-strong); }
.re-atlas .map-canvas { bottom:0; }

.re-atlas .map-canvas.has-force-atlas .atlas-force-graph {
  position:absolute;
  z-index:0;
  inset:0;
  overflow:hidden;
  background:var(--re-paper);
}
.re-atlas .map-canvas.has-force-atlas .atlas-force-graph canvas {
  display:block;
  outline:none;
}
.re-atlas .map-canvas.has-force-atlas .connections { z-index:1; pointer-events:none; }
.re-atlas .map-canvas.has-force-atlas .research-node {
  position:absolute;
  display:block;
  width:34px;
  height:34px;
  min-width:0;
  min-height:0;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:50%;
  background:transparent;
  color:transparent;
  box-shadow:none;
  opacity:1;
  transform:translate(-50%,-50%);
  transition:none;
  will-change:left,top,visibility;
  pointer-events:auto;
}
.re-atlas .map-canvas.has-force-atlas .research-node:hover,
.re-atlas .map-canvas.has-force-atlas .research-node.is-selected {
  border:0;
  background:transparent;
  box-shadow:none;
  filter:none;
  transform:translate(-50%,-50%);
}
.re-atlas .map-canvas.has-force-atlas .research-node-label {
  position:absolute;
  top:var(--force-label-offset,26px);
  left:50%;
  display:block;
  width:max-content;
  max-width:min(180px,28vw);
  display:none;
  padding:2px 4px;
  border:0;
  border-radius:2px;
  background:rgba(var(--rw-rgb-air),.86);
  color:var(--atlas-node-strong);
  font-size:11px;
  font-weight:620;
  line-height:1.3;
  text-align:center;
  white-space:normal;
  word-break:keep-all;
  transform:translateX(-50%);
  pointer-events:auto;
  cursor:pointer;
}
.re-atlas .map-canvas.has-force-atlas .research-node.entity-root .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node.entity-research .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node.is-selected .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node.is-hovered .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node:hover .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node:focus-visible .research-node-label { display:block; }
.re-atlas .map-canvas.has-force-atlas .research-node.is-selected .research-node-label {
  background:var(--atlas-node-strong);
  color:var(--re-white);
}
.re-atlas .map-canvas.has-force-atlas .research-node.is-muted .research-node-label,
.re-atlas .map-canvas.has-force-atlas .research-node.is-context-muted .research-node-label { opacity:.12; }
.re-atlas .map-canvas.has-force-atlas .research-node:focus-visible .research-node-label {
  outline:var(--re-focus);
  outline-offset:3px;
}
.re-atlas .map-canvas.has-force-atlas.is-layout-editing .research-node { cursor:move; }

.re-atlas .connections .relation-edge { stroke:var(--re-muted); stroke-width:.7; opacity:.24; }
.re-atlas .connections .relation-edge.is-active { stroke:var(--atlas-node-strong); stroke-width:1; }
.re-atlas .detail-panel {
  width:min(430px,92vw);
  border-left:1px solid rgba(var(--rw-rgb-text),.18);
  background:var(--re-surface);
}
.re-atlas .detail-toggle { right:min(430px,92vw); width:42px; min-height:62px; border-radius:8px 0 0 8px; }
.re-atlas .detail-scroll { padding:24px 28px 36px; }
.re-atlas .detail-intro h1 { font-size:clamp(34px,3vw,48px); letter-spacing:-.045em; }
.re-atlas .detail-actions button,.re-atlas .atlas-child-link { border-radius:4px; }

@media(max-width:720px) {
  .re-atlas .map-header { top:10px; left:10px; right:10px; }
  .re-atlas .map-tools .read-link,.re-atlas .info-button { display:none; }
  .re-atlas .relation-controls { top:64px; left:10px; }
  .re-atlas .map-footer { right:10px; bottom:10px; }
  .re-atlas .map-actions #rotate-mode,
  .re-atlas .map-actions #layout-mode { display:none; }
  .re-atlas .detail-panel { transition:none; }
  .re-atlas .map-canvas.has-force-atlas .research-node-label { max-width:110px; font-size:11px; }
  .re-atlas .map-canvas.has-force-atlas .research-node.entity-root .research-node-label,
  .re-atlas .map-canvas.has-force-atlas .research-node.entity-research .research-node-label,
  .re-atlas .map-canvas.has-force-atlas .research-node.is-selected .research-node-label,
  .re-atlas .map-canvas.has-force-atlas .research-node.is-hovered .research-node-label,
  .re-atlas .map-canvas.has-force-atlas .research-node:hover .research-node-label,
  .re-atlas .map-canvas.has-force-atlas .research-node:focus-visible .research-node-label { display:block; }
}

@media (prefers-reduced-motion:reduce) {
  .re-atlas .detail-panel,.re-atlas .detail-toggle { transition:none; }
}
