/* Shared shell. design-tokens.css is the single palette and type source. */
/* Do not opt into cross-document View Transitions: embedded browsers can abort
   them during normal navigation, producing a visible flash and console error. */
::view-transition-old(root),::view-transition-new(root){animation-duration:.08s}
.re-powered .skip-link { z-index:6001; }
.re-legacy-header[hidden] { display:none!important; }
.re-shell { position:sticky; top:0; z-index:5000; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:24px; min-height:var(--re-shell-height,64px); padding:8px 24px; border-bottom:1px solid var(--re-line); background:var(--re-surface); color:var(--re-ink); font-size:13px; line-height:1.5; box-shadow:none; backdrop-filter:none; }
.re-shell a { color:inherit; text-decoration:none; }
.re-brand { font-weight:760; letter-spacing:-.025em; white-space:nowrap; }
.re-navigation { display:flex; justify-content:center; flex-wrap:wrap; gap:4px 20px; }
.re-navigation a { display:inline-flex; align-items:center; min-height:44px; border-bottom:2px solid transparent; white-space:nowrap; color:var(--re-muted); transition:color .16s ease,border-color .16s ease; }
.re-navigation a:hover { color:var(--re-accent); }
.re-navigation a[aria-current] { border-bottom-color:var(--re-accent); color:var(--re-ink); font-weight:720; }
.re-shell-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.re-shell-actions form { margin:0; }
.re-shell button,.re-palette button { min-height:42px; padding:8px 12px; border:1px solid color-mix(in srgb,var(--re-line) 82%,transparent); border-radius:8px; color:var(--re-ink); background:var(--re-surface); font:inherit; cursor:pointer; transition:border-color .16s ease,background .16s ease; }
.re-shell button:hover { border-color:var(--re-accent); background:var(--re-accent-soft); }
.re-shell a:focus-visible,.re-shell button:focus-visible,.re-palette :focus-visible,.re-workspace :focus-visible { outline:var(--re-focus); outline-offset:3px; }
.re-shell .re-menu { display:none; }
.re-palette { width:min(620px,calc(100% - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:24px; border:1px solid var(--re-ink); background:var(--re-surface); color:var(--re-ink); }
.re-palette::backdrop { background:var(--re-overlay); }
.re-palette-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px; }
.re-palette-heading h2 { margin:0; font-size:24px; }
.re-palette label { display:block; margin-bottom:8px; font-size:14px; }
.re-palette input { width:100%; min-height:48px; padding:12px; border:1px solid var(--re-line); background:var(--re-paper); color:inherit; font:inherit; }
.re-command-results { display:grid; gap:6px; margin-top:16px; max-height:45dvh; overflow:auto; }
.re-command-results button { width:100%; text-align:left; }
.re-palette [role=status] { font-size:14px; line-height:1.6; }
.re-powered .button,.re-powered .reset-view { min-height:44px; }
.re-powered form[aria-busy=true] { cursor:progress; }
.re-atlas .atlas { height:calc(100dvh - var(--re-shell-height)); }
.re-atlas .detail-panel { height:calc(100dvh - var(--re-shell-height)); }
.re-atlas #search-results button { grid-template-columns:1fr; line-height:1.5; }
.re-atlas #progress-total { max-width:65%; line-height:1.5; text-align:right; }

/* Atlas interaction: primary drag rotates the 3D view; right drag pans it. */
.re-atlas .map-canvas{cursor:grab}
.re-atlas .map-canvas.is-orbit-mode{cursor:grab}
.re-atlas .map-canvas{bottom:76px}
.re-atlas .map-canvas.is-panning{cursor:grabbing}
.re-atlas .map-canvas.is-orbiting{cursor:grabbing}
.re-atlas .research-node{
  overflow:visible;
  color:transparent;
  background:var(--re-accent);
  border:1px solid rgba(var(--rw-rgb-text),.32);
}
.re-atlas .research-node:hover{background:var(--re-ink)}
.re-atlas .research-node.is-selected{background:var(--re-ink);color:transparent;border:2px solid var(--re-sea);box-shadow:0 0 0 3px var(--re-sea)}
.re-atlas .research-node-label{
  position:absolute;
  left:50%;
  top:calc(100% + 8px);
  width:max-content;
  max-width:150px;
  padding:3px 6px;
  border-radius:2px;
  background:var(--re-surface);
  color:var(--re-ink);
  font-size:12px;
  font-weight:650;
  line-height:1.25;
  letter-spacing:-.01em;
  text-align:center;
  white-space:normal;
  word-break:keep-all;
  transform:translateX(-50%);
  pointer-events:auto;
  cursor:pointer;
  box-shadow:none;
}
.re-atlas .research-node.is-selected .research-node-label{background:var(--re-ink);color:var(--re-surface)}
.re-atlas .record-node{border-radius:24%}

@media(max-width:1180px) {
  .re-shell { grid-template-columns:1fr auto; gap:8px 16px; }
  .re-shell-actions { justify-content:flex-end; }
  .re-navigation { grid-column:1/-1; grid-row:2; justify-content:flex-start; }
}
@media(max-width:720px) {
  .re-shell { position:relative; grid-template-columns:1fr auto; padding:10px 16px; gap:8px; }
  .re-shell .re-menu { display:block; }
  .re-navigation,.re-shell-actions { display:none; grid-column:1/-1; }
  .re-shell.is-menu-open .re-navigation { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-row:auto; gap:4px 12px; }
  .re-shell.is-menu-open .re-shell-actions { display:flex; justify-content:flex-start; }
  .re-atlas .atlas { height:auto; min-height:calc(100dvh - var(--re-shell-height)); }
  .re-atlas .detail-panel { height:auto; min-height:78dvh; }
  .re-atlas .map-canvas{bottom:110px}
  .re-atlas .research-node-label{display:none;font-size:11px;max-width:110px}
  .re-atlas .research-node.is-selected .research-node-label,
  .re-atlas .research-node:focus-visible .research-node-label{display:block}
}
@media(prefers-reduced-motion:reduce) { .re-powered { scroll-behavior:auto; } }

.re-powered .edge-swatch { width:33px; height:12px; flex:0 0 33px; }
.re-powered .edge-swatch path { fill:none; stroke:currentColor; }
